I still don't get Single Page Apps

I've been working with web-development for almost 20 years now. Starting out with CGI in Perl, quickly moving to PHP and on to Java Servlets. I've been down the Java Enterprise road, building my own framework in Scala before the days of Play or Lagom.

I've always been fascinated by web-technologies and often amazed by the simplicity of the design of the HTTP protocol and its buddies HTML and CSS. I've enjoyed being able to use the more expressive HTML5 together with the newer additions to CSS.

In my job I've gotten to try out a whole bunch of different web-technologies. Even if it started with Java and EJBs we quickly grew tired of it and started building apps using own framework for Scala which had XML-support built-in the language which made it easy to do templating with composition and inheritance. It was a simple Scala process rendering HTML and CSS on the server side and giving it back to the Web Browser. We developed using this for quite some time and were happy doing so.

But as time went by more and more people in the company started using NodeJS and writing something new called Single Page Application. My first encounted with SPAs was using ExtJS. That experiment did not go very well even we had developers with a lot of experience of ExtJS. I have to admit that it partly failed because I wanted to develop a classic web-app and not a desktop-like app running in the browser.

After ExtJS things turned to Angular and then React and now lately back the Angular again, this time using NG-RX. All this time writing Single Page Applications, instead of being amazed by the simplicity of technologies I've wondered why such complexity is needed on the client side for accomplishing often quite simple things. It feels very far away from the core web-technologies that everything rests on.

To this day I've never got Single Page Applications. Keeping track of the state on client side often leads to weird bugs. Performance was often stated as a reason but from my experience using web-apps I can't say that that is the case. But the worst thing of the SPAs must be the complexity of the applications.

To end this rant on a more positive note I can tell you about a wonderful framework for writing web-apps that I've started to fall in love with. Ruby on Rails. I've always had an interest in Rails but I never really got around to actually using it for something. When I wanted to develop a small hobby-app I finally took the leap and decided to try out Rails.

Not having used Ruby very much it took a while to get going but after a few hours I was amazed of what you could accomplish in very little code. And the main thing, in very descriptive and clear code.

What I like about Rails is that it's close to HTML and CSS with a optional sprinkle of Javascript. When I started out I was writing pure HTML and CSS and as I learned more about the framework I was able to simplify the code using all the helpers provided by the framework.

I love my new Multi-Page-Applications and how simple they are. ❤️