Developing Web Applications


Web Framework Overview


What is a Web Application?

In very simple terms, a Web Application is a web database application; using new or pre-existing database tables. With the help of the wizards, you can generate a web application in a matter of minutes; complete with a theme, user interface and access to your database tables.

The DataFlex Web Framework supports three styles of web applications: Mobile/Touch, Desktop and Basic.



The mobile/touch style works well on a range of browser devices from mobile phones, to tablets on up to desktop browsers. It utilizes a drilldown user interface; this style assumes that an application is used by navigating forward until you find what you are looking for. You "drill down" by navigating forward from one view to another view.

In applications that use a drilldown interface, the application developer takes a more active role in mapping specific actions (both during query and data entry) as the user navigates the application.

We've found that various aspects of the mobile computing environment (significantly smaller screens, fluid aspect ratios, the absence of external keyboards and very precise pointing devices, etc.) are better supported by the drilldown application interface. Creating mobile/touch style applications with Web Framework marries the drilldown interface to the full power of the DataFlex platform.



Desktop style web applications use our unique and very flexible, user-driven interface. This interface was born in the character mode days and has been expanded and refined over many years in both the Windows and Web environments. The seamless connection between the business rules expressed in the data dictionaries and flexible user interface elements is so complete that applications that use it are often referred to as "DataFlex style applications". The Desktop style  is best suited for web applications with a larger/more complex user interface that would be accessed via browser on a desktop/laptop system.


Both mobile/touch and desktop applications use web view and dialog components to provide the browser’s visual interface. These components are created in the Studio and are coded and visually modeled using DataFlex code. They rely on the Framework’s ability to translate this code into JavaScript based user interfaces. The components are based on cWebView and cWebModalDialog objects.

Set peApplicationStyle to determine whether the web application will use the mobile/touch (drilldown) or the desktop (user-driven) application style. Desktop and Mobile/touch web applications use a different structure of objects to represent their navigational elements such as menus, breadcrumbs, etc.



A basic web application is an application that does not use the DataFlex user interface objects. Instead it only uses Web Application Server components. This is use for service based applications.


Web Application Server Components

A web application will often contain web component objects that are not used to create DataFlex web user interfaces. These are referred to as web application server components. These may be used in conjunction with web UI components (cWebView, cWebModalDialog) or they may be used in place of UI components.  These server components are:


Web application server components can be used in both desktop or mobile/touch applications.  In fact, a default web application, uses web services (cWebService) and web component objects (cWebComponent) as a standard part of its application template.

It is also possible that a web applications may only use web application server objects. These type of applications are called basic web applications. Examples of this might be an application that:

A basic application is an application that uses web server components but does not use UI components (cWebView or cWebModalDialog).


cWebApp vs. cWebAppBasic

When you create an application from the Studio you select your application style from the Create New Dialog/Project page where you can select Desktop Web Project, Mobile Web Project or Basic Web Project. If you select a desktop or mobile web project your application will use as cWebApp object as its main container object. If you select a basic web project your application will use a cWebAppBasic object.

The cWebAppBasic class is a simpler version of the cWebApp class (i.e., it’s “basic”). If your application will not use the web framework’s browser UI, you don’t need the additional overhead of cWebApp class and may use the cWebAppBasic class in its place. This simplifies documentation, does not require some of the framework tables (sessions, users, server properties, etc.) and more importantly does not require that you have the JavaScript engine copied into your AppHtml folder. This can simplify migration and deployment. However, the cWebApp class can be used for any type of web application. If your application contains web server components but does not contain any UI components you can choose to use the cWebApp or cWebAppBasic class as the basis for your application.  

To summarize, if your application displays UI objects based on web dialogs (cWebView or cWebModalDialog) you must use the cWebApp class. If your application only uses web server components (cWebComponent, cWebService, cWebHttpHandler or cWebAspClassicObject)  you may use the cWebAppBasic or the cWebApp class.


The Studio


The DataFlex Studio is the Integrated Development Environment (IDE) for creating Web Applications. The wizards in the Studio will allow you to create the web application and views. In the Studio you can also create or connect to database tables and create DataDictionaries. These will contain all your business rules for the database.


Understanding the Web Framework

We recommend that you read through the documentation on the Web Framework in its entirety.


Next Topic: Web Framework Overview