I have recently been looking into various java technologies a bit and j2EE and struts seem to be the in thing right now. What are the similarities/differences of the two? When should one be used over the other? Thanks.
Well, J2EE is a set of standards which specify tools and services required for enterprise Java development. The JDK J2EE Edition provides the Java classes which deliver this.
Struts is a web-framework based on the popular 'Model-View-Controller' design pattern. It makes use of JavaServer Pages and Java Servlets which are themselves part of the J2EE standards.
There is plenty of info to be had on the Sun website and the internet in general. Google should be useful to investigate further.
Tim
--------------------------- "Your morbid fear of losing,
destroys the lives you're using." - Ozzy
J2EE is an over-arching extension to the core/standard Java packages (J2SE).
Its encompasses many APIs, once of them being the JSP/Servlet specification.
Struts is a "web framework" that builds upon the JSP/Servlet APIs - so there is no real "similarity or difference" between Struts and J2EE. Struts is just an API framework that utilises one part of J2EE.
Thanks for your input. What I am still unsure of is when one should be used over the other? If Struts includes the major technologies provided by J2EE, doesnt that make J2EE a little redundant?
As I said before, J2EE encompasses many technologies - Struts just uses one of those.
Struts does NOT provide APIs for SMTP mail, EJB, JMS, JTA, Connectors, activation API, SOAP, WSDL etc etc etc.
I you want to use any of those, then Struts cannot help - but if you want to use a web framework (and there are many others apart from Struts), then you should look into Struts.
My two cents is that Struts is an over-bloated framework that sometimes can extend dev and maintentance time rather than lowering it, but thats my opinion.
If you're using Struts then you are making use of part of the J2EE extensions.
Look at Struts as a separate library which builds on facilities within J2EE.
You would use J2EE facilities if you wanted (generally) to write an Enterprise application, and Struts in particular if you wanted to write a Web Application which is structured around the MVC pattern.
Tim
--------------------------- "Your morbid fear of losing,
destroys the lives you're using." - Ozzy
Another related for you guys if you dont mind. I've also read quite a bit of comparison between Java Server Faces and Struts - as JSF is itself a web application framework. How do the two of these compare?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.