Forewords
So you've heard about Trails from somewhere, perhaps happened to stumble upon Chris Nelson's excellent intro articles, or were googling the net for Java's answer to Ruby On Rails or were looking for something really RAD for Java. You keep asking yourself why you need to deal with the complexity of creating a web application stack every time you start a new project. Java by itself is already a complex beast, and on top of that you are trying to build a web application with the myriad of frameworks, libraries, components, paradigms, different versions of specifications, competing servlet containers and conflicting commercial interests out there. No wonder your head is hurting.
Now, Trails is not a spring chicken anymore. Trails was started several years ago (some of the code dates more than five years back) and lots have happened since then. Trails 1.x line is based on Tapestry 4.x and while Tapestry 4 is mature and has some greate concepts, they have evolved and become more streamlined implementations in Tapestry 5. Much the same way, and because Tapestry 5 is way simpler for a framework developer, Trails 2 that is based on Tapestry 5 is a leaner, meaner and modular version of the concepts conceived in Trails 1.x. However, at the time of writing this (2009-02-21) we only have snapshots of Trails 2 available, and we don't have a date for general release of Trails 2. Although, because we promised more modularity, we are going to have more individual component releases following their own release cycles and we've already released some of them; all of them of course based on Tapestry 5. Meanwhile, you have a choice to make; whether you want to settle for Trails 1.x, courageously use snapshots of Trails 2 or just stick it out and wait for a GA release.
Compared to Trails 1.x, in Trails 2 we've thrown out a lot of unnecessary clutter such as Spring. Certainly nothing prevents you from using it together with Trails 2, but once you learn Tapestry IoC it's just unnecessary. Interested in Trails 1.x? Continue to Read me first for Trails 1.x instead
Trails does a heck of lot for you, but nothing's free. A little warning is in order:
| Disclaimer Trails pulls together Tapestry for web UI framework and Hibernate-based persistence, a and a couple of other handy-dandy frameworks in a pre-packaged format so you can focus on implementing the domain model and user interaction using these frameworks. However, if the previous sentence is pure Greek to you and you've never heard about Tapestry or written Java web applications, Trails is probably not for you. |
Sure, if you are good enough, you can learn it all at once, and maybe even manage to avoid picking up any bad habits from other frameworks along the way, but the chances are that without any previous experience, you'll just get frustrated since you don't know how the underlying frameworks work. While out-of-the box Trails functionality, based on your domain model, is where Trails really delivers, most of the customization happens using either Tapestry or Hibernate. Understanding and learning even one of these frameworks can be a daunting task if you start from scratch, but not a huge deal if you already understand Object Relational Mapping (ORM), Inversion Of Control (IoC), dependency injection, templating languages (such as Velocity), code blocks (for example anonymous classes) and decorator pattern as generic concepts. This doesn't mean you need to be super-experienced in any of the mentioned frameworks and concepts, but it does mean that you'll commit to learning and using those in your project. So take that into account when deciding if Trails is the right framework for your web application.
If you decide to try Trails and like the project, let us know. You are welcome to join the discussions and the community on our mailing lists!
