Develop > Controller layer


Application developer

You can extend the WebSphere Commerce product to fit the business needs. This topic describes the prerequisite skills and required knowledge that customize business logic. After you have the required knowledge, use WebSphere Commerce Developer to take tutorials that guide you step-by-step through various customization scenarios.


What know before you start

WebSphere Commerce is a Java and J2EE compliant application.

To successfully customize WebSphere Commerce you need skills in the following areas:

Before you begin to customize WebSphere Commerce, read the following topics.

Required knowledge See
Understand the main components and capabilities of the WebSphere Commerce development environment.

Understand the WebSphere Commerce architecture including the information model, data model, and programming model.

Understand how the WebSphere Commerce development environment interacts with the Web server, Database server and WebSphere Application Server.

Understand the major components of WebSphere Commerce and how they interact.

Understand how the data model, presentation information, and control information are separated into different objects.

Understand the programming frameworks used by WebSphere Commerce and when to use each model.

Understand the relationship of the business context service to business logic.

Understand features of developing Enterprise JavaBeans.

Understand the main features of developing commands.


Tutorials, samples and procedures

When you have the required skills and knowledge, the following instructions are available to you in the WebSphere Commerce Information Center:

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

  • Develop a Web Service definition

  • Set up the WebSphere Commerce Web services framework to handle the request

  • Create a JSP page to generate the Web service response

  • Set up a caching policy to cache fragments of the Web service response

Tutorial: Defining an inbound Web service This tutorial demonstrates how to create a Web service to retrieve information.
name-value pair

  • Define an OAGIS style Web service

  • Call existing business logic

  • Create a success confirmation message

  • Create a custom failure message

Tutorial: Defining a User Registration Web Service The purpose of this tutorial is to demonstrate how to create an OAGIS style Web services that will create a new customer in WebSphere Commerce through Web services using the WebSphere Commerce Web services framework. This tutorial will demonstrate the steps involved in defining a new service that uses the OAGIS style to create a new customer, register the service in WebSphere Commerce and create the response JSP template to generate a confirmation response.
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.


+

Search Tips   |   Advanced Search