Searching for the Best Technology Stack
I was recently asked what my favorite programming language was and discovered it was a long and complicated question. Long gone are they days when C, C++ or Java was the simple answer, depending on which year it was.
One of the wonders of the web and the open source movement is that we now have a constant stream of new choices for software development. So many, in fact, that it can be almost impossible to keep up.
Having recently decided to personally program the prototype for a new product idea, I found myself needing to first choose the tech stack. This quickly became a more complicated task than I had anticipated.
I found an endless parade of options like Ruby, PHP, JSP, Python, Objective-C, Spring, Rails, Hibernate, Prototype, JQuery, HTML5, and so on coming and going like seasonal fashion trends. By the time you become well-versed at one, a cooler, hipper technology comes along making all that knowledge seem so yesterday.
I settled into my chore by first looking at the problem at hand. I needed to build a database-driven web service that would be flexible enough to use with multiple front-ends, and with the primary front-end being a web browser. (Pretty standard fare, but different from, say, building a mobile app.)
I soon had to acknowledge that there is no perfect tech stack and, like fashion, it is largely a matter of personal taste. So I tried on various items and ultimately settled on the old and comfortable combined with a bit of something new.
JQuery
Being used to coding lightweight Javascript as needed, I was hesitant to accept a large Javascript library that would need to be downloaded by the browser. But JQuery has improved upon its predecessors like Prototype and is now the most popular library. Its terse, almost functional programming-like usage patterns take some getting used to, but its support for common use cases makes it hard to resist for web programming.
Java
The mid-tier is where I spent the most time studying alternatives.
Ruby on Rails is one the trendier techs out there, and I find a lot to admire in Rails. I completely understand it's reactionary stance against the out of the control direction Java went with inscrutable XML config files. Rails' convention over configuration philosophy makes a lot of sense.
But I also found the platform immature, and the Ruby language left me thinking, "Does the world really need another object-oriented programming language with nothing but a slightly different syntax than its predecessors?"

My Tech Stack
Then there's PHP, which runs Facebook, Wordpress and countless web sites. I've done a lot of PHP programming. It's quick, easy, and there is a lot of documentation and example code available.
But I've also done enough PHP programming to realize that it's not a deep engineering platform. You figure this out once you need to deal with multi-threading, caching or clustering and wish you had more firepower. Not to mention the endless frustration I once experienced trying to get it handle time zones correctly, or its well-known security flaws.
At this point, I ran back home to Java without giving a serious look at Python or others. But even then, the choices seem to never end.
For example, there are many middleware layers to help organize your web application into an MVC paradigm. I hate them all. Having built an MVC framework, I understand and often leverage the concept, but these frameworks too often turn an application into confusing bits and pieces spread over multiple files and directories that no future programmer can figure out. Moveover, they rarely achieve the goal of effectively separating the view from the business logic. So here I decided less is more and to let my application architecture dominate the mid-tier.
JBoss
The question of what server I wanted really came down to whether I wanted a web server or an application server. Tomcat is the most popular Java server, but after 5 years of excellent experience with JBoss, which uses Tomcat internally as a service, I stuck with JBoss because it gives me much more than just web pages. I can effectively segment applications, use JMX to control and monitor them at runtime, support web services and leverage other technologies like EJBs.
EJB3
EJB3 is like prescription medicine and should come with a warning label. It's powerful, but it's also very easy to overdose. When you find yourself debugging a 600 line auto-generated SQL statement, you'll know what I mean.
However, it's ability to encapsulate entity and session objects while supporting RMI, caching and clustering is top drawer. My team at Ad Infuse was able to handle hundreds of complex ad requests per second with an average response time of under 20ms using a properly tuned JBoss/EJB3/Postgres configuration.
Postgres
That leads me to the database back-end. I strongly endorse Postgres after years of working with it. I've had tables with hundreds of millions of rows performing well in real-time situations. You have full SQL support, transactions, stored procedures and more, plus a vibrant and active community that continues to take it to the next level.
Perhaps I'm a bit partial, since Postgres was born at UC Berkeley while I was a student there. (At the time, I was helping on an Ingres database project.)
Postgres 9.0, which is currently in beta, adds hot standby, streaming replication and many important new features.
Linux
And, finally, this is all deployed in the cloud on Linux servers. I'm happy to see that versions of Unix have ended up dominating almost all modern platforms: web servers, Macs, iPhones, iPads, and Android devices. (Perhaps that's my Cal background showing again.)
Conclusion
As I said, this is largely a matter of personal taste, and I'm sure when I get around to enabling comments on this blog, I'll hear a lot of strong opinions, since engineers tend to have their pet peeves and preferences.
Successful products have been built on a wide variety of platforms, and in the end the ideas and talent of the designers and engineers matter far more that any particular technology choice.
