Wednesday, January 2, 2013

Assembling an ATG Application



     When you assemble an ATG application (nucleus-based), the application resources (such as class libraries, web applications, and EJB modules) and the ATG platform resources (such as Dynamo Application Framework, platform libraries)  are copied from the Oracle ATG Web Commerce installation into an EAR file.

     The Dynamo Application Framework (DAF) runs on top of your application server and supplies essential facilities for application development and deployment (Nucleus, Repositories, tag libraries, security, etc.). Nucleus component framework gives you access to the personalization, commerce, and content administration features of the ATG platform in applications. These portable frameworks are designed to run on the industry’s leading J2EE application servers such as JBoss, WebLogic, and WebSphere.

    We can assemble an ATG application in two modes; development mode and stand-alone mode

  • In development mode, the application draws configuration information for Nucleus components from properties files in the Oracle ATG Web Commerce installation
  • In stand-alone mode, the properties files that configure your Nucleus components are imported into the EAR file and stored in directories that correspond to the Oracle ATG Web Commerce modules


    Our build script should take care the following few things when you assemble an ATG application

  • Custom application modules should be created/generated at ATG installation (DYNAMO_ROOT) directory and install application resources if you develop code out side ATG installation dir.
  • ATG modules should be automatically analyzed to determine the CLASSPATH, configuration path, and inter-module dependencies
  • After evaluating the list of dependency modules and coming up with a final list of modules, the system CLASSPATH each should be defined in the atg_bootstrap_ejb.jar file of the final ear.
  • The class files of each module should be placed into the atglib dir of the final ear
  • The atg-bootstrap.war and the atg-bootstrap-ejb.jar components should be copied from D:\ATG\ATG10.0.2\DafEar\base\j2ee-components to final ear file
  • All ATG modules, which are part of your application, should be copied to <name.ear>/atg-bootstrap.war/WEB-INF/ATG-INF directory in the case of standalone ear

      Another important thing to remember about the ATG assembly process is that the config path is not determined until runtime. At runtime, the NucleusServlet inspects the module ordering and sets the config path.

      ATG platform includes an application assembly tool (runAssmler) that you can use to build J2EE enterprise archive (ear) files. All necessary Nucleus classes and configuration are included in the EAR file, so you can simply deploy the application and run it.

Wednesday, December 19, 2012

ATG Applications - Module Direcory Structure


    To develop an (ATG) application on ATG platform, it can be included as a module or set of modules in the ATG Nucleus-based applications. The Nucleus-based applications are J2EE applications that include ATG Nucleus Framework. The Nucleus framework gives you access to a set of features of the ATG platform that are portable across application servers.

    Based on the above description, ATG application modules should follow core features to develop and assemble as a J2EE application (EAR).

     
  • Application components are packaged in a simple, modular directory structure.
  • Modules can reference other modules on which they depend, and which can be automatically loaded.
  • The correct class path, configuration path, and main Java class for a given set of modules are dynamically calculated for both client and server.
  • Updated modules are automatically downloaded from server to client.

Application Module Directory Structure

 An Oracle ATG Web Commerce installation must have a single module root (DYNAMO_ROOT) directory that contains all ATG application modules and your custom application modules. We should package classes and configuration files into that module. Module may not contains directly under module root. If that is the case, the module name uses parent-dir.module-dir format.

    Each module directory and its subdirectories can contain any number of module resource files such as platform libraries, Nucleus component configuration files, J2EE applications, web applications, HTML documents, and EJB modules.

The META-INF directory containing the manifest file MANIFEST.MF. 
The config directory contains the configuration files for Nucleus components. 
The j2ee-apps directory contains the J2EE web applications


   We can develop our code some other directory structure. But at the time of packaging the application as an ear, all required modules should be in a single module root  (DYNAMO_ROOT).


Tuesday, December 18, 2012

Oracle ATG Web Commerce – Introduction

    ATG is an application platform – a framework and a solution - for building content- driven web applications - largely for ecommerce and publishing sites. It is a Java based application platform for hosting web-based applications, as well as RMI accessible business components, with an ORM layer (Repositories), a component container (The Nucleus), an MVC framework, and a set of tag libraries (DSP tags) for JSP.

ATG product suite comes with several application like;
  • ATG Commerce which includes DAS, DAF, DSS, DPS, DCS, Content Administration, Merchandising and some reference applications
  • ATG Search/Endeca
  • ATG Commerce Service Center
  • ATG Campaign Optimizer
  • ATG Outreach
  • ATG Customer Intelligence
  • ATG Multi-site
   

       The Dynamo Application Framework (DAF) runs on top of your application server and supplies essential facilities for application development and deployment (Nucleus, Repositories, tag libraries, security, etc.). It gives you an RMI container, distributed caching, distributed locking and distributed singletons, distributed events and messaging, a task scheduler, a rules engine and a mechanism for defining business workflows with custom actions and outcomes, a graphical editor for business workflows, support for versioned data, support for roles and rights, logging and auditing - all out of the box, and all using very coherent and consistent APIs.
      At Applications/Solutions level, you have the components and the APIs for dealing with user profiling, identity management and personalization, content authoring, versioning and publishing, content search, product catalogs for tangible and intangible goods, product search and guided navigation, pricing, tax calculation, promotions, shopping carts, gift lists and wish lists, payment types, shipping methods, order tracking, customer relationship management etc.

       ATG application is a piece of software installed independent of the ATG platform, which can be included as a module or set of modules in a Nucleus-based application.

       The Nucleus is a lightweight container for managing the life cycle and dependency binding of Java component objects. It is the core of the ATG framework and all other services and frameworks are hosted within it.

       Nucleus-based applications are assembled into EAR files that include both the application and ATG platform resources, and which are then deployed to your application server.

     Since ATG platform architecture, build and deploy approach is different from J2EE standards, you should understand ATG approaches apart from the regular Build and Release skills and tools.