• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Use of spring framework with third party hosting

 
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All and Peter Den Han
I want to use spring framework for my new project.This project will be with some hosting site(third party).Do i have to upload the whole framework in hosting site or they will provide such frame work.
I am bit confused about this.Can anybody throw some light on this.
Thanks
kundan
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Third parties are unlikely to provide you with Spring support out of the box, so you'll have to include it in your application (war or ear). There should be no problem with that. The separate Spring parts optionally come in separate jars, so you can include just the bits you are actually using if you want to keep the size as small as possible.

- Peter
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter
So you want to tell me that whatever i will download from spring site.I have to make a jar of that and have to upload to my web hosting server.
Is it a good idea to use this framework for a small project which can be done using servlet,jsp and xml.A forum kind of thing.
Basically i have never used spring framework so have very less idea about it right now.
Your suggestions can help me to decide.
Thanks
kundan
 
Peter den Haan
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Download, well you probably want to download the whole lot. What you want to include with your web application, I can't say, depends on which bits of Spring you want to use!

This is perhaps not widely enough appreciated. Spring is a truly open framework. It supports what Rod calls an "a la carte" approach to using it: you pick what you're interested in. It will integrate smoothly with just about anything else - Spring is first and foremost about middleware and integration. Yes, it has its own MVC framework if you're interested, and it's excellent, but it will just as happily integrate with Struts, Tapestry, JSF, or Portlets. There is no "privileged code" within Spring.

Having said that, if you'd want to build a small database-backed forum application with an "all-Spring" approach you could use the Spring container, the MVC framework, declarative transactions and the Spring JDBC support classes (either at the JDBC template level or using the classes that can map query results to objects). The petclinic sample application included with the Spring distribution will give you an excellent starting point.

But if you're already familiar with Struts, JSF, Tapestry, Hibernate, JDO, iBatis, or OJB, then you might want to use that. Spring has integration support for all of these out of the box. If there's some other tool that you're familiar with and want to stick with, you can. Even if you have to write your own integration glue it is usually pretty easy and straightforward.

Some of you might yawn and think: yes, have seen that kind of thing many times before. I did. But Spring actually delivers. Give it a shot.

- Peter
[ September 05, 2004: Message edited by: Peter den Haan ]
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter
Actually i am familiar with struts framework since my own framework is almost similar to that except we use properties file instead of xml files.For this project , i want to use servler ,JSP, XML and JDO to complete this project.Does JDO already comes with full download of spring.
With this approach can you tell me what should i select from spring.I have already downloaded the whole stuff, now i want to seggregate it depending on my above use.I have seen it has a lot of jar files, some jdo.jar is also available most probably. I have gone a bit through its tutorial also, but at first glance it was very confusing, it seems that i have to mug up a lot of thing to use it.
PLz give me a brief idea what shuold i select from this frame work, i wanna use tomcat as my web server.Is tomcat suppors JDO objects.
THanks
kundan
 
Peter den Haan
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using Struts, or are you using your own MVC framework (and if the latter, are you sure that's a good idea)? In any case, there are some projects and articles around on Spring/Struts integration which should serve as an inspiration; see Google.

Spring does not come with a JDO implementation (remember it's primarily an integration framework), but it does have classes which integrate JDO with the Spring data access approach. Add your favourite JDO implementation, stir, add salt to taste and eat.

I wouldn't try to do my own Spring packaging, because it requires intimate knowledge of internal Spring dependencies. The dist directory of the complete distribution has both the unified jar (spring.jar) and the split-up jars (spring-core.jar, and so on). Use the latter. Probably spring-core.jar, spring-context.jar, spring-dao.jar, spring-orm.jar, and also spring-aop.jar if you want to use declarative transactions. This corresponds to using the Spring DI container (org.springframework.beans.* and .context.*), the DAO exception hierarchy (org.springframework.dao), the JDO integration classes (org.springframework.orm.jdo) and the transaction support (org.springframework.transaction.* and org.springframework.aop.* but you do not really have to understand these classes, just set them up; see the Spring manual and the sample apps).

Tomcat will be fine with JDO, and everything else. In fact one of the major Spring benefits is that you get some of the best features traditionally associated with the EJB tier, like declarative transactions, in web-only systems.

I know setting things up is confusing at first. It always is with so many ingredients in the mix, whether you use Spring or not. That's why I directed you to the petclinic sample application because it gives you a starting point. Also look at the webapp-minimal and webapp-typical skeleton applications.

- Peter
[ September 06, 2004: Message edited by: Peter den Haan ]
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Peter
I had used struts like framework but this time i totally want to go with spring and JDO with tomcat as webserver.Spring is also using hibernate, is that something like JDO.
OK i will go through your recommended petclinic application.
Is Spring MVC is enough to avoid Struts.(JSTL)
Thanks
kundan
 
Peter den Haan
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hibernate is quite like JDO in many respects, but it does not conform to the JDO standard (nor does it try to). Spring MVC is enough to be cured of Struts for the rest of your life

- Peter
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Peter
I want to use JPOX JDO implementation.Do you have any idea about JPOX. Is it a good implementation of JDO or should i look for other.
THey are also providing spring integration.
THanks
kundan
 
Peter den Haan
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have zero experience with JPOX. Perhaps someone else can chip in?

- Peter
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Peter den Haan:
I have zero experience with JPOX. Perhaps someone else can chip in?

- Peter



Here is some portion from JPOX Web Site. It's some kinda JDO implmentation with higher performance as its goal... I'm also interested in reading about it as well, since traditional JDO implementation is heavy and slow...


With a versatile and high performance implementation, JPOX is on the cutting edge of the available Java Data Objects (JDO) implementations, offering a free and full compliant JDO implementation released under an open source license.

JPOX 1.0 is fully compliant with JDO 1.01, and JPOX 1.1 has many JDO 2.0 preview features. If you are interested in using a JDO implementation and make the most of your time, download JPOX and see what you think. This website provides various documents defining the current status of JPOX with regards functionality and how well it meets the JDO specification. Our future roadmap is available on this site, as well.

 
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I have read this thread and I couldn't figure out one thing: is this new project a learning project or is it a real one?
Cause', if the 2nd is true you should analyse the requirements and come up with a real working solution and not to choose the latest/most talked frameworks on the internet. After you know what you have to do you will see that the choices will be easier ;-).

./pope
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ali Pope:
After you know what you have to do you will see that the choices will be easier ;-).


Of course, we need to know what we have to do first... If not, how can we decide what to choose? Even some developers choose the things first before they what they have to do... That's kinda dangerous in the real project, I feel..

We shouldn't walk blindly in the forest without any instruments brought with us... If not, we will never be able to get out of the forest... So be prepared before doing sthing...
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
Its a real project but i can take the risk of implementing new technology as well since i want to learn it also.And you know some body has to start.Otherwise no new tech will ever be implemented.
Basically i am making a site which will grasp the survey abut different products.I want to use spring framework,JSP,SERVLET,JDO and jaxB/xml.
TOMCAT AND MYSQL WILL BE THE SERVERS.
DO ANY BODY HAVE ANY EXPERINCE ON THIS.Do you think i can combine these tech and use it properly to provide a great site.
THanks
kundan
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
kundan, it seems reasonable. I would consider a further analysis against JDO - ORM - simple ORM (for example iBatis). The persistence layer could be an overkill to a web application.

./pope
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ali
Dont tou think JDO is an implementation of ORM only
And Hibernate and iBatis are POJO/JDO effort.
THanks
kundan
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by kundan varma:
Hi Ali
Dont tou think JDO is an implementation of ORM only
And Hibernate and iBatis are POJO/JDO effort.
THanks
kundan



ORM: object/relational mapping (solving the object/relational paradigm mismatch) is focused on object persistence over RDBMS _only_;
JDO: specification of data access (to different data sources (EIS); targeting many possible data sources (databases (relational, objectual), mainframe transaction processing systems, filesystem).

So, the answer is no. Moreover, ORMs (especially Hibernate) does not consider to target the JDO spec.

./pope
 
Peter den Haan
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't you think it's fair to say that the majority of JDO users are using it as an ORM tool?

In the "simple ORM" arena, you could consider the Spring JDBC support as a really really simple ORM (hey, it can map query results to objects, it's gotta be ORM ). It's certainly the most lightweight option of the lot.

- Peter
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Peter
i think you are right and almost all the JDO Implementer JPOX and other right now are only supporting for databases rather than files or EIS.
Thanks
kundan
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Peter den Haan:
Don't you think it's fair to say that the majority of JDO users are using it as an ORM tool?

In the "simple ORM" arena, you could consider the Spring JDBC support as a really really simple ORM (hey, it can map query results to objects, it's gotta be ORM ). It's certainly the most lightweight option of the lot.

- Peter



I can agree with these. But as always I will ask why should I use something more complicated if something simple solves all my problems? (instead of using JDO, I could also involve some entity beans, ain't it? ).

./pope
[ September 08, 2004: Message edited by: Ali Pope ]
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Ali
i feel entity beans are more complicated and costly affair than JDO.
THanks
kundan
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by kundan varma:
HI Ali
i feel entity beans are more complicated and costly affair than JDO.
THanks
kundan



Now you got my point ;-). I should analyse the applicability by takin' into account the complexity (from simple to complex):
- small size: iBatis
- medium to large size: ORM (Hibernate, OJB)
- different data sources: JDO, CMP

./pope
 
reply
    Bookmark Topic Watch Topic
  • New Topic