Team Developer 6.0

Download Report

Transcript Team Developer 6.0

Team Developer 6.0
Migrating Existing
Applications to Team
Developer 6.0 .NET
Agenda
•
•
•
•
•
•
Team Developer 6.0 products and upgrade path
New .Net Build Target options
Architectural overview
New Team Developer IL Compiler
Debugging
Migrating Existing Applications to .Net
– External Calls, ActiveX, COM Servers, DB Connectivity
• How to use .NET WPF Controls
• How to create and use .Net classes
• How to deploy TD .NET apps
Team Developer 6.0 Products
TD 1.x – 5.1 Applications
Upgrade
TD 5.2 Applications
New Add-On Product
TD 6.0 Win32
Win32 Build Targets
•New Tab Control
•New Outlook Control
•New Tree Control
•New Toolbar
•Quick Mail SMTP
•True Color Icons & Images
Win32 Application
TD 6.0 .NET
.NET Build Targets
Win32 Build
Targets
.NET WPF Desktop
.NET WPF Browser
.NET Class Library
.NET SAL Library
.NET Web Service
.NET App
Win32
New .NET Build Target Options
•
•
•
•
.Net WPF Desktop
.Net WPF Browser
.Net Class Library
.NET SAL Library
Architectural Overview
• All compiled code pure .Net, assembled from
generated IL
• New .NET class libraries, based on proven
Sabertooth libraries
• New debugger, based on Microsoft’s .NET
debugger library
TD .Net Database Connectivity
Backward Compatible DB Connectivity
• Database access continues to simply work
– Using existing sql.ini
– SQLBase, Oracle, SQL Server, Sybase, ODBC and
OLE DB
• TD automatically maps to appropriate .NET
Data Provider regardless whether OLE DB or
native router has been used on Win32
DBPipe .NET WPF Browser Centralized DB Access
• New DBPipe allows multiple clients to share
one database connection
• Server component uses Microsoft’s scalable
.NET Windows Communication Foundation
(WPF) technology
• Database access on server only
• Easy client deployment without client
database driver setup
TD 6.0 DBPipe
Browser
client
Database server
SQLBase
Oracle
SQL Server
Etc.
IIS Site
Hosts
XBAP downloads
Hosts DBPipe Server
Hosts database
client
• Runs
downloaded
XBAP app
Browser
client
Browser
client
• Uses DBPipe
to send and
receive SQL
• Internet
Explorer
• Firefox
New .Net Compiler and Debugger
Team Developer 6.0 IDE
NEW TD IL Debugger
NEW Team Developer IL Compiler
WPF XAML
.NET SAL
Library
Class
Library
Web
Service
Desktop
Compiled
Assembly
Browser
TD .NET Class Libraries
ActiveX
COM
3.0 – 3.5 .NET Framework
DB Access, Controls, Types
Windows Common Libraries
New TD IL Compiler
• Brand new compiler, developed in C#
• All existing language keywords and statement
types supported
• Same SAL data types continued to be used
• Support for windows classes and multiple
inheritance
New TD IL Compiler
Seamless Experience
• New compiler and debugger fully integrated
into existing TD IDE
• Performance equal to or faster than existing
win32 compiler
• No change to TD IDE
• All warnings and errors displayed using
existing Output window
Debugging
• If a .Net build target selected, the new .Net
Debugger engine is launched
• Most features of existing win32 debugger
supported
– Step into, over, and out
– Setting breakpoints
– Examining variable values
– Evaluating expressions
What has changed since DevCon 2009
• A lot more .NET power!
• External Calls supported (Win32 DLL from .NET)
– Except struct parameters
• ActiveX and COM Server consumption works
unchanged on .NET
• .NET WPF Controls support
• .NET SAL Libraries including GUI (DynaLib APDs)
• Extensive migration help
– Migration report
– Define tasks, task report
• .NET Web Services moved to TD 6.1
Team Developer 6.0 .NET
Step by Step Migration Guide
Migrating Existing Applications to TD .Net
Step 0
• Is your app on TD 5.x?
– Yes, go ahead with Step 1
– No, migrate app to TD 6.0 Win32 first, same as
migrate to TD 5.2 (Unicode etc.)
Migrating Existing Applications to TD .Net
Step 1
• Set the desired .NET build target
– .Net WPF Desktop
– .Net WPF Browser
– .NET Class Library
– .NET SAL Library
Migrating Existing Applications to TD .Net
Step 2
• Run the V 6.0 Upgrade Report
• Work through high level task list
• Then run report again for details
• Read/print generated report for effort
estimation and instructions
Migrating Existing Applications to TD .Net
Step 2.1
• Compile the application and use new „Convert
to Task“ feature to comment code that needs
to change
• Use „Find Tasks“ from edit menu to work on
task list
Demo Upgrade Report and Task Management
Migrating Existing Applications to TD .Net
Step 3
• Remove Table Window Split features
– For example replace with second table window
• Replace VT controls with new TD controls
– Outline list box -> Tree Control
• QuickTabs to new Tab Control
– Use QuickTab2Tab conversion tool
Converting QuickTabs to new .NET Tab Control
•
•
•
•
QTAB2TAB.EXE
FIRST, always make a backup of all your code!
Now run v6 utility QTAB2TAB.EXE on your appl.
The utility makes these changes:
– Pagelist.apl is removed
– Qcktabs.apl is replaced with new qtab2tab.apl
• v6 qtab2tab.apl declares these classes:
– Tab Bar Class: cTabControl
– General Window Class: cTabControlParent
– cTabBarXX classes for Dialog Boxes & Form Windows
Visual Toolchest Migration
• Supported Stand-Alone functions
Visual Toolchest Migration
• Supported visual classes
– cMeter
Migrating Existing Applications to TD .Net
Step 4
• Examine External Functions Parameters and
Return Values
– OK if not using struct‘s or window handles
– If using struct‘s
• Change DLL or
• Change to call .Net class method instead, using the .Net
Explorer
– If using window handles
• Replace with TD technology
– Other limitations
• No LPNumber, LPParam, Hsqlhandle, Harray
• No calling of SAL Win32 libraries
Supported with External Calls
• Numeric:
–
–
–
–
–
–
–
•
INT
FLOAT
LONG
SHORT
WORD
USHORT
UINT
String:
–
–
–
–
–
LPCWSTR
LPWSTR
LPVOID
LPSTR
LPCSTR
• Boolean:
– BOOL
Migrating Existing Applications to TD .Net
Step 5
• DynaLibs
– Replace with .NET SAL Library
• Move dynalib to .NET SAL Library including GUI
elements
• Compile dynalibs to .NET SAL Library
– Creates new SAL symbol file .axl
• In the main application remove the include of the
APD
• Include the new symbol file of the .NET SAL
Library
New SAL Library Symbol File
Migrating Existing Applications to TD .Net
Step 6
• Custom Controls (not ActiveX)
– Not supported on .Net
• Option 1
– Replace with similar .Net WPF control
• Option 2
– Rewrite using TD control
Migrating Existing Applications to TD .Net
Step 7
• Compile Application
• Replace all unsupported calls, the compiler
reports
• Shouldn‘t be a lot at this time
QuickObjects Limitations
• QuickObjects are not supported on .NET
• QuickGraphs are supported on .NET
• QuickTabs can be converted to new Tab
Control using QuickTab2Tab app
• QuickReports are not supported
Language Support and Limitations
• Restrictions (usage throws compiler error)
– No loose usage of numeric types. Sql Handles,
Window Handles, File Handles may not be used as
number variables, or have their values assigned to
each other
– No DDE
– Only a small subset of low-level window
messages (WM_*) supported
Enhancing .NET Apps with WPF Controls
• Leverage modern and very rich .NET WPF
controls
• Use free or commercial third party WPF
controls or self written WPF controls in TD
.NET apps
• Replace Win 32 Custom Controls and ActiveX
Controls with .NET WPF Controls
WPF Control Samples (not part of TD)
More WPF Controls...
Enhancing .NET Apps with WPF Controls
• Very cool and rich controls available
– http://download.componentone.com/pub/demo/wpf
/ControlExplorer/ControlExplorer.xbap
– http://demos.telerik.com/wpf/
– http://demos.devexpress.com/DXChartDemos/
– http://www.wpftutorial.net/3rdPartyLibs.html
– http://www.codeplex.com/site/search?projectSearchT
ext=wpf%20control
– http://chriscavanagh.wordpress.com/2009/08/25/areal-wpf-webbrowser/
Using .NET WPF Controls
• Place WPF Control
onto TD window
• Add xaml snippet to
properties
• Call any control
methods
• Set/Get any control
properties
• Trap any control
events
Use TD Built-In Gauges
• Use any of these to
display numeric values
– RadialGauge
– LinearGauge
– RangeGauge
– FlatRangeGauge
– FlatLinearRangeGauge
Demo ActiveX to .NET WPF Control
• Demo using WPF controls
Demo
• .NET Office Integration
Language Support and Limitations
• Restrictions (usage throws compiler error)
– No multiple inheritance of controls from 2
different form classes
– No renaming of controls/columns which are
inherited from a parent class
– No overriding functions based on return type
Calling .Net from Team Developer
• Brand new for Team Developer 6.0, the ability
to call .Net assemblies from within SAL code
using either the Win32 compiler, or the new
.Net compiler
• Approach similar to ActiveX Wizard and Web
Services wizard
– New .Net Wizard allows user to select an
assembly to call from SAL
Calling .Net from Team Developer
Calling .Net from Team Developer
Choose
GAC or
Assembly
Choose
Classes to
include
and output
path
Apl and axl
created
using
Assembly
name
Choose
Assembly
from GAC
Calling .Net from Team Developer
Sample
.NET APL
Calling .Net from Team Developer
• Limitations
– No support for handling the events of the external
assembly
– No support for calling methods or properties using
“generics” datatypes
Team Developer 6.0 .NET WPF Applications
• Latest technolgy .NET WPF
apps supported (Desktop
and Browser)
• GUI definition and code
separated
• XAML files describe UI
• XAML fully customizable
• Team Developer 6.0
includes customized XAML
editor
Customizing generated XAML
• Team Developer comes with customized XAML
editor (based on kaxaml)
• XAML editor launchable from Team Developer
IDE
Customizing generated XAML
• Custom XAML is created in
.xaml\<app_name>\window.xaml
• Customized XAML will be picked up by
compiler and used instead of default
• Form outline items will have new XAML
context menu with options to view default
XAML, or create custom XAML
Customizing generated XAML
Customizing generated XAML
• App.xaml and window_main.xaml file may be
edited to enable application-wide changes
– Applying custom themes to all forms
– Applying custom styles to certain controls
Customized XAML
XAML Demo
Deployment Options
• For WPF/Desktop applications:
– New menu item Project -> Create Installer
– Wizard will create setup.msi and setup.exe files
– Configurable author, company, product name
properties
Deployment Options
Deployment Options
• For WPF/Browser applications:
– New menu item Project -> Publish assists in
publishing your XBAP application to an IIS server
– If using our new distributed database client, will
assist in setting up the correct connectivity
settings
Deployment Options
Demo
• WPF Browser IIS Deployment
• TD 6.0 Demo App
Q&A
Team Developer 6.0 Resources
• More on Social Networking Sites