Reading Notes: Your First Cup: An Introduction to the Java EE Platform

2010-07-10  来源:本站原创  分类:Java  人气:208 

Reading Notes: Your First Cup: An Introduction to the Java EE Platform

1. Differences Among Three platforms

Java technology is both a programming language and a platform. The Java programming language is a high-level object-oriented language that has a particular syntax and style. A Java platform is a particular environment in which Java programming language applications run.

Three platforms of the Java programming language: Java SE, Java EE, Java ME
All Java platforms consist of a Java VirtualMachine (VM) and an application programming interface (API). The Java VirtualMachine is a program, for a particular hardware and software platform, that runs Java applications. An API is a collection of software components that you can use to create other software components or applications. Each Java platform provides a virtual machine and an API, and this allows applications written for that platform to run on any compatible system with all the advantages of the Java programming language.

Java SE: Java SE's API provides the core functionality of the Java programming language. It defines everything from the basic types and objects of the Java programming language to high-level classes that are used for networking, security, database access, graphical user interface ( GUI) development, and XML parsing.

Java EE: The Java EE platform is built on top of the Java SE platform.Java EE provides an API and runtime environment for developing and running large-scale, multi-tiered, scalable, reliable, and secure network applications.

Java ME: The JavaME platform provides an API and a small-footprint virtual machine for running Java programming language applications on small devices, like cellular phones. The API is a subset of the Java SE API, along with special class libraries useful for small device application development. JavaME applications are often clients of Java EE application services.

2. Overviewof Enterprise Applications

As stated above, the Java EE platform is designed to help developers create large-scale,
multi-tiered, scalable, reliable, and secure network applications. A shorthand name for such
applications is "enterprise applications,"
so called because these applications are designed to
solve the problems encountered by large enterprises.

The features that make enterprise applications powerful, like security and reliability, often make
these applications complex. The Java EE platform is designed to reduce the complexity of
enterprise application development by providing a development model, API, and runtime
that allows developers to concentrate on functionality.

Tiered Applications

In a multi-tiered application, the functionality of the application is separated into isolated
functional areas, called tiers. Typically, multi-tiered applications have a client tier, a middle tier,
and a data tier (often called the enterprise information systems tier). The client tier consists of a
client program that makes requests to the middle tier. The middle tier's business functions
handle client requests and process application data, storing it in a permanent datastore in the
data tier.

(1) The ClientTier;

Clients can be a web browser, a stand-alone application, or other servers, and they run on a
different machine from the Java EE server.

(2) TheWebTier

The web tier consists of components that handle the interaction between clients and the
business tier. Java EETechnologies Used in theWebTier:

Servlets Java programming language classes that dynamically process requests and construct responses, usually for HTML pages

JavaServer Pages (JSP) Text-based documents that are compiled into servlets and define how dynamic content can be added to static pages, such as HTML pages.

JavaServer Faces technology
A user-interface component framework for web applications that allows you to include UI components (such as fields and buttons) on a page, convert and validate UI component data, save UI component data to server-side data stores, and maintain component state.

JavaServer Pages Standard Tag Library
A tag library that encapsulates core functionality common to JSP pages
JavaBeans Components Objects that act as temporary data stores for the pages of an application

(3) The BusinessTier

The business tier consists of components that provide the business logic for an application.

Java EETechnologies Used in the BusinessTier
The following Java EE technologies are used in the business tier in Java EE applications:
■ Enterprise JavaBeans (enterprise bean) components
■ JAX-WS web service endpoints
■ Java Persistence API entities

(4) The Enterprise Information SystemsTier
The enterprise information systems (EIS) tier consists of database servers, enterprise resource
planning systems, and other legacy data sources, like mainframes. These resources typically are
located on a separate machine than the Java EE server, and are accessed by components on the
business tier.

The following Java EE technologies are used to access the EIS tier in Java EE applications:
■ The JavaDatabase Connectivity API (JDBC)
■ The Java Persistence API
■ The J2EE Connector Architecture

■ The Java Transaction API (JTA)

3. Java EE Servers

A Java EE server is a server application that the implements the Java EE platform APIs and
provides the standard Java EE services.Java EE servers are sometimes called application servers,
because they allow you to serve application data to clients, much as how web servers serve web
pages to web browsers.

Java EE servers host several application component types that correspond to the tiers in a
multi-tiered application. The Java EE server provides services to these components in the form
of a container.

Java EE Containers

Java EE containers are the interface between the component and the lower-level functionality
provided by the Java EE platform to support that component. The functionality of the container
is defined by the Java EE platform, and is different for each component type.

TheWeb Container

The web container is the interface between web components and the web server. A web
component can be a servlet, a JSP page, or a JavaServer Faces page. The container manages the
component's lifecycle, dispatches requests to application components, and provides interfaces
to context data, such as information about the current request.

The Application Client Container

The application client container is the interface between Java EE application clients, which are
special Java applications that use Java EE server components, and the Java EE server. The
application client container runs on the client machine, and is the gateway between the client
application and the Java EE server components that the client uses

The EJB Container

The EJB container is the interface between enterprise beans, which provide the business logic in
a Java EE application, and the Java EE server. The EJB container runs on the Java EE server and
manages the execution of an application's enterprise beans.

4. Architecture of the Example Application

4.1 Architecture of the Example Application

4.2 Creating

4.2.1 Creating theWeb Service Endpoint

Web services are web-based applications that use open, XML-based standards and transport protocols to exchange data with calling clients. Both the requests and responses are sent as XML documents, and are usually sent as HTTP packets. This makes interoperability between different systems and applications easy, as it is not necessary for the client to know the underlying architecture of the server and vice-versa to make a successful web service call.

Web services are designed to be independent of the client. Typically web service endpoints are
publicly available to a wide variety of clients, and the clients are located throughout the internet.
This is called "loose coupling," as the clients and servers are connected only by the standard
XML-based requests and responses.

4.2.2 Creating the Enterprise Bean

4.2.3 Creating theWeb Client

4.2.4 Building, Packaging, Deploying, and Running

  • Reading Notes: Your First Cup: An Introduction to the Java EE Platform 2010-07-10

    Reading Notes: Your First Cup: An Introduction to the Java EE Platform 1. Differences Among Three platforms Java technology is both a programming language and a platform. The Java programming language is a high-level object-oriented language that has

  • Reading Notes: Enterprise JavaBeans, 3.0 Chapter 1. Introduction 2010-07-31

    Reading Notes: Enterprise JavaBeans, 3.0 Chapter 1. Introduction 1.1. Server-Side Components In business systems, object-oriented languages are used to improve development of GUIs, to simplify access to data, and to encapsulate the business logic. A

  • javascript DOM programming arts reading notes 2010-09-06

    javascript DOM programming arts reading notes The first part of the directory Chapter 1 Origin of JavaScript 1.1 JavaScript 1.2 A Brief History of the browser war 1.3 standard 1.4 Summary Chapter 2, JavaScript 2.2 Grammar 2.1 Grammar 2.3 statement pr

  • Reading Notes: Based on fuzzy c-means algorithm for data classification and forecasting of space - Hu Caiping. Qin Xiaolin 2010-11-06

    Reading Notes: Based on fuzzy c-means algorithm for data classification and forecasting of space - Hucai Ping, Qin Xiaolin Background Introduction c-means c-means clustering method is the most common and most commonly used method, in the "Data Mining

  • Reading notes on the code refactoring (1) 2010-04-16

    AgileJava reading notes (1) AgileJava is a test-driven development based on the method to help you learn how to polish your Java code, and thus obtain a stable object-oriented design and high-maintainable, high-quality systems. The book with a studen

  • Reading notes (1) array 2010-05-04

    Reading notes 1. In c + +, there are two ways the array statements: one is to use the built-in array; Another is to use Vector. Vector is much easier to use and more secure than the basic element array, and should therefore be preferred to use Vector

  • <Software Architecture Design> reading notes notes 2010-05-07

    "Software Architecture Design" reading notes Domain model lack of knowledge, not in-depth understanding of Robustness analysis?

  • Reading Notes explain design pattern mode (Interpreter pattern) 2010-10-28

    Interpreter Pattern: Given a language, define a representation of its grammar, and define an interpreter, the interpreter uses the representation to interpret sentences in the language. By the definition, does not explain the mode is a commonly used

  • One study notes struts2 (PART 1. Struts2 Introduction and Configuration) 2011-01-05

    One study notes struts2 (PART 1. Struts2 Introduction and Configuration) First, the development environment IDE: MyEclipse6.0 version Servlet Container: Tomcat6.0 Second, create a web project Project Name: struts2 1, function: to complete a user logo

  • JUnit In Action Reading Notes (1) 2008-03-29

    JUnit In Action Reading Notes (1) Part1 JUnit distilled chapter1 will teach you what the JUnit framework is and what problems it solves. chapter2 will take you on a discovery tour of the core JUnit classes and how to best use them. chapter3, you'll p

  • Practice reading notes java Introduction to concurrent programming 2010-12-07

    package cn.wtu.executor; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.LinkedBlockingQueue; /** * * Versi

  • "Software Architecture Design" reading notes 2009-04-07

    Recently read "software architecture color design" of this book, harvest story, happened to see this online book notes, is reproduced below: 【Title】 : Software Architecture Design Press 【】 : Electronics Industry Press People s : Wen Yu Foreword

  • <agile java> reading notes 2010-04-17

    This is a good book to learn java-driven testing, which in the range of knowledge about both java way by TTD is a good TDD actual book. Java knowledge to master the same time a taste of the development of TDD mode. This book is thick, also read off a

  • "The Return of the King" reading notes JavaScript object-oriented programming (1) 2009-04-08

    Skip JS core (language structure, data types, functions, objects, collections, strings, etc.) as well as BOM, DOM part of this series of notes to summarize the main "The Return of the King" object-oriented programming part of the knowledge point

  • Java concurrent programming practice reading notes (1) 2010-05-06

    Concurrent programming in the preparation of high-performance, scalable applications often used when a technology is a relatively advanced technology, every necessary skills to do the back-end development. This book is about Java and the contracted u

  • Lying design patterns - Reading Notes (1) 2010-07-22

    CSDN share in reading the book addresses are: This is the author of the book is brilliant, witty text, easy to stick to a final. Records point to study notes, the right to make prints. Three characteristics of obje

  • Reading Notes - Facade Pattern (Facade Pattern) 2010-08-21

    Recent research and development involved in the project, called interface, regarding the case of hell, for example, the transfer must transfer before C method A method B method successfully transferred before the end to adjust C methods, and interfac

  • <Head First Python> reading notes 2 - String 2011-04-14

    The main contents of Chapter II on the string, that is, text data, the book by the example of an analysis to explain HTML, complete business scenario is as follows: CEO wants to buy coffee beans, coffee bean prices in the URL http://beans .itcarlow.i

  • Programming Pearls (2nd Edition) reading notes 2011-05-24

    Programming Pearls (Second Edition) notes the basis of the first part of the directory begins with Chapter 1 of 3 3 1.1 a friendly conversation Accurate description of the problem 4 1.2 1.3 Program Design 4 1.4 Summary of 5 to achieve 1.5 Principle 6

  • <One Piece> reading notes 1 - the reasons for project failure 2010-01-17

    Bought a while ago, "Peopleware" 2 (Tsinghua University Press). Have not been watching this weekend suddenly saw this book and decided to find time to study it. After receiving deep reading. With the increase in the number of chapters read, I be