1 / 41

Migrating to OMNIS Studio

AmerOmnis 2003 London, Ontario, Canada David Ferri & Robert Preston Word Master, Inc. Original Presentation by Richard Mortimer Raining Data Corporation. Migrating to OMNIS Studio. Why Migrate to OMNIS Studio?. Make use of new features GUI (e.g. tab pane, tree list) OO

emmly
Download Presentation

Migrating to OMNIS Studio

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AmerOmnis 2003 London, Ontario, Canada David Ferri & Robert Preston Word Master, Inc. Original Presentation by Richard Mortimer Raining Data Corporation Migrating to OMNIS Studio AmerOmnis, London, Ont.

  2. Why Migrate to OMNIS Studio? • Make use of new features • GUI (e.g. tab pane, tree list) • OO • Table classes for data manipulation • Web Client • Product is being actively improved and developed • Enables you to build a thoroughly “modern” application • Supports Windows, Macintosh, Solaris and Linux environments AmerOmnis, London, Ont.

  3. Strategies for Migration1. Concurrent OMNIS 7.3 and Studio • OMNIS 7.3.8.1 libraries can read & write OMNIS Studio 3.1 data files • Pro’s • No modification of existing OMNIS 7.3 application • You can gradually migrate functionality to Studio • Con’s • Not a single integrated client solution • Separate OMNIS 7.3 and Studio runtimes required • Limited scope for communication between OMNIS 7.3 and Studio elements • DDE and Apple events or via data file or database AmerOmnis, London, Ont.

  4. Strategies for Migration2. Rewrite • Rewrite application from scratch • Pro’s • Adheres to pure Studio model • Con’s • Time consuming • Expensive AmerOmnis, London, Ont.

  5. Strategies for Migration3. Convert • Convert an existing OMNIS 7.3 application • Pro’s • Leverages existing investment in code • Quicker and less expensive • Con’s • Result initially not a pure Studio application AmerOmnis, London, Ont.

  6. Factors Affecting Decision • Quality of existing OMNIS 7.3 code • Does OMNIS 7.3 application reflect current or future business model? • Are major changes to interface required? • Availability of developers to carry out conversion • What proportion of conversion cost may be passed on to customers? AmerOmnis, London, Ont.

  7. OMNIS Studio Terminology • Classes (formats) • Methods (procedures) • Properties (attributes) • Field reference parameters (field name parameters) • Instantiated window (open window) • Complex grid (table field) AmerOmnis, London, Ont.

  8. The OMNIS Studio Paradigm • Data classes (file formats) • Schema, Query, Table classes • Row variables and lists • OO • Inheritance • Instantiation and instance variables • Messaging, Do $iwindows.myWind.$myMethod() AmerOmnis, London, Ont.

  9. The Built-in Converter • Performs automatic conversion of OMNIS 7.3 libraries and data files • Back up your old library and data file first! • Converted library will run in the Studio environment • Result is 95% compatible with OMNIS 7 AmerOmnis, London, Ont.

  10. Compatibility Issues • Compatibility • Graphs • Variables • Open window instance command • OO paradigm and Call method command • Obsolete commands • V3 event vs native Studio event mechanism AmerOmnis, London, Ont.

  11. Converting to the Studio Paradigm • Follows on from the built-in converter • Objectives • Initially produce a library that works as before • Non OO • Uses Call method OBSOLETE COMMAND • Subsequently gradually re-engineer application • Convert to Studio paradigm • Use inheritance • Messaging • Can be done 1 object at a time AmerOmnis, London, Ont.

  12. The Converter Libraries • Automate some conversion tasks • Designed to be modular • Unwanted modules can be removed • Custom modules added • OMNIS 7 library preprocessed by O7Analyzer • Run built-in Studio converter • New Studio library post-processed by O$Converter AmerOmnis, London, Ont.

  13. O7Analyzer • Preprocesses OMNIS 7.3 library • Saves information lost during conversion • Written to an OMNIS data file • Corrects things that cause problems with built-in converter • Bad format names, e.g. containing *,/, -, +, ( etc. • Bad window field names • Menu lines containing \ preceded by spaces • Bad method names • Unnamed methods • Identifies Uninitialized parameters AmerOmnis, London, Ont.

  14. O$Converter • Post-processes OMNIS Studio library • Runs after built-in converter • Modules built using object classes • Each module is called in-turn • Reads data file output by O7Analyzer • Records all changes and errors in a log AmerOmnis, London, Ont.

  15. ModuleAClassNames • This module fixes references to classes (formerly formats) identified by the OMNIS 7 Analyzer library that previously had bad names • The Analyzer library generated new names for these classes and these new names must be substituted in any reference to the classes AmerOmnis, London, Ont.

  16. ModuleBMethods • This module processes all methods in the library • For each method submodules are called to correct certain pieces of code • Submodules are object classes whose names begin with 'Submodule' followed by the name of this class, followed by the name of the submodule • Note that the reason for splitting this module into submodules is for run-time efficiency AmerOmnis, London, Ont.

  17. Submodule_MethodsANotation • Converts obsolete notation items to equivalent OMNIS Studio items • $was_rowobjs, $was_headerobjs, $was_horzheaderobjs are converted to $objs • $cformat is converted to $cclass, $cinst or other depending on context • $cwind is converted to $cinst • #TOP is converted to $topwind().$name • sys(50) is converted to $topwind().$name • $head is removed AmerOmnis, London, Ont.

  18. Submodule_MethodsBQuitMthd • It was common practice in OMNIS 7 libraries to define local and format variables at the end of a procedure preceded with a Quit procedure command • If a library is converted to OMNIS Studio then the built in converter removes the local and format variable commands and places the declarations in the method editor variable pane • However the Quit method command is left at the end of the method • Removes any redundant Quit method commands that are found at the end of a method AmerOmnis, London, Ont.

  19. Submodule_MethodsCFldIdent • This submodule replaces notation that uses field idents with the name of the object ($name property) AmerOmnis, London, Ont.

  20. Submodule_Methods_CloseWind • This submodule converts Close Window Instance and Close Top Window commands into a notation equivalent • This fixes a compatibility issue since the Close Window Instance/Close Top Window commands in OMNIS Studio change the status of the flag whereas they did not in OMNIS 7 AmerOmnis, London, Ont.

  21. Submodule_Methods_CommentLn • This sub-module removes command lines commented out by the built-in converter • Searches for commands containing the text "COMMAND REMOVED BY CONVERTER" • The following commands contain this text and are removed: • Other parameters are optional • Install hierarchical menu • Clear class variables when closed • HELP MESSAGE AmerOmnis, London, Ont.

  22. Submodule_Methods_Extension • This submodule attempts to locate references to obsolete external commands and either fix them or report them in the log for manual fixing • Obsolete externals will be represented by a token containing "X" followed by at least 2 digits (i.e. 00 to 99) AmerOmnis, London, Ont.

  23. Submodule_Methods_FldName • Checks notation containing $objs.//myField// to determine whether a new object name ($name) was generated by the O7Analyzer library to fix bad characters • If so the name of the object is changed to the new name and the, now redundant, "//" delimeters are removed AmerOmnis, London, Ont.

  24. Submodule_Methods_HideDisab • Converts certain commands that use tab order to manipulate fields on windows with equivalent notation • If possible the field will be referenced using its $name property • If a number of fields are manipulated using a range (say field number 6 to 9) then if the range does not exceed a preset threshold, then the command will be converted to reference each field within the range • Otherwise the notation method "$sendall" is used to manipulate fields within a From and To range of $order AmerOmnis, London, Ont.

  25. Submodule_Methods_HideToNot • This submodule converts Hide, Show, Enable and Disable field commands to notational equivalent • The reason for doing this is that OMNIS Studio will generate a run time error when a Hide, Show, Enable and Disable field command specifies an object name that does not exist on the top open window instance whereas OMNIS 7 did not • For example. "Enable field {myObject}” Is converted to "Do $topwind.$objs.myObject.$enabled.$assign(kTrue)" AmerOmnis, London, Ont.

  26. Submodule_Methods_ObsoleteC • Replaces obsolete commands with equivalent OMNIS Studio commands • Queue click OBSOLETE COMMAND • Queue set current field OBSOLETE COMMAND • Redraw windows OBSOLETE COMMAND • Set return value OBSOLETE COMMAND AmerOmnis, London, Ont.

  27. Submodule_Methods_OpenWind • Whereas the old Open window command opened a single instance of a window or, if the it was already open caused it to come to top, the Studio command Open window instance will attempt to open a new instance of a window class each time it is executed • This causes a run-time error in Studio if the command is executed twice without closing the first instance • This sub-module resolves this by converting the Open window instance command to a command that only opens a single instance of the window class AmerOmnis, London, Ont.

  28. Module_#Modified • Converts #MODIFIED into a notational form • Note that this change is not strictly necessary since the OMNIS 7 #MODIFIED system variable continues to work with OMNIS Studio AmerOmnis, London, Ont.

  29. Module_CallMethod • Fixes any calls to methods that use the method number • Can convert calls to menu and window methods that use the command "Call method OBSOLETE COMMAND" to an appropriate OMNIS Studio method call (i.e. Do, Do method, Do code method) • A list of menu and window classes to be converted must be set up in the $construct method AmerOmnis, London, Ont.

  30. Module_EventHandling • Converts OMNIS 7 event handling which uses $v3events to the OMNIS Studio paradigm • For example "If #AFTER" is converted to "On evAfter" etc. • It will attempt to resolve certain configurations like "If #AFTER&NOT(#CANCEL)" but some that cannot be easily restructured will be logged as user fix errors AmerOmnis, London, Ont.

  31. Module_FieldRedraws • This module attempts to fix obsolete OMNIS 7 field redraw commands • These are commands that redraw a particular field on a window rather than a complete window • If possible, the redraw is replaced with the equivalent OMNIS Studio code to redraw the field • Redraws that are found in window $construct methods that redraw the window being opened are removed, since they are redundant AmerOmnis, London, Ont.

  32. Module_IndrectMenuOptions • Fixes any menu line text that uses square bracket notation to vary the text displayed on the menu line AmerOmnis, London, Ont.

  33. Module_ListField • This module fixes properties of List fields and Complex Grids on window classes where the display or behavior is different to that previously exhibited in OMNIS 7v3 • Vertical scroll bars are added to all list fields and vertical row dividers made not moveable for all complex grid fields AmerOmnis, London, Ont.

  34. Module_PromptedFind • This module converts suppresses processing of certain events in the window $event method and field $event methods of window classes that contain a "Prompted find" command • For example an evOK will occur when the user terminates a "Prompted find" command by pressing the Enter key • This makes the behavior of the application consistent with OMNIS 7v3 where such events were not generated. AmerOmnis, London, Ont.

  35. Module_UninitedParms • This module sets the default value for all uninitialized parameter variables identified by the OMNIS 7 Analyzer library AmerOmnis, London, Ont.

  36. Module_WindowBobjs • OMNIS 7 libraries that are converted to OMNIS Studio using the built-in converter display a different combination of foreground and background color in background objects on window classes • Also the width of OMNIS 7 labels is often insufficient to accommodate the text to display resulting in truncation • This module can be used to set the back pattern, backcolor, forecolor and width properties of all window background objects • You can change the pattern, color and width used to suit your requirements AmerOmnis, London, Ont.

  37. Module_WindowFields • OMNIS 7 libraries that are converted to OMNIS Studio using the built-in converter display a different combination of foreground and background color in fields on window classes • This module can be used to set the back pattern, back color, fore color and border style properties of all window fields • You can change the pattern and color used to suit your requirements AmerOmnis, London, Ont.

  38. Module_xRemoveBlankLines • The built-in converter deletes certain commands from methods during the initial conversion to OMNIS Studio. For example "Parameter..." commands are removed • If the line removed was at the start of a method and was previously followed by blank lines, then the resulting OMNIS Studio method may start with one or more blank lines • This module searches all methods and removes any blank lines that are found at the top of the method prior to the first actual line of code AmerOmnis, London, Ont.

  39. Module_yMethodNames • This module fixes references to methods identified by the OMNIS 7 Analyzer library that previously had bad names • The Analyzer library generated new names for these methods and these new names must be substituted in any reference to the methods AmerOmnis, London, Ont.

  40. Ideas for New Modules • Convert DML commands to SQL ($select, $fetch, $update etc.) • Convert Set current list and commands and variables dependant on it to use notation • Identify resusable routines used by windows and menus and move these to superclasses so that they may be inherited by windows etc. • Convert old OMNIS 7 graph objects and notation to the equivalent Studio objects and code • Convert use of and calls to standard menus (*File etc) AmerOmnis, London, Ont.

  41. Questions & Demo AmerOmnis, London, Ont.

More Related