Java EE Open Source project to learn from? - java

I'am trying to dive deeper into Java EE,
so i was browsing SourceForge to look for a project
that can help me see how components fit together
so if comeone could point out a specific open source project
or any other resource that can help me with this.

The canonical sample application to learn Java EE used to be the Pet Store from the Java BluePrints program (now) at Oracle.
Check out here for a list of blueprints. The Pet Store is here

Barring a specific need, if I wanted to "learn Java EE" today, I would focus on the EJB-Lite profile of Java EE 6. Basically this is the web tier, JPA, and embedded Session Bean EJBs.
These components are the "90+%" of what folks do with a full boat Java EE server today. I don't consider learning the web tier enough to be considered "Java EE". Yea, it's a component of Java EE, but I think EJB is more important, and EJB is more "interesting" along with the web tier.
EJB-Lite hits the sweet spot of functionality and ease of deployment and packaging.

Open eSignForms by Yozons is an excellent Java EE application to learn on.
Check out their website and download their esignature and web contracting application.
You'll learn advanced topics such as sending and receiving mail, integrating with PostgreSQL, Apache Tomcat, encryption, and much more!
They also make extensive use of the Java framework Vaadin for a modern and responsive web application interface.

Related

Start Java EE project after standard java

My task is to make a small a project for start my ee studies. Till now, I learned standard java, but i don't get what ee means exactly, how my project would be an enterprise stuff. Has it a different syntax or different setup in IDE? I know it's not a clever question, but I really don't know where to start. Do you have any idea for start a project?
Java EE is no different language or has no different syntax than Java SE. It's built on top of Java SE and comprises a set of standardized APIs and libraries that are helpful for solving problems in an enterprise context.
To name a few:
Web Applications (Servlets, JSPs, JSF, WAR-packaging)
RESTful- and WebServices (Jax-RS, Jax-WS)
Persistence (EJB, JPA)
Context Dependency Injection (CDI)
Security
Batch
Messaging
...
Further it defines a runtime environment - an Application Server - to run enterprise applications. Nevertheless, the classic application server model has become somewhat obsolet, nowadays you either run a single application in an application server or use only parts of the libraries and APIs and embedd those in your applications.
So basically, all you need is an IDE and the libraries. When you're using maven as build environment, all you need is the java-ee maven dependency, see Maven Central
Usually you don't need to know all the libraries and APIs of Java EE in detail, it's good to know what is available out-of-the-box (so you don't reinvent the wheel), but you hardly will need all of them in all of your projects.
I personally avoid JSF, hardly have to deal with JPA, only occasionally do something with Batch or EJBs. More common are CDI, Restful or WebServices and WebApps, and usually a bit of Security.
And a good example for a Java EE Projects, a simple one with some typical use cases and very little code is Adam Bien's Guestbook2.0, which only requires Docker to run.

resources for .net programmer to learn Java EE [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Java: A good introduction to J2EE platform for noobs
I'm not new to programming at all - I've programmed in .net for over a decade. I have dabbled now and then in java, but never at an enterprise level. Now I'd like to learn to use Java EE.
What are some good online resources, or books that I can buy? I'll need a step-by-step on what to download to set up my environment (I already have the Glassfish tools bundle for eclipse, but I'm not sure if this is what I need or where to go with it...).
I think coding a simple website to perform basic crud operations would give me a good start.
To begin with, I'd stay away from anything that says J2EE as it's an outdated uglier version. Look for Java EE 6 or at least Java EE 5.
Apart from that my recommendation would be to download the Java EE version of Netbeans
since it has everything you need. In the same site there several starting tutorials and a longer e-commerce tutorial
If you want to start with Servlets and JSPs in Tomcat, just make sure it is selected during the install procedure.
Glassfish is fine. You might consider JBOSS as well; it's another Java EE app server that's open source and won't cost you a thing to try out.
I'm not sure if WebLogic from BEA/Oracle is still available to download for developers to learn, but it's my favorite Java EE app server. Version 9/10 from BEA, before Oracle bought them, was simply the best.
You can start with a servlet/JSP engine like Tomcat or Jetty. You would begin with servlets (HTTP listeners that respond to GET/POST requests); JSPs (a templating language using tags that are compiled into servlets and executed on the server - think of them as servlet/HTML factories); and JDBC (relational database connectivity). You can go a long way with just those.
Once you've mastered those you can decide between a Java EE solution (EJBs) or Spring. Spring is not part of the Java EE spec, but it's a fine alternative. It's a combination of dependency injection, aspect oriented programming, and solid modules for persistence, remoting, messaging, web services, web MVC, LDAP, etc.
The NetBeans IDE is not so ubiquitous as eclipse (so eclipse is a very good choice), but makes Java EE 6 with Java 7 and GlassFish very easy. And netbeans.org has several tutorials.

Java webdevelopment IDE/Server/Documentation

I have been using PHP (OOP) with various Frameworks for all my webdevelopment projects for the last few years. Next year I'll have to learn Java as part of CS university course, so I thought it may be a good idea to switch to Java for some of my smaller webdevelopment projects, so that I can get to know Java in advance.
What do I need to use Java for backend web development? What IDE/Server software/etc. should I use? What frameworks are available and which documentations could one recommend?
I know this is strictly not a Stackoverflow question, but I'd really like to hear the opinion of the very professional community here at Stackoverflow!
The web development component of Java is called Java EE. You should look into that.
As IDE you can use Eclipse, Netbeans, etc. (you can download versions that are specifically aimed at Java EE development, with bundled servers like GlassFish or Tomcat).
Use all of these technologies and learn what the terms mean: Servlet, JSP, JSTL, Filter, Tag library (create your own).
A very popular framework is Spring. Spring Core and Spring MVC has recreated most of the Java EE components but in a way that is easier to use.
The DWR library makes AJAX very easy.
Learn how to use Spring ORM, Hibernate or JPA.
I also just want to add my own answere to show what I choose in the end to work with:
IDE: NetBeans
Framework Play! Framework

Can I use JSP but not using JavaBean and Java EE?

I am developing a web application using JSP, but it seems that Java EE is very big for my application. I'm only doing something like a blog.
Can I use a pure JSP and ignore Java EE and the JavaBean and start a pure JSP project?
JavaSE on its own is not sufficient to use JSP, you need at least some components of JavaEE. Specifically, you need a servlet container, such as Jetty or Tomcat.
Neither of these requires (or even contains) the rest of the baggage that comes with a full JavaEE stack.
You don't need to download the huge Java EE packages as offered by sun.com/oracle.com. All it basically contains is the Glassfish server and eventually the Netbeans IDE. Glassfish is a fullfledged and heavyweight Java EE server.
The minimal requirement to develop and run JSP/Servlet is the following:
JDK (click the first Download JDK button) - about 75MB.
A JSP/Servlet container, I'd suggest Apache Tomcat - only about 7MB.
That's all. You have only to choose a development editor, which can be just Notepad. However to ease and speedup development, I'd recommend using an IDE like Eclipse for Java EE. It offers code completion, automatic builds (compilation), easy debugging, deploying to integrated server, etc.
That said, Javabeans is just a specification, say, a style of coding. Public classes with private properties and public getters/setters which represent real world data e.g. Person, User, Product, Order, etc. It doesn't require a download. You just have to write it yourself. However, to ease development and maintenance it's strongly recommend to use Javabeans in your code.
See also:
Is the sun tutorial the best way to learn how to make a Java webapp
Java web development - What skills do I need?
What is a Javabean and where are they used?
JSP tag info page
There's no requirement you use all the features of the Java EE server. There's also stand-alone servlet containers like Apache Tomcat.

Java EE App Server Hello World

I am fairly comfortable with standalone Java app development, but will soon be working on a project using a Java EE application server.
Does anyone know of a straightforward how-to tutorial to getting a hello-world type application working in an application server? I'm (perhaps naievly) assuming that the overall approach is similar between different frameworks, so I'm more interested in finding out the approach rather than getting bogged down in differences between the different frameworks.
If you are not aware of a good guide, then could you post bullet-point type steps to getting a hello-world running?, i.e.
Download XX
Write some code to do YY
Change file ZZ
Other steps...
Note: Just because I have a windows machine at home, I would prefer to run if this could be run on windows, but in the interest of a better answer, linux/mac based implementations are welcome.
I would choose JBoss AS or GlassFish for a start. However I'm not sure what you mean by Java EE "Hello World". If you just want to deploy some JSP you could use this tutorial (for JBoss):
http://www.centerkey.com/jboss/
If you want to get further and do the EJB stack and/or deploy an ear-file, you could read the very good JBoss documentation:
Installation Guide
Getting started
Configuration Guide
In general you could also just do the basic installation and change or try the pre-installed example applications.
I currently have JBoss installed (on windows). I develop with Eclipse and use the Java EE server integration to hot deploy or debug my code. After you get your first code running you realy should have a look at the ide integration since it makes development/deploy roundtrips so much faster.
The JavaEE (they dropped the 2) space is pretty big. A good tutorial to start is the one from Sun. For a simple hello world application, the web container only would suffice. A well known servlet jsp container is tomcat. See here for installation instructions. Try installing it with eclipse and create a web project. This will generate some files for you that you can look at and edit. Also starting and stopping the application server is simpler.
Another option is to get Oracle JDeveloper (free to download and use - it's a full featured IDE that includes some neat extras like the SQL workbench and BPEL designer).
As a learning tool, it is quite good, not only for the tutorials available from Oracle, but it includes a range of "cue-card" lessons in the tool itself to teach many common techniques.
cue card view http://tardate.heroku.com/images/jdev-cuecards.jpg
If you haven't gone near NetBeans in a while its catching up with Eclipse very fast and worth a look, especially when starting Java EE.
Version 6.x installs Tomcat and/or Glassfish for you and then provides wizards to create/deploy/redeploy applications.
The initial tutorial on Web Applications is here and a more complex example here.
As JeroenWyseur puts it, Java EE is a fairly big space. In addition to what he said, you should try to get more details of what exactly you'll be doing: servelts & co, EJB (entity, session, message beans?) and try to get familiar with that.
It should be clear for you that your code runs in a managed environment, which imposes a lot of constraints. in order to make sure you understand what happens you should get familiar with the concept of deployment. Then, if you do EJBs, transaction management is important too. If you don't understand exactly what happens when a bean or a servlet is deployed, how transactions are managed, how beans are invoked, you're going to have a hard time.
A book that helped me a lot back in the time is Mastering EJB, by Ed Roman.
Also, getting familiar with RMI will help you understand EJBs.

Categories

Resources