migrating vfp to.net suggestions and tips a migration experience in costa rica customs office...
Post on 19-Jan-2018
220 Views
Preview:
DESCRIPTION
TRANSCRIPT
Migrating VFP to .NETMigrating VFP to .NETSuggestions and Tips Suggestions and Tips
A migration experience in Costa Rica Customs Office
Enrique Almeida – Conceptoealmeida@concepto.com.uy
Gustavo Morales – Costa Rica Customs Office moralescg@hacienda.go.cr
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
The ProjectThe Project
• Customization of a system from Costa Rica real life.
• Concepto technological transfer to the Costa Rica development team.
• Migration of GeneXus 7.5 generating Visual FoxPro (Windows) and C/SQL (Web and WebServices) to GeneXus 8.0 and full .NET
• 400 Tables and 3200 objects
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Who are we?Who are we?
CONCEPTO– 12 years working with GeneXus. – GxAlliance members– 2001 and 2002 Best BetaTester – 2001 Early adopter of new
tecnologies .NET– ISO-9001:2000 Quality System
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Who are we?Who are we?
COSTA RICA CUSTOMS OFFICE- 650 employees.
- Invoicing U$S 1,029,000,000 6% of Costa Rica GNP.
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Why .NET and 3 Tier?Why .NET and 3 Tier?
• Resolution of Costa Rica Ministry of Finance – Security – Scalability– Need for integration with other state
entities – Conceived to keep the same
technology for the next 5 years
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
What did we have?What did we have?
WIN Visual Fox Pro
WEB C/SQL Oracle
A working system developed with:
Changes in • WIN and WEB generator• Application architecture • Database
Which implied the following additional updates • GeneXus version (from 7.5 to 8.0)• Data access (ODBC– ADO.NET)
Client/Server
WIN .NET
WEB .NET 3 tier
And they requested us….SQLServer
Stages.Stages.
3 GeneXus 8.0 WIN .NET
WEB .NET ADO.Net SQLServerClient/
Server
2 GeneXus 8.0 WIN .NET
WEB .NET ODBC SQLServerClient/
Server
1 GeneXus 7.5 WIN Visual Fox Pro
WEB .NET ODBC SQLServerClient/
Server
0 GeneXus 7.5 WIN Visual Fox Pro
WEB C/SQL ODBC OracleClient/
Server
4 GeneXus 8.0 WIN .NET
WEB .NET ADO.Net SQLServer3 tier
Data Acce
ss
Archite
cture
Databas
e
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Suggestion Suggestion I:I:Planning the migration!!Planning the migration!!
• Stages– Simple and assessable steps – If a problem arises it will be easily
detected and compared with something that works correctly.
• Resources – Defining the resources required for
each stage
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Suggestion II:Suggestion II:Work group focused on the Work group focused on the
migration migration • Team working exclusively on the
migration – Anticipating problems – Evaluating new versions – Finding solutions to “standard” problems – Communicating solutions to the rest of the
work group.
• Rest of the group devoted to program new features.
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Suggestion III: Suggestion III: Studying destination platform Studying destination platform
• If we will generate C#, someone in the group must know how to program C#.
• Build a “lab” with the destination platform to perform tests and be able to learn.
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Suggestion IV: Deleting every Suggestion IV: Deleting every unnecessary thing unnecessary thing
• Deleting everything that is not used !!
• Searching for every object non- reachable from mains and delete them.
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
TIP I: How do you get the group TIP I: How do you get the group of objects used in your of objects used in your
application?application?• Distributing:
– All transactions and Data Views– All used mains (Easy in 8.0)– All objects referenced by these mains
(ADD CALLED)– All dynamically called objects
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
What problems may arise?What problems may arise?
Study the KB searching for “weird things” – External Programs and Stored Procedures– Commands: “SQL”, “JAVA”, “DBASE”,
“CSHARP”, “VB”– Non-STANDARD Functions – DataViews with other databases – Images/Already read files – Components: ActiveX, DLL, etc.– Calls between objects from different
generators/environments.– DBF Tables
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
External Programs External Programs
• Rationalize their use – Unify the ones doing similar things – Verify if there is some GeneXus
function to do this • Reprogram them in the new
language (C#)• Test them in the new language and
platforms
TIP II – How can you see external TIP II – How can you see external programs used in your KB?programs used in your KB?
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
External Programs External Programs
• In the migration to C# we had to had parameters used by GeneXus but not by the application.
• Different versions for Windows/WEB, because of these parameters.
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Stored ProceduresStored Procedures
• In ADO.NET, you must call SP with the name of the parameter variable.
• Change programming.
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
““DBASE” Commands DBASE” Commands
• Search for all objects that have DBASE in the GeneXus code.– Example: DBASE wait window 'Presione <ESC> para cancelar' TIMEOUT 5 if lastkey()=27 &SALGO='S' return Endif
• This programming method should be avoided.
• Substitute DBASE by CSHARP, and program equivalent code.
TIP III: What objects use TIP III: What objects use DBASE command?DBASE command?
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Suggestion V:Suggestion V:Use XPZ files (Distribute)Use XPZ files (Distribute)
• Study distribution XML files format (within XPZ)
• “Search and Replace” tool with regular expressions
• Grep• (SR) www.funduc.com.
– Use them to search for the objects containing a specific string.
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Functions Functions
• Knowing the list of functions supported in the destination platform.
• Detecting the non-supported functions or the ones that have changed their meaning in the destination platform.
• Searching for GeneXus Non-STANDARD or non-native functions to find and alternative for them.
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
TIP IV: How to find objects that TIP IV: How to find objects that use non-standard functions?use non-standard functions?
• Consolidate it in an empty KB with the Function property so that it will not accept non-standard functions.
DESIGN PROTOTYPE
• Review everything giving errors and warnings • Correct them
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Suggestion VI: Study all Suggestion VI: Study all Upgrades Release Notes Upgrades Release Notes
• Searching for corrected errors
• New features
• Changes in – Functions– Properties– Commands– Configuration
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
ActiveX ControlsActiveX Controls
• They are not supported in .NET generator
• Reprogram them with native controls
• Keep some programs in Visual FoxPro.
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
Proposed Process Proposed Process
• Delete everything you do not need to migrate
• Distribute original model • Consolidate problems in empty KB and
solve them• Specify problems and solve them• Generate, compile and solve problems • Compare execution with previous model
and fix differences • Document errors and report them
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as
ConclusionsConclusions
• Migrating is unavoidable
• But……– It takes work – I takes planning – It uses resources
• It allows the incorporation of new features
Mi g
r and
o VF
P a
. NE T
Tip
s y
S uge
r en c
i as
Mi g
r and
o V F
P a
. NE T
Tip
s y
S uge
r en c
i as Migrating VFP to .NETMigrating VFP to .NET
Tips and Suggestions Tips and Suggestions
Any question?
Enrique Almeida – Conceptoealmeida@concepto.com.uy
Gustavo Morales – Costa Rica Customs OfficeMoralescg@hacienda.go.cr
top related