|
|
|
|
|
by pdimitar
3680 days ago
|
|
You don't want to know. I inherited and am currently tech-leading a large e-commerce project powering an e-shop doing $10k+ sales a day. Even a small bugfix or a very minor UI addition is taking days because outdated tests are breaking, because there are dozens of tight integrations directly in the code, because there's zero separation of concerns, and awfully inefficient ActiveRecord queries everywhere. Making a cart checkout with ONE item takes 50+ ActiveRecord queries. Yep... It is extremely challenging and very educational for me, and I appreciate the experience. I've always been a fan of repairing and improving things -- but truth be told, it gets tiresome and annoying VERY quickly. I am currently working hard to stabilize the entire process of small refactorings for the sake of the new features/bugfixes, streamlining deployment, making full separate QA/Staging environment (yes, even that wasn't addressed by the previous team) so we can test with confidence and without fearing we'll break Prod, and to reduce the 3rd party API dependencies -- right now they are 20+. I am hopeful that after I stabilize the project and make the process of introducing new code easier and quicker, I could then make the case for gradual exodus to Elixir/Phoenix. Realistically, I am not seeing that Rails abomination I inherited to be a sustainable job for even one year. Inevitably I'll burn out, the customers will lose patience, and my employer will be unhappy both with me and the customers. Not cool for anyone involved. So I'll try to gradually run away from Rails. As pointed by numerous smart people here, it's suited for medium-sized projects at best. Even Sinatra/Padrino and 50+ attached libraries would have been much easier to maintain. |
|
On top of that changing the database becomes a royal nightmare because the database is what defines this AR model that all of your buisness logic and application layer spaghetti dependency relies on. The databases usually end up full of garbage because without complex validations and lots and lots of tests which by the way were never written ruby and rails will dump any trash into your db whenever. So you end up with columns with like 10 variations of the definition of NULL or FALSE.
Usually around this point your app just slips into a state of quantum uncertainty. It essentially ceases to behave deterministically at least when viewed from within the bounds of human perception.
Its hard for experienced developers to bend rails in away so that things don't become overly dependent on each other and neigh impossible for average or beginner rails developers to manage.
Im just really not impressed with rails at all especially coming off of 6 years of development time on huge enterprise apps written with the c# .net libraries. I mean really they are light years ahead using IOC dependency injection for injecting service apis into controllers while using mapping patterns for keeping buisness and database logic separate. Its the only way to break up large apps and keep them sane and maintainable. Additionally static typing is the only thing that keeps things sane in really large applications doing complex business logic through many layers of interfaces.