This article was brought to you by the guys from VDF-GUIdance.
For more DataFlex targeted articles see http://www.vdf-guidance.com

Introduction



Open eLectos (OEL) is the open source content management system written for WebApp.
This project is based on work originally initiated by Folkert Klemme and is currently maintained by Wil van Antwerpen.
Open eLectos has been designed in such a way that it is very userfriendly and easy to operate from any browser.
But it is more... it is actually a complete framework which can be used as a bases to develop all your WebApp based applications with.
With the standard WebApp framework, source-code needs to be maintained in many different layers.
One of the goals of using the Open eLectos framework is moving as much code as possible to the WebApp level. Because this is the type of code that a VDF developer knows best and this code is the most secure as it is compiled p-code. On top of that, webapp code itself is platform independent.

Code which is generated by the standard WebApp wizards depends on asp scripting (server side scripting), intermingled with javascript and/or VBscript (server side scripting) and Javascript/JScript running in the browser (client side scripting) and WebApp (server side p-code).
This results in source-code in many layers and not all of them are controllable from a developer point of view.
For example; critical functionality should never depend on active scripting (client-side), this type of code is only to be send to the browser when the user agent is able to support it and if the user agent has enabled this ability. If active scripting is not supported then your application is supposed to handle this and not send javascript code to the browser.

Another problem with all those separate snippets of code having to work together is connecting them to one another and passing variables along which might not be available in the layer on which your code is doing the work.
This is of particular interest when you run client-side scripts as that means you will have to post data from the server to the client or get data from the client to the server.
Open eLectos takes care of these problems in a variety of ways, but most of these can be found in the session manager.
An example of this would be the automatic detection if javascipting is enabled at the clients browser and storing this ability for the rest of the session.
Other examples are:
  • storing the querystring in the session manager,
  • the name of the user
  • the last login date/time
  • links to the last five pages which have been visited