How lalilulelo1986/asytutorial works
Project Type and Purpose
• This is an Ariba “SOClass” extension tutorial.
• It comprises three logical modules:
– Client: UI code (Java views, controllers) delivered to the browser/ADK.
– Server: SOM plug-in code (business logic, server controllers).
– Shared: Common domain classes and utilities used by both sides.
• The build uses Ant (build.xml) and the Ariba ADK (configured via build.properties).
File Structure and Key Indicators
• Top-level modules:
– Client/ (kz.asytutorial/tutorialN/client packages)
– Server/ (kz.asytutorial/tutorialN/server packages + som/ configuration)
– Shared/ (kz.asytutorial/tutorialN domain classes C_, D_, F_)
• Server/som/ contains: config (properties), db (DDL/DML XML), format, locale, Info XML – these feed into Ariba’s SOM loader.
• Build scripts at project root and per-module (Ant targets to compile classes, assemble JARs, generate manifests).
Architectural Patterns
• MVC on the client:
– DC_TutorialN (Data Controller)
– VD_/VF_/VP_ classes (View Data, View Factory, View Presenter)
• Server uses controller classes (S_TutorialN, TC_TutorialN) to handle requests, manipulate shared domain objects, and persist via the Som framework.
• Shared module defines data/document classes (D_TutorialN), controllers/helpers (C_TutorialN), and factories/utilities (F_TutorialN) that are transported between client and server.
Main Components
• Client Module
– UI layer: VF_, VP_, VD_, DC_ classes
– Delivered as a JAR to the browser/ADK runtime
• Shared Library
– Shared JAR containing domain objects & helpers
– Included on both client and server classpaths
• Server Module
– SOM plug-in loaded into Ariba application server
– Business logic: S_*, TC_* classes
– Resource folders under som/ for config, db, formats, localization
• Ariba SOM Framework & App Server
– Hosts the plug-in, provides lifecycle & persistence
• Database
– Populated via som/db/*.xml on install
• Build Infrastructure
– Ant scripts and properties (build.xml, build.properties, classpath.properties)
Relationships and Interactions
– Client → Server: Remote procedure calls (ADK API) invoking server controllers
– Server → Database: SOM framework commits/retrieves data
– Client ↔ Shared: Client code uses shared domain classes at runtime
– Server ↔ Shared: Server code manipulates same shared types
• Packaging flow: Source → compile → JARs → deploy to ADK (client) or SOM (server).
Important Architectural Principles
• Layer separation: UI / shared domain / server logic / persistence.
• Reuse via Shared module avoids DTO duplication.
• Tutorial packages (tutorial1…tutorial6) demonstrate incremental feature builds but follow identical layering.