ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
From legacy to WPF/SLMigrating applications from Windows Form to WPF/SilverlightRaffaele Garofalo
Who am I?Raffaele GarofaloNET Software ArchitectMCP (MCAD, MCSD, MCTS)Blog: http://blog.raffaeu.comTwitter: @raffaeuCompany: Nephila Capital Ltd. (www.nephila.com) I am Italian, sorry for my bad English
My BooksMicrosoftAPRESS
SummaryReasons for migratingChoose the right technologyIs Windows Form dead?Choose the right architectureThe teamSome useful tools
Reasons for migratingLegacy application that requires refactoring (partial)Legacy application developed with a very old technology (FoxPro, VB6, ¡­) (re-write)Application that requires a more complex UI (User Interface) not sustainable with Windows Form (partial)Specific request from the Customer (at the end, he has the money ¡­)New project (never start a new project with an old technology!)
Always consider the budget!You do not need to re-write everything, you can keep the existing UI and migrate only the new featuresWindows Form can live in parallel with WPF/SLYou can host Windows Form in WPF (WindowsFormHost) and WPF in Windows Form (ElementHost) or SL in Windows Form (embed browser)
Is Windows Form dead?No, it is not. There are still thousands of active projects done in Windows FormWin Form is still the following step after VB6 WPF is not intended to replace Windows FormsIt is not dead but it is an old technology. It is still available It does not separate UI from code, I can¡¯t employ a designer for the UI
Choose the right technologyFirst rule: WPF is for Standalone, Silverlight is for Web, PhonesSecond rule: WPF works only on Windows OS, Silverlight works on Windows, MAC, LinuxThird rule: WPF is a more powerful technology, Silverlight uses a restricted version of the NET Framework but more feasible for Web and MediaWPF requires a knowledge of XAML for WPF, Silverlight requires XAML for SL, HTML and JS and WCF
What can I do with?WPFFull .NET Framework(i.e. Split() has 6 overrides)UI objects derives from Visual base classRouted events, more controlCryptography more powerfulNot a lot of choices for Media managementSILVERLIGHTRestricted version of .NET(i.e. Split() has 3 overrides)UI objects derives from ControlRouted events, less controlSL supports only 4 hash algorithmsGreat support to Media management and streaming
What Microsoft suggests? SLIf you're just starting out, and there's a question as to which technology to choose (Silverlight or WPF) then start with Silverlight. It is generally easier to move up to WPF from Silverlight than it is to move the other way. Silverlight has a smaller API, and is therefore generally considered easier to learn.If you need a desktop application with only basic system integration, consider building a Silverlight Out-of-Browser application. Silverlight 4 Trusted Applications with IDispatch support provide access to many system resources previously unavailable to web technologies.If you need deep system integration, excellent multi-touch support, device access, local resources, and all the other things that go with a solid desktop application, then consider moving up to WPF.If you're a C++ developer, you can choose to go with C++ and MFC, or use C++ with WPF on the front end, like the Expression team did.
Still missing ¡­WPFA good designer tool, VS is not cool as BlendThe Control toolkit is not exhaustive, you still need a third party control librarySilverlightSame thingInteraction with HTML and Javascript still lacks in some partsStill requires to recompile your .dlls
Composite FrameworksCreate an application using Modules (independent assemblies)Specialize teams in different areas (UI, Presentation, Business)Reusable architectureIncrease quality and usability by sharing common services and functionality
Composite for WPF/SLPrismRequires observer patterns (message broker)Cool navigation service in V4Only IoC with Unity (Microsoft)Astonishing resources and documentationcaliburnAuto-wiringTransitions between ViewsOpen source with less technology limitsAvailable also for Windows Phone
DemoWinForm demo application (MSDN, Telerik)WPF demo application (MSDN, Codeplex)Silverlight demo application (MSDN, Telerik)WPF showcasehttp://windowsclient.net/community/showcase.aspxSilverlight showcasehttp://www.silverlight.net/showcase/
Choose the right architectureLayered application or monolithic block?SOA or not SOA? If I work with Silverlight that¡¯s the only choice ¡­TDD or not TDD?What about an O/RM? Entity Framework, Nhibernate or what?What about security, especially if I am working with SL?Design patterns, is M-V-VM mandatory?
Layered application, why?Why should I use a layered application if it requires:More codeMore timeMore effortMore peopleMore money
Layered application, why?The application we are designing is complex or it will be complex in the futureI need to be able to make my application scalable, maintainable and secureI want to split the project over multiple teams and resourcesI need to recycle as many code/features as I canI need to cover with test as much surface as I can
Layered applications
SOA (Service Oriented Architecture)Real reasonsWe need to hide the datastore and the business logicI need to spread the business logic over different technologies (WPF, Phones, REST)I can¡¯t migrate everything (like AS400 ¡­) so I need a bridge between old/newDeveloper¡¯s reasonsI need to get certified on WCFIt is cool and I am the only one that doesn¡¯t use it yetI can write 10 times more code to do the same thing
TDD Overview
TDD Overview. A good unit test ¡­Run fast (they have short setups, run times, and break downs).Run in isolation (you should be able to reorder them).Use data that makes them easy to read and to understand.Use real data (e.g. copies of production data) when they need to.Represent one step towards your overall goal.
TDD Pros and ConsPROSIndicator of project¡¯s healthLess time to fix bugsYou should write application using functional codeGood documentation for you code by function/requirementsCONSOne change may requires more effort on fixing tests than fixing real codeTime to write testsYou may not always need to write applications using functional codeWrong test will document wrong requirement
O/RM, which one?Nhibernate, Entity Framework are free, others are notNhibernate is 100% flexible but no IDEEF has an IDE but is not flexibleNhibernate has years and is open sourceEF is still not mature and it is not open sourceNhibernate requires more experience, it is not for newbie
O/RMPROSYou are not anymore Database technology drivenWrite applications faster, do not need ton of SQLEasier to test the data layerCONSLess flexibility because you can¡¯t use all the power of a specific RDBMSDevs tend to forget T-SQL/PL-SQLThe database become a simple container of data, no more logic in it
Security real facts, did you know?Most developers have no clue about securityMost of the intranet applications are not secure at all, especially WinFormSOA implies an additional layer of securityThe database should also be encryptedA web application with ¡°secret¡± data should be always SSLThe NET framework provides tons of utilities and facilities to apply security
Security concerns for my applicationAuthentication, how the user will authenticate against the applicationAuthentication with SOAAuthorization, are we applying also granular security rights?Logging, do we know what is going on? Do we have a trace?Data protection, is security applied also at the data tier or do we use SA in SQL?
M-V-VM Overview
M-V-VM Main conceptsProvides separation of concernsIt is natural pattern for XAML platformsEnables the developer-designer workflowIncreases application testability
Resources on M-V-VMIn the Box Visual Studio integration (SEE DEMO)My BookGary McLean¡¯s bookPRISM documentationhttp://compositewpf.codeplex.com/Josh Smith http://joshsmithonwpf.wordpress.com/Karl Shiffletthttp://karlshifflett.wordpress.com/
The TeamHow big is the team I will work with?How much experience do they have?Guru | Some exp. | newbieWhat was their previous project? Do they know the difference between Client (WPF) and Web (SL)?Is there a technology leader in the Team with some experience?
The right oneNever put too many seniors: ¡°Too many cooks spoil the dinner¡±Never use big teams, lot of technical debates and few hours on writing code Put together devs that love the technology they are working with, negativity is a cancerTools make a developer life easier (documentation, books, controls, ¡­)
Make your life easierChoose a set of Controls, learn it and use it! Apply one pattern for the UI, learn it and use it. Do not ¡°experiment¡± with customer money, do what you know and avoid the unknownDo not over engineer, remember that the Customer can appreciate only what he can see ¡­ (a.k.a. no NASA web services)Small steps, small releases, small iterations
Some toolsBooksGuidanceBest practicesForums and Communities
BooksMy book ?Architecting Applications for the EnterprisePRISM¡¯s Developer Guide (MS PRESS)WPF 4 Unleashed (Adam Nathan)Silverlight 4 Unleashed (L. Bugnion)
GuidanceCodeplexhttp://wpfslguidance.codeplex.com/MSDN¡°Developers Guide to Microsoft PRISM¡±WPFhttp://windowsclient.netSilverlighthttp://silverlight.net
QA?

More Related Content

What's hot (13)

Btb017 David
Btb017 DavidBtb017 David
Btb017 David
Rohit Ray
?
Design Patterns : The Ultimate Blueprint for Software
Design Patterns : The Ultimate Blueprint for SoftwareDesign Patterns : The Ultimate Blueprint for Software
Design Patterns : The Ultimate Blueprint for Software
Edureka!
?
VSTO + LOB Apps
VSTO + LOB AppsVSTO + LOB Apps
VSTO + LOB Apps
Joao Livio
?
Installation of Silk Test Framework
Installation of Silk Test FrameworkInstallation of Silk Test Framework
Installation of Silk Test Framework
Burak AVCI, MEM, PSM I?
?
Stepin evening presented
Stepin evening presentedStepin evening presented
Stepin evening presented
Vijayan Reddy
?
Basic Java script handouts for students
Basic Java script handouts for students Basic Java script handouts for students
Basic Java script handouts for students
shafiq sangi
?
Lotus Framework
Lotus FrameworkLotus Framework
Lotus Framework
Todi Adiyatmo
?
Flash Development Guide
Flash Development GuideFlash Development Guide
Flash Development Guide
Stanley Fok
?
VSTO + LOB Apps Information Matters
VSTO + LOB Apps Information MattersVSTO + LOB Apps Information Matters
VSTO + LOB Apps Information Matters
Comunidade NetPonto
?
Professional PHP: an open-source alternative for enterprise development [Antw...
Professional PHP: an open-source alternative for enterprise development [Antw...Professional PHP: an open-source alternative for enterprise development [Antw...
Professional PHP: an open-source alternative for enterprise development [Antw...
Combell NV
?
The seven pillars of aspnet
The seven pillars of aspnetThe seven pillars of aspnet
The seven pillars of aspnet
Nethaji Naidu
?
Outsourcing php india
Outsourcing php indiaOutsourcing php india
Outsourcing php india
taishaaben
?
PHP framework difference
PHP framework differencePHP framework difference
PHP framework difference
iScripts
?
Design Patterns : The Ultimate Blueprint for Software
Design Patterns : The Ultimate Blueprint for SoftwareDesign Patterns : The Ultimate Blueprint for Software
Design Patterns : The Ultimate Blueprint for Software
Edureka!
?
Stepin evening presented
Stepin evening presentedStepin evening presented
Stepin evening presented
Vijayan Reddy
?
Basic Java script handouts for students
Basic Java script handouts for students Basic Java script handouts for students
Basic Java script handouts for students
shafiq sangi
?
Flash Development Guide
Flash Development GuideFlash Development Guide
Flash Development Guide
Stanley Fok
?
VSTO + LOB Apps Information Matters
VSTO + LOB Apps Information MattersVSTO + LOB Apps Information Matters
VSTO + LOB Apps Information Matters
Comunidade NetPonto
?
Professional PHP: an open-source alternative for enterprise development [Antw...
Professional PHP: an open-source alternative for enterprise development [Antw...Professional PHP: an open-source alternative for enterprise development [Antw...
Professional PHP: an open-source alternative for enterprise development [Antw...
Combell NV
?
The seven pillars of aspnet
The seven pillars of aspnetThe seven pillars of aspnet
The seven pillars of aspnet
Nethaji Naidu
?
Outsourcing php india
Outsourcing php indiaOutsourcing php india
Outsourcing php india
taishaaben
?
PHP framework difference
PHP framework differencePHP framework difference
PHP framework difference
iScripts
?

Similar to NET Event - Migrating WinForm (20)

Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Frank La Vigne
?
Afik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex IntroAfik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex Intro
Alphageeks
?
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentation
streambase
?
Lamp Zend Security
Lamp Zend SecurityLamp Zend Security
Lamp Zend Security
Ram Srivastava
?
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
Shean McManus
?
PHP and Silverlight
PHP and SilverlightPHP and Silverlight
PHP and Silverlight
Maarten Balliauw
?
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
dcoletta
?
WPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysWPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these days
Dave Bost
?
Building A Platform From Open Source At Yahoo
Building A Platform From Open Source At YahooBuilding A Platform From Open Source At Yahoo
Building A Platform From Open Source At Yahoo
Dustin Whittle
?
Windows Phone and Windows 8 application development
Windows Phone and Windows 8 application developmentWindows Phone and Windows 8 application development
Windows Phone and Windows 8 application development
Christos Matskas
?
Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)
dcoletta
?
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight Applications
Dave Allen
?
Web application framework
Web application frameworkWeb application framework
Web application framework
Pankaj Chand
?
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
Dave Bost
?
A Developer Day 2014 - Durban
A Developer Day 2014 - Durban A Developer Day 2014 - Durban
A Developer Day 2014 - Durban
Robert MacLean
?
XAML: One Language to Rule Them All
XAML: One Language to Rule Them AllXAML: One Language to Rule Them All
XAML: One Language to Rule Them All
Frank La Vigne
?
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb
?
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
Sean Coates
?
dot net
dot netdot net
dot net
sambhajimeher
?
The Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platformThe Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platform
Nuxeo
?
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Frank La Vigne
?
Afik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex IntroAfik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex Intro
Alphageeks
?
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentation
streambase
?
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
Shean McManus
?
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
dcoletta
?
WPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these daysWPF Applications, It's all about XAML these days
WPF Applications, It's all about XAML these days
Dave Bost
?
Building A Platform From Open Source At Yahoo
Building A Platform From Open Source At YahooBuilding A Platform From Open Source At Yahoo
Building A Platform From Open Source At Yahoo
Dustin Whittle
?
Windows Phone and Windows 8 application development
Windows Phone and Windows 8 application developmentWindows Phone and Windows 8 application development
Windows Phone and Windows 8 application development
Christos Matskas
?
Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)
dcoletta
?
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight Applications
Dave Allen
?
Web application framework
Web application frameworkWeb application framework
Web application framework
Pankaj Chand
?
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
Dave Bost
?
A Developer Day 2014 - Durban
A Developer Day 2014 - Durban A Developer Day 2014 - Durban
A Developer Day 2014 - Durban
Robert MacLean
?
XAML: One Language to Rule Them All
XAML: One Language to Rule Them AllXAML: One Language to Rule Them All
XAML: One Language to Rule Them All
Frank La Vigne
?
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb
?
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
Sean Coates
?
The Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platformThe Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platform
Nuxeo
?

Recently uploaded (20)

A General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithmsA General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithms
Buhwan Jeong
?
AI-Driven Digital Transformation Using Agentic AI
AI-Driven Digital Transformation Using Agentic AIAI-Driven Digital Transformation Using Agentic AI
AI-Driven Digital Transformation Using Agentic AI
Kris Verlaenen
?
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
Achieving Extreme Scale with ScyllaDB: Tips & TradeoffsAchieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
ScyllaDB
?
Build with AI on Google Cloud Session #5
Build with AI on Google Cloud Session #5Build with AI on Google Cloud Session #5
Build with AI on Google Cloud Session #5
Margaret Maynard-Reid
?
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI
?
I am afraid of no test! The power of BDD
I am afraid of no test! The power of BDDI am afraid of no test! The power of BDD
I am afraid of no test! The power of BDD
Ortus Solutions, Corp
?
Columbia Weather Systems - Product Overview
Columbia Weather Systems - Product OverviewColumbia Weather Systems - Product Overview
Columbia Weather Systems - Product Overview
Columbia Weather Systems
?
STARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to PonderSTARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to Ponder
anupriti
?
Rens van de Schoot - Mensen, machines en de zoektocht naar het laatste releva...
Rens van de Schoot - Mensen, machines en de zoektocht naar het laatste releva...Rens van de Schoot - Mensen, machines en de zoektocht naar het laatste releva...
Rens van de Schoot - Mensen, machines en de zoektocht naar het laatste releva...
voginip
?
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-WorldAll-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
Safe Software
?
Benefits of Moving Ellucian Banner to Oracle Cloud
Benefits of Moving Ellucian Banner to Oracle CloudBenefits of Moving Ellucian Banner to Oracle Cloud
Benefits of Moving Ellucian Banner to Oracle Cloud
AstuteBusiness
?
UiPath NY AI Series: Session 3: UiPath Autopilot for Everyone with Clipboard AI
UiPath NY AI Series: Session 3:  UiPath Autopilot for Everyone with Clipboard AIUiPath NY AI Series: Session 3:  UiPath Autopilot for Everyone with Clipboard AI
UiPath NY AI Series: Session 3: UiPath Autopilot for Everyone with Clipboard AI
DianaGray10
?
Recruiting Tech: A Look at Why AI is Actually OG
Recruiting Tech: A Look at Why AI is Actually OGRecruiting Tech: A Look at Why AI is Actually OG
Recruiting Tech: A Look at Why AI is Actually OG
Matt Charney
?
How AWS Encryption Key Options Impact Your Security and Compliance
How AWS Encryption Key Options Impact Your Security and ComplianceHow AWS Encryption Key Options Impact Your Security and Compliance
How AWS Encryption Key Options Impact Your Security and Compliance
Chris Bingham
?
UiPath Automation Developer Associate Training Series 2025 - Session 8
UiPath Automation Developer Associate Training Series 2025 - Session 8UiPath Automation Developer Associate Training Series 2025 - Session 8
UiPath Automation Developer Associate Training Series 2025 - Session 8
DianaGray10
?
When Platform Engineers meet SREs - The Birth of O11y-as-a-Service Superpowers
When Platform Engineers meet SREs - The Birth of O11y-as-a-Service SuperpowersWhen Platform Engineers meet SREs - The Birth of O11y-as-a-Service Superpowers
When Platform Engineers meet SREs - The Birth of O11y-as-a-Service Superpowers
Eric D. Schabell
?
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN NB-IoT LTE cat.M1ÉÌÆ·¥ê¥¹¥È
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN  NB-IoT  LTE cat.M1ÉÌÆ·¥ê¥¹¥ÈDragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN  NB-IoT  LTE cat.M1ÉÌÆ·¥ê¥¹¥È
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN NB-IoT LTE cat.M1ÉÌÆ·¥ê¥¹¥È
CRI Japan, Inc.
?
UiPath NY AI Series: Session 4: UiPath AutoPilot for Developers using Studio Web
UiPath NY AI Series: Session 4: UiPath AutoPilot for Developers using Studio WebUiPath NY AI Series: Session 4: UiPath AutoPilot for Developers using Studio Web
UiPath NY AI Series: Session 4: UiPath AutoPilot for Developers using Studio Web
DianaGray10
?
Presentation Session 2 -Context Grounding.pdf
Presentation Session 2 -Context Grounding.pdfPresentation Session 2 -Context Grounding.pdf
Presentation Session 2 -Context Grounding.pdf
Mukesh Kala
?
The Rise of AI Agents-From Automation to Autonomous Technology
The Rise of AI Agents-From Automation to Autonomous TechnologyThe Rise of AI Agents-From Automation to Autonomous Technology
The Rise of AI Agents-From Automation to Autonomous Technology
Impelsys Inc.
?
A General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithmsA General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithms
Buhwan Jeong
?
AI-Driven Digital Transformation Using Agentic AI
AI-Driven Digital Transformation Using Agentic AIAI-Driven Digital Transformation Using Agentic AI
AI-Driven Digital Transformation Using Agentic AI
Kris Verlaenen
?
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
Achieving Extreme Scale with ScyllaDB: Tips & TradeoffsAchieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
ScyllaDB
?
Build with AI on Google Cloud Session #5
Build with AI on Google Cloud Session #5Build with AI on Google Cloud Session #5
Build with AI on Google Cloud Session #5
Margaret Maynard-Reid
?
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI: How Much Does an XXX AI Porn Generator Cost in 2025
Sugarlab AI
?
I am afraid of no test! The power of BDD
I am afraid of no test! The power of BDDI am afraid of no test! The power of BDD
I am afraid of no test! The power of BDD
Ortus Solutions, Corp
?
STARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to PonderSTARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to Ponder
anupriti
?
Rens van de Schoot - Mensen, machines en de zoektocht naar het laatste releva...
Rens van de Schoot - Mensen, machines en de zoektocht naar het laatste releva...Rens van de Schoot - Mensen, machines en de zoektocht naar het laatste releva...
Rens van de Schoot - Mensen, machines en de zoektocht naar het laatste releva...
voginip
?
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-WorldAll-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
Safe Software
?
Benefits of Moving Ellucian Banner to Oracle Cloud
Benefits of Moving Ellucian Banner to Oracle CloudBenefits of Moving Ellucian Banner to Oracle Cloud
Benefits of Moving Ellucian Banner to Oracle Cloud
AstuteBusiness
?
UiPath NY AI Series: Session 3: UiPath Autopilot for Everyone with Clipboard AI
UiPath NY AI Series: Session 3:  UiPath Autopilot for Everyone with Clipboard AIUiPath NY AI Series: Session 3:  UiPath Autopilot for Everyone with Clipboard AI
UiPath NY AI Series: Session 3: UiPath Autopilot for Everyone with Clipboard AI
DianaGray10
?
Recruiting Tech: A Look at Why AI is Actually OG
Recruiting Tech: A Look at Why AI is Actually OGRecruiting Tech: A Look at Why AI is Actually OG
Recruiting Tech: A Look at Why AI is Actually OG
Matt Charney
?
How AWS Encryption Key Options Impact Your Security and Compliance
How AWS Encryption Key Options Impact Your Security and ComplianceHow AWS Encryption Key Options Impact Your Security and Compliance
How AWS Encryption Key Options Impact Your Security and Compliance
Chris Bingham
?
UiPath Automation Developer Associate Training Series 2025 - Session 8
UiPath Automation Developer Associate Training Series 2025 - Session 8UiPath Automation Developer Associate Training Series 2025 - Session 8
UiPath Automation Developer Associate Training Series 2025 - Session 8
DianaGray10
?
When Platform Engineers meet SREs - The Birth of O11y-as-a-Service Superpowers
When Platform Engineers meet SREs - The Birth of O11y-as-a-Service SuperpowersWhen Platform Engineers meet SREs - The Birth of O11y-as-a-Service Superpowers
When Platform Engineers meet SREs - The Birth of O11y-as-a-Service Superpowers
Eric D. Schabell
?
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN NB-IoT LTE cat.M1ÉÌÆ·¥ê¥¹¥È
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN  NB-IoT  LTE cat.M1ÉÌÆ·¥ê¥¹¥ÈDragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN  NB-IoT  LTE cat.M1ÉÌÆ·¥ê¥¹¥È
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN NB-IoT LTE cat.M1ÉÌÆ·¥ê¥¹¥È
CRI Japan, Inc.
?
UiPath NY AI Series: Session 4: UiPath AutoPilot for Developers using Studio Web
UiPath NY AI Series: Session 4: UiPath AutoPilot for Developers using Studio WebUiPath NY AI Series: Session 4: UiPath AutoPilot for Developers using Studio Web
UiPath NY AI Series: Session 4: UiPath AutoPilot for Developers using Studio Web
DianaGray10
?
Presentation Session 2 -Context Grounding.pdf
Presentation Session 2 -Context Grounding.pdfPresentation Session 2 -Context Grounding.pdf
Presentation Session 2 -Context Grounding.pdf
Mukesh Kala
?
The Rise of AI Agents-From Automation to Autonomous Technology
The Rise of AI Agents-From Automation to Autonomous TechnologyThe Rise of AI Agents-From Automation to Autonomous Technology
The Rise of AI Agents-From Automation to Autonomous Technology
Impelsys Inc.
?

NET Event - Migrating WinForm

  • 1. From legacy to WPF/SLMigrating applications from Windows Form to WPF/SilverlightRaffaele Garofalo
  • 2. Who am I?Raffaele GarofaloNET Software ArchitectMCP (MCAD, MCSD, MCTS)Blog: http://blog.raffaeu.comTwitter: @raffaeuCompany: Nephila Capital Ltd. (www.nephila.com) I am Italian, sorry for my bad English
  • 4. SummaryReasons for migratingChoose the right technologyIs Windows Form dead?Choose the right architectureThe teamSome useful tools
  • 5. Reasons for migratingLegacy application that requires refactoring (partial)Legacy application developed with a very old technology (FoxPro, VB6, ¡­) (re-write)Application that requires a more complex UI (User Interface) not sustainable with Windows Form (partial)Specific request from the Customer (at the end, he has the money ¡­)New project (never start a new project with an old technology!)
  • 6. Always consider the budget!You do not need to re-write everything, you can keep the existing UI and migrate only the new featuresWindows Form can live in parallel with WPF/SLYou can host Windows Form in WPF (WindowsFormHost) and WPF in Windows Form (ElementHost) or SL in Windows Form (embed browser)
  • 7. Is Windows Form dead?No, it is not. There are still thousands of active projects done in Windows FormWin Form is still the following step after VB6 WPF is not intended to replace Windows FormsIt is not dead but it is an old technology. It is still available It does not separate UI from code, I can¡¯t employ a designer for the UI
  • 8. Choose the right technologyFirst rule: WPF is for Standalone, Silverlight is for Web, PhonesSecond rule: WPF works only on Windows OS, Silverlight works on Windows, MAC, LinuxThird rule: WPF is a more powerful technology, Silverlight uses a restricted version of the NET Framework but more feasible for Web and MediaWPF requires a knowledge of XAML for WPF, Silverlight requires XAML for SL, HTML and JS and WCF
  • 9. What can I do with?WPFFull .NET Framework(i.e. Split() has 6 overrides)UI objects derives from Visual base classRouted events, more controlCryptography more powerfulNot a lot of choices for Media managementSILVERLIGHTRestricted version of .NET(i.e. Split() has 3 overrides)UI objects derives from ControlRouted events, less controlSL supports only 4 hash algorithmsGreat support to Media management and streaming
  • 10. What Microsoft suggests? SLIf you're just starting out, and there's a question as to which technology to choose (Silverlight or WPF) then start with Silverlight. It is generally easier to move up to WPF from Silverlight than it is to move the other way. Silverlight has a smaller API, and is therefore generally considered easier to learn.If you need a desktop application with only basic system integration, consider building a Silverlight Out-of-Browser application. Silverlight 4 Trusted Applications with IDispatch support provide access to many system resources previously unavailable to web technologies.If you need deep system integration, excellent multi-touch support, device access, local resources, and all the other things that go with a solid desktop application, then consider moving up to WPF.If you're a C++ developer, you can choose to go with C++ and MFC, or use C++ with WPF on the front end, like the Expression team did.
  • 11. Still missing ¡­WPFA good designer tool, VS is not cool as BlendThe Control toolkit is not exhaustive, you still need a third party control librarySilverlightSame thingInteraction with HTML and Javascript still lacks in some partsStill requires to recompile your .dlls
  • 12. Composite FrameworksCreate an application using Modules (independent assemblies)Specialize teams in different areas (UI, Presentation, Business)Reusable architectureIncrease quality and usability by sharing common services and functionality
  • 13. Composite for WPF/SLPrismRequires observer patterns (message broker)Cool navigation service in V4Only IoC with Unity (Microsoft)Astonishing resources and documentationcaliburnAuto-wiringTransitions between ViewsOpen source with less technology limitsAvailable also for Windows Phone
  • 14. DemoWinForm demo application (MSDN, Telerik)WPF demo application (MSDN, Codeplex)Silverlight demo application (MSDN, Telerik)WPF showcasehttp://windowsclient.net/community/showcase.aspxSilverlight showcasehttp://www.silverlight.net/showcase/
  • 15. Choose the right architectureLayered application or monolithic block?SOA or not SOA? If I work with Silverlight that¡¯s the only choice ¡­TDD or not TDD?What about an O/RM? Entity Framework, Nhibernate or what?What about security, especially if I am working with SL?Design patterns, is M-V-VM mandatory?
  • 16. Layered application, why?Why should I use a layered application if it requires:More codeMore timeMore effortMore peopleMore money
  • 17. Layered application, why?The application we are designing is complex or it will be complex in the futureI need to be able to make my application scalable, maintainable and secureI want to split the project over multiple teams and resourcesI need to recycle as many code/features as I canI need to cover with test as much surface as I can
  • 19. SOA (Service Oriented Architecture)Real reasonsWe need to hide the datastore and the business logicI need to spread the business logic over different technologies (WPF, Phones, REST)I can¡¯t migrate everything (like AS400 ¡­) so I need a bridge between old/newDeveloper¡¯s reasonsI need to get certified on WCFIt is cool and I am the only one that doesn¡¯t use it yetI can write 10 times more code to do the same thing
  • 21. TDD Overview. A good unit test ¡­Run fast (they have short setups, run times, and break downs).Run in isolation (you should be able to reorder them).Use data that makes them easy to read and to understand.Use real data (e.g. copies of production data) when they need to.Represent one step towards your overall goal.
  • 22. TDD Pros and ConsPROSIndicator of project¡¯s healthLess time to fix bugsYou should write application using functional codeGood documentation for you code by function/requirementsCONSOne change may requires more effort on fixing tests than fixing real codeTime to write testsYou may not always need to write applications using functional codeWrong test will document wrong requirement
  • 23. O/RM, which one?Nhibernate, Entity Framework are free, others are notNhibernate is 100% flexible but no IDEEF has an IDE but is not flexibleNhibernate has years and is open sourceEF is still not mature and it is not open sourceNhibernate requires more experience, it is not for newbie
  • 24. O/RMPROSYou are not anymore Database technology drivenWrite applications faster, do not need ton of SQLEasier to test the data layerCONSLess flexibility because you can¡¯t use all the power of a specific RDBMSDevs tend to forget T-SQL/PL-SQLThe database become a simple container of data, no more logic in it
  • 25. Security real facts, did you know?Most developers have no clue about securityMost of the intranet applications are not secure at all, especially WinFormSOA implies an additional layer of securityThe database should also be encryptedA web application with ¡°secret¡± data should be always SSLThe NET framework provides tons of utilities and facilities to apply security
  • 26. Security concerns for my applicationAuthentication, how the user will authenticate against the applicationAuthentication with SOAAuthorization, are we applying also granular security rights?Logging, do we know what is going on? Do we have a trace?Data protection, is security applied also at the data tier or do we use SA in SQL?
  • 28. M-V-VM Main conceptsProvides separation of concernsIt is natural pattern for XAML platformsEnables the developer-designer workflowIncreases application testability
  • 29. Resources on M-V-VMIn the Box Visual Studio integration (SEE DEMO)My BookGary McLean¡¯s bookPRISM documentationhttp://compositewpf.codeplex.com/Josh Smith http://joshsmithonwpf.wordpress.com/Karl Shiffletthttp://karlshifflett.wordpress.com/
  • 30. The TeamHow big is the team I will work with?How much experience do they have?Guru | Some exp. | newbieWhat was their previous project? Do they know the difference between Client (WPF) and Web (SL)?Is there a technology leader in the Team with some experience?
  • 31. The right oneNever put too many seniors: ¡°Too many cooks spoil the dinner¡±Never use big teams, lot of technical debates and few hours on writing code Put together devs that love the technology they are working with, negativity is a cancerTools make a developer life easier (documentation, books, controls, ¡­)
  • 32. Make your life easierChoose a set of Controls, learn it and use it! Apply one pattern for the UI, learn it and use it. Do not ¡°experiment¡± with customer money, do what you know and avoid the unknownDo not over engineer, remember that the Customer can appreciate only what he can see ¡­ (a.k.a. no NASA web services)Small steps, small releases, small iterations
  • 34. BooksMy book ?Architecting Applications for the EnterprisePRISM¡¯s Developer Guide (MS PRESS)WPF 4 Unleashed (Adam Nathan)Silverlight 4 Unleashed (L. Bugnion)
  • 35. GuidanceCodeplexhttp://wpfslguidance.codeplex.com/MSDN¡°Developers Guide to Microsoft PRISM¡±WPFhttp://windowsclient.netSilverlighthttp://silverlight.net
  • 36. QA?

Editor's Notes

  • #2: Topics that we will analyze in this workshop:Why we want to migrate an application? Do we really need to?Why we should use one technology instead of another one? Silverlight, WPF, what else?Is Windows Form dead? What about SL?Why we should choose one design instead of another one? Should I use an O/RM, shouldn¡¯t I? Should I use SOA, shouldn¡¯t I?Is my team ready for a new technology? If it¡¯s not ready, what should I do?Some useful tools and links
  • #3: Who I am, what is my experience and my backgroundHow you can reach me, what I write in my blogWhere I work, what do I do thereDifferences between software developer and architect
  • #4: Why two different booksWhat do I talk about in the microsoft book?LayeringDesign patternsDALDDDTDDBLLMVVMWhat in the second one?WPFLayeringBlendEntity FrameworkWCFStylesDataTemplate
  • #5: Topics that we will analyze in this workshop:Why we want to migrate an application? Do we really need to?Why we should use one technology instead of another one? Silverlight, WPF, what else?Is Windows Form dead? What about SL?Why we should choose one design instead of another one? Should I use an O/RM, shouldn¡¯t I? Should I use SOA, shouldn¡¯t I?Is my team ready for a new technology? If it¡¯s not ready, what should I do?Some useful tools and links
  • #6: I have a legacy application in Windows Form and I do not have the time to migrate or change itso it would be easier to add an additional component or module in WPF/SL and leave the old application as isI have a very old application that can¡¯t be kept alive as is, so I need to re-write itThe technology I am using, like Windows Form, has some big limits and I can¡¯t go over these limitsThe Customer wants an application using a new technology because it will guarantee a more durable lifeWhy should I use an old technology with a new project?
  • #7: Remember that the budget if fundamental. I can¡¯t invest 6 months for an application that is already working just because I want to move into a new technology. The customer will not understand this business decision. I need to provide a real reason.Microsoft has designed WPF and SL and Windows Form in a way that the compatibility will be kept alive. This was the first target and this is the reason there isn¡¯t an official tool to migrate from Win Form to WPF. You simply do not need it!
  • #8: There are tons of active projects written in Windows Form, in C++ and of course Microsoft can¡¯t get rid of sucha technology in one shotRemember about VB6 to NET 2003If you were working with VBx before, Win Form is the natural next move. Same IDE, same way of handling methods, eventsJust more OOPIt is not dead but it won¡¯t work forever. Consider what happened to Windows Phone. Windows CE 6 is not dead but the new phones will work on WP7 (Silverlight)Windows Form runs on Windows 7 but rumors say that in the future only WPF and SL will run on the next versions of Windows (they are rumors)At the PDC 2010 Microsoft didn¡¯t talk at all about Windows Form. Guess why?It is an old technology and if you move to WPF you will have tons of advantages, right away
  • #9: Standalone means that it runs on a Client, it doesn¡¯t need necessarily a web connection andit doesn¡¯t need a browser and so on ¡­ Less security implied because it doesn¡¯t use the internet. Less portable ¡­SL is designed for the web and WP7 for the phones. SO different technology for different audience!WPF is a Windows technology while Silverlight is cross platform, cross device but with some limitationsWPF is more powerful but Silverlight is more feasible for Web and MediaWPF is for core developers, Silverlight is for web developers because it is a web technology
  • #15: Some demo with Windows Form. The UI loads slower because it takes more timeSome demo with WPF, better UI but more CPU usageSome silvelright demo, good but on IE they looks different than in chromeSHOW INSTALL SL LOCALLYSHOW WPF and SL showcases
  • #16: Should I stick the code inside the WPF view or should I use a layered architectureWhen it is the case of working with SOA, when it is not the caseTest Driven is a waste of time or it is notWhat are the advantages of using an O/RM and why we should use itWhat are the considerations about security that I should do especially with Silverlight and SOAAre design patterns mandatory?