Since a JSP application is pure 2 tiers application, are there any Opes Source Projects that will help me build a JSP 3 tiers ? I understand Struts wont help me with that, correct ? Since it will not separed business layer. Do I really need to go for EJB ? My application will not be large, I wanted to go for 3 tiers but I'm afraid EJB will be too much...
Giselle, You don't necessarily need to have 3 physical tiers. You need to evaluate your application need for transactions (the best thing the EJB container gives you). I would start by having a good logical separation by breaking your presentation logic and your business logic. Create some good reusable POJOs make the ones you need data aware using something clean and *transparent* like Hibernate, OJB or JDO. If you later determine that your application is highly transactional, then you can think about introducing Stateless Session EJBs using your POJOs. So in conclusion, use a minimalistic approach and add complexity as needed. Sometimes 2 tiers are enough (just ask the PHP guys).
Co-Author of <a href="http://www.amazon.com/exec/obidos/ASIN/1590591259/ref=jranch-20" target="_blank" rel="nofollow">Enterprise Java Development on a Budget</a>
Joined: Aug 31, 2004
I would also take a look a Tapestry which a find a much nicer, simpler framework to build web apps