It makes my head spin to remember how many technological changes we have experienced in the last years. For those of us who have lived more than four decades, we not only lived during the arrival of the internet revolution, but also the PC itself and its early evolution.
I remember back in those days in 1989 how easy it was to build a small business system of Accounts Payable using dBase IV or Clipper (Clipper was an old language that came as a compiler bundled with database capabilities). There was not object orientation, not even the concept of components, back in those days if you wanted to have some reusable code you could only create your own .lib file by compiling and linking your functions in a procedural library. The database, front end code and any business rules used to live normally within the same executable. I have to admit that it was easy and fun… (as long as you didn’t need to maintain the code over time…) but not by far as flexible as the tools we have today.
Nowadays the monolithic app experience is part of the past. Even if you are creating a VBA application for automating MS Office tasks, you come to the realization that even your VBA code should not be monolithic and then the layered design arises as the solution to code reuse, cleanliness and maintainability among others. That way we find once and again that for creating a professional app we need to think in creating at least three different layers.
- Front End Layer (Interface or GUI)
- Message Layer (Ideally when Web Services are necessary for message transport)
- Business Layer (can be in the message layer)
- Data Layer (your database and other data sources)
How to implement these different layers or components in an app depends many times in the developer’s decision, which can be based on a number of reasons. I used to have my favorite mix of technologies for creating a web app myself which years ago was to use MSSQL, ASP.NET and jQuery with HTML and CSS to build enterprise apps, then evolved to use MySQL as the Data Layer, PHP Zend Apigility for the Message Layer and Ionic / Electron with AngularJS for the front end. As you can see, there are at least three technologies that you need to master in order to build a professional enterprise, web or even mobile app, one technology or language per layer to be more precise. Now to the combination of technologies you utilize for creating such apps is called a “stack”.
Then we have the need for a tool that will help us when we need to build a website with server based technology, which is also a very valid option when you have certain logic for rendering that want done on the server, a tool like ASP.NET, Symfony, Zend Framework (PHP) or even JSP, there it was. Express. Although I must be very honest here and admit that personally Express doesn’t convince me a lot compared with their Microsoft, Java and PHP counterparts, but it is still a young and evolving technology that I hold no doubts that in the next few years will become as robust as its PHP (at least) competitors.
So, basically what are the advantages of using the Full Stack approach in our apps? Well, for example let’s assume for this scenario that we are using AngularJS 2, NodeJS with Loopback.js and a Firebase or MongoDB backend and let’s consider some of them:
Using the same language saves time
No-SQL is really fast and effective for processing millions of records
As long as you are reading and not writing data. But yet again, most web and mobile apps have normally a 1:10 ratio of write vs. read operations which makes a database engine like Mongo or Firebase the perfect choice for these scenarios.
Using the same language most of the times means also using the same IDE
Most of the languages and tools are Open Source which means saving money
If you are like me you probably love Microsoft languages and technologies, and it is truth, most of Microsoft development tools and languages have been for a long time the best tools in its class in the world. A clear proof of this is their IDE Visual Studio, which still has no match in the Windows world. However there are two problems with Microsoft, many will not agree with a so controversial point of view, but I will hold to my personal opinion:
1) Microsoft tends to kill its own products and suddenly announce after spending millions of dollars in promoting them, that they will lose support in matter of months. Many of us lived that bitter experience with Silverlight and even WPF, and I don’t know you, but I don’t forgive a company easily for betraying my trust as a developer like that. Yes I was one of those developers than in 2008 invested all my time, money and effort in learning Silverlight and become an expert with this technology, only for one year after my investment see a an event ridiculously called “Silverlight FireStarter” be the beginning of the end for the product. The name was quite accurate, it was a fire starter, like taking Silverlight, putting gasoline on it and then start the fire… Want some other example? XNA. Yes, Microsoft did it and will do it again.. and again.. and yet again…
2) Microsoft tools are expensive, if buying a few copies of Visual Studio and a few subscriptions to MSDN doesn’t sound like a lot of money to you, would it be an IIS hosting with Windows Server, (comparing with the costs of a server with a LAMP stack)? What about a SQL Server license package? Even the very acclaimed Microsoft cloud platform, Windows Azure with SQL Azure, which is not extremely expensive with its “Pay as you go” plans, constrains your application to run only in Windows Azure, try to taking it out to another server solution and you have to re-write the whole thing. An application written for Windows Azure will always need to be in the Azure cloud. This may seem too obvious, but the truth is that if you have a full stack JS app, you can take it with you to virtually any hosting, as it doesn’t need a specific web server environment to run, at least, no as specific as Azure for sure.
Want to move your app to Web? Mobile? Desktop? Only change Front End code… a little!
Is as simple as it sounds, for example let’s say we have a web app developed using AngularJS 2 and Bootstrap 3, the very same app will work in Mobile perfectly by adding some Cordova functions and wrapping the app properly in a Cordova project. Want something more specialized and an even more native user experience? Change the Front-End of the app to use the Ionic Framework. (Still most of your AngularJS Front-End code will be reusable), Want to move the app now to a native Desktop Application that won’t have to depend on a Browser? We only make a few changes to the Front-End code and add support for Electron and you have your desktop app working as natively and nicely as, let’s say the Atom Editor. So easily, saves time and most importantly… money, which is a scarce resource for any startup these days.