30

I'm really starting to get a hang of the client-side Java programming, and from what I understand Java is great for developing stable server sides for large amounts of traffic.

The problem is that I'm completely new to server development, so I don't know where to start or where to look for information, despite Java's good documentation.

More specific questions:

  • Do you know any good, non-specific tutorials for server-side Java? I've seen some tutorials for Google's Cloud Platform and Netscape, but I don't want to be dependent on their infrastructure.
  • Is the common practice to develop your code in Eclipse and then "ship" it to your server? As I said I've never done server-side development and I've only tried learning a little node.js.

Thank you in advance, I hope these questions aren't to wide-scoped.

joseph
  • 897
  • 2
  • 10
  • 20
  • 1
    The easiest way to get a working webserver IDE would be to download Netbeans with Glassfish and install it. You can then start experimenting with simple JSP pages. – Thorbjørn Ravn Andersen Apr 09 '15 at 23:00

4 Answers4

10

I would suggest you to start with a simple setup like you already told us: Eclipse + let's say an easy to use tomcat.

If it comes to the server side you need to create a Servlet which allows to access other application data from your server in a format which you define or let's say you + the clients define. I would suggest you to start with something you will be familiar like Json. For this I have a little "starting point" for you.

Clone that simple example for a server-side application: https://github.com/DominikAngerer/java-GsonJerseyProvider It already provides you a simple structure for Json which is used by a Framework like Ember and also you can easy modify the structure which is defined there.

Is the common practice to develop your code in Eclipse and then "ship" it to your server?

Yeah it's totally common to do that. Write your Server Side code and export it as .war - tomcat or jetty for example can simply deploy them and you will be able to run them on these application server.

Do you know any good, non-specific tutorials for server-side Java? I've seen some tutorials for Google's Cloud Platform and Netscape, but I don't want to be dependent on their infrastructure.

I really love to work with Jersey - It's really a to understand the code you will write. Maybe try the example provided by IBM developersworks: http://www.ibm.com/developerworks/library/wa-aj-tomcat/

For the beginning it may be a little of a overhead but after you tried the example (it should be running right away) I think you will get the idea of how to create a simple backend system with java.

DominikAngerer
  • 6,354
  • 5
  • 33
  • 60
  • One more question: When I decide to rent a server, does the server need any qualifications to run Java? Will the Java virtual machine run on any server? – joseph Apr 10 '15 at 12:02
  • I'm currently always working with a Debian Wheezy on a Dedicated Server and let's say an Apache. I would recommend you something like Siteground - or another would be using amazon server :) - I will get you a like for a trial (if i can find it somewhere). – DominikAngerer Apr 10 '15 at 12:17
  • System requirements for Java: http://java.com/en/download/help/sysreq.xml – DominikAngerer Apr 10 '15 at 12:19
  • Amazon Free https://aws.amazon.com/en/free/ :) There you can ahve up to 750h per month running a simple linux system (let's say debian wheezy) install a simple tomcat & voila - things are running :) – DominikAngerer Apr 10 '15 at 12:21
4

If you want a complete environment out of the box, you can try:

  • Netbeans EE IDE: It contains a GlassFish server and the SDK preconfigured, glasfish is one of the most used open source application servers. Here you can find tutorials from the Netbeans page.

  • JBoss Developer Studio: is another very used IDE that includes a JBoss server. You can find tutorials from this one here.

I would sugest to start with GlassFish, as it is very easy to use and configure.

3

Take a look at JavaEE. I would start by learning how to create simple JSP pages with Eclipse + Tomcat (create a "Dynamic Web Project"). After that, check out Servlets and be sure to understand HTTP. After that, I would get an overview of JSTL and other Java EE components. DZone has a nice refcard giving you an overview of the Java EE 7 components. After that, you should be good enough to move on to a framework like Spring or Struts. Alternatively you can perfect Java EE fully learning it's more advanced components like CDI(context dependency injection) or JAX-RS and JAX-WS(web services). This document should give you an overview of how to configure a servlet container in eclipse: http://www.eclipse.org/webtools/community/education/web/t320/Configuring_an_Application_Server_in_Eclipse.pdf

As for tutorials, check out Oracles JavaEE 7 tutorial at: http://docs.oracle.com/javaee/7/tutorial/

Alternatively, if you do not like the styles and patterns used in Java EE, there is a non-Java EE framework called the Play Framework (http://playframework.com) it gives you the option to develop your application using either Java or Scala, and uses MVC architecture.

James Parsons
  • 6,097
  • 12
  • 68
  • 108
1

If you want to learn server side programming with JAVA, I recommend to start working with Eclipse. Almost all developers whom I know are using one or another IDE, most of them are using Eclipse for J2EE.

There are plenty of tutorials available on how to setup eclipse on your local computer. I personally read many tutorials when I learned it, you can google it.

http://www.apekshit.com/t/11/Writing-JAVA-programs-in-Eclipse

http://www.apekshit.com/JSP-Tutorial-for-beginners-with-Examples/c/21

I found these 2 that might help you to achieve what you are looking for.

Jay
  • 11
  • 1