Reading Notes : Your First Cup: An Introduction to the Java EE Platform
- 博客分类:
- Notes Java
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
environment
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:Enterprise JavaBeans, 3.0 Chapter 2. Architectural Overview
2010-08-01 16:09 753Enterprise JavaBeans, 3.0 Chapt ... -
Reading Notes:Enterprise JavaBeans, 3.0 Chapter 1. Introduction
2010-07-31 10:05 697Reading Notes:Enterprise JavaB ... -
Reading Notes:Tutorial for building J2EE Applications using JBOSS and ECLIPSE
2010-07-11 09:26 835Tutorial for building J2EE Appl ...
相关推荐
An Introduction to the Bootstrap_Efron,an excellent book, and worth a reading by most students and practitioners in statistics... Throughout the book, the authors have spent a lot of effort in ...
How to be efficient at the command line by using aliases, tab completion, and your shell history. How to schedule and automate jobs using cron. How to switch users and run processes as others. ...
An Introduction to Number Theory with Cryptography(2nd) 英文无水印原版pdf 第2版 pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,如有侵权,请联系...
Java入门英文版T HE BASIS FOR EDUCATION IN THE last millennium was “reading, writing, and arith- metic;” now it is reading, writing, and computing. Learning to program is an essential part of the ...
The purpose of this book is to show you how to write Python programs in good idiomatic Python 3 style, and to be a useful reference for the Python 3 language after the initial reading. Although Python...
Appendices summarize the basics of cosmology and particle physics needed for any quantitative understanding of particle models for dark matter.This interdisciplinary textbook is essential reading for ...
The third volume could also be used for professionals wishing to design or deploy a real-time operating system onto an ARM platform. This first book is an introductory book that could be used at the ...
This book details microservices architecture and is an addendum to the Java EE Architect’s Handbook, Second Edition. This book will define microservices architecture and provide an overview of costs ...
We hope that this textbook provides you with an enjoyable introduction to the field of algorithms. We have attempted to make every algorithm accessible and interesting. To help you when you encounter ...
Looking to incorporate mail facilities into your platform-independent Java solutions? Look no further than the JavaMail API, which offers a protocol-independent model for working with IMAP, POP, ...
The MIT EECS I course serves as an introductory foundation in Electrical Engineering and Computer Science, providing students with the fundamental skills and knowledge necessary to pursue advanced ...
This book presents an introduction to programming interactive computer graphics, with an emphasis on game development, using Direct3D 10. It teaches the fundamentals of Direct3D and shader programming...
Scheme is a clean and fairly ... or the Info system for the Emacs editor), or converted automatically to HTML format for browsing with a web browser. Whichever way you're reading this, welcome to Scheme.
标题“ReadingNotes:写下我的读物和想法”表明这是一个关于个人阅读记录的项目,其中可能包含作者对所读文章、博客、论文和网页的总结、反思或者评论。这个项目可能是受阮一峰(Ruanyifeng)博客的启发,他以定期...
ReadingNotes Sharing my reading notes while pursuing graduate study. These notes include C++, Java, computer science, all kinds of literary works, management books and so on. Summarize the key ...
这个压缩包中的"ReadingNotes-master"可能是一个代码仓库或者资料库,包含了关于阅读和理解计算生物学相关论文的方法、工具以及示例。 在计算生物学这一跨学科领域中,科研人员经常需要阅读和分析大量的科学论文,...
After reading this book, you will come away with sample code that can be re-purposed and applied to your own projects using Scilab. What You'll Learn Apply sample code to your engineering or science...