Originally posted by Raj Bhandari:
I wonder then what is Struts and EJB ? Are they not MVC architecture ? Could someone please tell me how is Struts different from EJB and what purpose both solve ? What books/articles should I read.
Struts and EJBs are two different beasts. Struts is a framework that implements MVC architecture. So you are right in that aspect. The framework gives you hooks which you plug your code into and your application turns into this MVC thingy.
EJB is a specification written by Sun which 2 groups of people should satisfy.
First group is the people who write containers ( IBM, Weblogic, JBoss, Oracle ) and the second group are the poor developers. Now if you write your code according to EJB specs you get lot of special features for free ( the container writers ensure that ) - like - Transaction, Security, Scaling, Caching, and so many things which the developers need not write code - as the wise say - reinventing the wheel. So the developers just worry about the business logic and leave the other bigger worries to the container developers.
And for you to ponder - you can have a struts application with EJB !! Also find out about Session Beans, Entity Beans and Message Driven Beans - Great concepts.
Good luck !!