Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Digital Java EE 7 Web Application Development
Table of Contents
Digital Java EE 7 Web Application Development
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Digital Java EE 7
Working in the digital domain
Digital Java developer requirements
Java in the picture
The impressive growth of JavaScript
The JavaScript module pattern
JavaScript advanced libraries
Information architecture and user experience
Java EE 7 architecture
Standard platform components and API
Xentracker JavaServer Faces
Application servers
Summary
Exercises
2. JavaServer Faces Lifecycle
Introduction to JSF
JSF 1.0 and 2.0 history
Key JSF 2.2 features
Why choose JSF over alternatives?
The MVC design pattern
MVC in JSF
Facelets
The request processing lifecycle
The execute and render lifecycle
Restore View
Apply Request Values
Process Validations
Update Model Values
Invoke Application
Render Response
Event handling
A basic JSF example
A web deployment descriptor
JSF XML namespaces
A Composition example
JSF serving resources
Expression language
Immediate and deferred expressions
Value expressions
Map expressions
List expressions
Resolving the initial term
Method expressions
Parameterized method expressions
Arithmetic expressions
Page navigation
The navigation rules
Wildcards
Conditional navigation
Static navigation
Summary
Exercises
3. Building JSF Forms
Create, Retrieve, Update, and Delete
A basic create entity JSF form
The JSF HTML output label
The JSF HTML input text
The JSF HTML select one menu
The JSF HTML select Boolean checkbox
The JSF HTML command button
The backing bean controller
Data service
JSF custom tags
The HTML render kit custom tags
The core JSF custom tags
The template composition custom tags
Common attributes
Displaying a list collection of objects
Enhanced date time entry
Editing data
Removing data
JSF and CDI scopes
Bean scopes
Summary
Exercises
4. JSF Validation and AJAX
Validation methods
Server-side validation
Client-side validation
Faces messages
Validation
Constraining form content with Bean Validation
Validating user input with JSF
Customizing JSF validation
Custom validation methods
Defining custom validators
Validating groups of properties
Converters
Validating immediately with AJAX
Validating groups of input fields
AJAX custom tag in depth
A partial JSF lifecycle
Handling views
Invoking controller methods
Parameterized method invocations
Passing parameters to the controller
Invoking an action event listener
Redirection pages
Debugging the JSF content
Summary
Exercises
5. Conversations and Journeys
Digital e-commerce applications
Conversational scope
Conversation timeout and serialization
The conversation scope controller
The Entity-Control-Boundary design pattern
The customer journey
Entity classes
Data service
Page views
An initial page view
Getting started page view
Contact details page view
Your rate page view
HTML5 friendly support
Using AJAX for a partial update
Binding components
Updating areas with AJAX partial updates
The address page view
The confirmation page view
The completion page view
Utility classes
Composite custom components
Components with XHTML
Composite components and custom components
Composite component with self-generating tag
Summary
Exercises
6. JSF Flows and Finesse
What is Faces Flow?
Flow definitions and lifecycle
Simple Implicit Faces Flows
Implicit navigation
A Flow scoped bean
Facelet views
Handling view expired
A comparison with conversational scoped beans
Capturing the lifecycle of flow scoped beans
Declarative and nested flows
The flow node terminology
An XML flow definition description file
A flow definition tag
A mandatory flow return tag
A view page tag
An optional start page tag
Switch, conditional, and case tags
A nested flow example
XML flow definitions
Flow beans
Page views
A real-world example
Ensure the application populates the database
Securing page views and flows
Resource Library Contracts
Static Resource Library Contract references
Dynamic Resource Library Contract references
Advice for flows
Summary
Exercises
7. Progressive JavaScript Frameworks and Modules
JavaScript essentials
Creating objects
The console log
Writing JavaScript object constructors
The JavaScript property notations
Dealing with a null and undefined reference pointer
The JavaScript truth
Runtime type information
The JavaScript functions
Introducing the jQuery framework
Including jQuery in a JSF application
jQuery ready function callbacks
Acting on the jQuery selectors
Manipulating the DOM elements
Animation
The RequireJS framework
A RequireJS configuration
An application module
Defining modules
UnderscoreJS
The for-each operations
The filter operations
The map operations
The flatten operations
The reduction operations
GruntJS
Summary
Exercises
8. AngularJS and Java RESTful Services
Single-page applications
The caseworker application
AngularJS
How does AngularJS work?
Caseworker overview
Caseworker main view
Project organization
Application main controller
New case record controller
The case record modal view template
New task record controller
The task modal view template
State change
Controller code
The template view code
Toggling the task display state
Server-side Java
Entity objects
RESTful communication
Retrieval of case records
Creating a case record
Updating a case record
Creating a task record
Updating a task record
Deleting a task record
WebSocket communication
AngularJS client side
Server-side WebSocket endpoints
Consider your design requirements
Array collection of single-page applications
Hierarchical collection of single-page applications
Summary
Exercises
9. Java EE MVC Framework
Java EE 8 MVC
MVC controllers
MVC page views and templates
MVC models
Response and redirects
Reconfiguring the view root
Handlebars Java
A compiled-inline template servlet
Template expressions in Handlebars
The welcome controller
The custom view engine
The product controller
Block expressions
The retrieve and edit operations
The JAX-RS global validation
An MVC binding result validation
Design considerations
Majority server-side templating
Majority client-side templating
Shared templating
Summary
Exercises
A. JSF with HTML5, Resources, and Faces Flows
An HTML5 friendly markup
The pass-through attributes
The pass-through elements
Resource identifiers
Resource Library Contracts
A Faces servlet
Reconfiguration of the resource paths
A JSF-specific configuration
Internationalization
Resource bundles
Message bundles
A browser configured locale
An application controlled locale
An individual page controlled locale
A web deployment descriptor
Programmatic Faces Flows
View types
The Faces Flows programmatic interface
ViewNode
ReturnNode
MethodCall
FlowCall
SwitchNode
NavigationCase node
Builder types
B. From Request to Response
HTTP
An HTTP request
An HTTP response
Java Enterprise Architectures
Standard Java EE web architecture
Extended architectures
Containerless systems
Microservices
To be full stack or not
C. Agile Performance – Working inside Digital Teams
Digital teams and adaptation
Roles
The development perspective
A Java engineer
An interface developer engineer
Quality assurance tester
Software in developer test
The design perspective
A creative designer
A usability experience engineer
A content strategist
The architectural perspective
A data scientist
A technical architect
The management perspective
A business analyst and liaison officer
A project manager/scrum master
A digital development manager
Software quality
Class versus form
D. Curated References
Service delivery
Agile and leadership
Architecture
User interface
Java EE and JVM technology
Index
← Prev
Back
Next →
← Prev
Back
Next →