blob: 83f04b4b2af80f219c29b93aacfb04abbb967cea [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="author" content="troy.giunipero@sun.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="description" content="Conclusion of the NetBeans E-commerce Tutorial.">
<meta name="keywords" content="NetBeans, IDE, integrated development environment,
Java, Java EE, open source, web technology, e-commerce">
<link rel="stylesheet" type="text/css" href="../../../../netbeans.css">
<link rel="stylesheet" type="text/css" href="../../../../print.css" media="print">
<title>The NetBeans E-commerce Tutorial - Conclusion</title>
</head>
<body>
<!-- Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -->
<h1>The NetBeans E-commerce Tutorial - Conclusion</h1>
<div style="margin-left:-3px">
<div class="feedback-box margin-around float-left" style="margin-right:15px">
<h4>Tutorial Contents</h4>
<ol>
<li><a href="intro.html">Introduction</a></li>
<li><a href="design.html">Designing the Application</a></li>
<li><a href="setup-dev-environ.html">Setting up the Development Environment</a></li>
<li><a href="data-model.html">Designing the Data Model</a></li>
<li><a href="page-views-controller.html">Preparing the Page Views and Controller Servlet</a></li>
<li><a href="connect-db.html">Connecting the Application to the Database</a></li>
<li><a href="entity-session.html">Adding Entity Classes and Session Beans</a></li>
<li><a href="manage-sessions.html">Managing Sessions</a></li>
<li><a href="transaction.html">Integrating Transactional Business Logic</a></li>
<li><a href="language.html">Adding Language Support</a></li>
<li><a href="security.html">Securing the Application</a></li>
<li><a href="test-profile.html">Testing and Profiling</a></li>
<li><strong>Conclusion</strong>
<ul style="margin: 5px 0 0 -2em">
<li><a href="#deliver">Delivering your Work</a></li>
<li><a href="#framework">Using the JavaServer Faces Framework</a></li>
<li><a href="#seeAlso">See Also</a></li>
<li><a href="#about">About the NetBeans E-commerce Tutorial</a></li>
<li><a href="#acknowledge">Acknowledgments</a></li>
<li><a href="#disclaimer">Disclaimer</a></li>
</ul></li>
</ol>
</div>
</div>
<p><img src="../../../../images_www/articles/68/netbeans-stamp-68-69.png" class="stamp"
alt="Content on this page applies to NetBeans IDE, versions 6.8 and 6.9"
title="Content on this page applies to NetBeans IDE, versions 6.8 and 6.9"></p>
<p>Congratulations! You have now finished developing the <code>AffableBean</code> application.
By following this tutorial, you incrementally built a simple e-commerce application using
Java-based technologies. In the process, you became familiar with the NetBeans IDE, and
have learned how to use it for the development of Java EE and web projects. Referring
back to the <a href="design.html#requirements">customer requirements</a>, you can
confirm that each requirement has been fully implemented, and through continuous feedback
from the Affable Bean staff, you are confident that they'll be satisfied with the
final product. At this stage however, you may ask, &quot;What specifically needs to
be delivered to the customer?&quot; and &quot;How can the application become deployed
to the customer's production server so that it functions online?&quot; This tutorial
unit briefly discusses next steps in terms of handing off deliverables, and concludes
with a discussion on how using a framework such as JavaServer Faces could improve the
application and benefit your experience when developing future projects.</p>
<p>You can view a live demo of the <code>AffableBean</code> application:
<a href="http://services.netbeans.org/AffableBean/" target="_blank">NetBeans E-commerce
Tutorial Demo Application</a>.</p>
<p>The completed <code>AffableBean</code> project is also
<a href="https://netbeans.org/projects/samples/downloads/download/Samples%252FJavaEE%252Fecommerce%252FAffableBean_complete.zip">available
for download</a>.</p>
<br style="clear:left;">
<h2 id="deliver">Delivering your Work</h2>
<p>When delivering your work, you should prepare both a WAR (web archive) file, which is
a compiled, ready-to-deploy version of your project, and a source distribution, which
contains all the source files you created during the development phase.</p>
<ol style="margin-top:0">
<li><strong>WAR File Distribution:</strong> A WAR file is basically a compressed
collection of classes, files and other artifacts that constitute the web application.
You can create a WAR file for your project using the IDE. In the Projects window,
right-click your project node and choose Clean and Build. When your project is
built, a WAR file is generated and placed in a <code>dist</code> folder in your
project. You can verify this by examining your project in the Files window (Ctrl-2;
&#8984;-2 on Mac). (Refer back to <a href="setup-dev-environ.html#run">Setting up
the Development Environment</a>).</li>
<li><strong>Source Distribution:</strong> A package containing all source and configuration
files, typically in an archive file format (e.g., ZIP, TAR). You can use your NetBeans
project as part of your source distribution. Before compressing your project, make sure
to clean it (In the Projects window, right-click the project node and choose Clean) in
order to delete <code>build</code> and <code>dist</code> folders, if they exist. You
should also remove any of your environment-specific details included in the project.
To do so, navigate to the project on your computer's file system, then expand the
project's <code>nbproject</code> folder and delete the <code>private</code> folder
contained therein. (When the project is opened again in the IDE, the <code>private</code>
folder and its files are regenerated according to the current environment.)
<p>
As part of your source distribution, you would need to also provide any scripts or
artifacts that are necessary for setup, configuration, and population of the database.
In this scenario, that would include the MySQL Workbench project from Unit 4,
<a href="data-model.html">Designing the Data Model</a>, the DDL script that creates
the <code>affablebean</code> database schema, and possibly a separate script that
populates the <code>category</code> and <code>product</code> tables with business
data.</p></li>
</ol>
<p>As was indicated in the tutorial <a href="design.html#scenario">Scenario</a>, a
&quot;technically-oriented staff member is able to deploy the application to the
production server once it is ready.&quot; Aside from necessary performance tuning
(GlassFish tuning is discussed in Unit 12 <a href="test-profile.html#glassFishTune">Testing
and Profiling</a>) the person responsible for this would need to ensure that the database
driver is accessible to the server (i.e., place the driver JAR file in the server's
library folder). He or she would also need to know the JNDI name of the data source used
by the application to interact with the database. This is found in the persistence unit
(<code>persistence.xml</code> file) and, as you may recall, is: <code>jdbc/affablebean</code>.
This is the only &quot;link&quot; between the application itself and the back-end database
server.</p>
<p class="notes"><strong>Note:</strong> Recall that the <code>sun-resources.xml</code> file,
which you created in Unit 6, <a href="connect-db.html#createConnPoolDataSource">Connecting
the Application to the Database</a> contains entries that instruct the GlassFish server
to create the JDBC resource and connection pool when the application is deployed. The
<code>sun-resources.xml</code> file is a deployment descriptor specific to the GlassFish
server only. Therefore, if the customer isn't using GlassFish as the production server,
the file should be deleted before the application is deployed. If the <code>sun-resources.xml</code>
file isn't removed from the WAR distribution however, it would simply be ignored by the
server it is deployed to.</p>
<p>In terms of security, it would be necessary to set up a <em>user</em> and <em>group</em>
on the production server, so that the server can authenticate persons wanting to log into
the administration console. Also, SSL support for the production server would need to be
enabled, and you would need to acquire a certificate signed by a trusted third-party Certificate
Authority (CA), such as <a href="http://www.verisign.com" target="_blank">VeriSign</a> or
<a href="http://www.thawte.com/" target="_blank">Thawte</a>.</p>
<p>Once the database is created and tables are populated with necessary data, the connection
pool and JDBC resource are set up on the production server, and security measures have
been taken, the application WAR file can be deployed to and launched on the production
server. Using GlassFish, it is possible to deploy your applications via the Administration
Console. (Select Applications in the left-hand Tree, then click the Deploy button to deploy
a new application.)</p>
<p class="tips">The GlassFish plugin support in NetBeans also enables you to connect to a
remote instance of GlassFish. You can therefore work with a GlassFish production server
from the IDE for monitoring, profiling, and debugging tasks. If you are interested in
using GlassFish as a production server, refer to the <a href="#seeAlso">See Also</a>
section below for a list of web hosting solutions.</p>
<p><em>Portability</em> is among the key benefits of Java EE. As your application adheres to
the technology specifications, it can theoretically be deployed to any server that supports
the same specifications. Recall that the <a href="intro.html#jcp">Introduction</a> lists
the specifications that you have used in this tutorial. All of these specifications are
part of the Java EE 6 platform specification (<a href="http://jcp.org/en/jsr/summary?id=316"
target="_blank">JSR 316</a>). Therefore, any server that is Java EE 6-compliant would be
a candidate for running the <code>AffableBean</code> application.</p>
<br>
<div class="feedback-box float-left" style="width: 683px;">
<h3>Did you know?</h3>
<p>The NetBeans IDE began as a student project (originally called Xelfi) at
Charles University in Prague, Czech Republic in 1996. The goal was to write
a Delphi-like Java IDE. Xelfi was the first Java IDE written in Java, with
its first pre-releases in 1997.</p>
<p>NetBeans was later purchased by Sun Microsystems in 1999, and shortly
thereafter became Sun's first sponsored open source project.</p>
<p>In June 2000, the initial netbeans.org website was launched. You can view
an archived version of the site at:
<a href="http://web.archive.org/web/20000815061212/https://netbeans.org/index.html"
target="_blank">http://web.archive.org/web/20000815061212/https://netbeans.org/index.html</a></p>
<p>For more information, see <a href="https://netbeans.org/about/history.html" target="_blank">A
Brief History of NetBeans</a>.</p>
</div>
<br style="clear:left"/>
<br>
<h2 id="framework">Using the JavaServer Faces Framework</h2>
<p>Having developed a Java web application from scratch puts you in a great position to
begin appreciating how a framework can benefit your work. This section briefly introduces
the JavaServer Faces (JSF) framework, then examines the advantages of applying the
framework to the <code>AffableBean</code> application.</p>
<ul>
<li><a href="#whatJSF">What is the JavaServer Faces Framework?</a></li>
<li><a href="#benefitJSF">How Can JSF Benefit Your Project?</a></li>
</ul>
<div class="indent">
<h3 id="whatJSF">What is the JavaServer Faces Framework?</h3>
<p>The JavaServer Faces framework (<a href="http://jcp.org/en/jsr/detail?id=314" target="_blank">JSR 314</a>)
is an integral part of the Java EE platform and aims to facilitate web development by
providing the following:</p>
<ul>
<li><strong>a user interface component model:</strong> JSF includes a standard component
API, which enables you to use and create custom UI components for your applications.
A <em>UI component</em> is a widget that has a specific appearance and guarantees
certain behavior. For example, this can be a simple text field that includes built-in
data validation and conversion with accompanying error messages, or it can be a complex
data table that interacts with a back-end data store and offers scrolling and column
sorting for users. Being able to reuse UI components for your application's interface
(or acquire custom components from third-party vendors) becomes increasingly important
as your application grows in size and complexity.</li>
<li><strong>an MVC development infrastructure:</strong> The framework provides a
<code>FacesServlet</code> which works behind the scenes to dispatch requests to their
appropriate handlers (usually <em>backing beans</em> that you create). You author page
views using Facelets, the default view handler technology for JSF 2.0. These features,
when operating in tandem with JSF's <em>request processing lifecycle</em> (described
below), encourage your work to adhere to the MVC paradigm.</li>
</ul>
<p>The JSF framework manages the request-response cycle by automating events that typically
need to occur for each client request. These events are qualified into six distinct
phases that are together known as the <em>JSF request processing lifecycle</em>. The book,
<a href="http://www.amazon.com/JavaServer-Faces-2-0-Complete-Reference/dp/0071625097/ref=pd_bxgy_b_img_a"
target="_blank">JavaServer Faces 2.0: The Complete Reference</a> by Ed Burns and Chris
Schalk, describes the lifecycle phases as follows:</p>
<blockquote style="margin-top: 0">
<em>[T]he request processing lifecycle performs all of the necessary back-end processing
for which one would otherwise have to write his or her own code. The lifecycle directs
the processing of incoming request parameters, and it manages a server-side set of UI
components and synchronizes them to what the user sees in a client browser. It also
satisfies follow-up requests for images, style sheets, scripts, and other kinds of
resources required to complete the rendering of the UI.</em><sup><a href="#footnote1"
id="1" style="text-decoration:none">[1]</a></sup>
</blockquote>
<p id="lifecyclePhases">The six lifecycle phases, according to
<a href="http://www.amazon.com/JavaServer-Faces-2-0-Complete-Reference/dp/0071625097/ref=pd_bxgy_b_img_a"
target="_blank">JavaServer Faces 2.0</a>, are defined as follows:</p>
<ol style="margin-top:0">
<li><strong>Create or Restore View:</strong> Restores or creates a server-side component
tree (View) in memory to represent the UI information from a client.</li>
<li><strong>Apply Request Values:</strong> Updates the server-side components with fresh
data from the client.</li>
<li><strong>Process Validations:</strong> Performs validation and data type conversion on
the new data.</li>
<li><strong>Update Model Values:</strong> Updates any server-side Model objects with new
data.</li>
<li><strong>Invoke Application:</strong> Invokes any application logic needed to fulfill
the request and navigate to a new page if needed.</li>
<li><strong>Render Response:</strong> Saves state and renders a response to the requesting
client.<sup><a href="#footnote2" id="2" style="text-decoration:none">[2]</a></sup></li>
</ol>
<img src="../../../../images_www/articles/73/javaee/ecommerce/conclusion/jsf-request-processing-lifecycle.png"
class="margin-around" alt="JSF request processing lifecycle" title="The JSF request processing lifecycle">
<p>One important concept of the JSF framework is the server-side UI component tree, or Faces
<em>View</em>. This component tree is built and maintained in server memory for each client
request, and is primarily associated with the first and last phases of the request processing
lifecycle depicted above. Consequently, the application is able to maintain state between
requests in a way that doesn't involve any manual coding on the part of the developer. In
other words, the request processing lifecycle handles synchronization between the server-side
View and that which is presented to the client. This enables you, the Java web developer,
to focus on code that is specific to your business problem.</p>
<h3 id="benefitJSF">How Can JSF Benefit Your Project?</h3>
<p>To understand JSF's benefits, let's take a second look at the <code>AffableBean</code>
project and consider how the framework could be applied.</p>
<h4>Strong Templating Support</h4>
<p>Rather than creating your application page views in JSP pages, you'd be using Facelets
technology instead.<sup><a href="#footnote3" id="3" style="text-decoration:none">[3]</a></sup>
Facelets is a first-rate templating technology that enables you to maximize markup reuse
and reduce redundancy in your page views. Also, because Facelets pages use the <code>.xhtml</code>
file extension, you are able prepare views using standard XHTML syntax.</p>
<p>In the <code>AffableBean</code> project, we took measures to reduce redundancy by factoring
out the header and footer markup for all page views into separate JSP fragment files,
and then included them in views by using the <code>&lt;include-prelude&gt;</code> and
<code>&lt;include-coda&gt;</code> elements in the deployment descriptor. Aside from the
header, the layouts for each of the application's five page views were unique. However,
many websites maintain the same layout across multiple pages. This is where templating
comes in especially handy.</p>
<p>With Facelets templating, you have more control over which portions of markup get displayed
for individual page views. For example, you could create a template layout that is common
to all page views, and insert view-specific content into the template to render your views.
In this manner, you could specify a title for each page view. (Notice that in the
<code>AffableBean</code> application, the title remains the same for all page views.)</p>
<h4>No Need to Handle Incoming Request Parameters</h4>
<p>Upon reexamining the <code>AffableBean</code>'s <code>ControllerServlet</code>, you can see
that each time we implemented code for the supported URL patterns, it was necessary to manually
extract user parameters using the <code>request</code>'s <code>getParameter</code> method.
When working in JSF, you often create <em>backing beans</em>, which are Java classes that
are conceptually bound to a specific page view. Parameters are automatically extracted from
a request (during phase 2 of the <a href="#lifecyclePhases">request processing lifecycle</a>),
and set as properties for the backing bean. JSF also takes care of casting the <code>String</code>
values of your request parameters into the types that you have defined for your backing bean
properties. For example, if you have a property defined as an <code>int</code>, and your
incoming request parameter is a <code>String</code> whose value is &quot;<code>33</code>&quot;,
JSF automatically converts the value to an <code>int</code> before storing it in the backing
bean.</p>
<h4>No Need to Programmatically Configure Navigation</h4>
<p>In order to set up navigation, we followed a certain pattern when implementing the
<code>ControllerServlet</code>: For each incoming request, the <code>getServletPath</code>
method is called to determine the requested URL pattern. After logic related to the URL pattern
is performed, a <code>RequestDispatcher</code> is attained, and the request is forwarded
to the appropriate page view. In numerous cases, the appropriate page view is specified by
hard-coding the path using the <code>userPath</code> variable.</p>
<p>None of this is necessary when using JSF - navigation is handled by the framework. Your job
would be to either associate page views with URL patterns and any logical outcomes using a
Faces configuration file, or take advantage of JSF 2.0's <em>implicit navigation</em> feature,
which automatically forwards a request to a view that has the same name as the requested
URL pattern.</p>
<h4>Built-in Validation Support</h4>
<p>JavaServer Faces provides built-in server-side validation support. In the <code>AffableBean</code>
project, we created a <code>Validator</code> class and manually coded logic to perform all
validation. Using JSF, server-side validation would automatically occur at phase 3 of the
<a href="#lifecyclePhases">request processing lifecycle</a>.</p>
<p>It would be worthwhile to take advantage of this validation for the <code>AffableBean</code>
checkout form, however some preliminary steps would be in order. Specifically, the HTML
markup for form elements would need to be replaced with comparable tags from JSF's
<a href="https://javaserverfaces.dev.java.net/nonav/docs/2.0/vdldocs/facelets/h/tld-summary.html"
target="_blank">Standard HTML Library</a>. This step converts the form elements into
JSF UI components, which we can then specify validation actions on using JSF's
<a href="https://javaserverfaces.dev.java.net/nonav/docs/2.0/vdldocs/facelets/f/tld-summary.html"
target="_blank">Core Library</a>. To give an idea, the side-by-side comparison
below demonstrates an adaptation of the checkout form's &quot;name&quot; field.</p>
<table>
<tr>
<td>
<strong>HTML Markup</strong>
<pre class="examplecode" style="width:252px">
&lt;label for=&quot;name&quot;&gt;name:&lt;/label&gt;
&lt;input type=&quot;text&quot;
id=&quot;name&quot;
size=&quot;30&quot;
maxlength=&quot;45&quot;
value=&quot;${param.name}&quot; /&gt;
&lt;c:if test=&quot;${!empty nameError}&quot;&gt;
Value is required.
&lt;/c:if&gt;</pre>
</td>
<td class="indent">
<strong>JSF HTML Tag Library</strong>
<pre class="examplecode" style="width:362px">
&lt;h:outputLabel value=&quot;name: &quot; for=&quot;name&quot;&gt;
&lt;h:inputText id=&quot;name&quot;
size=&quot;30&quot;
maxlength=&quot;45&quot;
<strong>required=&quot;true&quot;</strong>
value=&quot;#{checkoutBean.name}&quot; /&gt;
&lt;/h:outputLabel&gt;
&lt;h:message for=&quot;name&quot; /&gt;
</pre>
</td>
</tr>
</table>
<p>The <code>&lt;h:outputLabel&gt;</code> tag renders as an HTML <code>&lt;label&gt;</code>
tag, whereas <code>&lt;h:inputText&gt;</code> renders as an <code>&lt;input&gt;</code>
tag whose <code>type</code> is set to &quot;<code>text</code>&quot;. Note the <code>required</code>
attribute, which is set to <code>true</code> (shown in <strong>bold</strong>). This is
all that's needed to ensure that the field is not left blank by the user. The
<code>&lt;h:message&gt;</code> tag identifies the location where any validation error
messages for the field should display. JSF's default error message for a field that
requires user input is, &quot;Value is required.&quot;</p>
<p>Continuing with the example, if we wanted to check whether input for the field hasn't
exceeded 45 characters, we could apply the <code>&lt;f:validateLength&gt;</code> tag.</p>
<pre class="examplecode" style="margin-top:0; width:660px">
&lt;h:outputLabel value=&quot;name: &quot; for=&quot;name&quot;&gt;
&lt;h:inputText id=&quot;name&quot;
size=&quot;30&quot;
maxlength=&quot;45&quot;
required=&quot;true&quot;
value=&quot;#{checkoutBean.name}&quot;&gt;
<strong>&lt;f:validateLength maximum=&quot;45&quot; /&gt;</strong>
&lt;/h:inputText&gt;
&lt;/h:outputLabel&gt;
&lt;h:message for=&quot;name&quot; /&gt;</pre>
<h4>Well-Defined Division of Labor</h4>
<p>As stated in the <a href="http://download.oracle.com/javaee/6/tutorial/doc/bnapj.html" target="_blank">Java
EE 6 Tutorial</a>, &quot;One of the greatest advantages of JavaServer Faces technology is that it
offers a clean separation between behavior and presentation for web applications.&quot; If you
are working on a large project that involves a team of developers, the framework functions as a
blueprint which allows team members to focus on different areas of development simultaneously. For
example, front-end developers can implement page views using tags from JSF's HTML Library, while
programmers responsible for implementing component logic and behavior can &quot;plug their work
into&quot; existing HTML library tags.</p>
<h4>Ability to Render the View with Other Markup Languages</h4>
<p>Suppose that the Affable Bean staff commission you at a later point to prepare a
mobile version of their site, so users can access it using a hand-held device.
JSF APIs are a flexible rendering technology that enable you to attach multiple
renderers to the component tree (i.e., View) of a JSF-enabled application. In
other words, it is possible to create custom components that, for example, render
HTML when requested by a browser, or WML when requested by a PDA.</p>
</div>
<div class="feedback-box">
<a href="/about/contact_form.html?to=3&amp;subject=Feedback: NetBeans E-commerce Tutorial - Conclusion">Send
Us Your Feedback</a></div>
<br style="clear:both;">
<h2 id="seeAlso">See Also</h2>
<div class="indent">
<h3>NetBeans Tutorials</h3>
<div class="indent">
<p><strong>Community-Contributed Extensions of E-commerce Tutorial</strong></p>
<ul style="margin: -.5em 0 1em -1.8em">
<li><a href="http://netbeans.dzone.com/nb-hierarchical-web-services">Hierarchical Web Service Development with NetBeans IDE</a> by Jayasurya Venug</li>
</ul>
<p><strong>JavaServer Faces</strong></p>
<ul style="margin: -.5em 0 1em -1.8em">
<li><a href="../../web/jsf20-support.html" target="_blank">JSF 2.0 Support in NetBeans IDE</a></li>
<li><a href="../../web/jsf20-intro.html" target="_blank">Introduction to JavaServer Faces 2.0</a></li>
<li><a href="../../web/jsf20-crud.html" target="_blank">Generating a JavaServer Faces 2.0 CRUD Application from a Database</a></li>
<li><a href="../../../samples/scrum-toys.html" target="_blank">Scrum Toys - The JSF 2.0 Complete Sample Application</a></li>
</ul>
<p><strong>Contexts and Dependency Injection</strong></p>
<ul style="margin: -.5em 0 1em -1.8em">
<li><a href="../cdi-intro.html" target="_blank">Getting Started with Contexts and Dependency Injection and JSF 2.0</a></li>
<li><a href="../cdi-inject.html" target="_blank">Working with Injection and Qualifiers in CDI</a></li>
<li><a href="../cdi-validate.html" target="_blank">Applying @Alternative Beans and Lifecycle Annotations</a></li>
<li><a href="../cdi-events.html" target="_blank">Working with Events in CDI</a></li>
</ul>
</div>
<h3>JavaServer Faces</h3>
<ul>
<li><strong>Product Page:</strong> <a href="http://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html" target="_blank">JavaServer Faces Technology</a></li>
<li><strong>Specification Download:</strong> <a href="http://jcp.org/aboutJava/communityprocess/final/jsr314/index.html" target="_blank">JSR 314: JavaServer Faces 2.0</a></li>
<li><strong>Reference Implementation:</strong> <a href="https://javaserverfaces.dev.java.net/" target="_blank">GlassFish: Project Mojarra</a></li>
<li><strong>Official Forum:</strong> <a href="http://forums.sun.com/forum.jspa?forumID=427" target="_blank">Web Tier APIs - JavaServer Faces</a></li>
<li><a href="http://download.oracle.com/javaee/6/tutorial/doc/bnaph.html" target="_blank">The Java EE 6 Tutorial - Chapter 4: JavaServer Faces Technology</a></li>
<li><a href="http://download.oracle.com/javaee/6/tutorial/doc/giepx.html" target="_blank">The Java EE 6 Tutorial - Chapter 5: Introduction to Facelets</a></li>
<li><a href="http://www.amazon.com/JavaServer-Faces-2-0-Complete-Reference/dp/0071625097/ref=pd_bxgy_b_img_a" target="_blank">JavaServer Faces 2.0: The Complete Reference</a> [Book]</li>
<li><a href="http://www.amazon.com/Core-JavaServer-Faces-David-Geary/dp/0137012896/ref=pd_bxgy_b_img_b" target="_blank">Core JavaServer Faces</a> [Book]</li>
<li><a href="http://www.amazon.com/JSF-2-0-Cookbook-Anghel-Leonard/dp/1847199526/ref=pd_sim_b_2" target="_blank">JSF 2.0 Cookbook</a> [Book]</li>
<li><a href="http://refcardz.dzone.com/refcardz/javaserver-faces-20" target="_blank">JSF 2.0 Refcard</a></li>
</ul>
<h3>GlassFish Web Hosting</h3>
<ul>
<li><a href="http://www.joyent.com/" target="_blank">Joyent Cloud Hosting</a></li>
<li><a href="http://www.eapps.com/applications/glassfish-hosting.php" target="_blank">eApps Hosting</a></li>
<li><a href="http://www.visionwebhosting.net/glassfish-hosting.html" target="_blank">Vision Web Hosting</a></li>
<li><a href="http://www.jspzone.net/glassfish_hosting.htm" target="_blank">[DE]SYSTEMS</a></li>
<li><a href="http://www.jspzone.net/glassfish_hosting.htm" target="_blank">JSPZone</a></li>
</ul>
</div>
<br>
<h2 id="about">About the NetBeans E-commerce Tutorial</h2>
<img src="../../../../images_www/articles/73/javaee/ecommerce/conclusion/logo.png"
class="margin-around float-left" alt="AffableBean logo">
<br>
<p>The NetBeans E-commerce Tutorial and sample application were conceived of and
written by Troy Giunipero. The application began as a project arising out of
Sun's <a href="http://research.sun.com/SEED/" target="_blank">SEED program</a>,
and was developed from January 2009 to November 2010. The tutorial was prepared
as part of ongoing efforts to provide documentation for the IDE's
<a href="../../../trails/java-ee.html" target="_blank">Java EE & Java Web Learning
Trail</a>.</p>
<br style="clear:left">
<br>
<h2 id="acknowledge">Acknowledgments</h2>
<p>Many people have helped with this project. I am especially grateful to following individuals
for their help, support and contributions:</p>
<ul>
<li>Ed Burns, who was my SEED mentor, for his patience and guidance, and his willingness to
share his technical expertise in our numerous discussions concerning Java web technologies.</li>
<li>My managers, Patrick Keegan, for originally approving this project, and David Lindt, who
showed continuous support.</li>
<li>David Konecny and Andrei Badea for their invaluable help and advice, especially in regard
Java Persistence, working with EclipseLink, and integrating EE 6 technologies.</li>
<li>Don McKinney for providing the three beautiful diagrams used in <a href="design.html">Designing
the Application</a>.</li>
<li>Eric Jendrock and the Java EE Tutorial team, for granting permission to adapt and reproduce
diagrams from the Java EE 5 Tutorial. Diagrams were used in <a href="security.html">Securing
the Application</a>, and are based on <a href="http://download.oracle.com/javaee/5/tutorial/doc/bnbxj.html#bnbxl"
target="_blank">Figure 28-6: Mapping Roles to Users and Groups</a> and
<a href="http://download.oracle.com/javaee/5/tutorial/doc/bncbe.html#gexfa"
target="_blank">Figure 30-3: Form-Based Authentication</a>.</li>
<li>Jan Pirek, for coordinating and setting up necessary resources to make the
<a href="http://services.netbeans.org/AffableBean/" target="_blank">live demo</a> a reality.</li>
<li>Ondrej Panek for providing a Czech translation of text used in the sample application.</li>
<li>Also, special thanks to <a href="http://www.flickr.com/photos/cobalt/" target="_blank">cobalt123</a>
for graciously permitting usage of several photos, including
<a href="http://www.flickr.com/photos/cobalt/46523149/" target="_blank">Fresh Picks</a> and
<a href="http://www.flickr.com/photos/cobalt/1441879742/" target="_blank">Give Us Our Daily
Bread #1</a>.</li>
</ul>
<br>
<h2 id="disclaimer">Disclaimer</h2>
<p>This tutorial and sample application are solely available for educative purposes. Although
the sample application demonstrates a real-world scenario, there are several aspects that
are decidedly not &quot;real-world&quot;. For example, e-commerce sites do not typically
store customer credit card details, but allow payment to be managed by a reputable third-party
service, such as <a href="https://www.paypal.com" target="_blank">PayPal</a> or
<a href="http://www.rbsworldpay.com/" target="_blank">WorldPay</a>. Furthermore, although
not discussed in the tutorial, customer trust is a hard-earned commodity. An e-commerce
site's privacy policy, as well as the terms and conditions surrounding placed orders should
be made easily available to customers and site visitors.</p>
<p>The sample application and project snapshots are provided &quot;AS IS,&quot; without a warranty
of any kind. If you aim to use or modify this software for your own purposes, please comply
with the license presented at
<a href="http://developers.sun.com/berkeley_license.html" target="_blank">http://developers.sun.com/berkeley_license.html</a>.</p>
<br>
<h2>References</h2>
<ol>
<li id="footnote1"><a href="#1" style="text-decoration:none">^</a> Adapted from <a href="http://www.amazon.com/JavaServer-Faces-2-0-Complete-Reference/dp/0071625097/ref=pd_bxgy_b_img_a"
target="_blank">JavaServer Faces 2.0: The Complete Reference</a>, Chapter 3: The JavaServer
Faces Request Processing Lifecycle.</li>
<li id="footnote2"><a href="#2" style="text-decoration:none">^</a> Ibid.</li>
<li id="footnote3"><a href="#3" style="text-decoration:none">^</a> You can certainly use JavaServer
Pages in a JSF application. Facelets is the default view handler technology for JSF version
2.0. For previous JSF versions, the default is JSP. In fact, when creating a new JSF 2.0 project
in the IDE, you are able to specify the view technology you want to use (Facelets or JSP).</li>
</ol>
</body>
</html>