|
|
|
| Extending
zeroCode Built Applications |
|
| One
significant issue that we address with zeroCode
is the extensibility of a site built with
zeroCode. Like in any other, non-zeroCode-built
site you, as a designer, should be able to
open up any element in the deliverable and
modify it for enhancing functionality. This
document describes the mechanisms zeroCode
offers in the area of functional extension,
without depending heavily on server-side Java
programming. |
|
| Types
of Extensions |
| The
zeroCode architecture and tool-set are designed
for extensibility. The well-decoupled items
in the site make that possible at various
levels: the meta-templates, the database,
the data-access and other objects, the UDMs,
the HTML templates and the JavaScript files.
All of these elements can be modified within
the zDE or without it. The application servlet
itself need not be modified, although extensions
like calls from other servlets can be implemented
using normal Java servlet mechanisms. |
|
| Most,
if not all, modifications to a site fall into
one of the following increasingly-complex
categories. |
|
| Level
1 |
The
automatically-generated user interface needs
to change, to provide a different the look-and-feel
and/or navigation in the site. |
|
|
Level 2 |
Current pages or processes in the site need
to access data elements that are available
in the database but were not included in those
pages/processes in an earlier round of development.
|
|
|
| Level
3 |
The
current database needs extensions. Data items/relationships
need to be added and/or changed in/removed
from the database. |
|
|
| Level
4 |
New
data sources outside zeroCode need to be added
or zeroCode data services need to become available
in an external application. |
|
|
| L1
– UI Changes |
|
| Changes
to the user interface can be implemented using
any HTML editor (like FrontPage, for example).
The site structure includes directories where
the HTML templates are located. Changes can
be made directly on those templates or on
the meta-templates (click
here for more about meta-templates and
how they can be changes). The only thing you
need apart from HTML and JavaScript is some
degree of comfort with FreeMarker.
Of course, you can ignore the FreeMarker tags
in the HTML page and complete your changes
with no adverse impact. |
|
|
| The
simplest mechanism is to open the HTML template
in the zDE, copy the code from there to your
favorite HTML editor via the clip-board (Ctrl-C/Ctrl-V),
make the changes that you need and then replace
the code in the template text-box with the
modified code from your HTML editor. Make
sure that you refer to images that you may
want to use with the correct directory syntax
(you can look at the original page for example).
Upload any new images that you choose to use
and any new JavaScript functions that you
may have written into the images and JavaScript
directories in your site. |
|
|
Using JavaScript, you can make significant
changes to your site, enabling very advanced
features that are not generated by default
by zeroCode. For example, you could replace
all text-boxes in your site with an advanced
editing window where a user can highlight
text, bulletized it and so on. Click here
for more information about how to enhance
your site’s user interface using JavaScript.
|
|
|
| L2
– Using database elements in new locations |
|
| There
will be a number of cases where you would
want to use an existing data element in a
new page. For example, you may want to include
a customer’s phone number on a shipping document,
for additional information. Such a change
is very simple and direct, with changes to
the UDM and the normal changes to the HTML
(as in L1 above). The mechanism is: |
|
|
|
Open
the UDM of the page you would like to change.
In this example, it would be the shipping
confirmation page. |
|
|
Add
a node to that UDM, with the correct bindings,
for the new information you would like retrieved.
In this case, add the customer entity to the
shipping UDM, thereby making all customer-related
data elements available to the shipping UDM.
Save the UDM with your changes. |
|
|
Open
the HTML template for the page; here, it would
be the shipping page. |
|
|
Include
the name of the new node in the HTML, in the
appropriate location. For example, you could
include the node shipping.customer.phonenumber
in the HTML. |
Since
all of this can be achieved just by clicking
on the appropriate elements, there is no need
to open up the data access objects or deal
with Java code. |