Overview of atg framework

Post on 12-Apr-2017

463 views 2 download

transcript

INTRODUCTION TO ATG FRAMEWORK

AGENDA What is E-Commerce & m-commerce Different frameworks/platforms providing e-commerce solutions Overview of Oracle ATG Different modules provided by Oracle ATG Commerce Nucleus Different Oracle ATG Components

E-COMMERCE & M-COMMERCE Distributing, Buying, Selling and marketing products and services over internet through which transaction or terms of sale are performed electronically.

Types of E-Commerce B2B(Applies to businesses buying from and selling to each other. E.g. Walmart)

B2C(Applies to business that sells its products or services to consumers. E.g. flipkart)

C2B(Applies to any consumer that sells a product or service to a business. )

C2C(Applies to sites primarily offering goods and services to assist consumers interacting with each other. E.g. olx)

CONCEPTUAL VIEW OF E-COMMERCE

FRAMEWORKS PROVIDING E-COMMERCE SOLUTIONS Oracle ATG Commerce SAP Hybris IBM WCS Magneto

ART TECHNOLOGY GROUP (ATG) Web Commerce Application Highly scalable and flexible component-based architecture. E-commerce software solutions & On-demand commerce optimization applications.

Co-founded by Jeet Singh & Joseph Chung in 1991. ATG’s solutions provide merchandising, marketing, content personalization, automated recommendations.

Acquired by Oracle in 2005. The latest version of Oracle ATG Commerce is 11, which includes the integration support of REST MVC framework, Endeca Experience Manager.

ATG PLATFORM ATG platform is built on “layered” and “modular” approach. ATG Web Commerce applications implement a component development model based on Java Beans and JSP

The core of ATG platform is it’s Application framework i.e. Dynamo Application Framework (DAF).

DAF runs on top of the application server (like weblogic, websphere etc..) and provides essential facilities for application development and deployment.

ARCHITECTURE OF ORACLE ATG BASED APPLICATION.

APPLICATIONS IN ORACLE COMMERCE Commerce Personalization Merchandising Business Control Center Customer Service Center Endeca Commerce & Experience Manager

ATG COMMERCE

DIFFERENT MODULES AVAILABLE IN ATG

DPS Personalization module Used to create and maintain user profiles User specific business rules

DCS Core Commerce Module Provides the commerce capabilities like Shopping Cart, Order Purchase & Checkout.

CONTD.. DSS Extends the targeting capabilities of DPS Scenarios are event driven Designed to manage interaction between the site visitor and content

DCC Provides developer with the tool “ACC”

B2BCommerce B2CCommerce DCS.CustomCatalogs Fulfillment DAS-UI

KEY CONCEPTS Component Centric Model MVC2 framework Dependency Injection Modular approach Data Anywhere Architecture (Similar to ORM)

COMPONENT DEVELOPMENT MODEL What is a Component? Examples of Component ArchitectureMicrosofts COM/DCOM Java BeansCORBA

Benefits of Component Development ModelCode ReusabilityReduced Development timeContinuous, Incremental improvements

COMPONENT IN ATG Any simple Java Class can be treated as a “Component”. To define a component in ATG, we need to create .properties file in the corresponding config directory.

E.g. public class MyComponent{ } -> src/com/dev/MyComponent.java

Create a .properties file in the corresponding config directoryi.e. config/com/dev/MyComponent.properties

The properties file contains the class name and the scope of the component (request/session/global)

DYNAMO APPLICATION FRAMEWORK DAF is the core of Oracle ATG Web Commerce It runs on top of the application server It provides a Component Development Environment. Supplies essential facilities for application development and deployment Nucleus Repositories Droplets FormHandlers Tag Libraries

NUCLEUS Dynamo’s Open Object Framework Central registry for the java beans which contains our application level logic.

Creates and configures the components Organizes them into a hierarchical namespace

FORM HANDLER Specialized Nucleus Components Can be embedded into JSPs to do form validation and based on the result perform actions like submitting user data, forwarding the user to some other pages

Form handler components have handleXXX() methods, which takes care of appropriate handler logic based on user action.

Some of the mostly used OOTB form handlers areProfileFormHandler, CartModifierFormHandler, CommitOrderFormHandler etc..

DROPLET Specialized Nucleus components which are used to display dynamic content on the JSP pages

Also known as “Dynamo Servlet Beans” Java Developers and Page designers can work independently and applications are easier to maintain

OOTB droplets are ItemLookupDroplet, ForEach, Switch etc..

REPOSITORIES Data Access layer that defines generic representation of data store Data Anywhere Architecture (DAA) provides a unified view of content and data

Core of DAA is “Repository API” Using Repository API, we can employ a single approach to accessing different data types, including SQL databases, LDAP directories, content management systems and file systems

HIGH LEVEL OVERVIEW OF DAA

Advantages Data Source Independence Maximum Performance Simplified transactional control Fine-grained Access Control

TAG LIBRARIES Earlier the presentation language used is “JHTML” JHTML has lots of custom tags to access Dynamo Components JSP became the defacto language for Presentation tier Introduced to access Nucleus components and render dynamic content from JSP files

Example tags include <dsp:form>, <dsp:input>,<dsp:valueof>, <dsp:a>, <dsp:getvalueof> etc..

DROPLETS To display the dynamic content on JSP pages using nucleus components. We can embed the output of a nucleus component using dsp tag libraries

e.g. <dsp:droplet name=“/atg/dynamo/ForEach> <dsp:param name=“array” bean=“/com/sample/Student.subjects/>

<dsp:oparam name=“output”> <dsp:valueof param=“element”/> </dsp:oparam> </dsp:droplet>

CONTD… Each droplet has a predefined set of parameters that control it’s behavior Input Output Open

Input parameters are passed into the droplete.g. <dsp:param name=“array” bean=“/com/sample/Student.subjects/>Output parameters are set by the droplete.g. <dsp:valueof param=“element”/>Open parameters specify code to execute at different stages of servlet processingContent that needs to be displayed before output is displayed using outputStart <dsp:oparam name=“outputStart”> …. </dsp:oparam><dsp:oparam name=“output”>……</dsp:oparam>Content that needs to be displayed before output is displayed using outputEnd<dsp:oparam name=“outputEnd”>……</dsp:oparam>

CONTD..Some of the OOTB droplets <dsp:droplet name=“atg/dynamo/droplet/foreach”> <dsp:droplet name=“atg/dynamo/droplet/switch”> <dsp:droplet name=“atg/dynamo/droplet/empty”> <dsp:droplet name=“atg/commerce/catalog/ProductLookup”>

FORM HANDLERS Evaluates the form data before it is submitted, check for errors, and determine what action to take.

The form input fields are associated with the properties of the form handler rather than the component that we want to modify

E.g. <dsp:input type=“text” bean=“MyFormHandler.age”>

Form Handler must include one or more handler methods, to handle the processing of the form.

CONTD… Handler methods links form elements with Nucleus components Signature of the handler method Public boolean handleXXX(DynamoHttpServletRequest req, DynamoHttpServletResponse res){----}

Action based on return valueReturn Value

Action

false No further values are processed after the handler is called. Rest of the page is not served.

true Normal processing of the form values continuesPage specified by the form’s action attribute is served.

CONTD...Sample Jsp file showing form data<dsp:form action=“SaveData”><dsp:input type=“text” value=“jeet” bean=“MyFormHandler.firstName” /><dsp:input type=“text” value=“singh” bean=“MyFormHandler.firstName” /><dsp:input type=“submit” value=“Save” bean=“MyFormHandler.save”/><dsp:input type=“cancel” value=“Reset” bean=“MyFormHandler.cancel” /></dsp:form>

CONTD…public class MyFormHandler extends GenericFormHandler{private String firstName;private String lastName; public boolean handleSave(DynamoHttpServletRequest req, DynamoHttpServletResponse res){ return true/false;}public boolean handleCancel(DynamoHttpServletRequest req, DynamoHttpServletResponse res){ return true/false;}…..…..}

CONTD… MyFormHandler.properties

$class=MyFormHandler -> Fully Qualified Class Name$scope=request -> how the class instance will behaveage=25 -> form handler property. We have to provide

as name value pairs.subjects= java,atg,openapiprop1^=MyOtherFormHandler.prop1

SCOPE OF THE COMPONENTS•Scope specifies how the nucleus component is used among different users.•We specify the scope of the component in .properties file•Available scopes• Global: shared among all the users (default)• Session: for each user session a separate instance will be provided• Request: for each active request a separate instance will be provided•Window: for each browse window a separate instance will be provided• Prototype: every time the component is resolved separate instance of the components will be provided