• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Migration from VSE to VW with Pollock

on

  • 746 views

Migration from VSE to VW with Pollock, Christian Haider (ESUG 2004, Koethen)

Migration from VSE to VW with Pollock, Christian Haider (ESUG 2004, Koethen)

Statistics

Views

Total Views
746
Views on SlideShare
746
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Migration from VSE to VW with Pollock Migration from VSE to VW with Pollock Presentation Transcript

    • Migration from VSE to VW with Pollock Christian Haider
    • Overview • Motivation • Migration Process • The Baseline • Migration details • Conclusions ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 2 of 29
    • Why this talk? • Smalltalk market • VSE is dead • Pollock comes • As a checklist for VSE projects • Tell you that it is easy and worth it • My experience • 2 private projects • 1 consulting project ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 3 of 29
    • Why migrate? • Why migrate • Worry about support for new Windows versions • “System gets cracks” • New features • More Platforms • Increase Productivity • Why not to migrate • Cost of VisualWorks • Cost of migration • GUI migration is now easier with Pollock • Cost of change • Migrate to where? • VW, VA, Java, C# ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 4 of 29
    • How to migrate • Only migrate – don’t improve! • The Project is migrating, not just the Code • Get a Consultant • Customer will do everything! • Consultant will explain, guide and help where appropriate (and keep the fingers off the keyboard :-) • Setting • One Table with one Keyboard and Mouse • Display with a Beamer • Start with visual.im • Enhance the VisualWorks environment as needed • Consultant provides help and explanations when useful ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 5 of 29
    • Situation Visual Smalltalk VisualWorks Superclass Superclass -Instvars -Instvars -classvars Globals -classvars Globals App App Classes Classes Classes Classes Classes Classes External Database Comm. External Database Comm. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 6 of 29
    • Porting Steps - Overview 1. Create a Baseline (same source) 2. Translate Code (runnable code) 3. Test (same behavior) 4. Build Runtime (same product) 5. Make it Nice (new possibilities) ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 7 of 29
    • Baseline • Defined state • Equivalent Source • Same module structure and versions • All sources and texts are integrated and published in Store • Loads without serious warnings • All work can be done in VisualWorks ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 8 of 29
    • Towards the Baseline Get all Sources into VisualWorks • Module Structure… • Namespace Name • External Interfaces… • FileIn Modules… • Publish Baseline • Load in fresh image ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 9 of 29
    • Store Bundle Structure • The Store structure should reflect the development process • If a Team/V repository exists, the same structure should be used • Suggestion: Application Development (VSE Porting) Application Runtime Common Module 1 … Module n Tools Tests • Define a version format (1.0.0.0 <major.minor.revision.build>) • An Access DB can be used nicely as light weight Store ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 10 of 29
    • External Interfaces • DLL calls • <api: name args return> • Sockets • Use VW • Database • Use VW • COM? • SmallCOM/X? • Other? ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 11 of 29
    • Environment • Tool to fileOut XML VW sources • VSE Porting package • VSE namespace • VSE.Class • VSE.DynamicLinkLibrary with api parser • Tools package • Browser list icons ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 12 of 29
    • FileIn 1. Open GHChangeList • Precondition: Undeclareds are empty • Set default namespace and encoding 2. Load all sources for one package 3. Replay all • Missing superclasses -> define as VSE.Class • External interfaces -> define as VSE.DynamicLinkLibrary 4. Resolve Undeclared… 5. Add text file comments to Pundles, Classes and Globals 6. Publish to Store ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 13 of 29
    • Resolving Undeclareds • Referenced class • Subclass VSE.Class • Global, pool constant • Add Shared Variable in VSE (move to porting package) • Instvar, class instvar, class var • add in VSE.Class subclass • Global in system extension • Shared variable in referring Class (move to porting package) • Instvar in system overwrite • Add as temp var and add a comment/marker ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 14 of 29
    • The Migrant • Missing references are resolved (empty porting package) • Message send but not implemented issues are resolved • The code loads without warnings • Clean-up • The code critic reports no bugs or possible bugs. • There are no unnecessary system extensions or overrides • There is no unused code • The system and the applications run basically correct. • Problem areas are identified, recorded and patched • The behavior of the VSE system is basically preserved ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 15 of 29
    • Towards the Migrant • Eliminate the porting package • Resolve former Undeclareds • Resolve ‘Methods send but not implemented’ • Options • Rewrite Tool (!) • Regex • Reimplement • Remove • Publish and load in fresh image often ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 16 of 29
    • Topics • Translation by topics • Files • Registry • TCP/IP • Processes • Exceptions • Finalization • C calls • Dependency mechanism • GUI… ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 17 of 29
    • Differences in the Base • (Smalltalk at: #...) => (‘namespace.global’ asQualifiedReference value) • TimeStamp => Timestamp • Colors: Color, RGBColor, logical colors => ColorValue • Pool constants (Clr*, Cr, Lf) => ColorValue, Character, … • File access: File, Directory, Disk => Filename • ObjectFiler => BOSS • Application startup: SessionModel, SmalltalkLibrary, SmalltalkLibraryBinder => ObjectMemory, Parcel ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 18 of 29
    • GUI Migration • Emulate or replace? • Port one existing GUI • Get the topics with the debugger • Change them generally with the rewrite tool ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 19 of 29
    • Differences in the GUI • CursorManager, MessageBox , Prompter => Dialog • PrinterDialog [Windows Goodies], FontDialog • Display, Bitmap, Images, Icons • Text, Fonts • Window opening • Windows messages: wm* ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 20 of 29
    • GUI differences Digitalk Wrapper Pollock ViewManager ApplicationModel UserInterface SubPane VisualPart AbstractPane Nesting: own pane SubCanvas Form #needsContents (model) Window #opened Windows events Controller Controller ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 21 of 29
    • Pollock Model Frame Pane Agent Artist ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 22 of 29
    • Widgets GroupBox GroupBox StaticText DisplayText Button Button EntryField InputField CheckBox CheckBox TextPane TextEdit RadioButton RadioButton RichEdit TextEdit ListBox ListBox ComboBox DropDownList TabControl TabControl TreeView TreeView Toolbar Toolbar TabControlPage Page ToolbarSeparator ToolItemSeparator StatusField -- ToolbarButton ToolbarButton StatusWindow -- ToolbarToggleButton ToolbarButton ImageList -- ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 23 of 29
    • Adding a Widget • VSE • Pollock listBox := ListBox new. listBox := ListBox new. listBox font: self defaultFont. listBox textStyle: self artist listStyle. listBox printSelector: #printItem. listBox displaySelector: #printString. listBox when: #changed: listBox when: #selectionChanged send: #setSelection: to: self. send: #setSelection: to: self. listBox when: #needsContents send: #setList: to: self. frame := LayoutFrame frame := FractionalFrame topLeftRatio: 0 @ 0 fractionLeft: 0 top: 0 bottomRightRatio: 1 @ 1. right: 1 bottom: 1. listBox layoutFrame: frame. listBox frame: frame. view addPane: listBox. window addComponent: listBox. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 24 of 29
    • Tests Resolve the remaining differences • Module tests • SUnit test • First in VSE • Then migrate to VW • Application tests ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 25 of 29
    • Runtime and Performance • Build Runtime • RTP bug: exit on last window close • Test Runtime • Test Performance (WTS) ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 26 of 29
    • Make it Nice • Separate development from runtime • Structure namespaces • Define protocols (if not Team/V) • Comment Pundles, Classes, Globals (if not Team/V) • Write your formatter • Make use of VW Features • MultiProc-UI • Opentalk, CORBA • Net and Web Support • .net and CE Support (in Beta) • Pollock ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 27 of 29
    • Conclusion • It is easy and can be done in a few weeks • All code is rewritten and looked at • Duplications • Nil disease • Coding Style • Forgotten code • Direct variable access • Branches • Long methods ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 28 of 29
    • Recommended Tools • StoreForAccess (lightweight on disk) • GHChangeList (adds Namespace and package support) • Coding • Refactoring Browser • Rewrite Tool • Regex Tool • Code Critic • SUnit (standard for module tests) • Environment • RBCodeHighlighter (highlights while typing) • RBTabs (avoids too many browsers) • AutoComplete • RBSUnitExtensions (adds SUnit buttons to the browser) • RBStoreExtensions (shows versions graphically) • ExtraIcons (nice list icons, essential for testing) • WinIcons (icons for VW tools) ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 29 of 29