Books
A good place to look and find the latest books and official documentation is the Java BluePrints page (also available here: Java BluePrints > Enterprise > Guidelines).The Java BluePrints Program program helps developers create robust, scalable, and portable applications by providing guidelines, patterns, and code that illustrate best practices on how to build end-to-end applications using Java technology.
One example is the Java Pet Store: with real, working code illustrating the BluePrints guidelines, the Java Pet Store 2.0 reduces the learning curve of the Java EE 5 platform, enabling you to deliver complete end-to-end solutions with faster time-to-market.
More information on this sample app and other guidelines can be found on their free book: Designing Enterprise Applications with the J2EE Platform, Second Edition
The level of abstraction provided by the J2EE standard enables common themes to be developed, explained, and explored and certain common design guidelines to be developed. That's what Java BluePrints is all about. It answers questions like [1]:
- What's the best way to apply each type of J2EE component?
- Where does it make sense to use Java servlets and where to use JavaServer Pages?
- What's the best way to factor business logic between entity beans and session beans?
- How do you choose between container-managed and bean-managed persistence when using entity beans?
- What are the design and performance trade-offs between choosing a distributed architecture and one based on local interfaces?
- In this increasingly security-conscious world, how do you design distributed applications to be accessible to users who need them and secure from unwanted intrusion?
Sources of diverse tutorials:
- Official JAVA tutorials;
- Oracle Learning Library;
- Official Java Code Samples & Apps
- Java EE & Java Web Learning Trail: the Netbeans site has lots of tutorials (some sections: sample applications);
Tutorials for beginners:
- Beans (or JavaBeans) tutorial;
- Working with the Java DB (Derby) Database: This document demonstrates how to set up a connection to Java DB database in NetBeans IDE. Once a connection is made, you can begin working with the database in the IDE, allowing you to create tables, populate them with data, run SQL statements and queries, and more;
- Connecting to a MySQL Database: how to set up a connection to a MySQL database from the NetBeans IDE. Once connected, you can begin working with MySQL in the IDE's Database Explorer by creating new databases and tables, populating tables with data, and running SQL queries on database structures and content;
- Creating a Simple Web Application Using a MySQL Database: covers some basic ideas and technologies in web development, building a simple two-tier client-server architecture using:
- JSP (JavaServer Pages);
- JSTL (JavaServer Pages Standard Tag Library);
- JDBC (Java Database Connectivity API);
- Glassfish Application Server;
- Getting Started with Java EE 6 Applications
IDE and Application Servers
Servlets
JSP
- Building Web Apps in Java: Beginning & Intermediate Servlet & JSP Tutorials (GREAT TUTORIAL)
- JSP/Servlets course
JSF
- JSF (JavaServer Faces) 2.0 Tutorial (GREAT TUTORIAL). JSF 2.0 is a serious alternative to servlets and JSP, and has strong MVC support. JSF 2.0 requires servlets 2.5 (e.g., Tomcat 6) or later. JSF 2.0 is also built in to all Java EE 6 servers. This is the framework that I recommend for most new applications. Many modern apps should consider using JSF 2.0 instead of servlets and JSP.
- JSF (JavaServer Faces) 1.x Tutorial. Unless you are running an older server that supports only servlets 2.4 or earlier (e.g., Tomcat 5), you should use JSF 2.0 instead of JSF 1.x.
Structs
- Jakarta Struts (Action Framework) Tutorial (GREAT TUTORIAL)
Spring
TODOWebservice Tutorials
There's 2 main types of Webservices in java:- SOAP Web Services (JAX-WS) - aka "big webservices" these use SOAP and XML;
- or RESTFull Web Services (JAX-RS);
- Tutorial on JavaMagazine (TODO)
This tutorial uses both types of webservices (JAX-WS and JAX-RS).
In the end, we will have two types of Web services in one application. This will allow us to compare and easily choose the type of Web service that best fits our needs.
- Part1 (pag. 17): demonstrates how to create a Java Platform, Enterprise Edition (Java EE) application integrating Representational State Transfer (REST) Web services;
- Part 2 (pag. 22): covers managing the answers sent by a Web service using the JavaScript Object Notation (JSON) framework. We also used HTML5, JavaScript, and Ajax to call the Web service, store the information locally, and display the information later;
- Part 3 (pag 23): focuses on the integration of Java API for XML Web Services (JAX-WS). We create a complete application based on a Java API for XML Web Services(JAX-WS) Web service and see in detail how to use a JavaServer Faces (JSF) client to access and consume the Web service.
- Netbeans IDE: Introduction and first steps: Introduction to Web Services on the NetBeans site;
- Netbeans IDE: Web Services Learning Trail on the NetBeans site;
RESTFull Web Services (JAX-RS):
- Getting Started with RESTful Web Services: learn about REST and how NetBeans IDE supports this architectural style;
- Creating a Graphical Client for Twitter: use the NetBeans IDE to create a simple, graphical, REST-based client that displays Twitter friends timeline messages and lets you view and update your Twitter status
- The rsvp Example Application: (on the oficcial Java EE tutorial) allows invitees to an event to indicate whether they will attend. The events, people invited to the event, and the responses to the invite are stored in a Java DB database using the Java Persistence API. The JAX-RS resources in rsvp are exposed in a stateless session enterprise bean.
- [x]Creating a Graphical Client for Twitter: In this tutorial, you use the NetBeans IDE to create a simple, graphical, REST-based client that displays Twitter friends timeline messages and lets you view and update your Twitter status. The application uses Swing and NetBeans IDE's support for Twitter's SaaS operations.
SOAP Web Services (JAX-WS):
- Using JAX-WS 2.0 to Create a Simple Web Service on JavaSE;
- Getting Started with JAX-WS Web Services: JAX-WS stand for Java API for XML Web Services. This API simplifies the task of developing web services using Java technology. It addresses some of the issues in JAX-RPC 1.1 by providing support for multiple protocols such as SOAP 1.1, SOAP 1.2, XML, and by providing a facility for supporting additional protocols along with HTTP. JAX-WS uses JAXB 2.0 for data binding and supports customizations to control generated service endpoint interfaces. With its support for annotations, JAX-WS simplifies web service development and reduces the size of runtime JAR files.
- Developing JAX-WS Web Service Clients
EJB (Enterprise java Beans)
Keep in mind that EJB 3.x (introduced with JEE 5?) is very different from older versions an much easier to use. When reading about EJB always make sure you know what version is being used!- Getting Started with Enterprise Beans : shows how to develop, deploy, and run a simple Java EE application named "converter". The purpose of "converter" is to calculate currency conversions between Japanese yen and Eurodollars. The converter application consists of an enterprise bean, which performs the calculations, and a web client.
- TODO: this article seems to have a good overview: EJB 3.0 Tutorial
Full Application Tutorials
- Spring to Java EE Migration Article Series, by David Heffelfinger: we will rewrite the sample Pet Clinic application provided with Spring using Java EE. David Heffelfinger blog and on twitter. (my download backup)
- part 1 on Official Oracle site (October 2011): start developing the Java EE version of the application by generating the persistence layer from an existing database;
- part 2 (December 2011): see how NetBeans can help us generate EJB 3.1 session beans that act as DAOs, as well as the JSF 2.0 user interface;
- part 3 (April 2012): modify the generated code to make it a bit more user friendly and we will compare the Java EE and Spring versions of the Pet Clinic application.
- part 4 (not released yet): compare the Java EE and Spring APIs.
- [x] The NetBeans E-commerce Tutorial: A multi-part tutorial, where you learn how to create a simple e-commerce application that demonstrates various important features of Java web and EE development. In doing so, you'll familiarize yourself with the NetBeans IDE and become capable of applying it to your own development purposes. The resulting application can be seen live here.
This great resource uses an iterative implementation from initial design and planning to a final load test (with JMeter) and profiling (with NetBeans profile tool). It uses techonologies like: JPA, JSTL, JSP and Servlets (the new Facelets JSF framework is NOT used), EL, HTML, CSS, jQuery, EJB (Stateless beans are used to implement a facade design pattern), JDBC, MySQL database (MySQL WorkBench is also used to build a data model). The app is implemented with an MVC design with Servlets acting has a Controller, JSP/EL/JSTL has a View and JPA/Stateless beans/Entity Beans has the Model. - Java Pet Store: with real, working code illustrating the BluePrints guidelines, the Java Pet Store 2.0 reduces the learning curve of the Java EE 5 platform, enabling you to deliver complete end-to-end solutions with faster time-to-market.
- [x] Creating an Enterprise Application with EJB 3.1
- The "Java EE Documentation Downloads" have many examples available for download;
Contexts and Dependency Injection
- Getting Started with Contexts and Dependency Injection and JSF 2.0: demonstrates how you can use NetBeans IDE to set up a Java web project with support for JSF 2.0 and CDI. It continues by showing how to wire CDI managed beans with Facelets pages, and concludes with a brief example of CDI integration with EJB technology.
JPA
- JPA 2.0 with EclipseLink - Tutorial (Great basic tutorial)
- GlassFish Project - Java Persistence Example
- EclipseLink/Examples/JPA/JSF Tutorial: Tutorial: Build a Web Application (JSF) Using JPA;
Sem comentários:
Enviar um comentário