Bypassing J2EE or a review of Tapestry 5 framework for example blog
Here I publish only the introduction to the article (rather, mini-books). The rest is available here .
Two years ago (2006) I was looking for an alternative to PHP and my MVC bikes. At that time, professional frameworks were just beginning to appear on PHP (for example, the Zend Framework didn’t wait for the release), RubyOnRails came into fashion, heard something about Django. Having submitted to fashion, he studied a couple of books on RoR, but in the end did not bother with Ruby, apparently stopped the difference in syntax from C such languages. As an option, I considered creating a web in C ++, but having looked at the existing frameworks, I changed my mind. There was nothing to choose, so the choice fell on Java - a technology somewhere between PHP and C ++.
J2EE was too confusing for a newbie. PHP programmer in the novelty was faced with a dozen frameworks that impose to create a web on J2EE. Servlets, portlets, JMS, RMI, EJB, JSP, JSF - which was not there! But then I learned about Spring type J2EE alternatives. ')
It never came to Spring, for some reason it seemed that by complexity it was at the J2EE level. Stopped at Tapestry4 . This framework was compared to JSF, one of the J2EE technologies for web presentation. Through Tapestry4 I first learned about IoC engines (in my case it was HiveMind ). Later I found out about Wicket that allows you to do a web presentation no worse than Tapestry4. But then came the alpha version of Tapestry5 , which finally stopped.
Tapestry5 liked a lot of things. First, the configuration of the framework is performed through annotations - the XML configuration is minimized. Secondly, changes in templates and code are dynamically picked up, without reloading the servlet container - the main problem of J2EE and other Java frameworks. The truth is that it works only for code that Tapestry5 knows about (components, pages and something else), but this is not bad either. And thirdly, competent OOP approach, simplicity and the presence of its own IoC engine.
To work with the database I decided to use ORM Hibernate . I think this is the most powerful opensource ORM currently in existence, so the choice was obvious. And the advent of HibernateSearch, HibernateValidator, HibernateAnnotations - finally reinforced the decision to continue working with Java without regard to Python with Django.
From 2007-2008, Tapestry5 was in alpha and the developer API was constantly changing, so I had to learn the code. On the one hand, I lost time, but on the other hand I learned better the framework. Accumulated experience, which is the desire to share on the example of the development of a small blog.
Project sources are available here . The work can be found here . To enter the control panel, the username is admin and the password is admin .