• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Spring vs Tapestry

 
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matt:

Where do we classify the Spring framework of a thing. Is it for business component development or front end web component development or both ? I am really interested in knowing the difference between Spring and Tapestry and the advantage one might have over the other and/or how these two will work together in a given application.

Thanks,
Anselm.
 
author
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tapestry is a web application framework, while Spring is more of J2EE (or Java) application framework. It has allows you to use dependency injection in your data layer and middle tier and also has many concepts that make it easier to develop these layers.

For example, you can use the HibernateDaoSupport class to serve as a parent to your DAOs and reduce many of your Hibernate operations to 1-liners. For the middle-tier, you can use Spring's declarative transactions to wrap your method calls with transactions and rollback rules.

Spring does have a web framework component as well. It's similar to Struts, but it allows you to use your domain objects in your controllers. It also has a lifecycle for its many controllers - allowing you to overriding binding, validation, etc., which can be nice.

As for integrating Tapestry and a Spring middle-tier, it's quite easy. There's instructions in
[URL=Spring's documentation]
http://www.springframework.org/docs/reference/view.html#view-tapestry[/URL]. You also might want to check out the https://betterpetshop.dev.java.net/.
 
Matt Raible
author
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, bad link - should've been:

http://www.springframework.org/docs/reference/view.html#view-tapestry
 
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to add at Matt reply that Spring is a lightweight container - meaning it tries to provide a non-intrusive solution to the offerings of a J2EE container.

./pope
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Matt and Ali Pope.
If Spring is a J2EE application framework. It follows that Spring is a competitor to J2EE. Basically I see Struts or Tapestry as a competitor to JSP and Hibernate a competitor to EJB. Should this be the case, how much functionality does Spring offer compared to J2EE and its vast array of APIs such as Messaging, JAXP, e.t.c. or one has to borrow some of this from the J2EE framework when the need arises. I understand that SUN has been on the J2EE train for so long and Spring is a fresh birth, but how much of this functionalities does it provide outside providing one with lightweight front end and back end components?
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anselm: Spring is not a J2EE container, meaning it doesn't need to conform the J2EE specs. But, the Spring guys have integrated already in the framework many (if not all) of the offerings of a J2EE compliant container.
Try to look at the official Spring document and see how much they are offering.

./pope
 
Matt Raible
author
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If Spring is a J2EE application framework. It follows that Spring is a competitor to J2EE.



In my opinion, it's not a competitor to J2EE, but rather a complement to J2EE. Using Spring to develop your J2EE application makes things much simpler. You don't need to write nearly as much code, you get to follow best practices and J2EE patterns, and your app will be loosely coupled. In essense, you get to quite worrying about the "architecture" of your application and start worry about the problem it's trying to solve.

I understand that SUN has been on the J2EE train for so long and Spring is a fresh birth, but how much of this functionalities does it provide outside providing one with lightweight front end and back end components?



Spring does not hide any of J2EE's APIs. You can still use any of the APIs you previously used. However, it's possible that Spring has done something to make things simpler and more configurable, so you might want to use some Spring helper classes - or at least wire up your dependencies using its IoC container.

Spring is a very non-intrusive framework that only takes a couple hours to dig in and learn about. Spring Live is designed for the Spring rookie so it should make it even simpler to learn Spring.
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Pope && Matt
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!