re: Rails: The Struggle Is Real VIEW POST


Any moderately complex Rails App is a nightmare to maintain. What havent i seen in the past few yrs of Rails Development.

Starting with Skinny Controllers fat models.. ohh no now the Models are fat!
Well lets use decorators to trim some fat, but wait what about the complex logic that may not fit here? Ahh we have concerns, the only problem is this damn concern has no concern about breaking the MVC!

Few weeks and say, You know what lets extract the business logic and concerns into a external loading library that makes so much sense right?

Few months down the line, hmm i think since we are already using an external library let us "gemify" the library and host it in our internal gemserver. Some features and few weeks later lets gemify all major parts of the Application!

Some more features and few months down the line, lets refactor the s*** out of this code its becoming too complex.

Few more months half a dozen refactoring later, you know what this is getting out of hand lets look for a solution outside of rails ecosystem. After a bit of searching and looking at other rails installs and conf videos.

Aha, just rediscovered SOA (Service oriented architecture) but wait we are hipster rubyists lets not call it with a bigoted evil corporatized name like SOA, it needs a Hippie name, as ascribed by our beloved benevolent dictator DHH.

Lets call it "extraction of business logic" into services! or maybe something simpler like Lambda Architecture?

Well, after some time and few api requests later,

Hmm you see since we have already extracted few of the business logic as gems and then as independent services modeled around lambda architecture (because thats the most hipster thing to do plus i like netflix). Lets rewrite the services in golang or Java or Scala to make it faster. Yippie!!

Meanwhile the other rubyists, meh, i am not going to install JVM on my machine lets look for another VM to install, that can be used to spin our new services.

Suggestion: Well lets use Erlang VM because Whatsapp used it and Dave has written an awesome book on Elixir a new lang on Erlang VM.

Thats your rails app story!

code of conduct - report abuse