Clone this wiki locally
xTuple Web-Mobile client
Enyo is a framework for building web client applications that work on all devices and form factors. The HTML presentation is generated entirely by the client. The xTuple implementation of Enyo is designed as an object model hierarchy so that components are reusable as the application is expanded and customized. We've effectively created a set of building blocks that can be quickly mixed and matched to create new modules and applications. The framework of user interface objects is called enyo-x. The Picker Widget is an example of an enyo-x object. Note it is just over 300 lines of code. Less code here means a more flexible and managable application framework.
Backbone-x actually builds on another Backbone based project, Backbone-relational, that sits between Backbone and Backbone-x. Backbone-relational handles the additional complexity introduced when managing multiple related sets of records as a single object hiearchy. Sales Order is an example of a complex object that has a header, one-to-many comments, and one-to-many line items. When editing a line item, the entire order object will be marked as "dirty" so that the order can be saved in a single commit that updates all line items or comments that have changed in a single unit of work.
datasource. The datasource's main jobs are to:
- Handle authentication following Oauth2 protocol.
- Serve up the application code
- Receive and respond to data requests.
Data requests can be handled by either REST conventions or a Web Sockets connection. The REST implementation uses GET for querying lists or retrieving a single object, POST for creating new data objects and executing database side procedures, PATCH to perform updates per RFC6902, and DELETE for deleting objects.
It is worth noting that except for the login screen the datasource does not serve up HTML or any other presentation content. That is all accomplished by the client code described above.
PLV8 and PostgreSQL
The base client application is designed in such a way that almost nothing is in it by default except User Accounts. All end user functionaly is added by Extensions. However, the base application includes a set of core data models and an expanding set of standard business objects that can be used by extensions to build useful modules. Over time, all the business objects available in the Postbooks desktop application will be mirrored in the web client.
The bottom box shows "core" objects that may be directly referenced by any other object. The middle box contains more functionally specific business objects that are generally independent from one another and except for the cases of objects that are direct children of a parent (i.e. Sales Order is a child of Customer) are not directly related to one another.
The top box shows the standard extensions in Postbooks. Extensions can assemble the various core and business objects together to build a module that is a collection of objects usually relevant to a particular role a user is required to perform. They also usually create relationships between objects, such as adding a one-to-many relationship between Opportunities and Quotes. Access to Extensions are granted at the user level so that if a user does not have access to an extension not only are the menu items removed from the application, but so are the relationships. So, for example, if a user has access to the CRM extension, but not Sales, then that user will not see the relationships between Opportunities and Quotes. This provides a simple mechanism for administrators to hide the overall complexity of our enterprise application from users who have no need to see it, while at the same time allowing users to have a fully integrated experience between modules when they are granted appropriate access.
If you are not satisfied with xTuple's extension design, you can easily mix and match business objects to create your own extension. Extensions are also not limited to the pre-existing set of core and business objects. New business objects can be built and integrated with existing ones. To get started on the basics of building your own extension please review the tutorial.