Ofbiz Development Introduction PDF
Ofbiz Development Introduction PDF
2010-08-14
AntWebsystems Co.Ltd
1 Table of Contents
1 Introduction to this development introduction.......................................................................................3
2 Overview OFBiz development...............................................................................................................3
3 Local Installation: development environment........................................................................................4
4 Staging/Production Environment...........................................................................................................5
5 Framework introduction.........................................................................................................................5
5.1 Entity engine...................................................................................................................................6
5.1.1 Entity Engine guide................................................................................................................6
5.1.2 Entity Engine Configuration Guide........................................................................................6
5.2 Service Engine................................................................................................................................6
5.3 OFBiz minilanguage.......................................................................................................................6
5.4 Security...........................................................................................................................................6
5.5 OFBiz widgets................................................................................................................................6
5.6 Help screens & internal documentation.........................................................................................7
5.7 Birt report generator.......................................................................................................................7
5.8 Portal functions...............................................................................................................................7
5.9 Business Intelligence......................................................................................................................7
5.10 The java Api.................................................................................................................................7
6 Bulk upload of data................................................................................................................................7
7 Entity definition.....................................................................................................................................7
8 Application introduction........................................................................................................................7
9 Create the custom component in hot-deploy..........................................................................................7
10 Create company demo data..................................................................................................................7
11 Change OFBiz itself.............................................................................................................................8
12 Coding rules.........................................................................................................................................8
13 Testing..................................................................................................................................................8
14 Continuous testing environment..........................................................................................................8
14.1 Installation....................................................................................................................................8
14.2 Create and configure Hudson.......................................................................................................9
15 Documentation.....................................................................................................................................9
16 Version control with SVN....................................................................................................................9
17 Project mailing list.............................................................................................................................10
18 Integration with other systems...........................................................................................................10
18.1 Available integrations incorporated in OFBiz ...........................................................................10
18.1.1 CAS ...................................................................................................................................10
18.1.2 LDAP .................................................................................................................................10
Page 1 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
Page 2 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
Please also remember that development with OFBiz is a lot different from other environments for the
following reasons:
1. Framework.
Extensive framework making the system independent from database and operating system and
provides rapid development using a custom mini language with screens and forms. Provides a
SOA environment both in foreground and background. No detailed technology knowledge
required such as SQL, HTML, Javascript etc for general business functions.
2. Every information item or business function is only implemented once, which means no
duplication in data and/or programs. If an error is discovered, it only need to be fixed once.
3. Business entity relationship diagram (re)usage:
This data model is based on the Data model and resource books from Len Silverston and
provides more than 800 entities and 200 views which are fully normalized.
4. Business application service level ERP and CRM functions (re) usage:
Making use of the framework and entities, more than 2000 services are present in the system to
update and when the data s complicated for the retrieval of data which can be (re) used.
5. Business application user interface ERP and CRM functions.
On top of the framework, data model and services an extensive application is developed which
provides an user interface which can be re-used in custom developments.
So development with OFBiz requires knowledge of the framework, entity data model, services and
application interface to fully exploit and reuse its capabilities. This means that programming new
functions hardly happen, most of the work is in finding a function which comes close to what you want
and then modifying it to your requirements.
Page 3 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
Page 4 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
4 Staging/Production Environment.
For staging and production 2 different separated OFBiz installations are required
Preferably a Linux server is used to run these environments. For the second environment the ports need
to be adjusted if you are running in the same server. A good document here is the product setup guide
at:
https://cwiki.apache.org/confluence/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup
+Guide
For running 2 OFBiz systems you need at least 4Gb of memory.
An other alternative is using the recently introduced 'multi-tenant' functionality which is described at:
https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support
Using this functionality you can run two different OFBiz environments on the same system.
After the OFBiz system checkout from SVN you can install your local hot-deploy component (if any),
apply the OFBiz patches, run the seed update ant task and (re)start the system.
If you would later on update the system use the 'SVN up' command and rerun the patch and seed
loading programs.
Also setup a script to run the system tests every night on your test environment.
To shutdown the OFBiz system execute the 'stopofbiz.sh' command repeatedly until a connection error
appears which shows the server has stopped.
5 Framework introduction.
For an introduction please visit he following document and the option 'webtools' inside the ofbiz
application.
http://cwiki.apache.org/OFBTECH/framework-introduction-videos-and-diagrams.html
Page 5 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
5.4 Security
https://cwiki.apache.org/confluence/display/OFBTECH/OFBiz+security
Page 6 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
7 Entity definition.
An overview of the entity relationship diagram can be found here:
http://cwiki.apache.org/confluence/x/8ILK
8 Application introduction.
A full ERP/CRM system is included and an overview is given in the document: OFBiz introduction
which can be found on the same site you found this document.
Page 7 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
12 Coding rules.
If you would like to follow the coding conventions which are currently used within the system
checkout the coding rules:
https://cwiki.apache.org/confluence/display/OFBADMIN/Coding+Conventions
13 Testing.
In OFBiz we use 2 different ways of testing: at a service level (jUnit) and at the user interface level
(Selenium). For the examples see the system itself and check the help screens.
Junit testing is explained in the helpscreens or in the ofbiz document with the same text:
http://demo-trunk.ofbiz.apache.org/cmssite/cms/APACHE_OFBIZ_HTML#N2327C
14.1 Installation.
1. Download hudson from http://www.hudson-ci.org/latest/hudson.war
2. Run The Hudson by using command #java -jar hudson.war --httpPort=8086
Page 8 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
15 Documentation.
Ofbiz documentation is contained in the system itself:
1. user documentation: help screens of which a document can be generated.
2. Service documentation: in the service definitions, shown in webtools.
3. Entity documentation: in the entity definitions, shown in webtools.
4. General documentation in the OFBiz wiki at ofbiz.apache.org.
Page 9 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
Before you commit to SVN always check first with the following commands if that is really what you
want to change, Some times you can mis-type and did not notice it.
See what has been changed:
svn st
svn diff
Or put the changes in a file: SVN diff >changes.diff and use an editor to browse them.
If you are sure that this is what you want to change, enter the command:
svn commit -m log message
Make sure you have a meaningful log message referring back to the original customer request.
You can optionally add a directory or filename to the last command.
The SVN book free to download: http://svnbook.red-bean.com/
18.1.1 CAS
18.1.2 LDAP
Page 10 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
To get started with OFBiz services you need the following OFBiz specific information.
Call the OFBiz url with the following mandatory parameters: serviceName
example service: ping:
http://demo-trunk.ofbiz.apache.org/webtools/control/httpService?serviceName=ping
You can try this in a ordinary browser and you will be send the result in a separate document.
To obtain the WSDL use the following example:
http://demo-trunk.ofbiz.apache.org/webtools/control/SOAPService/ping?wsdl
(use the source page view) to show the wsdl xml document.
A list of possible exported services can be obtained by:
http://demo-trunk.ofbiz.apache.org/webtools/control/SOAPService/?wsdl
20 Scrum methodology
This is an optional development requirement using Scrum, we do however advise you to have a look.
There are a number of good short documents describing the methodology:
Scrum guide: http://www.scrum.org/scrumguides/ (various languages)
Scrum in 30 seconds: http://www.scrumalliance.org/pages/what_is_scrum
Scrum in 5 minutes: http://www.softhouse.se/Uploades/Scrum_eng_webb.pdf
We are currently developing and OFBiz component which supports the scrum methodology so you can
use Scrum within an ERP system integrated with your employees, customers and accounting.
Page 11 of 12 pages
OFBiz Development Introduction
2010-08-14
AntWebsystems Co.Ltd
Page 12 of 12 pages