We're happy to report that the latest build of Valence Framework 4.0 includes a fully functional Beta version of the much-anticipated Nitro AutoCode app.  This latest addition to the Nitro family allows developers to quickly generate Valence apps using a wizard-like interface.  You can literally produce a completely functional app -- including both the RPG and the user interface -- from scratch in less than a minute!  You can then call up the resulting app in Sencha Architect to quickly make additional adjustments to the user interface.  This is exciting news for both newbies to web development on IBM i as well as seasoned Valence developers. For RPGers who are just beginning to wade into the world of web development with JavaScript Frameworks, AutoCode serves effectively as "training wheels" for helping them learn how to create IBM i-based web apps that work over their own familiar data.  Just plug in a file name or SQL statement, select your fields, and voila - a completely functional app is ready to roll and, more importantly, ready to be dissected to see how it all works.  The back-end RPG programs AutoCode creates use best practices for retrieving and updating IBM i physical file data via embedded SQL, and the front-end JavaScript code is all MVC-compliant.  And most importantly, AutoCode also produces the meta data needed so that the drag and drop features of Sencha Architect can be used to further refine the app.  It's a great way to become instantly productive with the Valence Framework. Experienced developers will also appreciate the kick-start to common apps provided by AutoCode, particularly when using Sencha Architect.  You can even use AutoCode to produce a "blank" Architect project, preloaded with all the requisite references needed to work with Valence. As an example, let's say you want to use AutoCode to create a CRUD-type app for maintaining data in the sample customer master file included with Valence, DEMOCMAST.  To achieve this, you'd start by simply launching the AutoCode app, clicking on "File Maintenance" in the upper left and entering the file name... blog_autocode_1 Upon pressing the "Validate" button, the window expands into a list of fields in the physical file.  This is where you decide what data (columns) you want the user to see on the initial grid, how the column headings should be displayed, and what they should see when adding new records or editing existing ones.  You can even control which columns are included when the user wants to search for particular records.  Other controls include basic visual elements to be included and whether the user should have the option to download data to Excel...

Figure 2 - Field selection and grid configuration

The third and final step is to click the "Generate App" button, at which point AutoCode proceeds to create and compile an RPG program on the IBM i, and generate all the front-end JavaScript and Sencha Architect project code required.  The new app appears on the Valence Portal and you can execute it immediately. The entire process from start to finish can often be completed in a matter of seconds!

Figure 3 - AutoCode-generated app running in the Portal

Perhaps the best part of using AutoCode is what you can do after the app is initially generated.  The RPG code can be easily tweaked to add edit-checking or other logic, and the front-end can either be directly adjusted or pulled up in Sencha Architect, making it a snap to further refine and extend the app...

Figure 4 - AutoCode-generated app in Sencha Architect

To see a short demonstration of this tool in action, be sure to check out the new AutoCode Video.  This latest addition to the Valence Framework can be downloaded now from the Valence Downloads page.  Existing Valence Framework 4.0 installations, including those trialing the framework, should also download this latest version, which when launched will automatically update your instance to include this new functionality.

CategoryExt JSSencha ArchitectSencha TouchValence