WebSphere Commerce architecture - Bemol · Getting Started with WebSphere Commerce V7 3 After...
Transcript of WebSphere Commerce architecture - Bemol · Getting Started with WebSphere Commerce V7 3 After...
Unit Objectives 2
This unit was designed to enable you to:
Start a development project that implements WebSphere Commerce V7.
Describe the Runtime architecture of WebSphere Commerce.
Describe the development model for WebSphere Commerce.
Explain the application of Struts in WebSphere Commerce.
Describe the presentation layer for WebSphere Commerce by using both standard JSP files and Web 2.0-enabled JSP files.
Summarize the Business Logic and Persistence Layers.
Describe the benefits of EJBs, Access beans, and the Data Service Layer,
and describe what role each plays in persistence.
Summarize the elements and utilities available in access control.
Explain the development environment and how to effectively
troubleshoot and debug WebSphere Commerce applications.
Getting Started with WebSphere Commerce V7
3
After completing this topic, you should be able to describe the:
New features and functionality in WebSphere Commerce V7.
Programming specifications of WebSphere Commerce V7.
Establishing a team and develop a process for implementing a solution by using WebSphere Commerce V7.
4
What is new in WebSphere Commerce V7
Multi-channel Precision Marketing
Mobile Commerce
Social Commerce
Efficient data loading utility
Starter Stores that are enabled by Web 2.0 technology
IBM Management Center enhancements
Migration assistance utilities
Developer infrastructure improvements
Programming Specifications 5
WebSphere Commerce Version 7.0 uses a number of programming specifications: Dojo 1.3.1 EJB Version 2.1 EMF Version 2.2 JavaMail 1.4 JAX-RPC 1.1 JEE 5 JDK and JRE Server and Client Tools 1.6 JMS 1.1 JSP support (from WebSphere Application Server) 2.1 OpenLaszlo 4.2.0.3 SDO 2.0 Struts 1.2.9 Sun Java Servlet Version 2.5 XML XSD 1.1 XSTL
Stage 1: Model Gather requirements, design, simulate, and optimize business models Team: Architects, Business Analysts
Stage 2: Assemble Discover, assemble, test
Team: Architects, Project Managers, Development teams
Stage 3: Deploy Integrated deployment of processes
Team: Project Managers, Administrators
Stage 4: Manage Business monitoring for co-ordinated interaction, analytics, and optimization Team: Architects, Administrators
Development Process: The Development Cycle
6
© Copy right
WebSphere Commerce Architecture 7
After completing this topic, you should be able to describe the:
WebSphere Commerce V7 Runtime architecture.
WebSphere Commerce V7 Application Layers.
The WebSphere Commerce V7 Runtime.
Core components of WebSphere Commerce.
Multi-channel support in WebSphere Commerce V7.
Framework interactions in the Web channel.
© Copy right
WebSphere Commerce Application Layers
Business models
Represents a sample business situation or describes a scenario.
Business processes
Represents sample business functions and cases.
Presentation layer
Responsible for displaying results.
Serv ice layer
Segregates implementation of business logic.
Implemented by using OAGi messages.
Business logic
Implements business rules independent of the presentation.
Implemented by using a command pattern.
Persistence layer
Records the data and operations.
Represents entities within the Commerce domain.
Encapsulates data-centric logic.
Database schema
Designed specifically for e-commerce applications.
9
© Copy right
Presentation Layer
WebSphere Commerce V7 Runtime
Presentation layer Flexible architecture includes
Portal and Management Center.
Controller layer Enhanced to include support for
Portal and Management Center.
Web channel offers support for SDO tag library.
Business logic layer Supports NVP command
framework.
Supports processing commands for BODs.
Persistence layer Supports EJB 1.1 – EJB 2.0
Supports component services by using the Data Service Layer as an abstract, SOA-compatible persistence solution over the database.
10
Controller Layer
Struts Sales Ctr Portlet Struts
Storefront Sales Ctr Portal Mgmt Ctr
Business Logic Layer
Services Interface
Persistence Layer
JSP Eclipse Portlets .lzx
NVP cmds BOD cmds
Access beans
EJB beans
Data Service Layer
© Copy right
WebSphere Platform
Business Context Engine
11
Core Components
WebSphere
Commerce Accelerator
Administration
Console
Configuration
Manager
Development
Environment
IBM Management
Center
Organization
Administration Console
Analytics Personalization Roles and
Relationships Globalization
Foundation and
Tools
Business
Integration
Marketing Merchandising
Catalog
Management
Business
Intelligence
Customer Service
Order
Management
Tools Configurable Business Processes
© Copy right
Business Logic Layer
Multi-Channel Support in WebSphere Commerce
Presentation Layer is decoupled from the Business Logic Layer
through the Services interface.
Multiple types of Sales Channels
can be connected to the WebSphere Commerce Server with
the Services interface.
Each sales channel can support its own unique architecture.
Access to the database from the
WebSphere Commerce Server is implied through the Persistence
Layer.
12
Marketing
Services Interface
WebSphere Commerce Server
Struts Portal Mgmt Ctr
Other Kiosk Sales Ctr
Selling Member
Trading Order Catalog
© Copy right
Presentation Layer
WebSphere Commerce supports multiple Pr esentation Layers Use a n appropriate Presentation Layer
th at is based on y our business r equ irements.
Both the Struts and Portal Presentation La y ers follow the Model-View-Controller (MV C) design pattern.
In WebSphere Portal: Br ow ser request that are routed to a
con troller (portlet). Por t let calls client libraries (Java
cla sses).
Client library sends a service request for pr ocessing.
Por t let dispatches rendered data to a JSP pa g e in the portlet container.
JSP pa ges client libraries tags to r etrieve da ta.
In Struts: Br ow ser request is r outed to a servlet
th at acts as a controller.. Con troller calls the model for processing
Con troller dispatches the appropriate v iew to render data.
Model en capsulates all business logic (as commands) .
JSP pa ges retrieve data from the da tabase by using Data beans.
13
EJB Container
Business Logic Layer
Mgmt Center
Client
WebApp
Web Container
Servlet
Portlet Container
Portlet
Libraries JSP JSP
© Copy right
Development Layers of WebSphere Commerce
14
After completing this topic, you should be able to describe the:
Business Logic Layer:
Name-value pair processing commands
BOD processing commands
Persistence Layer: Access beans and Enterprise JavaBeans
Data Service Layer
© Copy right
Business Logic Layer
Business Logic Layer supports two methods of command processing: Traditional name-value pair processing
SOA-compliant processing of Business Object Documents (BODs)
Both name-value processing and BOD processing
Both methods use the WebSphere Commerce command framework
Name-value pair processing Controller commands
Task commands
BOD processing Get, Change, Process, Sync
15
Services interface
BOD command processing
Name-value pair command
processing
© Copy right
Task command
Task command
Task command
Controller command
Controller command
Controller command
Differences in Business Logic Layer Processing (1 of 2)
Name-value pair processing:
Request for execution from Presentation Layer.
Business token that is passed to Business Context service from Data bean.
Façade calls appropriate controller
command (or commands) which call task command (or commands).
Controller and task commands call Access beans which delegate to EJB beans.
16
Services interface
EJB container
Business Context
Access Bean
JSP
© Copy right
Controller command
Controller command
BOD command
Differences in Business Logic Layer Processing (2 of 2)
BOD processing:
Request for execution from Presentation Layer in SDO format.
Leverages Business Context service.
Pre-built BOD processing commands.
Commands call Data Service Layer to access database.
17
Services interface
EJB container
Business Context
Data Service Layer
Data service façade
BOM service
Phys. Obj. Persistence
© Copy right
Data Service Layer
Abstraction for data access
Independent of the physical schema
Purpose: Functions independent of the framework.
Transforms data that is retrieved from database into Java objects (implemented as SDO).
Offers bidirectional transformation between physical SDOs (schema) and logical SDO (classes).
Allows user to perform CRUD operations on physical or logical SDOs.
Services of the DSL: Data service façade: Interface for
accessing data.
Business object mediation: Initializes classes (mediators) that transform physical to logical data.
Physical object persistence: Provides mediators access to physical data, translating XPath to SQL.
18
Data service facade
Business object
mediation
Physical object
persistence
© Copy right
Subsystem Data Models in WebSphere Commerce
19 Catalog
Catalogs, categories, products, attributes, groupings
Marketing
Promotions, rules server, product advisor, WebSphere Commerce Analyzer
Member Access control, authentication,
member (participants)
Order management
ATP, calculation, pricing, payment, procurement store, shipping, tax
System
Collaboration, command, flow, scheduler, messaging, system, user traffic
Trading
Auctions, contract, RFQ
Payment
Tables that are related to the WebSphere Commerce Payments Multipayment framework and the Payments subsystem.
Workspaces
Relationship of database tables that are used in workspace.
Gift Center (optional)
Relationship of database tables pertinent to the IBM Gift Center application.
Store Locator (optional)
Search (optional)
Search Engine optimization
© Copy right
WebSphere Commerce Supporting Services 20
After completing this topic, you should be able to describe the:
Purpose and function of the Business Context service.
Purpose and function of Web services in WebSphere Commerce.
Basics of security and access control.
© Copy right
Business Context Services
Business contexts Contexts establish an execution
environment that affects the output of a business component.
Contexts are not directly invoked by clients; business components use the information present in a context to fulfill operations.
Benefits Enablement of generic
components.
Tailored content and experience.
Precisely targeted offers.
Enforcement of business policies.
Appropriate prices, entitlements, and terms for a particular user.
21
© Copy right
Web Services in WebSphere Commerce
WebSphere Commerce as a service provider:
Enabling business operations as externally accessible Web services makes WebSphere Commerce a service provider.
Web service deployment models usually have a central server with published WSDL defining the services.
External clients, Web applications, or rich client applications connect to the central server and invoke services that are defined by the publicly available WSDL.
22
Client code
Web service client code
Web service engine
Web service controller
Message mapping config
Business logic
façade
JSP comp. service
WebSphere Commerce Web service framework
WebSphere Commerce Server Web service client
© Copy right
Advantages of Web Services in WebSphere Commerce
23
Uses WebSphere Application Server Web service engine: Hides the complexity of SOAP
Reuses existing WebSphere Commerce assets: Existing programming model
Existing integration technology
Designed for customization: XML request message mapping
JSP response building
Inbound and outbound Web service implementations.
© Copy right
Elements of Access Control 24
Users People that use the system. Grouped into relevant access groups (UserGroup). Roles are used to determine membership in an access group. Roles are assigned to users on a per organization basis.
Actions Activities that Users can perform on a Resource. Actions can be grouped into relevant groups (ActionGroup).
Resources Entities, such as JSPs and commands, that are protected Can be grouped into relevant groups (ResourceGroup).
Relationships Define connection between Users and Resources (such as Owner,
Editor, Reader).
© Copy right
WebSphere Commerce Feature Pack Updates 25
After completing this topic, you should be able to describe the:
Catalog programming model updates.
WC search enhancements.
Sterling/CM integration.
Data load updates.
Coremetrics Integration.
© Copy right
Storefront Programming Model and the Goal of Feature Pack 3
26
Program model before Feature Pack 3: Data beans SOI and SOA-based services.
Understand different programming models when using catalog services in the store front.
Storefront catalog programming model solution in Feature Pack 3: Provide a consistent SOA-based programming model for the
store front .
Move store front catalog service that is currently based on Java™ beans and SOI to SOA.
The solution uses the existing WC Search framework and the search CatalogNavigationView noun.
© Copy right
Solution Architecture 27
Product
Display
JSP
getData tag Catalog
Service
Search
Engine
Database CatalogNavigationView
Noun
© Copy right
Sterling Configurator Integration 28
Provide an end-to-end Dynamic Kits authoring and shopping flows.
Integrate with Sterling Visual Modeler (VM). Allow product managers define models for Dynamic Kits.
Integrate with Sterling Configurator (SC) Allow Product Managers to pre-configure Dynamic Kits in
Management Center . Allow shoppers to configure or reconfigure Dynamic Kits from the
Storefront.
Except the data, product, catalog, and price information for the model are kept and managed in WebSphere Commerce.
Sterling products must be purchased separately. Feature Pack 3 does not support Sterling DOM
integration and Sterling Configurator integration working together.
© Copy right
Enhancements for Sterling Configurator Integration
29
Management Center updates: Launch the Visual Modeler and Sterling Configurator with
automatic sign-on. Define models reference for Dynamic Kit. Search and browse model by using integrated Utility view. Create pre-configuration for Dynamic Kit. Manage prices for Dynamic Kits.
Storefront enhancements:
Show Dynamic Kits in the following area: Catalog pages e-Marketing Spot Merchandising associations
Allow the shopper to configure a Dynamic Kit.
© Copy right
Sterling Configurator Integration Main Flows 30
Management Center
Create dynamic kits, prices
Visual Modeler Configurator
Pre-configure
Production environment Staging environment
Store
Shopper
Shop dynamic kit
Reconfigure
Sterling Web
Product manager
Configurator
Sterling Web
Create new models /
create model reference
Stage Prop
Dynamic kit ,
Configuration
, Price
© Copy right
Data Load in Review 31
Introduced in V7 to reduce total cost of data loading.
Streamline and load data in a single command. CSV file to database
Loading based on business objects.
Benefits: More scalable
Better performance
Business rule enforced
Better diagnostics and error reporting
In V7 business objects supported: Catalog
Price
Inventory
© Copy right
Updates to Dataload 32
Support loading of workspace data by using data load framework – Feature Pack 1.
Support loading of member data by using data load framework: – Feature Pack 3 Person
Organization
MemberGroup
Data load utility command-line support only.
Sample member loader mapping configuration and CSV files.
Customization tutorial
© Copy right
Command-line Utilities 34
Command-line utilities ideal for messaging command design pattern implementations.
txttransform This utility transforms data between a character-delimited format and an XML data
format.
xmltransform This utility transforms XML data into alternative XML formats.
dtdgen This utility generates a DTD based on the target database.
idresgen This utility generates identifiers for XML elements.
massload This utility loads data into the WebSphere Commerce database.
fileloader This utility loads managed files into the WebSphere Commerce database
massextract This utility extracts data from a database as an XML document.
© Copy right
Coremetrics Integration 35
Integration of Coremetrics and WebSphere Commerce Management Center.
Store Tagging Update:
Coremetrics Store tagging API update
Solr search with facet attributes
New <cm:element> tag
New <cm:conversion> tag
Coremetrics Intelligent Offer integration enhancements:
New store function “Enable Intelligent Offer Integration”
Flat file import enhancements
Intelligent Offer Data Extraction Utility
– Coremetrics Profile Segments tool import enhancements.
© Copy right
Implementing Coremetrics for Commerce 36
STEP 1: Apply FP3, Install FEP3, enable store-enhancements, Publish store, and enhancements sar files.
STEP 2: Configure site to communicate with Coremetrics. Configure bi-config.xml file
STEP 3: Generate Category Definition File to capture catalog hierarchy.
STEP 4: Enable pretagged analytics tags in Madisons/Elite starter stores.
STEP 5: [For new stores only] Tag store JSP files with page view tag. Run auto tagging utility
STEP 6: [For new stores only] Tag store pages for Coremetrics.
© Copy right
Versions of the Coremetrics JavaScript Library 37
Standard Coremetrics library:
Uses the hosted libs.coremetrics.com/eluminate.js library file version 4.7.4H or later versions that ends with letter H
Does not require hosting a cmcustom.js or cmdatatagutils.js file to support WebSphere Commerce customizations.
Custom Coremetrics library:
Uses an eluminate.js library file version that does not end with the letter H, for example, version 4.7.4 or 4.7.5
Requires site to host a cmcustom.js or cmdatatagutils file to support WebSphere Commerce customizations.
© Copy right
WebSphere Commerce Development Environment
38
After completing this topic, you should be able to describe the:
WebSphere Commerce development environment.
Contents of the default workspace.
Tools available with WebSphere Commerce Developer.
Purpose and function for WebSphere Commerce workspaces.
Process for determining problems and troubleshooting WebSphere Commerce.
Tiers of WebSphere Commerce for troubleshooting.
Logs and trace files with WebSphere Commerce.
Function of IBM Support Assistant in maintaining WebSphere Commerce.
© Copy right
WebSphere Commerce Development Environment
Rational Application Developer V7.5.5.1 Note: Rational Software Architect
V7.5.5.1 can be installed instead of Rational Application Developer.
Eclipse-based development environment.
WebSphere Commerce Developer V7 Leverages tools from Rational
Application Developer.
Leverages WebSphere Application Server V7 test server.
Development database Stores development artifacts.
Can be DB2, Oracle, or Apache Derby (default).
Lotus Expeditor V6.2 Optional
Used when developing and running IBM Sales Center for WebSphere Commerce.
39
WCDEV (DB2)
Rational Application Developer V7.5.5.1
WebSphere Commerce Developer V7
Lotus Expeditor V6.2 (IBM Sales Center)
© Copy right
WebSphere Commerce Development Environment
40
Installing WebSphere Commerce V7 Developer provides a fully configured Rational Application Developer workspace.
The following projects are included: WC: contains the core WebSphere Commerce EAR file.
CommerceAccelerator: contains assets for Commerce Accelerator.
LOBTools: customizable assets for IBM Management Center for WebSphere. Commerce
OrganizationAdministration: assets for the Organization Administration Console.
SiteAdministration: assets for the Administration Console.
Stores: module for sample store assets.
WebSphereCommerceServerExtensionsData: create custom enterprise beans and other data assets.
WebSphereCommerceServerExtensionsLogic: create new logic, such as Java classes.
WebServicesRouter: create custom Web service assets
© Copy right
WebSphere Commerce Tools 41
WebSphere Commerce Administration Console Administration functions for maintaining a site or any
number of stores.
WebSphere Commerce Organization Administration Console User Administration functions, maintain security.
WebSphere Commerce Accelerator User Console for making high-level modifications to
Storefronts.
IBM Management Center for WebSphere Commerce Suite of tools to support Merchandising and Marketing tasks.
© Copy right
Workspaces
Secure work area for developers to make and preview changes to managed assets.
Does not affect production environment: Similar to having a private copy of managed production assets.
Workspaces offer the following features: Task groups and tasks for dividing work within workspaces.
Defined roles for managing workspaces, approvals, and content.
Separate tool for creating and administering workspaces.
Locking policies to control changes.
Various forms of commit and publish.
Controls how data is moved from development to production.
42
© Copy right
WebSphere Commerce Problem Determination 43
Available resources: WebSphere Commerce Information Center:
Contains migration, installation, configuration information and more.
Contains several self-help tutorials.
IBM Education Assistant: Provides self-help modules.
Offers some voice recordings and visual assistance.
Technical documents: Supplemental technical information.
IBM developerWorks: Offers specific examples.
Redbooks: Highly technical deep-dives into specific tasks.
© Copy right
Problem Areas for Examination
Runtime issue could be anywhere along the path:
Browser: client side JavaScript, AJAX requests, cookie acceptance, cookie, or URL limits, pop-ups.
Web Server: virtual hosts, SSL certificate, rewrites, redirects, ports.
WebSphere Application Server plug-in: mapped modules, cluster, load balancing, transports, virtual hosts.
Application Server: servlet filters, Commerce servlets, caching.
Database: connections, SQL, contention, data itself.
44
Browser Web server Application server
(WebSphere Commerce Server) Database server
© Copy right
WebSphere Commerce Logs 45
Web server log: httpd.conf defines the virtual hosts
WebSphere Application Server plug-in: Check the plugin-cfg.xml file
Application server and WebSphere Commerce default files: native_stderr.log: contains text written to the stderr stream. native_stdout.log: contains text written to the stdout stream.
startServer.log: written when starting the server. stopServer.log: written when stopping the server.
SystemErr.log: any system error while the server is running. SystemOut.log: system output file while the server is running.
activity.log: logs continuous activity. trace.log: If trace is enabled, logs the components trace messages
while the service is running.
© Copy right
IBM Support Assistant for WebSphere Commerce
46
Ties to many key sites such as WebSphere Commerce Zone.
Offers problem determination, product flashes, and technotes.
Alerts user of APARs, fixes, and utilities.
News and preventive service planning. Contains:
Product documentation Publications Commerce news Preventive service planning Upcoming Webcasts
Automated Commerce data collectors.
© Copy right
IBM Support Assistant Data Collectors 47
Data collection can be tedious for some components.
Automated collectors within ISA help this process:
Commerce collectors are one aspect of the Commerce plug-in download for ISA.
In-line with Commerce “MustGather” documents for IBM Support.
Other products include WebSphere Application Server, DB2, and WebSphere Portal.
Speeds up initial data collection and ensures that a complete set of data is collected.
WebSphere Commerce collectors for IBM Support Assistant gather all relevant logs from application and configuration files. © Copy right
1. Name some of the features and enhancements available
with WebSphere Commerce V7.
2. List the Application Layers of WebSphere Commerce.
3. The Business Logic Layer supports which two methods of
command processing.
4. True or false: A task command can be composed of any
number of controller commands.
5. List the three pieces of the Data Service Layer
Checkpoint 48
© Copy right
Checkpoint Solutions 49
1. Multi-channel precision marketing, Mobile, and Social Commerce, efficient Data Loading utility, new Starter Stores
that are enabled by Web 2.0 technology (EliteB2B), IBM
Management Center enhancements, ANT-based migration assistance utilities, developer infrastructure improvements
for Rational Application Developer V7.5.
2. Business Models, Business Processes, Presentation Layer, Service Layer, Business Logic, Persistence Layer, and
Database Schema.
3. Name-value pair processing and BOD processing
4. Data service facade, business object mediation service, physical object persistence service.
© Copy right
Exercise Introduction
Introduction to the WebSphere Commerce Development
Environment.
In this lab exercise, you will:
Start the WebSphere Commerce development environment.
Identify common projects that are used in the development process.
Locate store artifacts to customize.
Launch the WebSphere Commerce test server.
Analyze server logs for debugging and error handling.
50
© Copy right
51
Unit Summary
This unit has been designed to enable you to: Start a development project that implements WebSphere
Commerce V7. Describe the runtime architecture of WebSphere Commerce.
Describe the development model for WebSphere Commerce. Explain the application of Struts in WebSphere Commerce.
Describe the presentation layer for WebSphere Commerce by using both standard JSP files and Web 2.0-enabled JSP files.
Summarize the Business Logic and Persistence Layers.
Describe the benefits of EJBs, Access beans, and the Data Service Layer, and describe what role each plays in persistence.
Summarize the elements and utilities available in Access Control.
Explain the development environment and how to effectively troubleshoot and debug WebSphere Commerce applications.
© Copy right
References 52
WebSphere Commerce V7 Information Center: http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/index.jsp
Apache Struts: http://struts.apache.org
Open Application Group (OAGi) Business Object Document architecture: http://www.oagi.org
Dojo Foundation Toolkit 1.3.1: http://www.dojotoolkit.org
OpenLaszlo: http://www.openlaszlo.org
Service Data Objects (SDO): http://www.osoa.org
© Copy right
References 53
IBM Support Assistant: http://www.ibm.com/software/support/isa/
IBM Education Assistant for WebSphere Commerce: http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.
jsp?topic=/com.ibm.iea.wcs/plugin_coverpage.html
IBM Support Portal: http://www.ibm.com/support/entry/portal/
WebSphere Commerce Zone: http://www.ibm.com/developerworks/websphere/zones/commerc
e
IBM Redbooks: http://www.redbooks.ibm.com
©