OFBiz Internals
Summary of OfBiz (1) It’s a big Java Application It runs on anything It requires SDK 8 It runs on anything Windows, Linux, Unix and the Mac
Summary of OfBiz (2) It uses Apache Ant A Java library that is used to manage the build of an application A .net solution and project file – sort of It uses Gradle, which builds upon Apache Ant It uses an internal Java database called Derby but most any database will work Postgres is the suggested Apache database MySQL and SqlServer would work too
OfBiz Architecture
OfBiz Architecture
Ant Basics Visit http://ant.apache.org/ It’s one of many tools deigned to build software Configure builds Configure build versions All through declarative XML vocabulary
Ant Basics Build.xml controls the build Defines targets <target> Create folders <mkdir> Copy files <copy> Delete files <delete>
Other installers UNIX make and name InstallSheld Deploymaster There are several
OFBiz Physical Layout
OfBiZ Physical Layout
OfBiz Physical Layout (1) config: configuration files such as labels and prompts Xml files. .properties files are configuration resources data: seed and / or test data files These map to the data that ends up in entity tables ShipmentTypeData.xml
OfBiz Physical Layout (2) documents: help documents entifitydef: entity definition files used to build the database Entitymodel.xml script: script files written in minilang or groovy Product\script\shipment\ShipmentServices.xml src: Java source files
OfBiz Physical Layout (3) servicedef: entries for Web services In addition to Groovy scripts webapp: The web application itself Uses another tool called freemarker http://freemarker.org/ widget: define the screens
OfBiz Design It’s based on the OASIS Universal Business Language (UBL) UBL lays out objects and responsibilities for many things Product items Customers Etc… These map to OFBiz Entities
OfBiz Design It’s based on a component stack made up of several components Entities are those tables and relationships you viewed with the entity designer They are built from XML files
OfBiz Components (Entity)
Entities (Figure)
OFBiz Components (Service Engine) Services are independent pieces of logic Workflow, Rules, Java, SOAP BeanShell are supported by OfBiz Parts A service definition declared in a “component” A service engine associated with the service definition Services can call other services (chaining)
OFBiz Components (Service Engine)
OFBiz Components (Service Engine)
OFBiz Components (Service Engine)
Installing Steps Install the correct Java version and SDK Download and unzip the OfBiz distribution Configure the software
Configuring the Application Setup demo data, if desired There is a clean option to remove all data. Setup the ports
Configuring the Application We had no e-mail settings because I had not configured them ${ofbiz install dir}/framework/common/config/general.properties
Multitenant In the OfBiz context, multitenant means that we run one copy of the software but several copies of the data (base) Good for development Good for our class Good to create multiple branded websites within one instance of the application Good for the environment too
<Tenant tenantId=“10001” tenantName=“Name”/> <TenantDataSource tenantId=“10001” entityGroupName=“org.ofbiz” jdbcUri=“jdbc:postgresql://127.0.0.1/tenant_name” jdbcUsername=“username” jdbcPassword=“password”/> <TenantDataSource tenantId=“10001” entityGroupName=“org.ofbiz.olap” jdbcUri=“jdbc:postgresql://127.0.0.1/tenant_nameolap” jdbcUsername=“username” jdbcPassword=password"/>
http://events. linuxfoundation http://events.linuxfoundation.org/sites/events/files/slides/Introduction%20to%20OFbiz.pdf
//19