The Rise of the ETA Stack
Investing in your Company’s Technical Future: The Rise of the ETA Stack and the Future of Web Programming
As a business owner, how do you respond when your development team asks for permission to move to a new application stack with a name like, “MEAN”? What happened to the “LAMP” stack that developers talked about last decade? Is MEAN destined to fall into disrepute when new fads emerge? Who will maintain your application then? How about a NICE stack for a change?
When making an investment into the technology that will shape the future of your company, it’s essential to cut through the acronyms and understand the context giving rise to fads and long-term trends. By doing so, we can make investments into systems that provide lasting value, rather than ones that quickly turn into a liability.
LAMP to MEAN: A Brief History of Web Stacks
If your company built a web application in the 1990’s, you were likely to use something called the LAMP stack. A Linux operating system, the Apache web server, the MySQL database, and the Perl, PHP or Python programming languages were the main building blocks chosen by a generation of programmers. With a small stand, or, as some say, the addition of a “kickstand” to the “P” in LAMP, we can include Ruby in this stack as well. Finally, many teams will substitute Postgres instead of MySQL without fundamentally altering this stack.
While dynamically-typed languages have formed an important part of the history of web programming, I believe that the languages typically used in the LAMP and MEAN stacks are declining in popularity, and their use is likely to become a liability rather than an asset for software projects. Gradually, programmers are realizing the benefits of modern systems for static typing, compared to dynamic languages. This is reflected in recent programming language trends.
Advocates of dynamic languages often describe them as easier to use to model a dynamic, fluid world. However, this ignores the reality that we must impose some sort of structure on the world - even if this structure needs to frequently change - in order to make a working software system. Type systems are a part of modern programming languages that allow the programmer to specify a structure for the data that they handle, and the compiler can tell us if there are inconsistencies in the program that the developer wrote. Statically typed languages help the programmer by identifying errors before the programs are run by the tester or the end user. This reduces errors, and makes programs significantly easier to maintain. In contrast, in order to make dynamically-typed applications reliable, and able to be maintained, very experienced developers and large investments in engineering are required in automated and manual testing, just to ensure that chaos doesn’t take over as the platform evolves.
The list continues, but needless to say, I don’t think that a new, dynamically-typed language in the vein of Ruby or Python would rise to popularity today, given what we know about the pain involved in maintenance of large-scale systems in dynamically-typed languages. The time has come to recognize the value of applications written in the ETA Stack.
The Rise of the ETA Stack
ETA is an acronym that we came up with at Stack Builders to describe an emerging trend in web programming. An ETA Stack is an, “Expressively Typed Application” stack, and we feel that this is part of a larger trend in engineering large-scale systems that solves problems better than the traditional LAMP or MEAN stacks.
What is an expressive type? Types in programming languages are something that has been given a lot of thought over the years. One of the most important books on types in programming languages is called, unsurprisingly, Types and Programming Languages. It says,
Expressive type systems offer numerous “tricks” for encoding information about structure in terms of types.1
While all programs necessarily have structures of data that they can handle, in the traditional LAMP and MEAN stacks, languages are used which don’t leave much room for this structure to be expressed. This limits the ability of the compiler to assert correctness. As a result, manual or automated testing costs increase, and program extension and maintenance is more problematic.
At the persistence level of the application, the ETA Stack developer also makes prudent choices. The ETA Stack developer realizes that systems which were popular in the MEAN stack, such as MongoDB and Redis, don’t allow for data type constraints and may lead to data loss in certain cases. They realize that those systems often lead to higher development costs, so instead, they choose tools such as Postgres which allows the specification of a structure that reflects the business domain of the application, and which provides helpful guarantees against data loss.
The ETA Stack team spends more time thinking about ways to add significant business value to applications, and less time debugging code through laborious work and manual testing than they did when writing the last generation of complex web applications. Investing in business applications created using the ETA Stack gives benefits in terms of maintainability, extensibility and a reduction in errors that are found by end-users.
At Stack Builders, we don’t feel that the ETA Stack is another passing fad. Instead, it represents a growing level of maturity in the software industry. To put it in somewhat more poetic terms, ETA Stack developers recognize that “freedom is nothing more than nothing left to lose.” In the legacy LAMP and MEAN stacks, massive flexibility lead to systems that were expensive to test and hard to change. ETA Stack developers choose efficient and pragmatic tools so that software can more easily meet business needs, now and in the future.
Migrating from LAMP or MEAN to ETA
If you have an application that has been written using the LAMP or MEAN stacks, does this mean that ETA is something that can only be contemplated for future projects? Not necessarily. We have seen projects that are successful in integrating new ETA Stack components in legacy LAMP or MEAN applications. For example, if you have a traditional Ruby or PHP application, you can substitute ETA Stack API endpoints. Gradually, you can decrease the footprint of the legacy application and allow the ETA Stack to take over. As you replace your legacy stack with an ETA Stack, you should see resources spent on debugging and testing decrease, and team efficiency and motivation increase.
Conclusions and the Future of the ETA Stack
As with any of the previous stacks, ETA is not a silver bullet. You can’t take a team that is inexperienced in software development, and expect them to produce great results. In fact, Stack Builders has seen many ETA-stack applications where the team may have relied too much on the promises of the new stack, and forgotten about engineering practices that we should be relying on as an industry to reduce chances of project failure. That is a topic for another post.
Does the ETA Stack stop with Haskell, PureScript and Elm? Certainly not. New languages are emerging, and existing languages are adopting more expressive types as researchers and language developers understand how to elegantly integrate them into the core language. This is currently happening with dependent types in Haskell, and extensions to Haskell, including Liquid Haskell.
In addition, enthusiastic engineers are working on ways to bring the benefits of languages such as Haskell to the operating system level with Linux distributions such as NixOS2.
While the ETA Stack is not a silver bullet3, it is a promising trend that we have seen emerging in the industry, and if executed well, we see benefits that are not present in legacy stacks such as LAMP and MEAN. It is likely that future software development for the web will continue to move in the direction of the ETA Stack, and this is something that is important to consider as you begin your next project. At Stack Builders, we’ve experienced great success with ETA Stack applications, and we hope that the ETA Stack continues to grow in popularity in the future.
Have an existing project that is proving difficult to maintain and extend, or want to discuss creating a new web application using the ETA Stack? Contact us.
Pierce, Benjamin C.. Types and Programming Languages (Page 27). The MIT Press. Kindle Edition.↩
We’ve recently seen many teams eagerly embrace NixOS, and then later abandon it due to the amount of time that it takes to wrangle it into submission. As of November 4, 2016 we are waiting for the technology to mature before we recommend its use in ETA Stack systems.↩