Mobile Development With Apache Ofbiz: Ean Schuessler, Co-Founder at Brainfood
Mobile Development With Apache Ofbiz: Ean Schuessler, Co-Founder at Brainfood
Mobile Development With Apache Ofbiz: Ean Schuessler, Co-Founder at Brainfood
Apache OFBiz
Static
Server
HTML
Browser Browser Scripts
Server
My Site
JSON
Technology: BackboneJS
require(['Employee', 'TaxCalc'], inside TaxCalc
function(Employee, TaxCalc) { emp.onChange('salary', function() {
var myEmp = new Employee(); this.set('amount',
var taxCalc = new TaxCalc({ emp: myEmp }); emp.get('salary') * rate);
... });
taxCalc: TaxCalc
myEmp: Employee change:
salary rate: 0.31
firstName: John amount: 13950
lastName: Doe
salary: 45000 DOM
update
<div>
<div>Current salary: {myEmp:salary|dollars}</div> Current salary: $45,000.00
<div>Current taxes: {taxCalc:amount|dollars}</div> Current taxes: $13,950.00
</div>
Technology: RivetsJS
Like AngularJS, provides two-way updating
between DOM and javascript objects:
scope.myvar = 'Hello world!';
Hello world!
Technology: Bootstrap
Pre-built recipes for handling adaptive websites
that work well on desktop, tablet and mobile
devices.
Huge user and developer base (79K stars, 31K
forks on GitHub)
Many third party UI component add-ons that
match the basic look and feel.
Saves weeks, maybe months of development.
Technology: Bootstrap
Technology: PhoneGap
Based on Apache's Cordova project
Wraps a HTML/Javascript based application in a
binary wrapper that allows it to be uploaded to
native web stores
Allows access to phone hardware features such as
GPS, accelerometer, camera and local file storage
Near native performance of interfaces and
improving all the time
OFBiz: HTTP Integration
OFBiz already provides basic support for
delivering JSON data from web services but
does not support mapping different HTTP
methods to different services (ie. REST)
For our projects we wrote a small servlet that
implements RESTful method mapping and
JSON input on the request body. This is what
Backbone prefers.
OFBiz: Framework challenges
One major challenge is the OFBiz screen/form widget
system's deep set dependency on access to the
delegator
Unconstrained remote access to the delegator is a
security problem
Moqui attempts to solve this problem with its authz
system but still makes extensive use of server side
templates
This is a problem for any client/server technology
(ie. iOS/Android native apps, Swing, etc.)
OFBiz: Server side Javascript
The OFBiz-Rhino integration currently allows
server side scripting with Javascript within
OFBiz
This provides opportunities to share code
(validation, etc.) between the client and server
The new Nashorn infrastructure opens
possibilities for much better performance and
node.js compatibility on the Java VM
OFBiz: ECAs and SECAs
Using websockets or long-polling COMET it is
possible to have ECA and SECA events
propagate to the client
We implemented this as an add-in servlet but it
would be a nice addition to the core platform
Allows Google Docs-like features in editing
and display screens
Demo
Q&A
Thanks!
Let's keep the conversation going:
@schue
http://schu.es
[email protected]
http://github.com/schue/ac15demo