WebSphere Commerce Architecture 1 Unit 1: WebSphere Commerce Architecture Copyrighted material 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. 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 4 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 Development Process: The Development Cycle Stage 1: Model Gather requirements, design, simulate, and optimize business models Team: Architects, Business Analysts 6 Stage 2: Assemble Discover, assemble, test Team: Architects, Project Managers, Development teams Stage 4: Manage Business monitoring for co-ordinated interaction, analytics, and optimization Team: Architects, Administrators Stage 3: Deploy Integrated deployment of processes Team: Project Managers, Administrators © 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 Runtime Architecture 8 © Copy right WebSphere Commerce Application Layers Business models 9 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. © Copy right WebSphere Commerce V7 Runtime 10 Presentation Layer Storefront Sales Ctr Portal Mgmt Ctr JSP Eclipse Portlets .lzx Sales Ctr Portlet Struts Controller Layer Struts Business Logic Layer Services Interface NVP cmds BOD cmds Persistence Layer Access beans EJB beans Data Service Layer © Copy right 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. Core Components WebSphere C ommerce Accelerator Administration C onsole Marketing Merchandising Development Environment Organization Administration C onsole Business Intelligence Order Management C onfiguration Manager IBM Management C enter C atalog Management C ustomer Service Tools Analytics Configurable Business Processes Roles and Relationships Personalization Globalization Business Context Engine Foundation and Tools Business Integration 11 © Copy right WebSphere Platform Multi-Channel Support in WebSphere Commerce Struts Portal Sales Ctr Kiosk Mgmt Ctr Other WebSphere Commerce Server 12 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. Business Logic Layer Each sales channel can support its own unique architecture. Access to the database from the Services Interface Marketing Selling Member Catalog Order Trading WebSphere Commerce Server is implied through the Persistence Layer. © Copy right Presentation Layer 13 Servlet Portlet Client JSP Web Container Libraries JSP Portlet Container WebApp Mgmt Center Business Logic Layer EJB Container © Copy right W ebSphere Com merce supports multiple Pr esentation Layers Use a n appropriate Presentation Layer t h at is based on y our business r equ irem ents. Bot h t he Struts and Portal Presentation La y ers follow the Model-View-Controller (MV C) design pattern. In W ebSphere Portal: Br ow ser request that are routed t o 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 t o a JSP pa g e in the portlet container. JSP pa ges client libraries tags to r etrieve da t a. In St ruts: Br ow ser request is r outed to a servlet t h 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 com m ands) . JSP pa ges retrieve data from the da t abase by using Data beans. 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 15 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 Services interface Name-value pair command processing BOD command processing © Copy right Differences in Business Logic Layer Processing (1 of 2) 16 JSP EJB container Services interface Business Context Controller Controller Controller command command command Task Task Task command command command 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. Access Bean © Copy right Differences in Business Logic Layer Processing (2 of 2) 17 EJB container Services interface Business Context Controller Controller BOD command command command 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. Data service façade BOM service Phys. Obj. Persistence Data Service Layer © Copy right Data Service Layer 18 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. © Copy right Data service facade Business object mediation Physical object persistence Subsystem Data Models in WebSphere Commerce 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 19 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 Trading Auctions, contract, RFQ © 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 Web service client WebSphere Commerce Server 22 WebSphere Commerce Web service framework Message mapping config Client code Web service client code Business logic façade WebSphere Commerce as a service provider: JSP comp. service Web service controller Web service engine © Copy right 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. Advantages of Web Services in WebSphere Commerce 23 Uses WebSphere Application Server Web service engine: Reuses existing WebSphere Commerce assets: Existing programming model Existing integration technology Designed for customization: Hides the complexity of SOAP 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 Program model before Feature Pack 3: 26 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 Search Engine Product Display Catalog getData tag Service JSP CatalogNavigationView Noun © Copy right Database 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 Staging environment Production environment Sterling Web Sterling Web Configurator Configurator Visual Modeler Create new models / create model reference Reconfigure Pre-configure Management Center Store Shop dynamic kit Create dynamic kits, prices Stage Prop Dynamic kit , Configuration , Price Shopper Product manager © Copy right Data Load in Review Introduced in V7 to reduce total cost of data loading. Streamline and load data in a single command. 31 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 Data Load Utility - User Interaction Diagram 33 © 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 39 V7.5.5.1 Rational Application Developer V7.5.5.1 WebSphere Commerce Developer V7 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). WCDEV (DB2) Lotus Expeditor V6.2 Optional Used when developing and running IBM Sales Center for WebSphere Lotus Expeditor V6.2 Commerce. (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. LOBT ools: 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 WebSphere Commerce Organization Administration Console User Administration functions, maintain security. WebSphere Commerce Accelerator Administration functions for maintaining a site or any number of stores. 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 42 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. © Copy right WebSphere Commerce Problem Determination 43 Available resources: WebSphere Commerce Information Center: IBM Education Assistant: Supplemental technical information. IBM developerWorks: Provides self-help modules. Offers some voice recordings and visual assistance. Technical documents: Contains migration, installation, configuration information and more. Contains several self-help tutorials. Offers specific examples. Redbooks: Highly technical deep-dives into specific tasks. © Copy right Problem Areas for Examination 44 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. Browser Web server Application server (WebSphere Commerce Server) © Copy right Database server 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 © Copy right Checkpoint 48 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 © 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 50 Introduction to the WebSphere Commerce Development Environment. In this lab exercise, you will: © Copy right 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. 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. 51 © 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 ©
© Copyright 2024