Home 

The LookFeel for Windows Development System

LookFeel for Windows (LFW) by App-2-Win Systems, Inc. is an application development/conversion system for Data Access Corp's Visual DataFlex (VDF) language. LFW was designed by application developers for application developers with the following goals:

Rapid application development with features required by mature applications.

Rapid application maintenance for long application life.

Rapid conversion of existing applications.

 

Application Development

LFW uses text scripts as its program source. These scripts are "top down" in nature, very similar to the way may developers think, especially if "coming from" a procedural environment. The LFW designers know that "coming from" is an incorrect term because in most cases the new VDF environment will be "added on". Developers will still be required to maintain, support, and think text based applications. The LFW system allows retention of the existing development environment, including text editors , version control, and file management. Unlike most Windows' development systems, the LFW system scripts emphasize the developer's custom programming rather than the visual component. Long term application success requires more than just good looking screens, even in a Windows environment.

Application Maintenance

The LFW system uses the simple premise that the computer should compute, and the developer should develop. The scripts used by the LFW system have structure, like an outline, to let the computer do real work, and flexibility, like a word processing document, to enable the developer to add his creativity. This is also the key to long-term maintenance. The LFW script commands necessary to provide the framework of the application are "quiet" compared to any added programming. There are simple, one line LFW script commands, to assist communications between objects. Most developer programming code is physically located in the script at the point of its focus. This allows someone unfamiliar with the application to quickly home in on a problem or make modifications, especially on large projects. Other development systems say they give quick access to custom programming, but either require mouse mining (click, click, click, click) to access the code, or it is buried in tons of "Widows" stuff.

Application Conversion

There are two aspects of conversion, visual and business rules. Every developer has a visual style. Windows has standards and a style. The trick of converting the visual component of existing programs to VDF is retaining as much of the developer's individual style as possible while conforming to Windows. The resulting application should feel comfortable to existing clients and have true Windows look for your marketing department. The LFW system conversion program reads an existing procedural program and creates a rough view. The rough view then gets massaged during a short and simple edit cycle. The process ends with screen layouts in a Windows style, containing enough of the existing application's LOOK and FEEL that clients feel comfortable. The LFW conversion program also retains the DF {entry options}, and can automatically add new options, such as currency masks, that are available in VDF. When the screens look "close" they are handed off to the actual development system, either the LFW system or VDF's AppBuilder. Much of the programming in procedural programs deals with navigation and database integrity, and is usually not retained after conversion because of the built-in capabilities of the LFW system and VDF. The remaining business rules from the old application are added to the new application as validation functions or other methods. The LFW system can be set to automatically update the VDF data dictionaries or keep the code in the entry view. The LFW system supports either style from the same source script.

Sample_script

Sample_screen

Sample_details

 

LFW Features

- Comfortable text based development environment.

- VDF AppBuilder and DDBuilder compatible output files.

- Automatically creates selection lists and VDF data dictionaries.

- Conversion programs for DF Procedural to VDF are included.

- Uses standard VDF classes.

- Complete, long term development environment.

- The fastest and easiest way from file definition to view, five mouse clicks.

- Alignment that works across containers.

- An unlimited number of validation functions for each entry form object.

- Commands are consistent for all objects, container or entry.

- Conditional entry commands make access control easy.

- Commands for communication between objects.

- Row and Column style entry for locations and sizes.

- Standard VDF commands can be used. If LFW can use the info it does, otherwise passes it through.

- Custom objects, functions, and procedures are placed directly into the script.

- Classes can be changed for an entire application, a view, or an object.

- Stand alone programs are created as easily as standard views.

- Registry entries for a project or a stand alone program is a single button press.

- Registry entries for development can have a workspace prefix.

- Formatted text listings with objects, methods, and control blocks highlighted for debugging.

- Easy database lookups for non-database entry forms.

- Special commands for automatic access to the report status panel program.

- Current programs and latest docs available 24 hours a day at the App-2-Win.com web site.

Sample_screen

Sample_details

Sample Script

Comments and things to notice about the following script

Notice the lack of position and size commands in the script file. The LFW system has automatically positioned objects based on the settings in the LFW.INI file and the script. A change to the LFW.INI file will be reflected in all of the programs processed after the change. The entire LOOK and FEEL of an application can be modified automatically. Readability is another consideration. The script to create this view is 2.5K, much of which is header information. The generated view is over 20K. In other development environments, code added for validation and entry control would be mixed in with lots of other code required by Windows/VDF. It is easy to modify a script.

The use of stickytabs in the script allow automatic alignment not only within a single container, but in all containers that follow until the stickytab is set to another value. There are seven stickytabs available for use in the LFW system.

Shadowing is used to control user access in Windows applications. The LFW term for this is conditional entry. There are two styles supported, simple based on the value of a prior entry object, and complex, based on the value of a property. The simple method is useful for most entry tests, and there can be any number of conditions on a field based on any number of entry objects. All standard DF tests can be used, including IN, MATCH, and CONTAINS. Conditional entry based on a property can be based on anything that can be tested in VDF. Any object, entry or container, can have conditional entry based on value of an entry object or a property, or both.

This script started as an auto-created maintenance view. Explanations of the letter labels and a screen print follow the script.

##Generate_Program EF  
##OutFile CODETYPE.VW  
##Main_Data_File CODETYPE  
##View_Object_Name CODETYPE                           
Detail_A
##Generate_Sub_Files YES  
##Delete_Output YES  
##Delete_Working NO  
##Update_DD INLINE // Yes No  
##Makeup_Labels ON  
##makeup_label_style First // Lowercase Title  
##Use_DF_Range no  
##Use_DF_Check no  
##Use_DF_Validates no  
##Default_Entry_Col 55  
##Auto_clear_deo true  
##V_dflt_s_col c70 //size for 640X480 = 406  
   
/VIEW_CLIENT 'Codetype Entry'                         
Detail_B
/EARLY_VIEW_AREA  
   
/DIALOG_3D                                            
Detail_C
/GROUP "outside group"  
/GROUP "inside group 1"  
##FLD TYPE#207 {CapsLock,NOChangeLive,AutoFind,Nonull}
Detail_D
  ##Tab 32  
  ##Status_help "Type code name."  
##FLD DESCRIPTION#207 {displayonly}                   
Detail_E
  ##Label ""  
  ##Noline  
  ##After c.5  
##DFLD DESCRIPTION#207                                
Detail_F
  ##Label "Dependent entry two:"  
  ##stickytab_A SET  
/GROUP_end  
   
/group "inside group 2"  
##FLD DESCRIPTION#207                                 
Detail_G
  ##stickytab_A  
  ##Conditional_entry TYPE#207 "" "" NE OR Y  
  ##Status_Help "Type code description."  
   
  ##AB_store_start  
  ##Validate_Function_Str X 350 "'Larry' is not allowed in descritpion."  
   If "Larry" in Local_value Function_Return rval_err  
  ##Validate_Function_End  
   
  ##Validate_Function_Str X 351 'Type TEST must include "Test" in desc.'  
   Local string tmp_str  
   ##get_value TYPE#207 to tmp_str  
   If tmp_str eq "TEST" begin  
   If not "Test" in Local_value Function_Return rval_err  
   End  
  ##Validate_Function_End  
   
##FLD COMMENT#207                                     
Detail_H
  ##row_size R4  
  ##Conditional_entry Description#207 "" "" NE OR Y  
   
/group_end  
/GROUP_END                                            
Detail_I
/DIALOG_3D_END  
 
##BFLD info_proc "Do Info"                            
Detail_J
  ##pointer_only  
  Set location to -1 ($$RIGHT$$-130)  
  ##conditional_entry Description#207 "do info" "" IN OR Y  
   
  Procedure $$BUTTONSEND$$  
   Set value to "PRESSED"  
   Send info_box "This is the do info button info." "LFW"  
   Set value to "Do Info"  
   End_procedure  
   
##BFLD exit_application "E&xit"                       
Detail_K
  ##object_name Out_of_here  
  ##after  
  ##pointer_only  
   
/LATE_VIEW_AREA                                       
Detail_L
  On_Key Key_Alt+Key_X Send KeyAction to (Out_of_here(Current_Object))  
/VIEW_CLIENT_END  

 

Sample_script

Sample_details

Screen print of view created by the following script

The view is automatically compiled and run after processing. The LFW system generates a "wrapper" to test the view. Each workspace has a "templates" directory for special loaders.

 

Sample_script

Sample_screen

Script details

Script_A Header information for use by the LFW system. These commands were automatically created by the LFW system. The LFW system uses the premise it is easier to edit than create, especially routine tasks. Commands that are required or normally modified are included.

Script_B Properties required by the view are placed after the /View_Client command. Other code for the "top" area of the view will follow the /Early_View_Area command. Register objects, procedures, and functions would be placed here, as well as USE or #INCLUDE statements. This is an area of the view accessible through delegation from all objects in the view.

Script_C Sets up the containers for this view. This view uses one large 3d box surrounding nested groups. The borders of the /Dialog_3d container can be changed, even set to none, using the VDF Border_Style command. The /Group command creates a visible container, with a title. The visible containers must have a visible border. The containers are automatically positioned by settings in the LFW.INI file. The position and/or size can be set using standard VDF set location, set size commands, or LFW equivalent ## commands. Using -1 for a setting tells the LFW system to compute a value, so one value can "hard" while the other "soft". Try to keep as "soft" as possible, like when using a word processor.

Script_D This is the first entry form of the view. The standard naming convention for database fields in the LFW system is fieldname#filenumber. In this example, the TYPE field in file number 207 (CODETYPE). The ##Fld commands also support the standard DataFlex style filename.fieldname (CODETYPE.TYPE). All of the DF field {} options have extended LFW ## equivalents. Most LFW ## commands also have DF {} style counterparts. The NoChangeLive and NoNull options in this field are examples of LFW commands in the normal DF entry options area. NoChangeLive means this is a key field and should not be changed for a live record. NoNull allows navigation through the object if null, but will not allow a null at save. There are, of course, command to allow change of key fields (OKChangeLive) and to allow null values (OKNull), even when they fall outside of a Range= range (only when using LFW validations). This field is Tabbed over 32 units, but lets the LFW system compute the vertical positioning. The LFW system maintains its own data dictionary, so it "knows" that this field heads an index . A prompt will be created automatically. As a matter of fact, even the selection list will be created if it does not exist.

Script_E This is a display only field of the CODETYPE.DESCRIPTION. It will have no label, be on the same line as the prior field, and positioned .5 columns after the prior field. If the prior field moves or changes size, the position of this field will automatically change. You will notice that the DESCRIPTION#207 field is presented on this screen in three times. This is called a dependent item and handled automatically by the LFW system. If an ASCII field is too long to fit its parent container, it is automatically trimmed using the margin parameters from the LFW.INI file for the type of parent container. All positioning and trimming automatically takes into account any prompt buttons.

Script_F Another instance of the DESCRIPTION#207 field. It is also display only, using the ##DFLD LFW command. The ##Stickytab ON command will set the tab position to that of the prior field. In this example, the position of the prior field is based on its prior field. The stickytab is also available for fields that follow. An entire screen, across multiple containers, can be anchored on a single field. There are three separate stickytabs available in the LFW system, and they can also be related by using the same technique. Windows screen design requires alignment for "proper" look. Stickytabs make this type of alignment possible when automatic positioning by the LFW system is not possible.

Script_G The actual entry form for the DESCRIPTION#207 field. It is in a different container than the other fields, but is aligned by use of the ##StickyTab LFW command. The ##Conditional_Entry LFW command is an example of power in a small package. This single line command creates all the support code for communication and testing between two entry objects. The line reads: Allow entry on this field if TYPE#207 is not blank. If TYPE#207 is blank, set this field blank. Test this relationship on every keystroke of TYPE#207. Shadowing is used to control access. An unlimited number of conditions can be put on the same field, and is not restricted to the value of one field. Simple OR and AND test logic is supported for multiple conditions. If the simple conditional entry does not have enough power, there is also a ##Conditional_Entry_Property LFW command which ties entry to the value of any integer property. The value of the property can be set in any procedure and/or function in the view. This field also has two validations. The LFW system has validation top and bottom command that reduces the programming required to create a validation. An unlimited number of validations can be added to a field, each having its own error message. The order the validations are executed is under programmer control, even the order of the LFW internal validation functions. The second validation makes use of the ##Get_Value LFW command. This command will get the value of any entry object, anywhere in the view. Notice the error messages for the field validations.

Script_H The COMMENT#207 field is a text field. The vertical size of the edit field is set to a size of four rows. The horizontal size and label location (and the label) are all computed by the LFW system. The ##Conditional_Entry LFW command tell the system to generate code to test that the DESCRIPTION#207 field is not blank. Conditional entry also cascades. If the TYPE#207 field is set blank, the DESCRIPTION#207 field is shadowed and set to blank. The COMMENT#207 field would then also be shadowed.

Script_I These commands close the containers. LFW commands are not case sensitive and can be indented. If there was code required for the bottom area of a container, it would be placed just before the end command. There is a LFW script command to end an entry object to allow access to this area if required. Custom programming is kept local to the area it supports.

Script_J The first button of the page. This ##BFLD LFW command will create a button with the label of "Do Info" that will send the do_info message when pressed. There are two LFW internal $$ replacements used in this button. $$RIGHT$$ is replaced with the width of the container, the right side. This button will be positioned 130 units to the left of the right side of the parent container. $$BUTTONSEND$$ is replaced with the send message name for the button, in this example "info_proc". Common routines can be programmed using the LFW $$ replacements, then pasted into the script. At the time of script processing, the replacements are made and the routines "fleshed out". The ##Pointer_Only LFW command is similar in effect to the VDF set focus_mode to pointer_only, except it also returns the cursor to the object that had the focus before the button press. Buttons can also have ##Conditional_Entry. Actually, almost any object in the LFW system can have ##Conditional_Entry.

Script_K Another button field placed standard LFW.INI button spacing after the prior button. The object name is Out_of_here. The LFW system makes up internal names for many objects such as grouping containers, buttons, and text fields. If access to these objects is required from custom programming, the objects can be named by the programmer. The object will have this name, and all internal LFW generated code will also use this name. The OnClick procedure sending the action message for the button is automatically created if it does not already exist.

Script_L The /Late_View_Area is where bottom code for the view resides. In this example, we are sending the KeyAction message to the button object named Out_of_here. The /View_Client_End LFW command ends the script. Comments and documentation can follow this command (but no ## commands) without affecting script processing.

Sample_script

Sample_screen

Sample_details

Home