Tutorials > Program model > Create new business logic
Create new business logic summary
This section summarizes the tutorial.
In this tutorial, you learned that:
- Create new business logic might require a new view, controller command, task command, database table and its related enterprise bean.
- Create a new view involves the following steps:
- Naming the view and registering it in the view registry.
- Create a new properties files in which translatable text for JSP pages are stored.
- Create a new JSP page for the new view.
- Create and load access control policies for the view
- Create a new controller command involves the following steps:
- Register the new command in the command registry.
- Create an interface for the command.
- Create an implementation class for the command.
- Create and load access control policies for the command.
- Test the command.
- Set attributes in a data bean can be accomplished by using a controller command.
- Validate parameters that are passed in through URL commands is good programming practice.
- Create smaller task commands from a larger controller command is good programming practice.
- Create access bean to access data in a new database table is good programming practice.
- In WebSphere Commerce Developer, you can run SQL queries against the database using http://localhost/webapp/wcs/admin/servlet/db.jsp. You can also use the native tools for the database to run SQL queries.
More informationTo learn more information about the topics covered in this tutorial, consider the following sources:
Create a new view
- Command registration framework
- Configure the WebSphere Commerce Struts-based Web application
- Support globalization
- Understanding access control and Sample access control policies for development purposes
Create a new controller command
- Controller command programming model
- CMDREG table
- Understanding access control and Sample access control policies for development purposes.
Pass information from MyNewControllerCmd to MyNewView
Create a new task command
- See Command design pattern for details and Create a new task command for more information about the performExecute () and execute() methods.
- Task command programming model
Create a new enterprise bean
- For more information about the protectable interface and getOwner() and fulfills(), see Protectable interface.
- Packaging the module with conversion.
Deploying to WebSphere Application Server
- Update applications in the WebSphere Application Server information center
Tutorial source code pages
- To view the source code used in this tutorial, see the following pages:
- MyNewControllerCmd source code
- MyNewControllerCmdImpl source code
- MyNewTaskCmd source code
- MyNewTaskCmdImpl source code
- BonusDataBean source code
- MyNewDataBean source code