Mobile development with Apache OFBiz. Ean Schuessler, co-founder @ Brainfood



Similar documents
Building native mobile apps for Digital Factory

Mobile apps development for Joomla

MENDIX FOR MOBILE APP DEVELOPMENT WHITE PAPER

White Paper On. Single Page Application. Presented by: Yatin Patel

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

IBM Digital Experience. Using Modern Web Development Tools and Technology with IBM Digital Experience

Implementing Mobile Thin client Architecture For Enterprise Application

PRIVACY AWARE ACCESS CONTROL FOR CLOUD-BASED DATA PLATFORMS

AngularJS for the enterprise

How To Develop A Mobile App With Phonegap

SYST35300 Hybrid Mobile Application Development

Introduction to Oracle Mobile Application Framework Raghu Srinivasan, Director Development Mobile and Cloud Development Tools Oracle

SwiftScale: Technical Approach Document

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

CHOOSING THE RIGHT HTML5 FRAMEWORK To Build Your Mobile Web Application

MarkLogic Server. Reference Application Architecture Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

How To Build A Web App

Lucy Zhang UI Developer Contact:

JavaScript Programming

Best practices building multi-platform apps. John Hasthorpe & Josh Venman

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

Bridging the Gap: from a Web App to a Mobile Device App

Web Cloud Architecture

Retool your HTML/JavaScript to go Mobile

Take full advantage of IBM s IDEs for end- to- end mobile development

DevOps Best Practices for Mobile Apps. Sanjeev Sharma IBM Software Group

Example. Represent this as XML

Smartphone Application Development using HTML5-based Cross- Platform Framework

Developing multidevice-apps using Apache Cordova and HTML5. Guadalajara Java User Group Guillermo Muñoz Java Developer

Enterpise Mobility Lexicon & Terminology

ADF Mobile Overview and Frequently Asked Questions

Developing Native JavaScript Mobile Apps Using Apache Cordova. Hazem Saleh

Art of Code Front-end Web Development Training Program

Architecture Workshop

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

Developing and deploying mobile apps

How To Develop A Mobile Application On An Android Device

Enterprise Mobile Application Development: Native or Hybrid?

Syllabus INFO-UB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Experimental Comparison of Hybrid and Native Applications for Mobile Systems

Cloud Powered Mobile Apps with Microsoft Azure

How To Use Titanium Studio

Develop a Native App (ios and Android) for a Drupal Website without Learning Objective-C or Java. Drupaldelphia 2014 By Joe Roberts

place/business fetch details, removefromfavorite () function, 189 search button handler bind, B BlackBerry build environment

Cross Site Scripting (XSS) and PHP Security. Anthony Ferrara NYPHP and OWASP Security Series June 30, 2011

ORACLE MOBILE APPLICATION FRAMEWORK DATA SHEET

HYBRID APPLICATION DEVELOPMENT IN PHONEGAP USING UI TOOLKITS

Structured Content: the Key to Agile. Web Experience Management. Introduction

Developing Exceptional Mobile and Multi-Channel Applications using IBM Web Experience Factory

BASIC COMPONENTS. There are 3 basic components in every Apache Cordova project:

Developing ASP.NET MVC 4 Web Applications MOC 20486

The Great Office 365 Adventure

ORACLE ADF MOBILE DATA SHEET

Extending Oracle Applications on Mobile Using Oracle MAF and Oracle Mobile Security

Cloud Powered Mobile Apps with Azure

Mobile Application Development

GOA365: The Great Office 365 Adventure

Mobile Application Platform

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Pentesting Web Frameworks (preview of next year's SEC642 update)

Developing ASP.NET MVC 4 Web Applications

Homework 3: Component & Interface Design

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

Progressive Enhancement With GQuery and GWT. Ray Cromwell

SAV2013: The Great SharePoint 2013 App Venture

50 shades of Siebel mobile

MEAN/Full Stack Web Development - Training Course Package

Continuous Integration and Delivery. manage development build deploy / release

Development of Hybrid Applications with HTML

Safe Harbor Statement

Middleware- Driven Mobile Applications

Mobilize Your ERP with ADF Mobile

Framework as a master tool in modern web development

Oracle Communications WebRTC Session Controller: Basic Admin. Student Guide

Electronic Ticket and Check-in System for Indico Conferences

Google Web Toolkit. Introduction to GWT Development. Ilkka Rinne & Sampo Savolainen / Spatineo Oy

Collaborative Open Market to Place Objects at your Service

OpenEdge and Mobile Applications

EWD: Simplifying Web Application Architecture

Whitepaper. Trans. for Mobile

IGW+ Certificate. I d e a l G r o u p i n W e b. International professional web design,

Mobile Enterprise Application Development - a Cross-Platform Framework

Enterprise Mobile Web Development. Robert Altland Principal Consultant, Mobility Neudesic, LLC

DreamFactory & Modus Create Case Study

WEB, HYBRID, NATIVE EXPLAINED CRAIG ISAKSON. June 2013 MOBILE ENGINEERING LEAD / SOFTWARE ENGINEER

Drupal CMS for marketing sites

Web Programming Languages Overview

Web Applications: Overview and Architecture

Building a Simple Mobile optimized Web App/Site Using the jquery Mobile Framework

Vincent Gabriel. Summary. Experience. Senior Software Developer at Landmark Network

Andrew Kovalenko Full Stack Web Developer

ENTERPRISE MOBILE BACKEND AS A SERVICE EVALUATION CHECKLIST

Developing ASP.NET MVC 4 Web Applications Course 20486A; 5 Days, Instructor-led

Transcription:

Mobile development with Apache OFBiz Ean Schuessler, co-founder @ Brainfood

Mobile development For the purposes of this talk mobile development means mobile web development The languages and APIs for native ios, Android and Windows phones are different but the concepts translate directly This talk will cover deployment as an app using PhoneGap (Apache Cordova)

Mobile web development Pages are largely static assets Adaptive HTML/CSS with flexible screen sizes Templating and client logic are implemented on the client using Javascript instead of on the server User data is provided via AJAX calls that return JSON, XML or some other common format May utilize a web app framework like PhoneGap to access additional hardware features

Benefits User interaction is more sophisticated and can provide functionality that would be impossible using server side template rendering (ie. Google Maps, etc) Multi-platform mobile app and mobile web from one source base Application can be more responsive and handle errors more naturally Better separation of business logic and presentation layer Improved server scalability and caching options Improved XSS security

Technologies There are many application frameworks with similar capabilities. Dojo, jquery/jqueryui, Stapes, Emberjs, BackboneJS, Angular, Rivets and so on There are also many HTML/CSS frameworks with two dominant examples being Bootstrap and Zurb Foundation How do you choose?

Todo MVC Implementations of the same simple todo list application using many different frameworks Full source is provided for each implementation for comparison

This talk For this talk we will focus on one common stack: RequireJS + BackboneJS + RivetsJS We will also discuss the common build automation tools Bower and Grunt PhoneGap to package as an app for app stores Integrate with OFBiz using a simple servlet for REST calls Demonstrate execution of shared Javascript code for client and server model validation

Benefits: Interface flexibility Example: D3 Javascript library for graphing provides dynamic, interactive data modeling that could not be achieved using page fetches. (Show examples)

Benefits: Single source base If an application is designed carefully then the same HTML, CSS and Javascript that is served to browsers can be packaged as a mobile app and distributed through the mobile app stores Static assets load from the phone locally instead of from the server and only AJAX calls are fetched remotely Fast start up, good performance even with poor signal quality

Benefits: Error handling Browser Server Browser HTML Scripts Static Server Page with user data JSON Server My Site Data is not available OK

Benefit: Scalability Browser My Site CDN JSON User data HTML Scripts Memcached JSON User: Joe Pending messages: 3 Static Server Data Server Message Server Since the presentation layer is rendered on the client the UI components can be served via a content distribution network. Typically whole files can be cached and it is no longer necessary to construct fine grained caches of page fragments to gain performance.

Benefit: Separation of concerns Auth Foo Server OAuth JSON My Site Foo Data Browser Bar Data HTML Scripts JSON Static Server Bar Server User interface is largely decoupled from business logic. Application servers are no longer tied to specific HTML presentations and can be reused in multiple applications. If there is shared authentication then everything can be driven off a single user log in.

Benefits: Security More resistant to XSS (cross side scripting) attacks. When using Javascript to set the text content of a DOM node there is never a chance that the text will be interpreted as Javascript and executed. Many frameworks (ie. Angular, RivetsJS) handle this automatically in their data binding system so inputs and divs are automatically secure against XSS. If AJAX calls require authentication tokens then many XSS link phishing attacks are also blocked.

Technology: RequireJS Replaces carefully ordered <script> tags with explicit dependencies <script src= js/jquery.js ></script> <script src= js/undescore.js ></script> <script src= js/backbone.js ></script> <script src= js/foo.js ></script> <script src= js/bar.js ></script> <script src= js/cookie.js ></script> <script src= js/calendar.js ></script> <script src= js/beans.js ></script> <script src= js/numeral.js ></script> <script src= js/hammer.js ></script> <script src= js/wire.js ></script> <script src= js/baz.js ></script> <script data-main= js/main.js src= js/require.js ></script> main.js: require(['foo'], function(foo) { foo(); }); foo.js: define('foo', [ 'underscore', 'backbone', 'bar'], function(foo, _, Backbone, bar) { do stuff });

Technology: BackboneJS myemp.fetch(); Backbone provides an abstraction layer for dealing with RESTful CRUD operations. This provides a simple API but, more importantly, decouples the web side logic from the details of how the data is delivered. require(['employee'], function(employee') { var myemp = new Employee();... myemp: Employee firstname: John lastname: Doe HTTP GET JSON myemp.save(); HTTP POST or PUT JSON myemp.remove(); HTTP DELETE JSON

Technology: BackboneJS require(['employee', 'TaxCalc'], function(employee, TaxCalc) { var myemp = new Employee(); var taxcalc = new TaxCalc({ emp: myemp });... myemp: Employee firstname: John lastname: Doe salary: 45000 change: salary <div> <div>current salary: {myemp:salary dollars}</div> <div>current taxes: {taxcalc:amount dollars}</div> </div> inside TaxCalc emp.onchange('salary', function() { this.set('amount', emp.get('salary') * rate); }); taxcalc: TaxCalc rate: 0.31 amount: 13950 DOM update Current salary: $45,000.00 Current taxes: $13,950.00

Technology: RivetsJS Like AngularJS, provides two-way updating between DOM and javascript objects: scope.myvar = 'Hello world!'; Label: <input rv-value= myvar > <div rv-text= myvar ></div> Label: 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 ean@brainfood.com http://github.com/schue/ac15demo