Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Structure improvements

- Uniform introductory section for each tutorial ('What will you learn here?')
- Capitalization corrections (partial)
- Grammar corrections
- Flow corrections (GWT chapter)
  • Loading branch information...
commit ed0c8660946d9fb9542008197b9806a1e73a0d1e 1 parent fe26432
@mbogoevici mbogoevici authored
View
9 AdminJSF.asciidoc
@@ -1,7 +1,8 @@
-Adding an Admin UI using JSF
-============================
-Pete Muir <pmuir@redhat.com>
-April 2012
+Adding a Administration User Interface using JSF and Forge
+==========================================================
+
+What Will You Learn Here?
+-------------------------
You've just defined the domain model of your application, and all the entities managed directly by the end-users. Now it's time to build an administration GUI for the TicketMonster application using JSF and RichFaces. After reading this guide, you'll understand how to use JBoss Forge to create the views from the entities, how to "soup up" the UI using RichFaces, and how to test the UI using Selenium:
View
17 BusinessLogic.asciidoc
@@ -1,8 +1,8 @@
-Building the business services
+Building The Business Services
==============================
-Learn how to design and implement the business layer of an application and how to make it usable by various front-ends
-----------------------------------------------------------------------------------------------------------------------
+What Will You Learn Here?
+-------------------------
You've just defined the domain model of your application and created its persistence layer. Now you need to implement the services that implement the business logic of your application and expose them to the front-end. After reading this, you'll understand how to design the business layer and what choices to make while developing it. Topics covered include:
@@ -34,10 +34,13 @@ exposed externally by the RESTful service;
.Where to draw the line?
******************************************************************************************
A business service is an encapsulated, reusable logical component that groups together a
-number of well-defined cohesive business operations. Business services perform business calculations, and may coordinate infrastructure services such as persistence units, or even other business services as well. The decision of drawing boundaries between them should take into account
+number of well-defined cohesive business operations. Business services perform business calculations,
+and may coordinate infrastructure services such as persistence units, or even other business services
+as well. The decision of drawing boundaries between them should take into account
whether the newly created service really represent standalone, potentially reusable components.
******************************************************************************************
+
As you can see, some of the services are intended to be consumed within the business layer
of the application, while others are exposing parts of the application as JAX-RS RESTful
services. We will start by implementing the former, and we will finish up with the latter.
@@ -69,10 +72,10 @@ application.
.Contexts and Dependency Injection (CDI)
******************************************************************************************
As it's name suggests, CDI is the contexts and dependency injection standard for Java EE.
-It's goal is to bring the various parts of the application together, by defining a set of
+Its goal is to bring the various parts of the application together, by defining a set of
component management and injection services for Java EE applications. By enabling CDI in
-your application, your deployment classes become managed components the lifecycle and assembly
-of whom becomes the responsibility of the Java EE server.
+your application, your deployment classes become managed components and their lifecycle
+and wiring becomes the responsibility of the Java EE server.
Reducing coupling is a critical goal for a truly decoupled architecture. You can focus now on implementing the specific responsibilities of each component and describing their dependencies in a declarative fashion, and the runtime will do the rest for you: instantiating, destroying them and wiring them toghether!
******************************************************************************************
View
27 DashboardGWT.asciidoc
@@ -1,8 +1,8 @@
-Building a statistics dashboard using GWT and ...
-=================================================
+Building A Statistics Dashboard Using GWT And Errai
+===================================================
-Learn how to implement an event-driven data collection dashboard using GWT and CDI client-server eventing
----------------------------------------------------------------------------------------------------------
+What will you learn now?
+------------------------
You've just an administration view, and would like to collect real-time information about ticket sales and attendance. Now it would be good to implement a dashboard that can collect data and receive real-time updates. After reading this tutorial, you will understand our dashboard design and the choices that we made in its implementation. Topics covered include:
@@ -12,15 +12,10 @@ You've just an administration view, and would like to collect real-time informat
The tutorial will show you how to perform all these steps in JBoss Developer Studio, including screenshots that guide you through. For those of you who prefer to watch and learn, the included video shows you how we performed all the steps.
-
-Errai, GWT and the TicketMonster
---------------------------------
-
-A booking monitor, developed using Errai and GWT, has been added to the TicketMonster application. It shows the live updating booking status of all performances and shows. These live updates are powered by CDI events crossing the client-server boundary, a feature provided by the Errai Framework.
-
+In what follows next, we will create a booking monitor using Errai and GWT, and add it to the TicketMonster application. It will show live updates on the booking status of all performances and shows. These live updates are powered by CDI events crossing the client-server boundary, a feature provided by the Errai Framework.
Module definition
-~~~~~~~~~~~~~~~~~
+-----------------
The first step is to add a GWT module descriptor (a .gwt.xml file) which defines the GWT module, its dependencies and configures the client source paths. Only classes in these source paths will be compiled to JavaScript by the GWT compiler. Here's the BookingMonitor.gwt.xml file:
@@ -56,7 +51,7 @@ The first step is to add a GWT module descriptor (a .gwt.xml file) which defines
The `rename-to` attribute specifies the output directory and file name of the resulting JavaScript file. In this case we specified that the `BookingMonitor` module will be compiled into 'BookingMonitor/BookingMonitor.nocache.js' in the project's output directory. The module further inherits the required Errai modules, and specifies the already existing `model` package as source path, as well as a new package named `monitor`, which will contain all the client source code specific to the booking monitor.
Host page
-~~~~~~~~~
+---------
In the next step we add a _host HTML page_ which includes the generated JavaScript and all required CSS files for the booking monitor. It further specifies a div element with id `content` which will be used as a container for the booking monitor's user interface.
@@ -100,7 +95,7 @@ In the next step we add a _host HTML page_ which includes the generated JavaScri
---------------------------------------------------------------------------------------------------------
Enabling Errai
-~~~~~~~~~~~~~~
+--------------
For enabling Errai in our application we will add an `ErraiApp.properties` marker file. When it is detected inside a JAR or at the top of any classpath, the subdirectories are scanned for deployable components. As such, all Errai application modules in a project must contain an ErraiApp.properties at the root of all classpaths that you wish to be scanned, in this case `src/mai/resources`.
@@ -115,7 +110,7 @@ errai.dispatcher_implementation=org.jboss.errai.bus.server.SimpleDispatcher
---------------------------------------------------------------------------------------------------------
Preparing the wire objects
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+--------------------------
One of the strengths of Errai is the ability of using domain objects for communication across the wire. In order for that to be possible, all model classes that are transferred using Errai RPC or Errai CDI need to be annotated with the Errai-specific annotation `@Portable`. We will begin by annotating the `Booking` class which used as an the event payload.
@@ -135,7 +130,7 @@ You should do the same for the other model classes.
The EntryPoint
-~~~~~~~~~~~~~~
+--------------
We are set up now and ready to start coding. The first class we need is the EntryPoint into the GWT application. Using Errai, all it takes is to create a POJO and annotate it with `@EntryPoint`.
@@ -297,7 +292,7 @@ The newly created methods `onNewBooking` and `onCancelledBooking`are _event list
The widgets
-~~~~~~~~~~~
+-----------
Next, we will define the widget classes that are responsible for rendering the user interface. First, we will create the widget class for an individual performance.
View
4 DataPersistence.asciidoc
@@ -1,8 +1,8 @@
Building The Persistence Layer
==============================
-Learn how to build the persistence layer for an application, and how to test it
--------------------------------------------------------------------------------
+What Will You Learn Here?
+-------------------------
You have set up your project successfully. Now it is time to begin working on the TicketMonster application, and the first step is adding the persistence layer. After reading this guide, you'll understand what design and implementation choices to make. Topics covered include:
View
8 UserFrontEnd.asciidoc
@@ -1,8 +1,8 @@
Building the User UI using HTML5
================================
-Learn how to build the user interface in desktop and mobile version
--------------------------------------------------------------------
+What Will You Learn Here?
+-------------------------
You've just implemented the business services of your application, and exposed them through RESTful endpoints. Now you need to implement a flexible user interface that can be easily used with both desktop and mobile clients. After reading this tutorial, you will understand our front-end design and the choices that we made in its implementation. Topics covered include:
@@ -22,8 +22,8 @@ In this tutorial, we will build a single-page application. All the necessary cod
.Single page application
image::gfx/single-page-app.png[]
-MVC support
-~~~~~~~~~~~
+Client-side MVC Support
+~~~~~~~~~~~~~~~~~~~~~~~
Because this is a moderately complex example, which involves multiple views and different types of data, you will use a client-side MVC framework to structure your application, which provides amongst others:
View
13 WhatIsTicketMonster.asciidoc
@@ -5,12 +5,12 @@ Ticket Monster is a moderately complex application that demonstrates how to buil
Apart from being a demo, Ticket Monster provides an already existing application structure that you can grab and use for trying out your use cases, testing your own ideas, or, if you so wish, contribute back to the community with extensions.
-Use cases
+Use Cases
---------
We have grouped the current use cases in two major categories: end user oriented and administrative.
-What can end users do?
+What Can End Users do?
~~~~~~~~~~~~~~~~~~~~~~
The end users of the application want to attend some cool events. They will, in principal, try to find shows and create or cancel their bookings. So their use cases are:
@@ -27,7 +27,7 @@ The end users of the application want to attend some cool events. They will, in
image::gfx/ticket-monster-user-use-cases.png[]
-What can administrators do?
+What Can Administrators Do?
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Administrators are more concerned the operation of the site. The will manage the so-called "master data": information about venues, events and shows, and want to see how many tickets have been sold. Their use cases are:
@@ -56,9 +56,14 @@ The major part of the administration site is centered around CRUD use cases, so
Monitoring sales requires staying in touch with the latest changes on the server side, so this part of the application will be developed in GWT and showcases Errai's support for real-time updates via client-server CDI eventing.
-Learn more about it
+How Can You Run It?
-------------------
+TODO
+
+Learn More About Ticket Monster
+-------------------------------
+
The example is accompanied by a series of tutorials that will walk you through the process of creating the TicketMonster application from end to end.
After reading this series you will understand how to:
Please sign in to comment.
Something went wrong with that request. Please try again.