310 likes | 748 Vues
Using Clarion in a Business Environment. Presented by: Katie Milanowski. Clarion Software Corporation. Formed in 1982 Bruce Barrington (HBO & Company) Apply RAD technology to IBM PC 1986: Clarion Version 1.0, Atlanta, GA 1988: Clarion Professional Developer Version 2.0
E N D
Using Clarion in a Business Environment Presented by: Katie Milanowski
Clarion Software Corporation • Formed in 1982 • Bruce Barrington (HBO & Company) • Apply RAD technology to IBM PC • 1986: Clarion Version 1.0, Atlanta, GA • 1988: Clarion Professional Developer • Version 2.0 • Included Designer
TopSpeed Corporation • 1990 • licensed compiler technology • State-of-the-art • 1992: merger
SoftVelocity • Founded May 2000 • Acquired Clarion from TopSpeed • Latest technology • Stay ahead of technology curve
Clarion Basics • Fourth generation language • Data-centric • Advanced RAD tool • Includes: • C++ compiler • Modula-2 compiler
Emphasized Components • Code generation • Reusable metadata • Consistent coding standards • Adopt styles quickly • Learn quickly
Template Basics • Define application • Predefined templates • User-made templates
Development Environment • Helps manage files/processes • Includes: • Source • Executables • Resources • Editing • Compiling • Linking • Highly configurable
Environment Setup • Basic Windows design • Common commands • Pick menu • Recent files • Arranged by type • Open or remove from list • Project menu • Commands • Project only commands
Data Dictionary • Information on: • How data is stored/accessed • How data is displayed/processed • Important step in development • Organize data
Data Dictionary Advantages • Information in central place • Consistent look/feel • Fields/relationships/validity defined once • Default data handling
Data Dictionary Items • File names and descriptions • Field balloon help • File key and index definitions • Field status bar messages • File relationship definitions • Field validation rules • Database connection information • Field entry pictures and formatting • Relational integrity rules • Default screen and report controls for each field • Field data types and descriptions
Application Generation • Tool used for development • Creates procedures • Procedures accomplish tasks • “Writes” source for application
Templates • Used in application generation • Two types • Legacy • Application Builder Class (ABC)
Legacy Templates • Mix template language and clarion language statements • Source generated by options specified • At the end of the road • Problems with Legacy templates • Lacks readability • Doesn’t always make complete sense • No visual development tools
ABC Templates • Introduced in Clarion 4 • Recreate Legacy templates • Contain core functionality of application • Rely on class library for source code • Contain commonly used code • Generic code • Must know methods in library
Developing an Application • “ToDo” procedures • Main procedure • Other procedures • Select templates • Define procedure • Add variables
Procedure Properties • A description of the procedure • The procedure prototype • The module containing the generated source code • Whether to export the procedure • Whether to declare the procedure globally • Parameters passed to the procedure • Return values from the procedure • INI file settings used by the procedure • Files accessed by the procedure
Properties (cont’d) • The window displayed by the procedure, including the size, shape, appearance and functionality • The report generated by the procedure • Data items (fields and variables) used by the procedure • Custom source code embedded within the procedure • Formulas used by the procedure • Template generated extensions
Embedded Source Code • Code added to generated source • Embed points • Where code is inserted • Most standard events • Developer created points • Allows for full customization • Saves embedded code for future generations • Must understand template source
Ways to Embed Code • Source in popup menu in application tree • Opens Embeditor • Embedded code in surrounding generated code • Text editor • Choose Embeds • Only embedded code • Sorted alphabetic/logical • Find embeds • Tools to copy/move embeds
Embeditor www.softvelocity.com
Embed Points www.softvelocity.com
Window Formatter • Easy to use • Helps generate appropriate source code • Provides essential tools for development • Direct manipulation of window/controls
Window Formatter www.softvelocity.com
Report Formatter • Reports built in • Can use external reporting tools • Visually develop • Formatter helps create necessary code • Report sub-structures • Form • Header • Detail • Footer • Break
Generated Report Code GROUP('Ship to'),AT(3938,2375,3365,823),USE(?ShipTo),BOXED,TRN,#ORIG(?Group2) STRING(@s35),AT(4063,2604,2948,167),USE(GLOT:ShipName),#ORIG(GLOT:ShipName) STRING(@s45),AT(4063,2771,3125,167),USE(GLOT:ShipAddress),#ORIG(GLOT:ShipAddress) STRING(@s40),AT(4063,2927,3125,167),USE(GLOT:ShipCSZ),#ORIG(GLOT:ShipCSZ) END LINE,AT(83,3302,7229,0),USE(?Line2),COLOR(COLOR:Black),LINEWIDTH(2),#ORIG(?Line2) END detail DETAIL,AT(,,,240),USE(?detail) STRING('Lines'),AT(21,21),USE(?ILines),TRN,#ORIG(?String43) STRING('Line'),AT(73,31),USE(?ILine),TRN,#ORIG(?String42) STRING(@n7),AT(5635,52,635,167),USE(DTL:QtyOrdered),RIGHT(100),#ORIG(DTL:QtyOrdered) STRING(@s10),AT(115,42,896,167),USE(PRO:ProductSKU),#ORIG(PRO:ProductSKU) STRING(@s35),AT(1083,52,2677,167),USE(PRO:Description),#ORIG(PRO:Description) STRING(@n$10.2B),AT(5500,10,135,52),USE(DTL:Discount),TRN,HIDE,#ORIG(DTL:Discount) CHECK,AT(3969,42,250,177),USE(DTL:BackOrdered),#ORIG(DTL:BackOrdered) STRING(@n$10.2),AT(4552,52,771,167),USE(PRO:Price),DECIMAL(250),#ORIG(PRO:Price) STRING(@N*10.2),AT(6396,52,865,167),USE(ExtendPrice),RIGHT,#ORIG(?String16) STRING(@n$10.2B),AT(5635,10,63,52),USE(DTL:TPd,,?DTL:TPd:2),TRN,HIDE,#ORIG(DTL:TPd) STRING(@n$14.2B),AT(5406,21,83,52),USE(DTL:TotalCost),TRN,HIDE,#ORIG(DTL:TotalCost) END Code snippet from www.softvelocity.com
Report Preview www.softvelocity.com
Conclusion • Powerful development tool • Require less storage • Saves time • Easy to use, easy to learn
References • [1] Harms, D. (1999, March 08) ABC or Legacy: Which Templates Should You Choose? Clarion Magazine. Retrieved October 30, 2007, from http://www.clarionmag.com/cmag/v1/v1n1abcorlegacy.html • [2] SoftVelocity. (2003). Clarion 6. Retrieved October 9, 2007 from http://softvelocity.com/ • [3] TopSpeed, (1998) Clarion 5: User’s Guide. Pompano Beach, Fl: TopSpeed Corporation. • [4] TopSpeed Corporation. Why: A layman’s guide to the merits of Clarion for Windows. Retrieved October 30, 2007, from www.clariondeveloper.com/why.pdf