Fred Schmitthammer - Clarion...The best tool to develop large applications
Posted September 1 1997
For those of you that have ever had to manage a large application, you might have come across some of the complexities and issues involved in large application development. There are many issues that will hamper the speed of your development and Fred had some extremely useful and practical tips on optimizing your development. These are essential to keeping your development cost, on large applications, down.
His session covered the following areas of managing the application development.
- Using CWs best features, the data type repository (the dictionary), and the application repository ( the Application file )
- Coding standards to keeping the code readable, intuitive and easily maintainable.
- Avoiding isl limits and optimizing development.
- Using 3rd party templates and avoiding reinventing the wheel.
Using CWs best features
Use the ability of the dictionary to control the default properties of all file variables, this turns the dictionary into a data type repository. In a multi developer environment the investment of setting the correct default values for all the data types will save all the developers on the application an incredible amount of time.
Multiple DLLs decrease the compile time of a large application, you will only be recompiling the DLL you are currently working on, it will also give you more flexibility. Fred also recommends keeping the number of modules down to 20 modules per app. He also pointed out even though Clarion for Windows defaults to populating one procedure per module it is advisable to group the procedures more logically (David Bayliss also broached the subject and pointed this out in his session the next day). A good rule of thumb is to group Browses with their matching update Forms. Compiling, testing and debugging your application will now not take vast amounts of your time and and you will find that you won't spend much time waiting for it all to finish.
Putting common functions into a function DLL will maximize code reusability and make sure that the multiple developers avoid duplication where possible. It also gives you a single place to maintain the code.
Use a shell application to glue all the separate apps together. This involves a few useful techniques. Make sure that all the separate DLLs can be compiled as Exes as this will help when you need to debug that DLL on it's own.
Watch your record buffers and global variables. You will need to create a common data dll containing your file layouts and any global variables (other than the internal global variables). This DLL will be linked into all the DLLs and will ensure that there is only one record buffer (apart from buffers created as a result of threading).
Naming Conventions
Upper case and Propercase, if you use your naming conventions for variables to indicate the different attributes of those variables, while parsing the code the person who needs to maintain it (often not the original developer) will intuitively know what type of variable it is. They will also know what it's attributes are without having to check the declarations. For instance you can use naming conventions to indicate wether the variable is local or global, threaded or not?
Keep your keynames unique. Some SQL databases don't use the prefix so sometimes it is worthwhile including the prefix again as part of the keyname so that you land up with a keyname of CUS:CUS:NameKey. Standardise on your keynames to keep consistency throughout the application, this will make it easier to match when declaring relations and coding lookup code.
Document your standards so that a new developer can easily familiarise themselves with the coding style.
"Dynamic Pool Errors" (isl limits exceeded)
Caused by nested IFs and CASE structures, lots of global data, large global declarations.
"Too many segments" the procedure is too complex. Break the procedure into routines where possible or separate procedures.
If all else fails use the 3rd party products available to help you overcome these problems, Tom Moseley's DET Templates are an excellent example.
Using 3rd Party Templates and avoiding reinventing the wheel
Where possible check to see if there are existing products that will implement the kind of functionality your are after, before you invest time reinventing the wheel. There are loads of useful OCXs and general Windows DLLs available with functionality that cover all manner of Windows operations.
Speed up your developments by using the templates to automate repetitive tasks.
Check the Windows API, there are so many useful functions contained within it that are worth investigating. For more information invest in the Windows API Bible and the essential tool for every serious developer, the Microsoft Developer Network Library CDs (MSDN). The Library CD contains loads of up to date API information, whitepapers and backgrounders on most popular Windows subjects.
"Take the time to document the project before you start!"
Fred closed in highlighting more resources to aid you in your developing efforts.
- the free support on the Compuserve TopSpeed forum and the help of Team TopSpeed both on CIS and the Internet .
- invest in training and contact the Clarion Education Department.
- utilize the Microsoft Windows Interface Design Guide to keep a consistent interface from one application to the next and between your application and other Window products.
Fred's session contained sensible hints on managing large applications, implementing documentation standards to keep maintenance intuitive and easy and using available 3rd party resources to save time and to increase your knowlege of Window programming. If you make the time to use and apply the techniques he has highlighted you will find the returns well worth the investment.
Fred kept the session focused and one left it with a clear idea of the primary ways to optimise your development. He obviously has been developing large applications for many years and has a clear grasp on the complexities they involve.
Article comments
Post a comment
You must be logged on to post comments.
Talk To Us!
Search ClarionMag
From the archives
Brazilian ConDev - Notes and Photos
6/13/2005 12:00:00 AM
Clarion Magazine's undercover reporter gets the real story on this year's Brazilian conference...
