Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,669 members, 7,955,438 topics. Date: Sunday, 22 September 2024 at 05:46 AM

Hibernate And Spring - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Hibernate And Spring (1614 Views)

Program To Logoff, Restart, Hibernate And Shutdown Your System / Hibernate Envers - EJB , Help Needed / Spring And Hibernate (2) (3) (4)

(1) (Reply) (Go Down)

Hibernate And Spring by candylips(m): 2:49pm On Jul 24, 2008
This thread is for Spring and Hibernate users (both Java and .Net versions)

Post your problems here. And if you have solutions to perculiar problems you can share with other users as well.
Re: Hibernate And Spring by javaprince(m): 3:23pm On Jul 24, 2008
@candylips
Do u know I have never used Hibernate and Spring before. I never even heard of it until I started that thread on Re: Java Server Pages (jsp) Or Java Server Face(jsf Which Path To Trend? ? ? ? .

My advise, to all growing programmers and developers make sure you read the latest books and developments on technologies by your language. For Java Programmers/Developers, I got a link on www. minnaova .org which you can get latest books as a single torrent file (430MB) on all (and I mean ALL a lil bit of exagerration there , ) the possible things you will need has a Java Programmer, developer, and Computer Scientist.

I have been surprised about how old I had grown and how way past technology had grown after reading many of the latest books.
Re: Hibernate And Spring by candylips(m): 3:35pm On Jul 24, 2008
Have you started using it now. Both technologies have made java development a whole lot easier and streamlined.
These days i hardly open up a jdbc connection or iterate through a Resultset or create a new object with the new keyword !!!
Re: Hibernate And Spring by Bossman(m): 5:37pm On Jul 24, 2008
I concur. I have been using both of them, in addition to Struts since I have been at the current client. Going on almost 3 years. In this field you learn something new every day.

candylips:

Both technologies have made java development a whole lot easier and streamlined.
These days i hardly open up a jdbc connection or iterate through a Resultset or create a new object with the new keyword !!!


Re: Hibernate And Spring by candylips(m): 9:41am On May 08, 2009
true
Re: Hibernate And Spring by Kobojunkie: 8:20pm On May 08, 2009
What exactly does one use Hibernate and Spring for? I have heard of and used NHibernate but not sure I have really read much of folks in .NET using Spring or Hibernate.
Re: Hibernate And Spring by bigboyslim(m): 8:39pm On May 08, 2009
I'm interested in Spring and Hibernate too. Just started on JSPs and I've heard Spring and Hibernate are the way to go now in Enterprise Java dev
Re: Hibernate And Spring by Ghenghis(m): 10:25pm On May 10, 2009
candylips:

create a new object with the new keyword !!!

Interesting , how do you manage this ? grin

How do u decide on what to manage or let the container manage ?

Loose coupling is good but no coupling is a nuisance ,
Spring doesn't manage all my objects so i'm still stuck eith new once in a while
Re: Hibernate And Spring by candylips(m): 9:21am On May 11, 2009
Kobojunkie:

What exactly does one use Hibernate and Spring for? I have heard of and used NHibernate but not sure I have really read much of folks in .NET using Spring or Hibernate.

You are right . most of the guys i have seen using Spring .Net or NHibernate are actually those that have a lot of experience using the Java versions.

The main idea is that with NHibernate you can do database operations from your object model without you actually writing SQL code .One main advantage with this is that it somethings(not always) solves the impedence mismatch btw ur object model and relational model.

Spring allows you to loosely manage the object dependencies in your app. This is done by you delegating the process of object construction to an IOC contanier. Main advantage i see is that you can hook callbacks into this process thereby streamling ur app from an architectural standpoint. Spring is probably most useful from an application architecture and unit testing standpoint


Ghenghis:

Interesting , how do you manage this ? grin
How do u decide on what to manage or let the container manage ?
Loose coupling is good but no coupling is a nuisance ,
Spring doesn't manage all my objects so i'm still stuck eith new once in a while

You are right you absolutely need to construct your objects yourself a lot of times if using Spring is an unneccessary overhead you can do without.

The way i decide on whether to use the container or not is to check how the object will be used. Simple dummy objects probably don't require Spring but more complex objects might benefit from Spring.

And also i find writing my unit tests a lot easier when i have all my dependecies handled by the container
Re: Hibernate And Spring by Kobojunkie: 10:05pm On May 11, 2009
Oh, well . . . I used NHibernate back with .NET 2.0 but with .NET 3.0 and 3.5, you get powerful tools such as Entity Framework, CLR, LINQ that basically do exactly what you could with NHibernate and more. As for Spring.Net , I initially thought Enterprise Library when I read up on it but going by your post, I am guessing it has to do with more with ORM and not the other, or am I wrong?
Re: Hibernate And Spring by candylips(m): 10:19am On May 12, 2009
Yes Spring .Net lets you do more than working with an ORM tool.

In .Net there are loads of functionality and ways of architeching and building apps but there is no way of taking the basic building blocks and composing them into a coherent whole; this area has mostly been left to the architects and developers tasked with building an application.

Now although there exist a number of best practices of ways of architecting systems - design patterns - you will have to create these patterns youself. What Spring gives you is an implementation of most if these patterns which you can easily integrate with your app. The other beauty is its IOC container which takes the pain out of managing the object dependecies in your app. This in the long run allows you to have POJO classes which makes unit testing a little bit more straight forward as well.
Re: Hibernate And Spring by Kobojunkie: 4:30am On May 13, 2009
Still sounds a lot like what you get with Enterprise Library.
Re: Hibernate And Spring by Ghenghis(m): 7:47am On May 13, 2009
While Spring like the Enterprise library is a collection of reusable components ,its most notably an IOC container.

It encourages loosely coupled designs strung together declaratively ,
Re: Hibernate And Spring by candylips(m): 10:49am On May 13, 2009
Other differences i can think of apart from the IOC container is coding to Interfaces and  AOP.

Basically with Spring best practice is to wire dependencies to an interface . The implementation of these dependencies can change without actually affecting the dependant class(classic interface programming) but Spring adds an additional step which is the automatic injection of this dependency into the dependant without u explicity doing this (this is were the IOC comes in). Also out of the box these dependencies can be built as Singletions or lazily initialized without you writing any code for this.

Am not sure about the AOP support in Enterprise Librabry but Spring AOP is very matured
Re: Hibernate And Spring by Kobojunkie: 4:27pm On May 13, 2009
Enterprise Library addresses both AOP and IOC concerns. The Configuration tools helps you basically configure without needing to write code.
Re: Hibernate And Spring by candylips(m): 4:39pm On May 13, 2009
Well i haven't done core .Net in a very long time but am curious to know how AOP and IOC container in enterprise library works ?

(1) (Reply)

In Dreamweaver Cs3, How Can I Draw Table Layout And Cell In Layout Mode,not Ap / Netbeans Study Guide / Let's Teach Kids To Code

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 24
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.