Migration from VSE to VW with Pollock
Christian Haider
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 2 of 29
Overview
• Motivation
• Migration Process
• The ...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 3 of 29
Why this talk?
• Smalltalk market
• VSE is dead
...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 4 of 29
Why migrate?
• Why migrate
• Worry about support...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 5 of 29
How to migrate
• Only migrate – don’t improve!
•...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 6 of 29
Situation
Visual Smalltalk
App
Superclass
-Instv...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 7 of 29
Porting Steps - Overview
1. Create a Baseline (s...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 8 of 29
Baseline
• Defined state
• Equivalent Source
• S...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 9 of 29
Towards the Baseline
Get all Sources into Visual...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 10 of 29
Store Bundle Structure
• The Store structure sh...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 11 of 29
External Interfaces
• DLL calls
• <api: name ar...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 12 of 29
Environment
• Tool to fileOut XML VW sources
• ...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 13 of 29
FileIn
1. Open GHChangeList
• Precondition: Und...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 14 of 29
Resolving Undeclareds
• Referenced class
• Subc...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 15 of 29
The Migrant
• Missing references are resolved (...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 16 of 29
Towards the Migrant
• Eliminate the porting pac...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 17 of 29
Topics
• Translation by topics
• Files
• Regist...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 18 of 29
Differences in the Base
• (Smalltalk at: #...)
...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 19 of 29
GUI Migration
• Emulate or replace?
• Port one ...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 20 of 29
Differences in the GUI
• CursorManager, Message...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 21 of 29
GUI differences
AbstractPaneVisualPartSubPane
C...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 22 of 29
Pollock Model
Pane
Agent
Artist
Frame
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 23 of 29
Widgets
--ImageList
--StatusWindow
--StatusFiel...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 24 of 29
Adding a Widget
• VSE • Pollock
listBox := List...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 25 of 29
Tests
Resolve the remaining differences
• Modul...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 26 of 29
Runtime and Performance
• Build Runtime
• RTP b...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 27 of 29
Make it Nice
• Separate development from runtim...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 28 of 29
Conclusion
• It is easy and can be done in a fe...
ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 29 of 29
Recommended Tools
• StoreForAccess (lightweight...
Upcoming SlideShare
Loading in …5
×

Migration from VSE to VW with Pollock

959 views

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
959
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Migration from VSE to VW with Pollock

  1. 1. Migration from VSE to VW with Pollock Christian Haider
  2. 2. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 2 of 29 Overview • Motivation • Migration Process • The Baseline • Migration details • Conclusions
  3. 3. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 3 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
  4. 4. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 4 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#
  5. 5. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 5 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
  6. 6. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 6 of 29 Situation Visual Smalltalk App Superclass -Instvars -classvars Globals External Classes Classes Classes Database Comm. VisualWorks App Superclass -Instvars -classvars Globals External Classes Classes Classes Database Comm.
  7. 7. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 7 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)
  8. 8. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 8 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
  9. 9. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 9 of 29 Towards the Baseline Get all Sources into VisualWorks • Module Structure… • Namespace Name • External Interfaces… • FileIn Modules… • Publish Baseline • Load in fresh image
  10. 10. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 10 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
  11. 11. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 11 of 29 External Interfaces • DLL calls • <api: name args return> • Sockets • Use VW • Database • Use VW • COM? • SmallCOM/X? • Other?
  12. 12. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 12 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
  13. 13. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 13 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
  14. 14. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 14 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
  15. 15. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 15 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
  16. 16. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 16 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
  17. 17. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 17 of 29 Topics • Translation by topics • Files • Registry • TCP/IP • Processes • Exceptions • Finalization • C calls • Dependency mechanism • GUI…
  18. 18. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 18 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
  19. 19. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 19 of 29 GUI Migration • Emulate or replace? • Port one existing GUI • Get the topics with the debugger • Change them generally with the rewrite tool
  20. 20. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 20 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*
  21. 21. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 21 of 29 GUI differences AbstractPaneVisualPartSubPane ControllerControllerWindows events Window #opened(model)#needsContents FormSubCanvasNesting: own pane UserInterfaceApplicationModelViewManager PollockWrapperDigitalk
  22. 22. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 22 of 29 Pollock Model Pane Agent Artist Frame
  23. 23. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 23 of 29 Widgets --ImageList --StatusWindow --StatusField PageTabControlPage TreeViewTreeView DropDownListComboBox TextEditRichEdit TextEditTextPane InputFieldEntryField DisplayTextStaticText ToolItemSeparatorToolbarSeparator ButtonButton ToolbarButtonToolbarToggleButton ToolbarButtonToolbarButton ToolbarToolbar TabControlTabControl ListBoxListBox RadioButtonRadioButton CheckBoxCheckBox GroupBoxGroupBox
  24. 24. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 24 of 29 Adding a Widget • VSE • Pollock listBox := ListBox new. listBox font: self defaultFont. listBox printSelector: #printItem. listBox when: #changed: send: #setSelection: to: self. listBox when: #needsContents send: #setList: to: self. frame := LayoutFrame topLeftRatio: 0 @ 0 bottomRightRatio: 1 @ 1. listBox layoutFrame: frame. view addPane: listBox. listBox := ListBox new. listBox textStyle: self artist listStyle. listBox displaySelector: #printString. listBox when: #selectionChanged send: #setSelection: to: self. frame := FractionalFrame fractionLeft: 0 top: 0 right: 1 bottom: 1. listBox frame: frame. window addComponent: listBox.
  25. 25. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 25 of 29 Tests Resolve the remaining differences • Module tests • SUnit test •First in VSE •Then migrate to VW • Application tests
  26. 26. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 26 of 29 Runtime and Performance • Build Runtime • RTP bug: exit on last window close • Test Runtime • Test Performance (WTS)
  27. 27. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 27 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
  28. 28. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 28 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
  29. 29. ESUG 2004 Christian Haider: Migration from VSE to VW with Pollock 29 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)

×