permaculture playing cards*
The moose likes Other Application Frameworks and the fly likes What's the benefit of using those available Java frameworks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "What Watch "What New topic
Author

What's the benefit of using those available Java frameworks

PCC IT
Greenhorn

Joined: Dec 13, 2007
Posts: 1
Hi,

Understand that there are so many Java frameworks available now i.e. Struts, Spring, EJB 3.0, etc. for codes. Hibernate, Ibatis, etc. for Database.
Our codes have not make use of any of those yet. Could anybody please help to share with us regarding the questions we have below?
1. Will it really give a lot of advantage to use the framework namely Struts, Spring, EJB 3.0, Hibernate and Ibatis? Could anybody share what is the greatest advantage that you've received from using the framework?
2. What is the Cons of using such frameworks? Could anybody share what are the major problems when using the framework?
3. Understand that some datacentre are more rigid. i.e. usage of 3rd party framework is not allowed. Will using any of the framework will cause us to not able to implement the application in the data centre? Therefore, we will need to strip apart the framework?
4. How flexible are those framework? Can the codes still be twisted as flexible as what we want?

Thanks.
Nick Williamson
Ranch Hand

Joined: Jan 06, 2007
Posts: 73
First off I have no experience with EJB 3.0, I've been using hibernate and spring. I hear it's very similar though.


1. Will it really give a lot of advantage to use the framework namely Struts, Spring, EJB 3.0, Hibernate and Ibatis? Could anybody share what is the greatest advantage that you've received from using the framework?

Yes frameworks wouldn't be frameworks if they didn't give you an advantage. You get a bit of structure (to a point) and you don't have to reinvent the wheel.

After I took the time to learn Hibernate, I haven't really looked elsewhere, it saves me a bunch of code in the persistence layer especially when used with Spring. It's very flexible to use the hql, sql, or query with your java beans and you can do any of those in the same dao, so you're not married to one or the other. A lot of options with this framework, but it's not a one night learn.

Ibatis is a light weight solution that I have seen some weird things (mainly with joins - actually it was only one issue) without any errors or warnings. This one is really easy to learn and easy to pick up in a day.

Struts is a good framework for following the MVC pattern as is Spring MVC, I've used both and like them both. If you're already using spring to tie in a service dao layer and tied into hibernate it may be good to use that in the UI because there is no integration issues, it's all spring.

2. What is the Cons of using such frameworks? Could anybody share what are the major problems when using the framework?

problems with using frameworks in general are using the wrong ones to get to your solution, not all frameworks are meant to be used for every program.

not learning the framework, if you don't take the time to learn it you can put yourself in a bad situation. Most people just use them without knowing what it does, take the magic out of it and learn what's going on with the code. Easy to do especially with open source frameworks

3. Understand that some datacentre are more rigid. i.e. usage of 3rd party framework is not allowed. Will using any of the framework will cause us to not able to implement the application in the data centre? Therefore, we will need to strip apart the framework?

This really isn't a question, if you can't use them, you can't use them.

4. How flexible are those framework? Can the codes still be twisted as flexible as what we want?

frameworks often provide an outline, but there are many different ways you can do it, writing wrapper classes is an example. Choose an extensible framework. I've had no issues extending struts, spring, or hibernate with abnormal things I have had to do to accomplish something. What that really comes back to is knowing the framework and being able to program it the way you need to.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What's the benefit of using those available Java frameworks
 
Similar Threads
Need suggestions on complete refactoring of my web app
Musings of a Java/J2EE job-seeker in UK
Spring is a implementation only ?
In Search of the Framework
How to migrate CMP Entity Benas to Spring?