Samples
IBM WebSphere® Application Server Feature Pack for Web 2.0 Samples
This presentation will focus on the IBM WebSphere Application Server Feature Pack for Web 2.0 installation of Samples.
Agenda
Agenda Overview of the samples Installing the samples
This presentation will focus on the overview of the Samples, software requirements for the Samples and how to install the Samples.
Overview of the samples
Overview of the samples Section
The first section will look at the overview of the Samples.
Samples
Samples There are two main samples for this feature pack: QuoteStreamer Sample PlantsByWebSphere Sample There are samples that are specific to feeds: CourierApp Feed samples
The IBM WebSphere Application Server Feature Pack for Web 2.0 contains two Samples. The Samples are QuoteStreamer and PlantsByWebSphere. There are smaller code snippets and small test samples. There are two samples that are specific to feeds CourierApp and Feed samples.
QuoteStreamer sample
QuoteStreamer sample Uses the Web messaging service to simulate stock quotes to a Dojo-enabled client application Simulated quotes are generated by a CommonJ timer that publishes messages to a Service Integration Bus topic space Web messaging service links a Dojo enabled client to the publish/subscribe function of WebSphere Application Server for messaging Communication is through Bayeux protocol
The Quote Streamer Sample application uses the Web messaging Service to simulate stock quotes to a Dojo-enabled client application. Simulated quotes are generated by a CommonJ timer that publishes messages to a Service Integration Bus topic space. The Web messaging Service links a Dojo enabled client to a WebSphere Application Server internal message broker, messaging, for Web-based publication/subscription. Communication is achieved through the Bayeux protocol. The Dojo Toolkit's cometd client links incoming JavaScript Object Notation(JSON) messages to the Dojo event/topic system for processing. In the QuoteStreamer Sample application, multiple Dojo widgets are specified in a market report summary article in HTML format. These Dojo widgets process incoming stock quote messages and visually indicate stock changes. These visual changes include: update to the current price of a stock, daily stock price change, and daily stock percent price change. When the price of a stock changes, the daily price change and daily percent price change turn green (increase) or red (decrease) before fading back to the normal backbground color.
QuoteStreamer sample (2)
QuoteStreamer sample (2) Quotes are generated on the server side at all times. Quotes are started by default. Stop stock quote unsubscribes to all topics on the server and disconnect the bayeux protocol. Resume stock quote, presubscribes and re-initializes the bayeux protocol connection.
The start/stop button is now at the top of the page, and when the page loads, quotes are started by default. When you hit stop, all topics on the server are unsubscribed to all topics on the server and bayeux protocol is disconnected. The bayeux protocol. Clicking on start again, presubscribes and re-inits the bayeux protocol connection.
QuoteStreamer sample snapshot
QuoteStreamer sample snapshot
The QuoteStreamer Sample page does not refresh and the fading is a Dojo effect. Actual values on the Sample are generated on the server. The Sample uses Bayeux protocol which is a long polling model to keep the connection open, the connection is open for 30 seconds and every 5 seconds it polls for information. Asynchronous requests keep coming. The client is up and makes request to the server and the connection stays open and data can be interchanged for the 30seconds. Connections request goes to the server and if no data it can wait for a maximum of 30 seconds then it will close after that. When a new request comes to open the line data will be queued. The Sample can receive events quicker when needed.
PlantsByWebSphere sample (Ajax edition)
PlantsByWebSphere sample (Ajax edition) An enhancement to the PlantsByWebSphere application which has been provided as a Sample with the WebSphere Application Server The application itself is a three-tier J2EE application consisting of Servlets, EJBs, and JSPs communicating with a back-end database It has been augmented with Dojo controls to add AJAX style widgets
The PlantsByWebSphere AJAX Edition application is an enhancement to The PlantsByWebSphere application which has been provided as a Sample since WebSphere Application Server Version 5.0. The application itself is a three-tier J2EE application which consists of Servlets, EJBs, and JSPs communicating with a back-end database. It has been augmented with Dojo controls to add Ajax style widgets to improve the usability and to highlight the rich potential of Dojo.
PlantsByWebSphere sample
PlantsByWebSphere sample Typical Web application containing JavaServer™ Pages files, enterprise service beans, and servlets Sample represents how a Web 1.0 technology-based application can be enhanced with Web 2.0 technology Sample demonstrates how Ajax widgets can be added to a traditional J2EE Web application to improve user interaction without rewriting the server-side application
The PlantsByWebSphere application represents a typical Web application that contains JavaServer Pages files, enterprise service beans, and servlets. The Sample is intended to represent how a Web 1.0 technology-based application can be enhanced with Web 2.0 technology. Specifically, Ajax style controls using the open-source JavaScript-based Dojo Toolkit. The Sample demonstrates how adding Ajax widgets can be added to a traditional J2EE Web application to improve user interaction without rewriting the server-side application. This application contains drag-drop function, scrollable inventory, and enhanced form validation.
PlantByWebSphere sample snapshot
PlantByWebSphere sample snapshot
This picture shows one of the pages for PlantsByWebSphere Sample, specifically the vegetables page. Note the shopping cart on the right hand side and the item preview section. You can drag-and-drop items into the cart or preview them then select to add them to the cart.
CourierApp
CourierApp Demonstrates auto population of address details on selecting a zip code or postal code. Address lookup invoked using RPC adapter. Response can be JSON or XML.
CourierApp demonstrates auto population of address details on selecting a zip/postal code. Address lookup service is invoked using the RPC Adapter to get the detailed address. The response can be either JSON or XML format.
Feed samples (1)
Feed samples (1) The feed samples demonstrate the Atom and RSS support in Abdera. Generate an Atom feed. Read an Atom feed. Read an RSS feed O’Reilly site: http://www.oreillynet.com/pub/feed/1 RSS feed from CNN: http://rss.cnn.com/rss/cnn_topstories.rss
The Feed samples demonstrate the Atom and RSS support in Abdera. You can generate or read Atom feeds using a simple example provided. You can also perform a filtered read on the Atom content. For example, choose an Atom feed from the O’Reilly site listed on this slide, or the RSS example from CNN.
Feed samples (2)
Feed samples (2) Samples for Atom Publishing Protocol (APP) Demonstrate the ability to create, update, delete, and retrieve entries in a feed. Also provides options to retrieve the service document for the deployed Abdera server, and the associated feed. Use the default Abdera Servlet, to try out the APP samples. The APP samples require HTTP operations to work with the feed entries.
The Samples for Atom Publishing Protocol demonstrate the ability to create, update, delete, and retrieve entries in a feed. They also provide options to retrieve the service document for the deployed Abdera server, and the associated feed. Use the default Abdera servlet to try out the Atom Publishing Protocol samples. These samples require HTTP operations to work with the feed entries.
Installing the samples
Installing the samples Section
The next section will cover how to install the Samples.
Installing the samples
Installing the samples Refer to the sample documentation that comes with the IBM WebSphere Application Server Feature Pack for Web 2.0 for detailed installation instructions.
Options for installing a sample
Options for installing a sample Eclipse IDE can be used to install a sample application into your application Administration console can be used to install a sample application Command line can be used to install a sample application Rational® Application Developer or other Eclipse based IDE’s can be used to install a sample application
There are a several ways to install the Sample. Eclipse Integrated Development Environment (IDE) can be used to install a Sample application into your application. Another option is installing through the command line. Other tools like Rational application Developer or other Eclipse based IDE’s can be used to install a Sample application.
Useful links
Useful links WebSphere Application Server Version 6.1 information center. http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.base.doc/info/welcome_base.html Eclipse Tools 3.2.2 is an open-source community, whose projects are focused on building an open-development platform comprised of extensible frameworks, tools and runtime environments for building, deploying and managing software across the life cycle. http://www.eclipse.org/ Eclipse Web Tools Platform (WTP 1.5.4) extends the Eclipse platform with tools for developing J2EE Web applications. http://www.eclipse.org/webtools/ The AJAX Toolkit Framework (ATF) provides and extensible framework and exemplary tools for building IDEs. http://www.eclipse.org/atf Rational Application Developer Version 7.0.0.3 is one of the premier tools for developing software solutions and applications. http://www.ibm.com/developerworks/rational/products/rad/
WebSphere Application Server Version 6.1 information center can be used as a reference tool.
Feedback
Feedback Your feedback is valuable You can help improve the quality of IBM Education Assistant content to better meet your needs by providing feedback. Did you find this module useful? Did it help you solve a problem or answer a question? Do you have suggestions for improvements? Click to send e-mail feedback: mailto:iea@us.ibm.com?subject=Feedback_about_was_web20fp_Samples.ppt This module is also available in PDF format at: ../was_web20fp_Samples.pdf
You can help improve the quality of IBM Education Assistant content by providing feedback.
Trademarks