• 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

I need a small project to do with spring and hibernate.

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i am doing spring 2.5 and hibernate. Now, i am trying to intregrate spring and hibernate with mysql. But feel some trouble to understand the xml files. Even after 1 month i am not so clear about this xml configuration files. Can anyone suggest me some tricks or tips, anyway?

I am also need a very short, demo project to develop my skills on spring-hibernate-mysql. So, if anyone have a demo on spring-hibernate-mysql, can you please send it to me? I aleady search some kind of demo on net. But i can not get. Please help me and I am very much interested to do professional work with spring-hibernate-mysql. so, If anyone can describe how a real-life professional project should be developed, i will be very oblige.

Regards
 
Mohammad Ashrafuddin Ferdousi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,
I am waiting for your reply. I will be very thankful to you if anyone can help me. have a nice day.
 
Author
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mohammad,

I also find it a lot easier to learn something by developing a "real" application. My approach in the past has been to write an application that either tries to copy a real application (for example, try to copy some features of Flickr, or JavaRanch), or tries to automate some task that I do at home (for example, generate web-based math problems for my daughter). Taking this approach can often be easier than just sitting in front of the computer and saying "OK, I'm going to wire Spring and Hibernate together!"

Hope that helps!

Peter
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can sympathize with your frustration. Spring and ORM (Hibernate) are really great tools. I've had to teach these skills for teams that I lead. Fortunately, I can create examples or write a module for people to "mimic" until they start understanding how it all works together. I think the Spring Docs make it hard to get started. They are more for people who have some understanding and help when they are starting in my humble opinion.

I would start with either JPA using annotations (forget the XML) or Spring and then bring in the other. Don't do both at once unless you have some help. The most basic thing is the Spring Beans container. As you know this helps with inversion of control. The Spring Beans container is nothing more than a way to implement the "Factory Pattern" with lots of helpful features to make it more functional and easy to use.

You can think of inversion of control as a way to bring in dependencies in a layered architecture. As you may know, the Factory Pattern is about configuring objects at run-time because their dependencies are not always known at compile time. So it is a way to create more flexible classes that can be used in more contexts. And so it is with the Spring Bean container. It provides convenience in bringing things together with more flexible architecture designs.

The amount of Inversion of Control you want is basically where the Bean Container is "instantiated", which translates to where the Factory Pattern is calling the factory (Spring Bean Container) and configuring the object for run-time use.

Let me translate this. Create 2 Java classes. A POJO (Plain Old Java Object) in standard Javabean syntax. Then create another class with a "main" method to instantiate and configure the POJO using the Spring constructs. Write a Spring application context XML file (or use annotations on the Javabean in Spring 3) and get an instance of this object in your "main" class by instantiating the Spring Bean Container. Print out the results by running it. You should see the object with the configuration (object attributes) from the XML file. Once you can do this, everything will start to fall into place with Spring and you can grow from there.

I was going to write an example of all of this and post it on my web site for people I mentor, but I haven't gotten around to it. I've been very busy and I don't see that changing for a few weeks/months. There is also an excellent example of this in the Sonatype Maven book, but is uses older syntax with XML files. But it works and it's sufficiently complicated to give a really good intro to new people.

If I get around to posting the example of this, I'll post back and let people know. Hope this helps.

scott
 
Mohammad Ashrafuddin Ferdousi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Mularien wrote:Hi Mohammad,

I also find it a lot easier to learn something by developing a "real" application. My approach in the past has been to write an application that either tries to copy a real application (for example, try to copy some features of Flickr, or JavaRanch), or tries to automate some task that I do at home (for example, generate web-based math problems for my daughter). Taking this approach can often be easier than just sitting in front of the computer and saying "OK, I'm going to wire Spring and Hibernate together!"

Hope that helps!

Peter



Thank you. I found some similarities with your thinking. Actually, I start a new project from home and i am a very beginner on spring and hibernate and other jee frameworks. I have to accomplish it. Your words increase my confidence that, i can also accomplish it in a professional coding level with your sugessions. thank you. have a nice day.
 
Mohammad Ashrafuddin Ferdousi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Richard Scott Smith wrote:I can sympathize with your frustration. Spring and ORM (Hibernate) are really great tools. I've had to teach these skills for teams that I lead. Fortunately, I can create examples or write a module for people to "mimic" until they start understanding how it all works together. I think the Spring Docs make it hard to get started. They are more for people who have some understanding and help when they are starting in my humble opinion.

I would start with either JPA using annotations (forget the XML) or Spring and then bring in the other. Don't do both at once unless you have some help. The most basic thing is the Spring Beans container. As you know this helps with inversion of control. The Spring Beans container is nothing more than a way to implement the "Factory Pattern" with lots of helpful features to make it more functional and easy to use.

You can think of inversion of control as a way to bring in dependencies in a layered architecture. As you may know, the Factory Pattern is about configuring objects at run-time because their dependencies are not always known at compile time. So it is a way to create more flexible classes that can be used in more contexts. And so it is with the Spring Bean container. It provides convenience in bringing things together with more flexible architecture designs.

The amount of Inversion of Control you want is basically where the Bean Container is "instantiated", which translates to where the Factory Pattern is calling the factory (Spring Bean Container) and configuring the object for run-time use.

Let me translate this. Create 2 Java classes. A POJO (Plain Old Java Object) in standard Javabean syntax. Then create another class with a "main" method to instantiate and configure the POJO using the Spring constructs. Write a Spring application context XML file (or use annotations on the Javabean in Spring 3) and get an instance of this object in your "main" class by instantiating the Spring Bean Container. Print out the results by running it. You should see the object with the configuration (object attributes) from the XML file. Once you can do this, everything will start to fall into place with Spring and you can grow from there.

I was going to write an example of all of this and post it on my web site for people I mentor, but I haven't gotten around to it. I've been very busy and I don't see that changing for a few weeks/months. There is also an excellent example of this in the Sonatype Maven book, but is uses older syntax with XML files. But it works and it's sufficiently complicated to give a really good intro to new people.

If I get around to posting the example of this, I'll post back and let people know. Hope this helps.

scott



Sir,
Thanks for your messages. I wish, i can be a member of your team. I am trying heart and soul to learn spring and hibernate3. Already i learn a little. Now, i am trying to found out the way of professional level coding style. As i am a beginner and unfortunately i can not see or observe or understand any professional project on jee i can not found out the better or the best way to accomplish my project. I want to follow the software engineering practice, the Agile and Scrum, xp process and all the things i wanna do with eclipse galileo. But can see the hope. But i have to try.

Anyway, I read your message. At first, thanks for your message; you wrote it for me to help. Thanks a lot. Your message will help me to learn something new. I sure oblige to you for your helping mind and your message will help me to increase my confidence.

If it is possible for you to add me on your team. Please just inform me. I am very much interested and truelove happy to work with you and your team. I am amazed on your co-operation. be happy. have a nice day.


thanking you
codeperl
 
Richard Scott Smith
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a couple of things as you get started...

I've been writing Java for 9 years and I'm still learning. I still study almost every day. That never stops. There's always something new to learn, some new technique, or some way to improve. You never get where you want to be. It's too big and there is too much to know. When I interview people I can tell right away when they are lying to me. It usually takes no more than 2 questions to eliminate a "know it all."

No one expects you to "know it all," but most expect honesty, a willingness to learn, and a firm grasp of the fundamentals. Senior developers will always ask about design patterns and programming technique. When someone comes in and they say they "know" Spring, then I will ask them about it. Saying you know Spring is a bit ridiculous anyway because Spring is huge. What do you know about Spring? Why would you use it? What are the fundamental ideas or design patterns that Spring is modeled after? What are some other frameworks that provide similar functionality? Based on these answers, I will then ask more questions. By this time, I know whether they are lying to me or not.

It is even more important to know what causes concurrency issues in multi-threaded environments like the web. Or algorithm efficiency and computational complexity. Or the pillars of Object Oriented design and why they are important, i.e. Polymorphism, Inheritance, and Encapsulation. Proper modeling and code reuse are important. These are the fundamentals you learn with a Computer Science degree. Unfortunately the most widely used design pattern is copy-paste! Not good!

I've seen so many goofy things from people who don't know the basics. I once saw 4 nested while loops to iterate through a 2 dimensional array. I also saw another guy not understand why his ordering was wrong when he'd call back his data structure because he didn't understand a hash table. He copy-pasted it from somewhere else, not knowing what it did. These are the things that give software developers a bad name.

Yeah, frameworks like Spring are great, but the fundamentals are more important. Knowing why a certain decision is made is more important than finding a code snippet that works, not really knowing whether it makes sense.

I've said too much. But hopefully you get the idea.

By the way, my employer has laid off over 80% in the last year. We are not hiring. Sorry. I walk in everyday, knowing it might be the last.

scott
 
Mohammad Ashrafuddin Ferdousi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Richard Scott Smith wrote:Just a couple of things as you get started...

I've been writing Java for 9 years and I'm still learning. I still study almost every day. That never stops. There's always something new to learn, some new technique, or some way to improve. You never get where you want to be. It's too big and there is too much to know. When I interview people I can tell right away when they are lying to me. It usually takes no more than 2 questions to eliminate a "know it all."

No one expects you to "know it all," but most expect honesty, a willingness to learn, and a firm grasp of the fundamentals. Senior developers will always ask about design patterns and programming technique. When someone comes in and they say they "know" Spring, then I will ask them about it. Saying you know Spring is a bit ridiculous anyway because Spring is huge. What do you know about Spring? Why would you use it? What are the fundamental ideas or design patterns that Spring is modeled after? What are some other frameworks that provide similar functionality? Based on these answers, I will then ask more questions. By this time, I know whether they are lying to me or not.

It is even more important to know what causes concurrency issues in multi-threaded environments like the web. Or algorithm efficiency and computational complexity. Or the pillars of Object Oriented design and why they are important, i.e. Polymorphism, Inheritance, and Encapsulation. Proper modeling and code reuse are important. These are the fundamentals you learn with a Computer Science degree. Unfortunately the most widely used design pattern is copy-paste! Not good!

I've seen so many goofy things from people who don't know the basics. I once saw 4 nested while loops to iterate through a 2 dimensional array. I also saw another guy not understand why his ordering was wrong when he'd call back his data structure because he didn't understand a hash table. He copy-pasted it from somewhere else, not knowing what it did. These are the things that give software developers a bad name.

Yeah, frameworks like Spring are great, but the fundamentals are more important. Knowing why a certain decision is made is more important than finding a code snippet that works, not really knowing whether it makes sense.

I've said too much. But hopefully you get the idea.


scott




Thank you for your information. I understand your words and must follow.


By the way, my employer has laid off over 80% in the last year. We are not hiring. Sorry. I walk in everyday, knowing it might be the last.



No problem. If you get any opportunity to give me an internship(even without any payment), i will be very oblige and if you can not, "No Problem".

You are so much experienced programmer on java and I always remember your words. I am going to learn something new, everyday. Will develop java basics more strongly. Remember about design patterns and whatever i need to accomplish the daily java tasks.

Thank you again. Have a nice day.


codeperl


 
Mohammad Ashrafuddin Ferdousi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Richard Scott Smith: Sir, If you do not mind, Can you give me your gtalk/ymail/live id? My id is it.codeperl@gmail.com(email) and it.codeperl@hotmail.com(conversation).

Please, do not mind for this. Actually web application development is my passion more than profession and i think, i always can learn some new things, techniques from your guidance(Ofcourse, if you do not feel disturbed). So, i ask for your id.

Thank you, anyway.

codeperl
 
Peter Mularien
Author
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yeah, frameworks like Spring are great, but the fundamentals are more important. Knowing why a certain decision is made is more important than finding a code snippet that works, not really knowing whether it makes sense.


This is the 1000% truth. Understanding "why" and not "how" is what makes you a great developer.
 
Richard Scott Smith
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohammad Ashrafuddin Ferdousi wrote:@Richard Scott Smith: Sir, If you do not mind, Can you give me your gtalk/ymail/live id? My id is it.codeperl@gmail.com(email) and it.codeperl@hotmail.com(conversation).

Please, do not mind for this. Actually web application development is my passion more than profession and i think, i always can learn some new things, techniques from your guidance(Ofcourse, if you do not feel disturbed). So, i ask for your id.

Thank you, anyway.

codeperl



I can appreciate the motivation and drive you seem to have. However I do not, normally give out my personal information for personal help. Reason? I'm so extremely busy, I normally end up putting people off because I'm under extreme pressure to meet deadlines to keep my own job and at the same time be a family man and run a household.

I miss my last team. They were mostly based in India, which was not convenient at all. I was up at all hours of the day but I put a lot of effort into getting them productive and they were really kicking ass on our stuff when they were let go. My boss was let go, my QA was let go and my business analyst was let go as well. Really sad because they were all great people.

The best thing to do is study, there are no shortcuts. If there were, I think I would have found them by now. Being an effective developer is analogous to any other profession of technical merit. A Doctor, a Lawyer, an Airline Pilot, another engineering discipline, etc. all take years of study and training to be good and effective. In programming, the entry level is skewed and the appreciation of experience and technical merit is often lost because we have few professional licensing contracts with the public like some other classical professions or certifications to measure and guarantee competence.

The best thing for prompt help to do is to stay on these forums. There are lots of people better than me here anyway and collectively they are able to offer more prompt help than I. I primarily stick with 2 myself, this one for Java (although I've been coming here a long time, I rarely post anything. I suppose I should probably be better about that) and linuxquestions.org for Linux. In addition, usenet forums are great as well. A formal study of computer science at a university is excellent.

nist.gov/dads is good for algorithm analysis. The list of great help out there goes on and on. But there's no substitute for good old fashion hard work. I, and many others here, will help you whenever you get tripped up with an issue.

scott
 
Mohammad Ashrafuddin Ferdousi
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Richard Scott Smith wrote:

Mohammad Ashrafuddin Ferdousi wrote:@Richard Scott Smith: Sir, If you do not mind, Can you give me your gtalk/ymail/live id? My id is it.codeperl@gmail.com(email) and it.codeperl@hotmail.com(conversation).

Please, do not mind for this. Actually web application development is my passion more than profession and i think, i always can learn some new things, techniques from your guidance(Ofcourse, if you do not feel disturbed). So, i ask for your id.

Thank you, anyway.

codeperl



I can appreciate the motivation and drive you seem to have. However I do not, normally give out my personal information for personal help. Reason? I'm so extremely busy, I normally end up putting people off because I'm under extreme pressure to meet deadlines to keep my own job and at the same time be a family man and run a household.

I miss my last team. They were mostly based in India, which was not convenient at all. I was up at all hours of the day but I put a lot of effort into getting them productive and they were really kicking ass on our stuff when they were let go. My boss was let go, my QA was let go and my business analyst was let go as well. Really sad because they were all great people.

The best thing to do is study, there are no shortcuts. If there were, I think I would have found them by now. Being an effective developer is analogous to any other profession of technical merit. A Doctor, a Lawyer, an Airline Pilot, another engineering discipline, etc. all take years of study and training to be good and effective. In programming, the entry level is skewed and the appreciation of experience and technical merit is often lost because we have few professional licensing contracts with the public like some other classical professions or certifications to measure and guarantee competence.

The best thing for prompt help to do is to stay on these forums. There are lots of people better than me here anyway and collectively they are able to offer more prompt help than I. I primarily stick with 2 myself, this one for Java (although I've been coming here a long time, I rarely post anything. I suppose I should probably be better about that) and linuxquestions.org for Linux. In addition, usenet forums are great as well. A formal study of computer science at a university is excellent.

nist.gov/dads is good for algorithm analysis. The list of great help out there goes on and on. But there's no substitute for good old fashion hard work. I, and many others here, will help you whenever you get tripped up with an issue.

scott



Thank you for posting another message for me. Ok. I will follow your advice. have a nice day.

Best Regards
codeperl
reply
    Bookmark Topic Watch Topic
  • New Topic