Tutorials >


Program model tutorials

WebSphere Commerce provides tutorials that are designed to introduce the various tasks related to creating customized code for WebSphere Commerce applications.

Program model Learning objectives Tutorial Description
name-value pair

  • Create new business logic: a new view, a new controller command, a new data bean and a new entity bean

Tutorial: Creating new business logic In this tutorial, you create new business logic. New business logic is required when a change is made to the default business logic behavior of WebSphere Commerce. In this tutorial, the change is the ability to keep track of a customer's bonus points. The types of assets created include a new view, a new controller command, a new task command, new data beans, and a new entity bean. This tutorial is for demonstration purposes only and does not reflect all the logic required to build a loyalty program application. Instead, from this tutorial, we will learn the development steps that are common to creating each of the previously listed types of code assets.
name-value pair

  • Create a new implementation for an existing controller command

  • Update the command registry so that the new implementation gets used in the application

  • Deploy a modified controller command to an existing WebSphere Commerce application

Tutorial: Modifying an existing controller command This tutorial demonstrates how to modify an existing controller command. In this tutorial, we will restrict the number of items in a customer's shopping cart to five or fewer items.

To implement this solution, we will override the OrderItemAddCmdImpl class with the own implementation that includes logic to check for the number of items in the shopping cart. If a customer attempts to add a sixth item to the shopping cart, an exception is thrown. This exception uses a new error message.

name-value pair

  • Extend the object model by creating a new database table

  • Create an entity bean

  • Modify an existing task command.

Tutorial: Extending the object model and modifying an existing task command In this tutorial, you address a requirement to collect gift card information for orders. The information that must be collected is the name of the recipient, the name of the sender and two messages. The information will be collected when the customer submits the order. You will create a new database table to store the gift order information and a new entity bean to access the data.
name-value pair

  • Add a finder to an entity bean to a WebSphere Commerce entity bean.

Tutorial: Adding a finder to an existing entity bean In this tutorial, you add a finder to an existing entity bean. By default, the order status page displays a customer's orders sorted by order number. In this tutorial, we will add a finder to the Order entity bean to sort a customer's orders by the time the order was placed, then modify the store JSP page to use the new finder.
name-value pair

  • Create an HTML form, along with assets and configuration necessary for its validation and processing.

Tutorial: Using Struts tags, action forms, and validation This tutorial is designed to show you how to use Struts tags, action forms, and validation in the context of WebSphere Commerce store development.
name-value pair

  • Extend an action, as opposed to a command, because you are only targeting requests entering the system through the Web channel.

  • Use cookies in the implementation, because to associate a referral with a specific user and you want this association to persist between shopping sessions.

Tutorial: Extending a Struts action This tutorial demonstrates how to extend Struts actions in the context of WebSphere Commerce store development. Specifically, we will create a new action class, MyNewAction, that extends the WebSphere Commerce BaseAction class... when a customer first arrives at a store page from one of a predefined set of referring Web sites (for instance, business partners or partner search engines), MyNewAction will create a cookie to store the referring Web site's URL; this information can later be used to pay royalties to the referring Web site if the customer makes a purchase within a predetermined period of time or simply to gather statistics. You will then configure an existing starter store action to use MyNewAction as its implementation class.
name-value pair

  • Create an outbound Web service client that integrates with a sample Web Service which manages users.

Tutorial: Creating an outbound Web service client for WebSphere Commerce In this tutorial, you create MyCompanyMember outbound Web service client. This client integrates WebSphere Commerce with a sample Web service which manages users. The MyCompanyMember Web service client integrates with the UserRegistrationAdd and UserRegistrationUpdate commands to push new and updated user registration information to the sample system.
Business Object Document command framework

  • Understand the WebSphere Commerce BOD command framework.

  • Overview of simple extension and customization tasks.

Tutorial: Creating a new WebSphere Commerce BOD service module In this tutorial you follow the development of a sample service module, TutorialStore, based on the concept of a Store in WebSphere Commerce version 7. The services provided by the tutorial store is Get, Change and Process.


Related concepts

Application developer


+

Search Tips   |   Advanced Search