The REALM Stack

Recently I started building with what I call the REALM stack. That's Ruby on Rails, EJB, Apache, Linux and MySQL. Although to be fair it's never EJB, it's usually Spring or something similar. This has changed my attitude completely from what it was while using the traditional LAMP stack. There is a more appropriate separation of responsibilities for each tier. A lot more design and forethought goes into the middleware tier because it can be expensive to make changes there (rebuild, redeploy, restart, etc). The front end developers no longer wait on backend functionality to be exposed which means they can work with stakeholders earlier in the process to provide a functional prototype. The toolkits are fantastic. And, it's fun again. New challenges, new things to learn, new problems to solve and new communities to interact with. In the middleware I have been using Hessian as the service protocol between Rails and Spring and it's fast, although I don't yet have any benchmarks. I'm using Maven2 or Ant plus a host of applications for continuous integration, bug tracking, deployment, etc. I've been using AppFuse too which does just what it says, it simplifies web development with Java. Granted, I'm not using any of the web stack but regardless Matt Raible has done a great job with the project. Hibernate is what bears do, but despite the horror that you can be faced with it is a fairly well engineered tool with a lot of nice features. I like the inversion of control/dependency injection model, but it would be nice if there was a bit more convention as there is with Rails. On the front end (RoR) it's easy to hook into web services provided by Spring remoting and you can still benefit from the slick scriptaculous integration, the rapid prototyping (scaffolding, etc), and the instant gratification of reloading the page to see a change (no need to redeploy a war file). You can even generate the models/controllers/views from the xml provided by your servlet definition, so the UI folks can get started as soon as you've enabled remoting. And in general, UI folks seem to like RHTML/erb a lot more than JSP/Velocity/etc. When I was getting started with the stack, a lot of the examples were complex and reading intensive for grasping relatively simple concepts. Over the next week I'm going to do a 5 part series on getting your REALM stack up and going, using as few lines of code as possible and as few lines of text while still proving all the appropriate references. The REALM series will look something like:
  • Tomcat & Servlets
  • Spring
  • Spring Remoting
  • RoR
  • RoR Web Services
The end goal being that you have a general understanding of all the technologies involved, the underlying design principals, the architecture component interaction and where to go for help and documentation. Although the services protocol is hessian, after going through this series you should be able to swap it out for REST, XMLRPC or SOAP (or any other services protocol). The first installment will be on Monday, so if you have any suggestions between now and then please let me know. The platform used will obviously be Linux, although you should be able to adapt the series to another platform.

No comments: