Moving Your Architecture: Microsoft Corporation
Moving Your Architecture: Microsoft Corporation
Microsoft® Corporation
What We Will Cover
Moving from COM to .NET
COM => .NET
Visual Basic® 6 => Visual Basic .NET
ASP => ASP.NET
Using adapters
XML Web services
.NET Remoting
Session Prerequisites
Knowledge of one of the following
languages: Visual Basic .NET, C#, C++,
or Visual Basic 6
Minimal understanding of the
differences between Visual Basic 6 and
Visual Basic .NET
Level 200
So Why this Presentation?
From COM to .NET, learn how
architecture has changed
Discuss different way to use existing
COM components within Visual Basic
.NET
Web services
.NET Remoting
Best practices
Demonstrations
Adapter components
Wrap Visual Basic 6 components with
Web services
Replace Visual Basic 6 components
with .NET Remoting
Using typed DataSets
Agenda
Re-architecting
Data flow and physical tiers
Migrating the UI
Migrating the business and data logic
Typed DataSets
Best practices
Re-architecting
Migration Leads to some Re-architecting
Migration will lead to some re-architecting of
your application if you want to leverage .NET
properly
You can re-architect your application in steps
(using COM Interop)
Good logical architecture is key: .NET won’t
solve issues caused by bad design
Key question: How does data flow through the
layers?
Re-architecting
Migration Leads to some Re-architecting
.NET uses strong typing
No more variants
No more default properties
Prefer ADO.NET over ADO
.NET can still work with ADO, including recordsets,
but ADO.NET is much faster and requires less
memory
ASP.NET offers better model for building UI
Re-architecting
Migration in Steps with COM(+)
Your Visual Basic .NET code can interact with
existing COM components
You can also expose your .NET components to
COM
Start with migrating the UI from ASP to
ASP.NET
Your ASP.NET pages can then talk to existing COM
business components
In many cases, 70% of the performance gained when
moving to ASP.NET comes from migrating the UI
Agenda
Re-architecting
Data flow and physical tiers
Migrating the UI
Migrating the business and data logic
Typed DataSets
Best practices
Data Flow
How Does Data Flow through the Layers?
VBNet.MyStrongComponent:
Public Function UpdatedData(Name As String, Age As
Integer, MyDataArray As Array Of Single) As Double
Physical boundary
ASP.NET
Visual Basic Business Web
Adapter
service
6 comp logic logic
Physical boundary
Untyped
ds.Tables(“Customers”).Rows(0).Columns(“Name”)
= “Steve Ballmer”
Typed
ds.Customers(0).Name = “Steve Ballmer”
Typed DataSets
Issues
They don’t solve all your data modeling needs:
You still have to write code to populate them
Marshalling serializable objects (such as DataSets)
rather than plain strings (such as XML strings) requires
more CPU
...
but the simplicity and power of using DataSets
more than makes up for it
See IBuySpy reference implementation
Demonstration 4
Using Typed DataSets
Running the Demo Application
Viewing the Client Application
Best Practices
Part I
Build your UI in ASP.NET using Web controls and
user controls
Use ASP.NET’s caching mechanisms to their
maximum for performance
Output caching handled by ASP.NET
Cache API for explicit caching
Don’t use Session state unless you absolutely
have to (and in most cases, you don’t)
Store state in SQL Server for availability – it’s not
much slower than the out-of-process state server
Best Practices
Part II
Use Enterprise Templates that implement and
force good coding practices
Use .NET’s standard naming conventions
Use structured exception handling
Use Typed DataSets rather than “generic”
DataSets whenever possible
It’s not the ultimate panacea but it’s better than generic
DataSets for strong typing and IntelliSense
Session Summary
Migration
ASP -> ASP.NET
Visual Basic 6 -> Visual Basic .NET
COM -> .NET
Typing
Weak
Strong
Adapters
Web service
.NET Remoting
Best practices
For More Information…
MSDN® Web site at
msdn.microsoft.com
Visual Basic .NET Home Page
www.msdn.microsoft.com/vbasic/
Visual Basic .NET Migration
support.microsoft.com/default.aspx?ID
=FH;EN-US;vbdnmig
For More Information…
Migrating to ASP.NET: Key Considerations
other Web sites
msdn.microsoft.com/library/en-us/dnaspp/html/aspne
=true
Converting ASP to ASP.NET
msdn.microsoft.com/library/default.asp?url
=/library/en-us/
dndotnet/html/convertasptoaspnet.asp
MSDN
Essential Resources for Developers
Subscription Library, OS, Professional, Enterprise,
Services Universal Delivered via CD-ROM, DVD, Web
http://www.microsoft.com/usa/webcasts
MSDN Subscriptions
THE way to get Visual Studio .NET
Visual Studio .NET MSDN Subscriptions
Enterprise Architect
• Software and data modeling MSDN Universal
• Enterprise templates $2799 new
• Architectural guidance $2299 renewal/upgrade
Enterprise Developer
• Enterprise lifecycle tools MSDN Enterprise
• Team development support $2199 new
• Core .NET Enterprise $1599 renewal/upgrade
NEW
Servers
Professional
• Tools to build applications MSDN Professional
and XML Web services for $1199 new
Windows and the Web $899 renewal/upgrade
Where Can I Get MSDN?
Visit MSDN Online at
msdn.microsoft.com
Register for the MSDN Flash email
newsletter at
msdn.microsoft.com/flash
Become an MSDN CD subscriber at
®
msdn.microsoft.com/subscriptions
MSDN online seminars
msdn.microsoft.com/training/seminars
Attend more MSDN events
Microsoft Press
Essential Resources for Developers
www.microsoft.com/mspress
Become a Microsoft
Certified Solution Developer
What is MCSD?
Premium certification for professionals who design
and develop custom business solutions
How do I attain MCSD certification?
It requires passing four exams to prove
competency with Microsoft solution architecture,
desktop applications, distributed application
development, and development tools
Where do I get more information?
For more information about certification
requirements, exams, and training options,
visit www.microsoft.com/mcp
Training
Training Resources for Developers
Course title:
Course number:
Availability:
Detailed syllabus: www.microsoft.com/traincert
Course Title:
Course number:
Availability:
Detailed syllabus: www.microsoft.com/traincert