Spring vs Other frameworks
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
SCJP 5, SCWCD 5
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
JSF is different from MVC as it takes the abstraction to one level above where one deal with Swing kind of notion. Though JSF is also a MVC deep down but as an application developer you are not exposed to it. In JSF the values and action are directly bound to attributes and methods respectively on the back end.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I now the whole Spring framework offers more sub components and frameworks that go beyond EJB but I'd like to know if Spring or EJB 3.0 is preferable at least for the functionality they have in common. Unfortunately I don't know Spring in Detail so I can't really compare it to EJB. What would you guys say?
Marco
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
You cannot inject POJO or simple types to Enterprise Beans.
Regarding AOP, Spring AOP has more features than EJB 3 Interceptors, but EJB 3 Interceptors are easier to use.
SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
the excellent AOP support in Spring is indeed a main difference I've seen, too.
Are there other really big advantages besides AOP and additional modules which are simply not part of EJB/JPA? When I read some short summaries or articles about Spring I often have the impression that most of the propagated advantages of Spring (or disadvantages of competing technologies) are already solved by EJB 3.0. And the updated versions of EJB and JPA sound even more promising. Not to forget that EJB is an official standard (which of course is not always an advantage).
So am I missing something fundamentally or is it like so often that a lot of all the hype is a kind of personal taste?
Marco
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Marco Ehrentreich wrote:
So am I missing something fundamentally or is it like so often that a lot of all the hype is a kind of personal taste?
As I said, EJB 3 DI cannot compare to Spring, Spring is an IoC container whereas EJB 3 was designed to simplify Java EE development.
If you use Spring, you will understand how serious it is if you cannot inject POJOs. For me, if I will not use EJB 3, the main reason would be its weakness in DI.
Anyway, did you know that using Spring doesn't prevent you to use EJB?
Spring provides EJB integration, you can read at http://static.springframework.org/spring/docs/2.5.x/reference/ejb.html.
SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
You can run Spring on Tomcat and not worry about app servers. This is big for small companies who don't want to leap into the app server space or shell out $. Tomcat has helped keep out environment very clean.
===Vyas Sanzgiri===
My Blog
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Transaction management in EJB works for enterprise beans only, this means that if we want to make a class transactional, we have no choice but make it EJB.
The same goes for security, if we want to apply declarative security to a class in EJB, we have no choice again (so sad
), but to make it EJB. But for Spring, it can make *any* classes transactional. Spring also offers declarative rollback rules (no EJB equivalent).
However, Spring Framework doesn't support propagation of transaction contexts across remote calls.
For more information about transaction management in Spring Framework, please read http://static.springframework.org/spring/docs/2.5.x/reference/transaction.html.
About security, Spring Framework doesn't have built-in security feature as EJB, but we can use Spring Security (formerly known as Acegi Security). And of course, when using Spring we can apply security to any classes.
SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Vyas Sanzgiri wrote:
You can run Spring on Tomcat and not worry about app servers. This is big for small companies who don't want to leap into the app server space or shell out $. Tomcat has helped keep out environment very clean.
You make a very important observation, so Spring resolves transaction management(among much more things) in a cheap way, big deal as you said for small companies talking about money $, it's like a small app container, thanks everyone by the tips, this is very helpful, to know what technology to use on particular situations it's a very important issue to every project.
SCJP 5, SCWCD 5
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Kengkaj Sathianpantarit wrote:Talk about money, there are free Java EE application servers available such as GlassFish, JBoss AS, Apache Geronimo.
Tomcat is a lightweight, cost-effective and simple solution compared other app servers you mentioned.
Mourougan
Open Source leads to Open Mind
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Tomcat is a lightweight, cost-effective and simple solution
Yes I vote for Tomcat.
Padmapriya
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Mourouganandame Arunachalam wrote:
Kengkaj Sathianpantarit wrote:Talk about money, there are free Java EE application servers available such as GlassFish, JBoss AS, Apache Geronimo.
Tomcat is a lightweight, cost-effective and simple solution compared other app servers you mentioned.
But Tomcat is not application server, I like JBoss in free application servers.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Sagar Kale wrote:
Mourouganandame Arunachalam wrote:
Kengkaj Sathianpantarit wrote:Talk about money, there are free Java EE application servers available such as GlassFish, JBoss AS, Apache Geronimo.
Tomcat is a lightweight, cost-effective and simple solution compared other app servers you mentioned.
But Tomcat is not application server, I like JBoss in free application servers.
you can read this thread... very interesting info shared by our experts....
Mourougan
Open Source leads to Open Mind
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Padmapriya Ranganathan wrote:
Sagar Kale wrote:
But Tomcat is not application server, I like JBoss in free application servers.
Have a look at this Link... may be bit old, but provides answers for your claim
Doesn't matter if there is no specific definition of application server but it is understood in java community ( many may not agree though ) that server which implements J2EE ( JEE ) specifications are called application server. Tomcat does not fully implement J2EE ( JEE ) specifications. Though Tomcat is popular because it is easy to use, but I do not consider it application server.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Sagar Kale wrote:
Doesn't matter if there is no specific definition of application server but it is understood in java community ( many may not agree though ) that server which implements J2EE ( JEE ) specifications are called application server. Tomcat does not fully implement J2EE ( JEE ) specifications. Though Tomcat is popular because it is easy to use, but I do not consider it application server.
If this is your own definition, you can use it to believe. Otherwise, provide the source reference.
Mourougan
Open Source leads to Open Mind
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Mourouganandame Arunachalam wrote:
If this is your own definition, you can use it to believe. Otherwise, provide the source reference.
Link
Wikipedia
Read following line on the page.
Tomcat from Apache and JOnAS from ObjectWeb are typical of containers into which these modules can be put.
Link
oreillynet
oreillynet.com defines it like this.
The Tomcat server is a Java based Web Application container that was created to run Servlets and JavaServer Pages (JSP) in Web applications. As part of Apache's open source Jakarta project, it has nearly become the industry accepted standard reference implementation for both the Servlets and JSP API. Written by expert Servlets and JSP software architect and author James Goodwill, this column will feature introductory Web application development issues, Tomcat installation and configuration, deploying Web applications onto Tomcat, Struts and much more.
If you want to discuss it further, start a new thread for it.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Sagar Kale wrote:
Mourouganandame Arunachalam wrote:
If this is your own definition, you can use it to believe. Otherwise, provide the source reference.
Link
Wikipedia
Read following line on the page.
Tomcat from Apache and JOnAS from ObjectWeb are typical of containers into which these modules can be put.
Link
oreillynet
oreillynet.com defines it like this.
The Tomcat server is a Java based Web Application container that was created to run Servlets and JavaServer Pages (JSP) in Web applications. As part of Apache's open source Jakarta project, it has nearly become the industry accepted standard reference implementation for both the Servlets and JSP API. Written by expert Servlets and JSP software architect and author James Goodwill, this column will feature introductory Web application development issues, Tomcat installation and configuration, deploying Web applications onto Tomcat, Struts and much more.
If you want to discuss it further, start a new thread for it.
Yes but none of the links claims Tomcat is NOT an application server. Moreover, there is no official standard specification for application servers. So, it's based on individual's decision. If you want to call Tomcat as servlet container and not an application server, then it's up to you. This has been already discussed in a separate thread which I have given reference above, so no need to discuss again, which is meaningless.
Mourougan
Open Source leads to Open Mind
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Yes but none of the links claims Tomcat is NOT an application server.
Looks like you did not bother to read links.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Run EAR which has EJB2.0 module in Tomcat and get happy.
Anyway there are many who claim Tomcat as application server because they like easy things to work with.
| Arthur, where are your pants? Check under this tiny ad. Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |











