Programming model tutorials

WebSphere Commerce provides tutorials that are designed to introduce the various tasks that are related to creating customized code to develop and enhance WebSphere Commerce applications. The following tutorials provide sample guides to customizing elements of the WebSphere Commerce programming model.
Tutorial Learning objectives Description
Tutorial: Creating business logic
After completed this tutorial, you should be familiar with the following concepts:
  • Business logic
  • Views
  • Controller commands
  • Data and entity beans
After completing this tutorial, you should be familiar with the following tasks:
  • Creating business logic to develop WebSphere Commerce applications
  • Creating views to display content on storefront pages
  • Creating controller commands to return a view task to be implement
  • Creating data beans to provide dynamic content for a JSP page
  • Creating and integrating entity beans to store data returned from a JSP page
In this tutorial, you create the business logic for a new view, controller command, data bean, and entity bean. New business logic is required when a change is made to the default business logic behavior of WebSphere Commerce. This tutorial guides you through creating business logic to support an application to track bonus reward points earned by customers in a new customer loyalty program application. The assets you will create include a view, a controller command, a task command, data beans, and an entity bean. This tutorial is for demonstration purposes only and does not reflect all the logic required to build a fully functional loyalty program application. From this tutorial, you learn the common development steps for creating the previously listed code assets.
Tutorial: Modifying a controller command
After completed this tutorial, you should be familiar with the following concepts:
  • OrderItemAddCmdImpl class
  • Controller commands
After completing this tutorial, you should be familiar with the following tasks:
  • Creating implementation for a controller command
  • Updating the command registry so that the new implementation gets used in your application
  • Deploying a modified controller command to a WebSphere Commerce application
This tutorial demonstrates how to modify an existing controller command. In this tutorial, you restrict the number of items in a customer's shopping cart to five or fewer unique items. To implement this solution, you override the OrderItemAddCmdImpl class with your own implementation. The implementation 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.
Tutorial: Using Struts tags, action forms, and validation
After completing this tutorial, you should be familiar with the following concepts:
  • Struts
  • Action forms
  • Validation
  • JSPs
  • Controller commands
After completing this tutorial, you should be familiar with the following tasks:
  • Creating HTML forms
  • Creating dynamic action forms
  • Changing the implementation of a view
  • Adding validation
  • Adding messages to a store as a struts
In this tutorial, you learn how to use Struts tags, action forms, and validation in the context of WebSphere Commerce store development.
Tutorial: Extending a Struts action
After completing this tutorial, you should be familiar with the following concepts:
  • Struts
  • Action classes
  • Implementation classes
After completing this tutorial, you should be familiar with the following tasks:
  • Extending a struts action
  • Use cookies in your implementation to associate a referral with users
In this tutorial, you learn how to extend Struts actions in the context of WebSphere Commerce store development. Specifically, you are creating a new action class, MyNewAction, that extends the WebSphere Commerce BaseAction class.
Tutorial: Extending a BOD service to manage UserData with the Data Service layer
After completing this tutorial, you should be familiar with the following concepts:
  • Understanding the WebSphere Commerce Data Service Layer
  • Overview of simple extension and customization tasks.
After completing this tutorial, you should be able to perform the following tasks:
  • Updating the WebSphere Commerce database with new tables and relationships.
  • Generating custom object-relational metadata that describe new tables and relationships.
  • Generating static service data objects (SDO) that provide a Java representation of the newly added tables.
  • Configuring the logical DataObject to physical DataObject mapping.
  • Creating a custom query template file to map an XPath expression and access profile to SQL.
In this tutorial, you customize the Catalog service to support warranty information and care instructions for Catalog Entries. This customization updates the WebSphere Commerce schema so that it stores the new information and customizes the Catalog service to include new information. The new information is included as user data in the CatalogEntry noun.
Tutorial: Extending a search profile to retrieve and display custom data in the storefront
After completing this tutorial, you should be familiar with the following concepts:
  • Search profiles
  • CatalogEntryView noun
After completing this tutorial, you should be familiar with the following tasks:
  • Customize WebSphere Commerce search
  • Customize the catalog programming model
  • Extend a search profile
  • Customize the business object mediator
  • Create a custom get data configuration file
In this tutorial, you learn how to create catalog data and display this data in the storefront by using the search-based catalog navigation noun.
Tutorial: Displaying additional UserData in mobile native applications
After completing this tutorial, you should be familiar with the following concepts:
  • REST Services
  • JavaScript Object Notation
After completing this tutorial, you should be familiar with the following tasks:
  • Specify a custom access profile to retrieve custom UserData by using REST services
  • Extend existing sample Android code to add information about the product page
  • Create an activity to retrieve custom warranty data
In this tutorial, you learn how to display custom UserData in a mobile native application via REST services.