Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

Advanced Framework Course

Target Audience

  1. Developers (especially Senior level)
  2. Architects

Pre-Requisites

  1. OFBiz Framework Introduction (Videos) - Important!
  2. Basic Java & J2EE (Servlet, JDBC, JNDI, JTA) Familiarity

Topics Covered

Part 1: Just Enough Java and J2EE

  1. The Java Classpath
  2. Servlet API & JSP
    1. Request & Response
    2. Contexts: page/screen, request, session, application
  3. JNDI
  4. JDBC
    1. Basic Concepts
    2. Basic API
    3. Transaction Isolation Levels
      1. None
      2. ReadCommitted (Recommended)
      3. ReadUncommitted
      4. RepeatableRead
      5. Serializable (NOT Recommended, Performance and Dead-locking)
  5. JTA
    1. UserTransaction & TransactionManager
    2. Transaction Control: rollback and setRollbackOnly
    3. On Pausing and Resuming Transactions

Part 2: The OFBiz Base: Containers and Components

  1. The OFBiz Base Utilities & Loader
  2. Containers
  3. Components
    1. component-load.xml (base/config, applications, framework, specialized, etc)
    2. Component Definition
      1. <component-directory>/ofbiz-component.xml
      2. Resource Loaders
      3. Classpath Entries
      4. Entity Resources
      5. Service Resources
      6. Test Resources
      7. Webapps
    3. Component Structure Conventions
      1. config
      2. data
      3. dtd
      4. entitydef (entitymodel*.xml, entitygroup.xml, eecas*.xml)
      5. lib
      6. script
      7. src
      8. servicedef (services*.xml, secas*.xml, groups*.xml)
      9. templates (email, survey, etc)
      10. testdef
      11. webapp
      12. widget
    4. The Component URI: component://<component-name>/relative-path

Part 3: The Webapp Framework, Widgets & MiniLang

  1. Basic Framework Review
  2. The Webapp Framework
    1. Control Servlet
      1. ofbiz/framework/webapp/dtd/site-conf.xsd
      2. component://<component-name>/webapp/<webapp-name>/WEB-INF/controller.xml
      3. Requests
      4. Request Events
        1. Event Context (parameters and return values)
        2. Event Handlers/Types
        3. Service Events
        4. simple-method Events
        5. Java Events
        6. Designing a new Event Handler
      5. Special Events: firstvisit, preprocessor, postprocessor, after-login
      6. Request Responses
      7. Views
        1. View Handlers/Types
        2. Designing a new View Handler
    2. Screen Widget Based Views - Templates, Widgets, etc
      1. Screen Widget
        1. Screen Definitions
        2. ofbiz/framework/widget/dtd/widget-screen.xsd
        3. component://<component-name>/widgets/**/*Screens.xml
        4. Screen -> Section
        5. Section -> Actions
        6. Section -> Widgets
        7. Section -> Conditions
        8. Screen Contexts (protected, inherited, etc)
        9. parameters Map: request attributes, request parameters, session attributes, application attributes
        10. Screen Decoration Pattern
      2. Form Widget
        1. Form Definitions
        2. ofbiz/framework/widget/dtd/widget-form.xsd
        3. component://<component-name>/widgets/**/*Forms.xml
        4. Form Element
        5. Form Actions
        6. Form Auto-Fields from Entities and Services
        7. Form Fields
        8. Form Sort Order
      3. Menu Widget
        1. Menu Definitions
        2. ofbiz/framework/widget/dtd/widget-menu.xsd
        3. component://<component-name>/widgets/**/*Menus.xml
        4. Menu Items
      4. Tree Widget
        1. Tree Definitions
        2. ofbiz/framework/widget/dtd/widget-tree.xsd
        3. component://<component-name>/widgets/**/*Trees.xml
        4. Tree Nodes
      5. BeanShell
        1. Data Preparation Actions
        2. http://www.beanshell.org
        3. component://<component-name>/webapp/<webapp-name>/WEB-INF/actions/*/.bsh
        4. Java Syntax, with some scripting like features
        5. Dynamic Types
      6. FreeMarker
        1. Content Templates
        2. http://www.freemarker.org
        3. component://<component-name>/webapp/<webapp-name>/*/.ftl
        4. PHP-like Syntax with Java Robustness and Flexibility
        5. Control Constructs (#if/#else/#elseif, #list, #assign)
        6. Built-ins
        7. Existence Concept and Fail-Fast (?exists, ?has_content, ?if_exists)
        8. OFBiz-specific Transforms: ofbizUrl, ofbizContentUrl, etc
      7. Generating PDFs (or other print formatted documents)
        1. Introduction to XSL:FO - Like HTML, but for Page Oriented Layout
        2. A Powerful Combination: Screen Widget, BeanShell, FreeMarker, and FOP
        3. How to Setup the view-map in controller.xml
    3. JPublish Based Views - Generic Templates
      1. JPublish
        1. Page Definitions
        2. http://www.jpublish.org
        3. component://<component-name>/webapp/<webapp-name>/WEB-INF/jpublish.xml
        4. component://<component-name>/webapp/<webapp-name>/WEB-INF/pagedefs/*/.xml
        5. Page Variables
        6. Decoration Templates
        7. Content, Template, and Page Actions
      2. Just as in Screen Widget use BeanShell for data preparation and FreeMarker for templates
    4. Region Based Views - Servlet/JSP Templates
      1. ofbiz/framework/webapp/dtd/regions.xsd
      2. Region Framework
        1. Defining Template Based Regions
        2. Defining Inheritance or Region Based Regions
        3. Using, or Not Using, Sections
      3. OFBiz Taglib
        1. URL Tags
        2. Conditional Tags
        3. Flow Control Tags
        4. Data Presentation Tags
        5. Internationalization Tags
        6. Service Engine Tags
        7. Other Tags
  3. MiniLang
    1. ofbiz/framework/minilang/dtd/simple-methods.xsd
    2. *Services.xml, *SimpleMethods.xml, et cetera
    3. simple-map-processor
      1. General Concept
      2. Make In String Operations
      3. Process Field Operations
    4. simple-method
      1. General Concept
      2. Call Operations
      3. Java Call Operations
      4. Control and Error Handling Operations
      5. Event Specific Operations
      6. Service Specific Operations
      7. Method Environment Operations
      8. Entity Engine Misc. Operations
      9. Entity Engine Find Operations
      10. Entity Engine Value Operations
      11. Entity Engine List Operations
      12. Entity Engine Transaction Operations
      13. Conditional (If) Operations
      14. Other Operations
    5. Some Examples

Part 4: The Entity and Service Engines

  1. The Entity Engine
    1. ofbiz/website/docs/entity.html
    2. ofbiz/website/docs/entityconfig.html
    3. Architecture & Design Goals
      1. Database (or datasource) Agnostic
      2. Dynamic API Behaves According to Entity Definitions
      3. Minimal Redundancy from Data Layer Artifacts (easier implementation and maintenance)
      4. Uses JDBC and JTA J2EE Components
        1. Can operate in the same transaction with EJB, JDO, Hibernate, etc code
        2. Can drop down to JDBC when necessary
      5. Choice of Tools for Ease/Efficient or Flexibility
    4. Configuration
      1. ofbiz/framework/entity/dtd/entity-config.xsd
      2. ofbiz/framework/entity/config/entityengine.xml
      3. Transaction (JTA) Setup
      4. Delegators
      5. Datasources
      6. JDBC Drivers (ofbiz/framework/entity/lib/jdbc)
      7. Distributed Cache Clearing
      8. Data Type Dictionary
        1. ofbiz/framework/entity/dtd/fieldtypemodel.xsd
        2. ofbiz/framework/entity/fieldtype/fieldtype*.xml
    5. Entity Definition
      1. Entity Groups & Delegation
        1. ofbiz/framework/entity/dtd/entitygroup.xsd
        2. entitydef/entitygroups*.xml
      2. Entity Definitions
        1. ofbiz/framework/entity/dtd/entitymodel.xsd
        2. entitydef/entitymodel*.xml
        3. Entities
        4. Fields
        5. Primary Keys
        6. Relationships
        7. Indices
      3. View Entity Definitions
        1. Member Entities
        2. Field Aliases
        3. View Links
        4. Relationships
        5. Joins: Inner & Outer
        6. Grouping and Summary Data
    6. Entity ECA (Event-Condition-Action) Rules
      1. ofbiz/framework/entity/dtd/entity-eca.xsd
      2. entitydef/eecas*.xml
      3. When to Use an Entity ECA: Data Maintenance, not Business Processes
      4. Defining Entity ECAs
      5. Limitations
    7. Entity Engine Caching
      1. Theory of Operation
      2. UtilCache API
      3. The Webtools Cache Pages
      4. cache.properties
      5. Automatic & Manual Cache Clearing
      6. Distributed Cache Clearing Note
    8. The Entity Engine API
      1. The GenericDelegator API
        1. Factory Methods (GenericDelegator, GenericPK, GenericValue)
        2. Creating, Storing & Removing
        3. Finding
          1. By Primary Key
          2. By And
          3. By Condition
            1. EntityConditions
              1. EntityFieldMap
              2. EntityExpr
              3. EntityConditionList
              4. EntityWhereString (caution)
          4. The EntityListIterator (remember to close)
          5. The DynamicViewEntity
      2. The GenericEntity API
        1. GenericPK
        2. GenericValue
      3. Sequenced Keys
        1. delegator.getNextSeqId
        2. SequenceValueItem entity (SEQUENCE_VALUE_ITEM table) - update to avoid key collisions!
      4. Overview of GenericHelper Interface
    9. Entity XML Import/Export Files
      1. XML File Format: Basic
      2. XML File Format: Pre-Transformed
      3. Command Line Import
      4. WebTools WebApp Import and Export Pages
    10. Entity Sync
      1. Theory of Operation
        1. Time-based Synchronization
        2. Suitable for Large Data Sets
        3. Best For Ongoing Incremental Changes (as opposed to large infrequent changes)
      2. EntitySync and Related Entities
      3. Sample EntitySync Settings, and Demo Scheduled Job
      4. WebTools EntitySync Status Page
    11. Entity Engine Pages in WebTools
  2. The Service Engine
    1. Architecture & Design Goals
      1. Agnostic Service Calls
        1. Implementation Agnostic
        2. Location Agnostic
      2. Support for Synchronous, Asynchronous, and Scheduled Calls
      3. Attribute/Parameter Validation
      4. Service Engines
        1. The GenericEngine Interface
        2. Overview of Existing Engines
          1. See definitions in serviceengine.xml, in the engine element
          2. simple
          3. java
          4. interface
          5. group
          6. route
          7. Remote: rmi, jms, soap
          8. Scripting: bsh, jacl, javascript, jpython
          9. workflow (Shark Workflow Engine, not old OFBiz Workflow Engine)
        3. Designing a New Engine
    2. Service Engine Configuration
      1. website/docs/serviceconfig.html
      2. ofbiz/framework/service/dtd/service-config.xsd
      3. ofbiz/framework/service/config/serviceengine.xml
      4. JNDI Servers & Resource Loaders
      5. Global Service Definition Files
      6. Service Group and SECA Rule Files
      7. JMS Servers
    3. Service Definitions
      1. ofbiz/framework/service/dtd/services.xsd
      2. servicedef/services*.xml
      3. WebTools Service Reference
      4. Parameters and Validation
      5. Interface Services
      6. Service Authentication
      7. Transaction Control
        1. use-transaction
        2. require-new-transaction
        3. transaction-timeout
    4. Implementing Services
      1. Service Context (parameters and return values)
      2. Java Services
      3. Bean Shell Services
      4. simple-method Services
      5. Remote Services: JMS, RMI, HTTP, etc
    5. Calling Services
      1. Synchronous, Asynchronous, & Scheduled
      2. WebTools Service Call Log
      3. Calling From:
        1. Java
        2. simple-method
        3. Control Servlet
        4. HTTP, SOAP, etc Remote Clients
      4. Scheduled Services
        1. Call from Java (as above)
        2. Setup in Imported Entity XML File
        3. WebTools Service Job Screens
      5. Service Engine RemoteDispatcher
        1. JNDI & RMI Basics
        2. rmi-dispatcher Container (in ofbiz-containers.xml)
        3. ExampleRemoteClient.java
    6. Service Groups
      1. ofbiz/framework/service/dtd/service-group.xsd
      2. servicedef/groups*.xml
      3. Service Definition for a Group
      4. Defining Groups
        1. Groups
        2. Services Per Group
    7. Service Event-Condition-Action (ECA) Rules
      1. ofbiz/framework/service/dtd/service-eca.xsd
      2. servicedef/secas*.xml
      3. Defining ECA Rules
        1. Events
        2. Conditions Per Event
        3. Actions Per Event
    8. Service Mail-Condition-Action (MCA) Rules
      1. ofbiz/framework/service/dtd/service-mca.xsd
      2. servicedef/smcas*.xml
      3. Mail Client Setup (ofbiz-containers.xml)
      4. Defining MCA Rules
        1. Field Conditions
        2. Header Conditions
        3. Service Conditions
        4. Actions
    9. SOAP Service and Service Engine Services
      1. Default Context-Envelope Mapping
      2. Call SOAP Services Through the Service Engine
      3. Call Service Engine Services From a SOAP Client

Part 5: Business Process Management, Rule Engines, Data Files, etc

  1. The Workflow Engine
    1. Process Management Concepts
      1. Workflow Style
        1. States & Transitions
        2. WfMC & OMG
        3. OFBiz Workflow
        4. Shark & JaWE
      2. Message Flow Style
        1. Messages & Nodes (consumers & producers)
        2. ebXML BPSS (Business Process Specification, like interface)
        3. BPML & BPMI
        4. SOAP Related Standards
    2. Workflow Concepts - WfMC Style
      1. Processes
      2. Activities
        1. Manual Start/End
        2. Automatic Start/End
      3. Transitions
      4. Splitting and Merging
      5. Workflow Data Context
      6. Asynchronous Execution
    3. The OFBiz Workflow Engine
      1. NOTE: The OFBiz Workflow Engine is planned to be replaced by the Shark Workflow Engine, so this is more informational than representative what will be covered.
      2. Workflow Engine Architecture
        1. Service Engine Based
          1. Calling Workflows Through Service Engine
          2. Calling Other Services in a Workflow
        2. Uses Entity Engine for Workflow Definition and Run-Time Data Persistence
      3. Designing Workflows
        1. What Needs to be Done?
        2. Who Will Do What?
        3. What Dependencies Exist Between Activities?
      4. Defining Workflows
        1. Basic XPDL
        2. Working With Parties, Groups, and Roles
        3. OFBiz Extensions
      5. Importing and Managing Workflow Definitions
      6. Running Workflows
      7. Interacting With Running Workflows
      8. Client API (UI development)
      9. Monitoring & Testing Workflows
    4. The Enhydra Shark Workflow Engine
      1. http://www.enhydra.org/workflow/shark/index.html
      2. OFBiz Shark Integration (wrappers, etc)
      3. Shark Webapp
      4. Integration and Usage Status
  2. Rule Engines
    1. General Concepts
      1. Inferencing Engines (Forward/Backward Chaining, Prolog-style)
      2. Constraint-based Optimization
    2. Open Source Engines (JBoss Rules, Mandarax, etc)
    3. The Old (gone) OFBiz Rule Engine
    4. Commercial Rule Engines: Enterprise Oriented and Big Bucks (Blaze, iLog, etc)
  3. The Data File Tool
    1. The Wonderful World of Flat Files
    2. Generic Data Structures for Flat File Data (very similar to the Entity Engine structures)
    3. ofbiz/framework/datafile/dtd/datafiles.xsd
    4. XML file locations vary, usually under the script directory (ie on the classpath)
    5. Defining Data Files
    6. The Data File API

Part 6: Review, Q&A

  1. Review
  2. Q&A
  • No labels

1 Comment

  1. Unknown User (eqi)

    Excuse me, how can I get this course?

    I did not find complete documents on ofbiz, so I can not begin work with it.