Basic XML

App Development Can Be Easier

We simplified the hard stuff… so you can focus on the important stuff

   You write XML to describe the business model — Schemas

   You write JAVA to implement the business logic — Handlers

 

Spark does everything else

Spark is content driven

Discrete entities in your business model are used to create the user interface and available features at runtime

The user interface (UI) dynamically morphs based on content schemas. Have an address element in your business model? Define an ADDRESS attribute in XML and Spark will geocode its lat/lon coordinates, alter the UI to show distance and bearing to the location, and turn on mapping and navigation features… automatically… no development necessary.

Content Driven Development

XML + Java + Spark = App

Content Schemas

Business “entities” and tasks defined by your content schemas

Content Handlers

Data access and business logic performed by your content handlers

Spark

User interfaces and app features dynamically built by Spark

Spark

Navigation, networking, and app lifecycle managed by Spark

Content Schemas

Business “entities” and tasks defined by your content schemas

Content Handlers

Data access and business logic performed by your content handlers

Spark

User interfaces and app features dynamically built by Spark

Spark

Navigation, networking, and app lifecycle managed by Spark

This means NO coding, NO visual editors needed for the UI… just define the business model in XML and GO!

It really is that simple

See the samples below

Spark employs a Find-List-View-Task paradigm when navigating between business entities. The entities are inter-connected in parent/child relationships by node definitions in their schemas.

Content Schemas

The following XML snippets show what screens they generate

Home

< ?xml version="1.0" encoding="UTF-8"? >
< content appServer="http://server.com" >
    < contentItem title="Classic Models Database" name="com.package.ContentHandlerClassicModels" >
        < homeEntity name="Employees" />
        < homeEntity name="Customers" />
        < homeEntity name="Offices" />
        < homeEntity name="ProductLines" />
    < / contentItem >
< / content >

Home entities are fundamental business objects that are navigational ”entry points” into the app.

Search

< ?xml version='1.0' encoding='UTF-8'? >
< entity name='Customers' >
    . . .
< searchAttributes >
    < searchAttribute name='CustomerName' />
    < searchAttribute name='City' />
    < searchAttribute name='State' />
    < searchAttribute name='PostalCode' />
    < searchAttribute name='Country' />
    < searchAttribute name='CustomerNumber' />
< /searchAttributes >
    . . .
< /entity >

Includes built-in auto saving of search criteria, comparison operands on numeric fields, and optional required searching.

List

< ?xml version='1.0' encoding='UTF-8'? >
< entity name='Customers' > 
    . . .
< listAttributes >
    < listAttribute name='CustomerName' />
    < listAttribute name='Address' />
    < listAttribute name='Phone' />
< / listAttributes >
    . . .
< / entity >

Includes built-in sorting and filtering, data hiding, fixed or auto paging, grouping by categories, row icons, and distance/bearing for location data.

View

< ?xml version='1.0' encoding='UTF-8'? >
< entity name='Customers' >
    . . .
< viewAttributes >
    < viewAttribute name='CustomerName' />
    < viewAttribute name='ContactLastName ' />
    < viewAttribute name='ContactFirstName' />
    < viewAttribute name='Phone' />
    < viewAttribute name='AddressLine1' />
    < viewAttribute name='AddressLine2' />
    < viewAttribute name='City' />
< / viewAttributes >
    . . .
< / entity >

View screens are used for Inserts and edits, and can include required fields.

Nodes

< ?xml version='1.0' encoding='UTF-8'? >
< entity name='Customers' >
    . . .
< nodes >
    < node name='Orders' /> 
    < node name='Payments' />
< / nodes >
    . . .
< / entity >

Node screens show related business objects for drill-down. Only nodes that have related records are shown along with a record count.

Task

< ?xml version='1.0' encoding='UTF-8'? >
< entity name='Customers' >
   . . .
< tasks >
    < task name='Send_overdue_notice' >
        < taskAttribute name='AddressLine1' />
        < taskAttribute name='AddressLine2' />
        < taskAttribute name='City' />
        < taskAttribute name='State' />
        < taskAttribute name='PostalCode' />
        < taskAttribute name='Country' />
    < / task >
< / tasks >
    . . .
< / entity >

Task screens are used to obtain data for business processes. They can also include multiple steps with each step shown as a tab.

Coding is very easy

Any developer can create a Spark app

Using Spark's reference architecture much of the complexities associated with app development are greatly reduced. Creating a Spark app is centered on defining the business model in XML and then coding content handlers to perform business logic and data access. Developers don't need to concern themselves with issues like screen layout and navigation, thread management, or security.

Content Handlers

Simple JAVA programs where developers spend 90% of their effort

Sample Code

public class MyContentHandler extends ContentHandler {
    public MyContentHandler() {
        super();
    }
    public ArrayList onGetList(Message message) {
        // insert code here to get list of records
        return new ArrayList();
    }
    public HashMap onGetView(Message message) {
        // insert code here to get one record
        return new HashMap();
    }
    public boolean onRunTask(Message message) {
         // insert code here to run a business process
        return true;  // return false if process fails
    }
}

Content handlers perform data access and business logic processing. Handlers can be device-only, server-only, or hybrid where they run on both tiers. Custom code is injected by overriding exit points during lifecycle processing of an app by the framework.