This week's book giveaway is in the Java in General forum.
We're giving away four copies of Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework and have Michael Redlich on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

What's the benefit of using those available Java frameworks

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic