I was going through Rails mailing list some time ago and something caught my eye. A guy called Greg Navis had written a blog against single page apps. I read it. In my opinion Single Page Apps are a piece of shit. At least shit can be converted to manure.

I was working in a company that was dominated by people who do not know tech, but they had the illusion that what ever they heard first and thought first was right. They got a contract for developing a financial product and they choose Laravel. Good choice. It was chosen by a guy so that once he got an hold of it, he could leave that company to search for less hellish job. Laravel was good choice and they chose Angular for front end. What?

It was all done because people over there saw these job requirements peak and they wanted to switch job. I watched the comedy as the team size grew. They employed close to 10 people to build a financial app, I was wondering whats going on, I could do with just 2 or 3 people with Rails. Laravel is good, I have nothing against it, partly because I haven’t used it a lot, but against Angular and most JS front end frameworks I have lot against. Lot of boiler plate and decision making must be done before we start to attack the business of delivering results to clients.

I have used these JS front end frameworks in my work, it does reduce the load of backend developer significantly, all you need is to generate JSON and not worry about the crappy CSS and design. Being a hardcore programmer, design thought was not in me, I am a person of logic, but the project went at a very slow pace. I used to finish a bunch of API’s and watch team of 3-4 front end developers toil with Angular for days. They envied me because it looked to them that I did almost no work, and yes I did almost no work, I used Rails and it di lot of stuff for me!

Yes if you look at the architecture level, SPA’s looks good. A clean separation between the client and the server, but when it comes to practicality it increases the time to deliver result. The increase in time comes in the form of communication. The front end dev needs to understand the business, the API’s back end devs provide, next he needs to interact with the designer. There is lot of people to people communication and its a bottle neck, consumes lot of time.

Companies in India do love SPA’s, that’s for another reason. If you can show many busy programmers to the client, you can bill more. When I was telling a company in Chennai and offered them a deal in which I can reduce the time and money by reducing head count needed for a project, they seem to worry about profit dropping, because their money comes from increasing complexity and head count. It a curse in India where people use tech for their selfishness (like Apple and Microsoft) rather than common good for humanity and the economy (like free software foundation). Its very bad.

As far as my personal experience goes, I use middleman for small sites and the moment complexity increases, I switch to Rails (nope I haven’t used Sinatra commercially, but its a good one too). Everything I need is there in Rails, the Database to the Front End, all is there and it works like Rolls Royce. You just don’t need to think about it. Rails migration from version to another too is okay, there are clear migration guides, but yes, if your apps are big and not tested, then you might be screwed.

Rails is evolving too. It seems to have some process which I don’t really know what, but the community seems to pick the right stuff. When they moved from prototype + RJS to jQuery I was furious, but they seem to have done the right thing. When they moved to Coffeescript, I was very happy at least I may not need to touch this Javascript directly. I wish they integrated with Opal and ended the web developers misery altogether, but….. WHY ITS NOT HAPPENING? I am telling good people on this earth to kill this evil Javascript because I don’t have the power enough to do it. Please consider…..

If you are saying that I am too biased against Javascript and single page apps, then bloody yes I am. I am because I am biased against inefficiency and things that brings sorrow to programmers. An those who love SPA’s, I curse you, go to hell.

Big companies need something that I don’t understand, I don’t know what they need, perhaps lengthy talks about their app architecture, perhaps lengthy talks about their engineering, bragging to people about how they used their engineering skills and tech insights to have hand picked each and every bit of their application and stitched it together loosing their night sleep. Well, that’s not me!

I am a person who likes to sleep at night, earn handsome, do projects to people who do not have deep pockets. How can I go for a SPA?

Reference

Gregnavis Blog