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 seven samples for this feature pack: Ajax: Hello! QuoteStreamer PlantsByWebSphere (Ajax edition) CourierApp (RPC adapter sample) HelloWorld (RPC adapter sample) Feed samples SOAP sample The IBM WebSphere Application Server Feature Pack for Web 2.0 contains 7 Samples. Each of the samples shows off specific features of the Feature Pack for Web 2.0. Ajax: Hello! Ajax: Hello! The Ajax: Hello! Sample application is a simple example of how to begin to use Ajax in Java? EE applications by using the Dojo Toolkit. Ajax operations used in the sample without requiring a full page load in the browser: input field validation combination box look-ahead asynchronous data retrieval dynamic page updating. The Ajax: Hello! Sample application is a simple example of how to begin to use Ajax in Java EE applications by using the Dojo Toolkit. The application implementation is simple, making it easy to understand while still performing Ajax operations, such as input field validation, combination box look-ahead, and asynchronous data retrieval, and dynamic page updating. All of aforementioned operations are demonstrated in this sample without requiring a full page load in the browser. 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 (continued) QuoteStreamer sample (continued) 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 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. HelloWorld (RPC adapter sample) HelloWorld (RPC adapter sample) Demonstrates the usage of EJB modules in RPCAdapter the capabilities of RPCAdapter like handling of XML and JSON responses and specifying validators. The application accepts a name from the user and displays a simple message on clicking the "SayHello" button. The application uses RPC adapter's XML and JSON services to validate name and display message. The functions for validation and message display are implemented in EJB modules. The HelloWorld Sample application demonstrates the usage of EJB modules in RPCAdapter. It also demonstrates the capabilities of RPCAdapter like handling of XML and JSON responses and specifying validators. The application contains links to access HelloWorld application using JSON or XML. If any of the links are clicked the corresponding page is displayed. The resulting page accepts a name from the user and displays a simple message on clicking the "SayHello" button. The application uses RPC adapter's XML and JSON services to validate name and display message. The functions for validation and message display are implemented in EJB modules. 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 (continued) Feed samples (continued) 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. SOAP sample SOAP sample SOAP is a standard XML-based protocol for invoking SOAP based Web services. The application implementation is a simple usage of the IBM Extension to the Dojo toolkit for working with SOAP services. The sample makes a SOAP call to United States' National Oceanic and Atmospheric Administration (NOAA) weather service to map a United States ZIP code to its corresponding latitude and longitude. SOAP is a standard XML-based protocol for invoking SOAP based Web services. The application implementation is a simple usage of the IBM Extension to the Dojo toolkit for working with SOAP services. The simplicity of the application makes it easy to understand how to use the extension while still performing an interesting operation. The sample makes a SOAP call to United States' National Oceanic and Atmospheric Administration (NOAA) weather service to map a United States ZIP code to its corresponding latitude and longitude. Installing the samples Installing the samples Section The next section will cover how to install the Samples. 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 Refer to the sample documentation that comes with the IBM WebSphere Application Server Feature Pack for Web 2.0 for detailed installation instructions 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. For complete details, see the information center or the documentation that is included with the feature pack. 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.3 (http://www.eclipse.org/), is an open-source community, whose projects are focused on building an open-development platform that includes extensible frameworks, tools and runtime environments for building, deploying and managing software across the life cycle. Eclipse Web Tools Platform (WTP 2.5 or higher) extends the Eclipse platform with tools for developing J2EE Web applications: http://www.eclipse.org/webtools/ The Ajax Toolkit Framework (http://www.eclipse.org/atf) provides an extensible framework and exemplary tools for building IDEs. Rational Application Developer Version 7.5 is one of the premier tools for developing software solutions and applications: http://www.ibm.com/developerworks/rational/products/rad/ Here are some useful links 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
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 seven samples for this feature pack: Ajax: Hello! QuoteStreamer PlantsByWebSphere (Ajax edition) CourierApp (RPC adapter sample) HelloWorld (RPC adapter sample) Feed samples SOAP sample The IBM WebSphere Application Server Feature Pack for Web 2.0 contains 7 Samples. Each of the samples shows off specific features of the Feature Pack for Web 2.0. Ajax: Hello! Ajax: Hello! The Ajax: Hello! Sample application is a simple example of how to begin to use Ajax in Java™ EE applications by using the Dojo Toolkit. Ajax operations used in the sample without requiring a full page load in the browser: input field validation combination box look-ahead asynchronous data retrieval dynamic page updating. The Ajax: Hello! Sample application is a simple example of how to begin to use Ajax in Java EE applications by using the Dojo Toolkit. The application implementation is simple, making it easy to understand while still performing Ajax operations, such as input field validation, combination box look-ahead, and asynchronous data retrieval, and dynamic page updating. All of aforementioned operations are demonstrated in this sample without requiring a full page load in the browser. 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 (continued) QuoteStreamer sample (continued) 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 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. HelloWorld (RPC adapter sample) HelloWorld (RPC adapter sample) Demonstrates the usage of EJB modules in RPCAdapter the capabilities of RPCAdapter like handling of XML and JSON responses and specifying validators. The application accepts a name from the user and displays a simple message on clicking the "SayHello" button. The application uses RPC adapter's XML and JSON services to validate name and display message. The functions for validation and message display are implemented in EJB modules. The HelloWorld Sample application demonstrates the usage of EJB modules in RPCAdapter. It also demonstrates the capabilities of RPCAdapter like handling of XML and JSON responses and specifying validators. The application contains links to access HelloWorld application using JSON or XML. If any of the links are clicked the corresponding page is displayed. The resulting page accepts a name from the user and displays a simple message on clicking the "SayHello" button. The application uses RPC adapter's XML and JSON services to validate name and display message. The functions for validation and message display are implemented in EJB modules. 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 (continued) Feed samples (continued) 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. SOAP sample SOAP sample SOAP is a standard XML-based protocol for invoking SOAP based Web services. The application implementation is a simple usage of the IBM Extension to the Dojo toolkit for working with SOAP services. The sample makes a SOAP call to United States' National Oceanic and Atmospheric Administration (NOAA) weather service to map a United States ZIP code to its corresponding latitude and longitude. SOAP is a standard XML-based protocol for invoking SOAP based Web services. The application implementation is a simple usage of the IBM Extension to the Dojo toolkit for working with SOAP services. The simplicity of the application makes it easy to understand how to use the extension while still performing an interesting operation. The sample makes a SOAP call to United States' National Oceanic and Atmospheric Administration (NOAA) weather service to map a United States ZIP code to its corresponding latitude and longitude. Installing the samples Installing the samples Section The next section will cover how to install the Samples. 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 Refer to the sample documentation that comes with the IBM WebSphere Application Server Feature Pack for Web 2.0 for detailed installation instructions 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. For complete details, see the information center or the documentation that is included with the feature pack. 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.3 (http://www.eclipse.org/), is an open-source community, whose projects are focused on building an open-development platform that includes extensible frameworks, tools and runtime environments for building, deploying and managing software across the life cycle. Eclipse Web Tools Platform (WTP 2.5 or higher) extends the Eclipse platform with tools for developing J2EE Web applications: http://www.eclipse.org/webtools/ The Ajax Toolkit Framework (http://www.eclipse.org/atf) provides an extensible framework and exemplary tools for building IDEs. Rational Application Developer Version 7.5 is one of the premier tools for developing software solutions and applications: http://www.ibm.com/developerworks/rational/products/rad/ Here are some useful links 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