Paul,
Here is what I did
1. Imported the file into the data dictionary
2. Based on the DSPFD metedata generated the raw UI metadata (calculated
pixels width etc.)
3. Generated a XML file that defines the field in the grid and form
4. Locked the two first columns in the grid by setting a XML property
4. Created a RPGLE program that launch the page WKQCUSTDT.PGM (time about 1
minute)
5. Created the file in the function table
6. Generated a SQLRPGLE REST/CRUD service by pointing at the file (time
about 20 seconds)
7. Collected the English metadata sentences and translated them into 6
other languages
8. Added some simple help text (the ? icon in upper left corner)
9. Added the new WKQCUSTDT function to the accordion menu system
You can get the form of an row by right clicking one or more rows
Please also notice that the Work With function also can generate PDF, CSV,
XML, JSON, HTML
by pressing the download icons in top, this is standard and will follow the
data in the grid view.
XLS is optional and requires a RPGLE program more that build XLS using POI
ad. 3. The XML grid/form definition file can hold designs at system, user
group and/or user level that
not only defines what fields that are shown but also tabs, sequence and
user rules.
ad. 6. The REST/CRUD service dosn't know the Client that can be anything
that run HTTP, so it
is generic.
Please also notice that the UI will follow the general language settings
punctuation as well as date
formats (if there where any) and dates in the DB can be any format such as
datefield or numeric
fields - they are converted in the REST/CRUD service that always transfers
data in ISO format and
then are translated to the appropiate language format in the UI.
So you get a very advanced WORK WITH function without knowing anything
about EXT JS all you
need to know is the sequence of the above procedures where to change the
launch program and
how to edit a simple XML grid/form definition file.
Further more the programs has build in sequrity (the ses and req parameters
in the below URL's)
and the REST/CRUD SQLRPGLE can be extended both with more fields and with
BL without
loosing the ability to be regenerated if I should build in new
functionallity in the standard.
Last but not least, any changes to the UI definitions that is defined in
the data dictionary will take
effect immediately and changes can due to build in Change Management
services be carried from
test to a production environment in minutes.
So there isn't really any constraints anywhere and a very high degree
of reusability (eg. the
WORK WITH controller is generic for all functions) and the platform can be
expanded to other
UI's just by adding some new generic UI templates to the system.
Her is the generated test program in different languages:
English:
http://5.103.128.110:6380/pextcgidmo/WKQCUSTCDT.pgm?ses=06488058880125034420131256072288&req=06384819200176980020131258072220&pxTS=20130006220721890
German:
http://5.103.128.110:6380/pextcgidmo/WKQCUSTCDT.pgm?ses=05008413440123085620131227152244&req=16612859200115014420131230152220&pxTS=20130006221453812
Italian:
http://5.103.128.110:6380/pextcgidmo/WKQCUSTCDT.pgm?ses=12396887040161024020131244182204&req=18194601600133992820131245182260&pxTS=20130006221809765
On Sat, Jan 12, 2013 at 9:36 PM, Holm, Paul <pholm@xxxxxxxxxxxxxxxxx> wrote:
Henrik/Kevin,
Your approach of generic EXTJS UI components is good but why not leverage
SQL to define the business model AND UI grid JS object model? This allows
subfile/work with type applications to be created instantly with no
client side JS.
For example:
select cusnum, lstnam, state, baldue from qiws/qcustcdt
This defines a generic "work with customers" grid.
You have a dynamic business object CUSTOMER with attributes CUSNUM, LSTNAM,
STATE, BALDUE. The UI can generated based on the metadata of the
attributes.
The generic WORK WITH list of records is the #1 most developed pattern in
all of software development and with this approach the programmer instantly
has WORK WITH screens for any of their database files.
Here is the development approach:
http://www.youtube.com/watch?v=MDuczx7Z6ng
This is an example CUSTOMER WORK WITH application:
http://www.planetjavainc.com/wowADDONDEV/runApp?id=185&_pj_lib=wowsamp
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.