Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Books for Sping, Hibernate and Maven

Options
  • 15-09-2013 1:07pm
    #1
    Registered Users Posts: 8,324 ✭✭✭


    Hey,

    One of my two fyp ideas involves a website. PHP with MySQL (for academic reasons) is out, so one of my supervisors was saying using Spring with Hibernate and Maven for deployment. I've used Java EE with Glassfish, albeit only locally, and I couldn't get it deployed with Maven, though I didn't create it as a Maven project so that could have been the issue.

    I will more than likely be using Eclipse as an IDE. Is there any recommended texts to getting started and developing with these tools?


Comments

  • Moderators, Technology & Internet Moderators Posts: 1,334 Mod ✭✭✭✭croo


    Springsource have their own version of eclipse called STS which has all the spring components included and ready to go


  • Registered Users Posts: 2,021 ✭✭✭ChRoMe


    This is an interesting one, the stack that you have described is what is used in I'd say 90% of java web applications. It's a great stack and really nice to work with, however it is complex. While you will find plenty of documentation that is about specific features/conventions, there doesn't appear to be any resources for considering the stack as a single concept, such as LAMP.

    However, you always learn more by doing rather than reading. What you want to do is to go to http://appfuse.org/display/APF/AppFuse+QuickStart and follow the instructions for setting up a Spring,Hibernate and Maven application. Once you download what is essentially a bare bones demo site using all of the technologies you can play with that and it should be a lot clearer.

    There is a lot of money for knowing these technologies well :)


  • Registered Users Posts: 8,324 ✭✭✭chrislad


    Cheers, thanks for the replies. Looks like I have a lot of work ahead of me! I'm still not 'getting' Maven. Spring seems to be the framework and Hibernate is what maps the objects in that framework to a database, if I'm reading correctly. I'm just really getting into the research part now.

    Like I said, I've used Jave EE and GlassFish, but it was very abstracted away - more a case of use this at this point because that's the way it is, rather than knowing while you're using it.


  • Registered Users Posts: 870 ✭✭✭moycullen14


    chrislad wrote: »
    Cheers, thanks for the replies. Looks like I have a lot of work ahead of me! I'm still not 'getting' Maven. Spring seems to be the framework and Hibernate is what maps the objects in that framework to a database, if I'm reading correctly. I'm just really getting into the research part now.

    Like I said, I've used Jave EE and GlassFish, but it was very abstracted away - more a case of use this at this point because that's the way it is, rather than knowing while you're using it.

    Spring & Hibernate fit well together so are a good match. Maven I'm not so sure about. It is orthogonal to the other technologies and is, IMHO, really at its best in large, multi developer projects. Don't get me wrong, it's a really smart bit of technology and incredibly powerful but it has a steep learning curve and the benefits only become apparent when you have a lot of people and software interacting with each other. Also, it is a pain with eclipse.

    java ee, eclipse, spring, hibernate, mysql and tomcat (or glassfish) is a great technology stack. I'd just put maven into the 'advanced' category.


  • Registered Users Posts: 5,246 ✭✭✭conor.hogan.2


    I'd just put maven into the 'advanced' category.

    As would I but even on relatively small projects lashing everything in a lib folder is messy and learning about Maven or Ivy (considering we are discussing Java) would be well worth not ignoring if just learning the basics and using it as much as possible without distracting too much from the actual project itself.


  • Advertisement
  • Registered Users Posts: 8,324 ✭✭✭chrislad


    How do I actually deploy the project then? I had no idea how to get everything from a local dev to being a live site last year, and I thought, from speaking to people, that Maven did that.


  • Registered Users Posts: 328 ✭✭TommiesTank


    Maven is actually very easy to pick up when you start to use it. Much easier than Ant.

    Find some starter examples and take it from there.


  • Registered Users Posts: 328 ✭✭TommiesTank


    chrislad wrote: »
    How do I actually deploy the project then? I had no idea how to get everything from a local dev to being a live site last year, and I thought, from speaking to people, that Maven did that.

    At a high level maven allows you to reliably create an artifacts such as WAR, JAR and EAR files. WAR and EAR files can generally be deployed through an app server GUI or an auto deploy folder. All on the above artifacts can be created through an IDE e.g by right clicking on a project and exporting, but the dependency management helps minimise run time issues (such as mismatched jar versions or missing dependencies that don't prevent compilation) and maven will automatically run unit tests (if present and based on command used).

    Maven also integrates with continuous integration environment which integrates with your source control.

    That is high level overview, it does a lot more.


  • Registered Users Posts: 2,021 ✭✭✭ChRoMe


    chrislad wrote: »
    How do I actually deploy the project then? I had no idea how to get everything from a local dev to being a live site last year, and I thought, from speaking to people, that Maven did that.

    You obviously haven't taken my advice and used AppFuse then :p


  • Registered Users Posts: 11,262 ✭✭✭✭jester77


    Maven is nice once you get the hang of it but it is very rigid and unflexible when it comes to its lifecycle. For deploying, maven will work with most CI systems, jenkins and travis are probably the most popular with the open source community. Depending on what you are developing, you can then deploy from your CI directly to your web server or a repository manager like Artifactory or Nexus.

    Maven is overkill for small projects, you would be better off looking at something like gradle. It falls between ant and maven in terms of usability, extensibility and not having too rigid of a lifecycle, plus the nice thing about gradle is you can extend it with plugins written in groovy, but it's also possible to write them in scala or java.


  • Advertisement
  • Registered Users Posts: 8,324 ✭✭✭chrislad


    ChRoMe wrote: »
    You obviously haven't taken my advice and used AppFuse then :p

    I did actually! I was getting a lot of errors, but I need to find some time to sit down and work through it.


  • Registered Users Posts: 8,324 ✭✭✭chrislad


    To give an overview, this is the vehicle for the project, in terms of that the main goal is to use these technologies and be able to get a good site deployed. I've recently taken back up the aul tennis so it fits current interests.

    Building a site for a local tennis club. Features include

    - User registration and login. Optional Facebook integration
    - Two week calendar for booking courts with preset times
    - Tournament registration and creator
    - News section

    Admin tasks such as

    - Disabling/Confirming user registrations/memberships
    - Changing scalability of the site (eg how many courts are available in the timetable?)
    - Prebooking times that are unavailable to book in the court timetable.
    - Assigning partners from registered members for tournaments (possibly automatic based on member seedings, if implemented)

    The requirements are still a bit fluid at the moment as it's still very much in the early, small overview stages.


  • Registered Users Posts: 2,021 ✭✭✭ChRoMe


    chrislad wrote: »
    I did actually! I was getting a lot of errors, but I need to find some time to sit down and work through it.

    Can you post what errors you were getting, I'd imagine maven is not added to your path or you dont have JAVA_HOME set.


  • Registered Users Posts: 8,324 ✭✭✭chrislad


    I was using Ubuntu so it wasn't a Java Home, it was more than I didn't understand what the hell I was doing.

    I have Maven working now with Eclipse, and have successfully used it to import Spring and Hibernate dependencies, so that's all I need for the moment.

    Again, thanks for all the help. It's been brilliant.


Advertisement