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

Its Java Jim, but which flavour.

Options
  • 08-01-2015 10:11pm
    #1
    Registered Users Posts: 6,252 ✭✭✭


    So, having written in Java before using SE, I'm now developing full time in PHP & mySql, using an MVC framework, along with jquery, javascript & css. I'm comfortable enough with doing this, developing web pages as interfaces etc..... but I want to go back and do some of my own work with Java, but given that Java is so varied i don't know what or which to use.

    As a learning process I'd like to replicate a project I've developed in php in the past. UI that is powered by a browser and runs from a server and sits on top of a mysql php

    I see no point in developing a desktop application in SE and swing, since the era of standalone software is dying out, and its all web based now. That plus swing is outdated.

    I was thinking of using Hibernate as the mySql framework, and build an application in Spring as an mvc framework.

    Having said all that, considering that there is so many different types of frameworks and so on out there that I don't have a clue of which ones to use or which ones are worth pursuing.

    Should I use Java EE?
    What should i use to build my interface?
    Should I use Spring and Hibernate? or either / or?

    Any suggestions on which to use would be appreciated.

    Thanks


Comments

  • Registered Users Posts: 50 ✭✭EamonnDunne


    So, having written in Java before using SE, I'm now developing full time in PHP & mySql, using an MVC framework, along with jquery, javascript & css. I'm comfortable enough with doing this, developing web pages as interfaces etc..... but I want to go back and do some of my own work with Java, but given that Java is so varied i don't know what or which to use.

    As a learning process I'd like to replicate a project I've developed in php in the past. UI that is powered by a browser and runs from a server and sits on top of a mysql php

    I see no point in developing a desktop application in SE and swing, since the era of standalone software is dying out, and its all web based now. That plus swing is outdated.

    I was thinking of using Hibernate as the mySql framework, and build an application in Spring as an mvc framework.

    Having said all that, considering that there is so many different types of frameworks and so on out there that I don't have a clue of which ones to use or which ones are worth pursuing.

    Should I use Java EE?
    What should i use to build my interface?
    Should I use Spring and Hibernate? or either / or?

    Any suggestions on which to use would be appreciated.

    Thanks

    Spring and Hibernate are probably the most dominant Java stack for the web at the moment, and what I would suggest for such a project. Manage and deploy the application locally using maven and jetty.

    JavaEE is more suited for larger enterprise type applications. Think large scale enterprises such as banks, insurance etc.

    If you have been away from Java for a while I'd highly recommend using IntelliJ as your IDE.


  • Registered Users Posts: 6,252 ✭✭✭Buford T Justice


    Spring and Hibernate are probably the most dominant Java stack for the web at the moment, and what I would suggest for such a project. Manage and deploy the application locally using maven and jetty.

    JavaEE is more suited for larger enterprise type applications. Think large scale enterprises such as banks, insurance etc.

    If you have been away from Java for a while I'd highly recommend using IntelliJ as your IDE.

    I have intellij alright, and I use phpStorm at work, Their IDE's are quite good I find. All will be based locally as its only a dev project.

    Can you write server side spring projects in SE? or do you need EE for that?
    What would I be looking to use to build a UI? and are there any resources that can get me started on a simple setup?


  • Registered Users Posts: 50 ✭✭EamonnDunne


    I have intellij alright, and I use phpStorm at work, Their IDE's are quite good I find. All will be based locally as its only a dev project.

    Can you write server side spring projects in SE? or do you need EE for that?
    What would I be looking to use to build a UI? and are there any resources that can get me started on a simple setup?

    Spring doesn't require EE. To do UI you should investigate bootstrap for a good starting point for your CSS and jQuery for handling ajax calls to update the page without a full refresh,


  • Registered Users Posts: 6,252 ✭✭✭Buford T Justice


    Spring doesn't require EE. To do UI you should investigate bootstrap for a good starting point for your CSS and jQuery for handling ajax calls to update the page without a full refresh,

    Spring doesn't yes, but if I want to write a program that can be hosted on a server or localhost, then is SE suitable, or does it need to be written in EE? Like I say, I think its more worthwhile to have something that can be cloud based rather than a local install like a jar file.

    Jquery, ajax, bootstrap CSS & html and all of that I have no problem with, as I work with them all the time. I know how to implement this kind of code into a PHP framework to build a UI, but I want to know how I can implement it into Java.

    Say I create a form in HTML5, I know how to process the form in PHP, but I want to be able to submit the same form to a java method and go from there. If that makes any sense.


  • Registered Users Posts: 50 ✭✭EamonnDunne


    You don't need EE for anything, you can completely ignore it.


  • Advertisement
  • Closed Accounts Posts: 8,015 ✭✭✭CreepingDeath


    Spring doesn't yes, but if I want to write a program that can be hosted on a server or localhost, then is SE suitable, or does it need to be written in EE?

    Some people think of J2EE as the enterprise java beans, but Java servlets are also part of J2EE.

    You would typically write a Java servet in a web application (in a WAR file) and deploy it on a web server.
    It could then respond to your own defined Ajax requests.

    This is a standard "RESTful" approach - see http://www.restapitutorial.com/lessons/httpmethods.html


    If you were to limit yourself to SE, then you'd have to write all the web handling yourself, when really thats the job of a web container in a web server, so no point in reinventing the wheel.

    Node.js could potentially be used on the backend for request handling and it doesn't require a web server, but you'd still need a web server to serve your html pages anyway.

    I don't typically work in the web layer, but that's the way I'd implement it.


  • Registered Users Posts: 50 ✭✭EamonnDunne


    Some people think of J2EE as the enterprise java beans, but Java servlets are also part of J2EE.

    Yes this is correct, and something I was guilty of not clarifying in my original post. I was making the distinction that a servlet container would be sufficient as opposed to a full blown application server such as jboss.


  • Registered Users Posts: 1,275 ✭✭✭bpmurray


    Install Tomcat and try to replicate a PHP solution you have today. Replace your PHP file with a JSP or try a servlet + HTML. The idea is to take a solution you're comfortable with, and change the language rather than any logic, although you'll have to move to OO for the servlet.

    Vary things: use Spring + Hibernate, or you can try JSF (although I'd recommend using tooling that supports it rather than trying to code it by hand). Try JDBC/JDO/Castor. And so on - Java tends to have a dozen ways to do anything, so try them all to see which ones are best for you.


  • Closed Accounts Posts: 8,015 ✭✭✭CreepingDeath


    bpmurray wrote: »
    Java tends to have a dozen ways to do anything, so try them all to see which ones are best for you.

    You've just increased his workload by a factor of 12 !


  • Registered Users Posts: 6,252 ✭✭✭Buford T Justice


    Some people think of J2EE as the enterprise java beans, but Java servlets are also part of J2EE.

    You would typically write a Java servet in a web application (in a WAR file) and deploy it on a web server.
    It could then respond to your own defined Ajax requests.

    This is a standard "RESTful" approach - see http://www.restapitutorial.com/lessons/httpmethods.html


    If you were to limit yourself to SE, then you'd have to write all the web handling yourself, when really thats the job of a web container in a web server, so no point in reinventing the wheel.

    Node.js could potentially be used on the backend for request handling and it doesn't require a web server, but you'd still need a web server to serve your html pages anyway.

    I don't typically work in the web layer, but that's the way I'd implement it.

    Stupid question is stupid, but can you be a bit more explicit?

    I can write the project MVC style in spring, and use Hibernate for the DB interaction, but what to do the UI in?


  • Advertisement
  • Registered Users Posts: 50 ✭✭EamonnDunne


    Stupid question is stupid, but can you be a bit more explicit?

    I can write the project MVC style in spring, and use Hibernate for the DB interaction, but what to do the UI in?

    Your front end will be written in .jsp (JavaServer pages), you will have tags available to work with data provided by the Spring controller.


Advertisement