SlideShare a Scribd company logo
1 of 51
 
Silverlight 2 for Developers Jonas Follesø Senior Consultant Capgemini Session Code: WEB304
 
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dive Log App
Outside data Public Internet mashup APIs Existing Intranet services New services you build RSS/Atom Feeds Images Sounds Videos
A bit of history: Silverlight 1 JavaScript HTML ? AJAX  (XmlHttpRequest) 1.0 <XAML/> Public Internet mashup APIs Existing Intranet services New services you build RSS/Atom Feeds Images Sounds Videos
Today: Silverlight 2 2 Managed Code (C#/VB) HTML Public Int e rnet mashup APIs Existing Intr a net services New services you build RSS/Atom Feeds Images Sounds Videos
Services that describe themselves Computer-Readable Metadata (e.g. WSDL) Automatic Proxy Generation WCF SOAP services in the enterprise Services for  your Silverlight project ADO.NET  Data Services SOAP  services on the Internet
Securing Silverlight Services Silverlight will use auth. info in the browser HTML E.g.: ASP.NET  Login User: Password : Credentials Auth info (e.g. cookie) Service calls + Auth info Silverlight code does not normally deal with credentials… DiveLog.com …/Login.aspx ../MyApp.aspx ../MyService.svc
HTTP Requests in Silverlight HttpWebRequest High-level components and User Code Browser Plugin APIs Web Browser - Cookies - Authenticated sessions - Caching - Proxy server to use Windows/Mac Networking Layer Restrictions Restrictions
Blend – The dark is not that scary…
Dive Log UI and Data
Everything in code behind …is probably not a good idea
A team of sad coders and designers
 
Different people reading about MVC in different places take different ideas from it and describe these as “MVC”. Martin Fowler, GUI Architectures Essay
Separated Presentation Patterns
Data & Domain Logic (Model) UI (View) Interaction  (Controller/Presenter)
Represent the  state  and  behavior  of the presentation  independently  of the GUI controls used in the interface. Martin Fowler, Presentation Model Essay
Makes your app easier to design …makes the designers like you
Everything in code-behind Data Model View XAML Code-Behind Event Handlers
Presentation Model Change notification Data-binding and commands Data Model View XAML Code-Behind Presentation Model State + Operations
Dive Log Presentation Model Change notification Data-binding and commands Dive Log Service Dive Log XAML Code-Behind Dive Log View Model State + Operations
Data Binding ,[object Object],View < ListBox   ItemsSource =&quot;{Binding Path=Dives}&quot; SelectedItem =&quot;{Binding Path=SelectedDive, Mode=TwoWay}&quot; /> Presentation Model State + Operations
Data Binding ,[object Object],View XAML Code-Behind Presentation Model public class   PageViewModel  :  INotifyPropertyChanged { public event   PropertyChangedEventHandler  PropertyChanged; public   ObservableCollection < Dive > Dives { ... } public   Dive  SelectedDive { ... } }
IValueConverter ,[object Object],[object Object],public object   Convert( object , value,  Type  targetType,  object  parameter,  CultureInfo  culture) { int  temp = System. Convert .ToInt32(value); Color  color =  Colors .Black; if (temp < 5) color =  Colors .Blue; else if (temp < 20) color =  Colors .Yellow; else  color =  Colors .Red; return new   SolidColorBrush (color); } View < UserControl.Resources > < demo:ColorConverter   x:Key =&quot;colorConverter&quot; /> </ UserControl.Resources > < TextBox   Text =&quot;{Binding Temperature, Mode=TwoWay}&quot;  Background =&quot;{Binding Temperature, Converter={StaticResource colorConverter}}&quot;/>
Building a Presentation Model
User Interaction ,[object Object],View private void  btnSave_Clicked( object  sender,  ExecutedEventArgs  e) { (( PageViewModel )DataContext).Save(); }
Objects are used to represent actions.  A command object  encapsulates  an action and its parameters.  This allows a  decoupling  of the  invoker  of the command and the  handlers  of the command.
Commands in Silverlight View < Button Content =&quot;Save Dives&quot; input:CommandService.Command =&quot;SaveDives&quot; /> Presentation Model public  PageViewModel() { Commands .SaveDives.Executed += new  EventHandler < ExecutedEventArgs >(SaveDives); } private void  SaveDives( object  sender,  ExecutedEventArgs  e) { // code to save dives.. }
The  strategy pattern  is a software design pattern, whereby algorithms can be selected  at runtime . Presentation Model public  PageViewModel() { if ( HtmlPage .IsEnabled) { client =  new   DiveLogServiceClient (); } else { client =  new   ServiceStub (); } }
 
 
Dealing with dependencies ,[object Object],[object Object],[object Object],[object Object]
Dependency Injection (DI) ,[object Object],[object Object],[object Object],Presentation Model public  PageViewModel( IDiveLogServiceClient  proxy) { this. proxy = proxy }
Dependency Injection by hand ,[object Object],View public  Page() { InitializeComponent(); if  ( HtmlPage .IsEnabled) this .DataContext =  new   PageViewModel ( new   DiveLogServiceClient ()); else this .DataContext =  new   PageViewModel ( new   ServiceStub ()); }
IoC Containers Presentation Model [ Inject ] public  PageViewModel( IDiveLogServiceClient  proxy) { this. proxy = proxy } View public  Page() { InitializeComponent(); IKernel  iocContainer =  new   StandardKernel (); this .DataContext = iocContainer.Get< PageViewModel >(); }
IoC Containers ,[object Object],[object Object],View < UserControl.DataContext > < dive:PageViewModel  /> </ UserControl.DataContext >
Using DI on the ViewModel
Testing is important!
Testing Silverlight Code ,[object Object],[object Object],[object Object],[object Object],[object Object]
Asynchronous Tests ,[object Object]
Unit Testing in Silverlight
 
Resources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Related Content ,[object Object],[object Object],[object Object],[object Object]
Track Resources ,[object Object],[object Object]
Please complete an evaluation
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Photo Copyright Notices ,[object Object],[object Object]

More Related Content

What's hot

Introduction to OO, Java and Eclipse/WebSphere
Introduction to OO, Java and Eclipse/WebSphereIntroduction to OO, Java and Eclipse/WebSphere
Introduction to OO, Java and Eclipse/WebSphereeLink Business Innovations
 
.NET Portfolio
.NET Portfolio.NET Portfolio
.NET Portfoliomwillmer
 
ASPNET_MVC_Tutorial_06_CS
ASPNET_MVC_Tutorial_06_CSASPNET_MVC_Tutorial_06_CS
ASPNET_MVC_Tutorial_06_CStutorialsruby
 
Angular Interview Questions & Answers
Angular Interview Questions & AnswersAngular Interview Questions & Answers
Angular Interview Questions & AnswersRatnala Charan kumar
 
Joel Landis Net Portfolio
Joel Landis Net PortfolioJoel Landis Net Portfolio
Joel Landis Net Portfoliojlshare
 
Wiesław Kałkus: C# functional programming
Wiesław Kałkus: C# functional programmingWiesław Kałkus: C# functional programming
Wiesław Kałkus: C# functional programmingAnalyticsConf
 
Groovy in SOAP UI
Groovy in SOAP UIGroovy in SOAP UI
Groovy in SOAP UIravireddy76
 
Asp.net mvc training
Asp.net mvc trainingAsp.net mvc training
Asp.net mvc trainingicubesystem
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questionsGoa App
 
Quick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview QuestionsQuick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview QuestionsLuis Martín Espino Rivera
 
Frank Mantek Google G Data
Frank Mantek Google G DataFrank Mantek Google G Data
Frank Mantek Google G Datadeimos
 
Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfacesdeimos
 
Functional programming in C#
Functional programming in C#Functional programming in C#
Functional programming in C#Thomas Jaskula
 
Developing ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller PatternDeveloping ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller Patterngoodfriday
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development GuideNitin Giri
 
Correlation id token in share point 2010
Correlation id token in share point 2010Correlation id token in share point 2010
Correlation id token in share point 2010UGAIA
 

What's hot (18)

Introduction to OO, Java and Eclipse/WebSphere
Introduction to OO, Java and Eclipse/WebSphereIntroduction to OO, Java and Eclipse/WebSphere
Introduction to OO, Java and Eclipse/WebSphere
 
.NET Portfolio
.NET Portfolio.NET Portfolio
.NET Portfolio
 
ASPNET_MVC_Tutorial_06_CS
ASPNET_MVC_Tutorial_06_CSASPNET_MVC_Tutorial_06_CS
ASPNET_MVC_Tutorial_06_CS
 
Angular Interview Questions & Answers
Angular Interview Questions & AnswersAngular Interview Questions & Answers
Angular Interview Questions & Answers
 
Joel Landis Net Portfolio
Joel Landis Net PortfolioJoel Landis Net Portfolio
Joel Landis Net Portfolio
 
Wiesław Kałkus: C# functional programming
Wiesław Kałkus: C# functional programmingWiesław Kałkus: C# functional programming
Wiesław Kałkus: C# functional programming
 
Flex in portal
Flex in portalFlex in portal
Flex in portal
 
Groovy in SOAP UI
Groovy in SOAP UIGroovy in SOAP UI
Groovy in SOAP UI
 
Asp.net mvc training
Asp.net mvc trainingAsp.net mvc training
Asp.net mvc training
 
Angular interview questions
Angular interview questionsAngular interview questions
Angular interview questions
 
Quick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview QuestionsQuick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview Questions
 
Frank Mantek Google G Data
Frank Mantek Google G DataFrank Mantek Google G Data
Frank Mantek Google G Data
 
Udi Dahan Intentions And Interfaces
Udi Dahan Intentions And InterfacesUdi Dahan Intentions And Interfaces
Udi Dahan Intentions And Interfaces
 
Functional programming in C#
Functional programming in C#Functional programming in C#
Functional programming in C#
 
Asp.NET MVC
Asp.NET MVCAsp.NET MVC
Asp.NET MVC
 
Developing ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller PatternDeveloping ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller Pattern
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
 
Correlation id token in share point 2010
Correlation id token in share point 2010Correlation id token in share point 2010
Correlation id token in share point 2010
 

Viewers also liked

TechEd Australia - OFC102 - Productivity for the ITPro
TechEd Australia - OFC102 - Productivity for the ITProTechEd Australia - OFC102 - Productivity for the ITPro
TechEd Australia - OFC102 - Productivity for the ITProPaul Woods
 
TechEd NZ 2014: Intelligent Systems Service - Concept, Code and Demo
TechEd NZ 2014: Intelligent Systems Service - Concept, Code and DemoTechEd NZ 2014: Intelligent Systems Service - Concept, Code and Demo
TechEd NZ 2014: Intelligent Systems Service - Concept, Code and DemoIntergen
 
SAP TechED Las Vegas 2016- OEM Partnesr SAP HANA Platform Agenda
SAP TechED Las Vegas 2016- OEM Partnesr SAP HANA Platform Agenda SAP TechED Las Vegas 2016- OEM Partnesr SAP HANA Platform Agenda
SAP TechED Las Vegas 2016- OEM Partnesr SAP HANA Platform Agenda Shivakumar Vishwanath
 
Data Driven Organization
Data Driven OrganizationData Driven Organization
Data Driven OrganizationBilot
 
Devising Your Data Movement Strategy for IoT
Devising Your Data Movement Strategy for IoTDevising Your Data Movement Strategy for IoT
Devising Your Data Movement Strategy for IoTSolace
 
SCOM-网络分享课模板-APS-20161026-A
SCOM-网络分享课模板-APS-20161026-ASCOM-网络分享课模板-APS-20161026-A
SCOM-网络分享课模板-APS-20161026-ARalph Yin
 
Proof of concepts and use cases with IoT technologies
Proof of concepts and use cases with IoT technologiesProof of concepts and use cases with IoT technologies
Proof of concepts and use cases with IoT technologiesHeikki Ailisto
 
Webinar - Transforming Manufacturing with IoT
Webinar - Transforming Manufacturing with IoTWebinar - Transforming Manufacturing with IoT
Webinar - Transforming Manufacturing with IoTHARMAN Services
 
The Internet of Things: Exploring revenue generating use cases
The Internet of Things: Exploring revenue generating use casesThe Internet of Things: Exploring revenue generating use cases
The Internet of Things: Exploring revenue generating use casesDeloitte United States
 
IOT and Big Data - The Perfect Marriage
IOT and Big Data - The Perfect MarriageIOT and Big Data - The Perfect Marriage
IOT and Big Data - The Perfect MarriageDr. Mazlan Abbas
 
Internet of Things and Big Data: Vision and Concrete Use Cases
Internet of Things and Big Data: Vision and Concrete Use CasesInternet of Things and Big Data: Vision and Concrete Use Cases
Internet of Things and Big Data: Vision and Concrete Use CasesMongoDB
 
IoT Meets Big Data: The Opportunities and Challenges by Syed Hoda of ParStream
IoT Meets Big Data: The Opportunities and Challenges by Syed Hoda of ParStreamIoT Meets Big Data: The Opportunities and Challenges by Syed Hoda of ParStream
IoT Meets Big Data: The Opportunities and Challenges by Syed Hoda of ParStreamgogo6
 
101 Use Cases for IoT
101 Use Cases for IoT101 Use Cases for IoT
101 Use Cases for IoTCisco Canada
 
Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)
Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)
Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)Étienne Garbugli
 

Viewers also liked (16)

TechEd Australia - OFC102 - Productivity for the ITPro
TechEd Australia - OFC102 - Productivity for the ITProTechEd Australia - OFC102 - Productivity for the ITPro
TechEd Australia - OFC102 - Productivity for the ITPro
 
TechEd NZ 2014: Intelligent Systems Service - Concept, Code and Demo
TechEd NZ 2014: Intelligent Systems Service - Concept, Code and DemoTechEd NZ 2014: Intelligent Systems Service - Concept, Code and Demo
TechEd NZ 2014: Intelligent Systems Service - Concept, Code and Demo
 
SAP TechED Las Vegas 2016- OEM Partnesr SAP HANA Platform Agenda
SAP TechED Las Vegas 2016- OEM Partnesr SAP HANA Platform Agenda SAP TechED Las Vegas 2016- OEM Partnesr SAP HANA Platform Agenda
SAP TechED Las Vegas 2016- OEM Partnesr SAP HANA Platform Agenda
 
Data Driven Organization
Data Driven OrganizationData Driven Organization
Data Driven Organization
 
Devising Your Data Movement Strategy for IoT
Devising Your Data Movement Strategy for IoTDevising Your Data Movement Strategy for IoT
Devising Your Data Movement Strategy for IoT
 
Wroclaw SAP Meetup - 2016/10
Wroclaw SAP Meetup - 2016/10Wroclaw SAP Meetup - 2016/10
Wroclaw SAP Meetup - 2016/10
 
SCOM-网络分享课模板-APS-20161026-A
SCOM-网络分享课模板-APS-20161026-ASCOM-网络分享课模板-APS-20161026-A
SCOM-网络分享课模板-APS-20161026-A
 
Proof of concepts and use cases with IoT technologies
Proof of concepts and use cases with IoT technologiesProof of concepts and use cases with IoT technologies
Proof of concepts and use cases with IoT technologies
 
Webinar - Transforming Manufacturing with IoT
Webinar - Transforming Manufacturing with IoTWebinar - Transforming Manufacturing with IoT
Webinar - Transforming Manufacturing with IoT
 
Intelligent Manufacturing - A Smart Choice
Intelligent Manufacturing  - A Smart ChoiceIntelligent Manufacturing  - A Smart Choice
Intelligent Manufacturing - A Smart Choice
 
The Internet of Things: Exploring revenue generating use cases
The Internet of Things: Exploring revenue generating use casesThe Internet of Things: Exploring revenue generating use cases
The Internet of Things: Exploring revenue generating use cases
 
IOT and Big Data - The Perfect Marriage
IOT and Big Data - The Perfect MarriageIOT and Big Data - The Perfect Marriage
IOT and Big Data - The Perfect Marriage
 
Internet of Things and Big Data: Vision and Concrete Use Cases
Internet of Things and Big Data: Vision and Concrete Use CasesInternet of Things and Big Data: Vision and Concrete Use Cases
Internet of Things and Big Data: Vision and Concrete Use Cases
 
IoT Meets Big Data: The Opportunities and Challenges by Syed Hoda of ParStream
IoT Meets Big Data: The Opportunities and Challenges by Syed Hoda of ParStreamIoT Meets Big Data: The Opportunities and Challenges by Syed Hoda of ParStream
IoT Meets Big Data: The Opportunities and Challenges by Syed Hoda of ParStream
 
101 Use Cases for IoT
101 Use Cases for IoT101 Use Cases for IoT
101 Use Cases for IoT
 
Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)
Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)
Apply the Lean Startup in B2B to Build Products Businesses Want (Course Slides)
 

Similar to Silverlight 2 for Developers - TechEd New Zealand 2008

Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patternsukdpe
 
2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with VoltaDaniel Fisher
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0Thomas Conté
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksSunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworksSunil Patil
 
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightClint Edmonson
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overviewmdc11
 
MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009Jonas Follesø
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan
 
Introduction To Dot Net Siddhesh
Introduction To Dot Net SiddheshIntroduction To Dot Net Siddhesh
Introduction To Dot Net SiddheshSiddhesh Bhobe
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Igor Moochnick
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSFSoftServe
 
Whidbey old
Whidbey old Whidbey old
Whidbey old grenaud
 
Entity Framework v2 Best Practices
Entity Framework v2 Best PracticesEntity Framework v2 Best Practices
Entity Framework v2 Best PracticesAndri Yadi
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCSunpawet Somsin
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012daniel plocker
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?ukdpe
 

Similar to Silverlight 2 for Developers - TechEd New Zealand 2008 (20)

Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overview
 
MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
 
Introduction To Dot Net Siddhesh
Introduction To Dot Net SiddheshIntroduction To Dot Net Siddhesh
Introduction To Dot Net Siddhesh
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
PPT
PPTPPT
PPT
 
Tdd,Ioc
Tdd,IocTdd,Ioc
Tdd,Ioc
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
 
C#Portfolio
C#PortfolioC#Portfolio
C#Portfolio
 
Whidbey old
Whidbey old Whidbey old
Whidbey old
 
Entity Framework v2 Best Practices
Entity Framework v2 Best PracticesEntity Framework v2 Best Practices
Entity Framework v2 Best Practices
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 

More from Jonas Follesø

Hvordan lage en vellykket Windows Phone 7 App
Hvordan lage en vellykket Windows Phone 7 AppHvordan lage en vellykket Windows Phone 7 App
Hvordan lage en vellykket Windows Phone 7 AppJonas Follesø
 
Introduction to MonoTouch
Introduction to MonoTouchIntroduction to MonoTouch
Introduction to MonoTouchJonas Follesø
 
Hvordan lage en vellykket WP7 applikasjon
Hvordan lage en vellykket WP7 applikasjonHvordan lage en vellykket WP7 applikasjon
Hvordan lage en vellykket WP7 applikasjonJonas Follesø
 
Why learn new programming languages
Why learn new programming languagesWhy learn new programming languages
Why learn new programming languagesJonas Follesø
 
Smidig 2011 TDD Workshop
Smidig 2011 TDD WorkshopSmidig 2011 TDD Workshop
Smidig 2011 TDD WorkshopJonas Follesø
 
Cross platform mobile apps using .NET
Cross platform mobile apps using .NETCross platform mobile apps using .NET
Cross platform mobile apps using .NETJonas Follesø
 
An overview of the Windows Phone 7 platform
An overview of the Windows Phone 7 platformAn overview of the Windows Phone 7 platform
An overview of the Windows Phone 7 platformJonas Follesø
 
Windows Phone 7 lyntale fra Grensesnittet Desember 2010
Windows Phone 7 lyntale fra Grensesnittet Desember 2010Windows Phone 7 lyntale fra Grensesnittet Desember 2010
Windows Phone 7 lyntale fra Grensesnittet Desember 2010Jonas Follesø
 
NNUG Trondheim 30.09.2010 - Windows Phone 7
NNUG Trondheim 30.09.2010 -  Windows Phone 7NNUG Trondheim 30.09.2010 -  Windows Phone 7
NNUG Trondheim 30.09.2010 - Windows Phone 7Jonas Follesø
 
Generating characterization tests for legacy code
Generating characterization tests for legacy codeGenerating characterization tests for legacy code
Generating characterization tests for legacy codeJonas Follesø
 
Get a flying start with Windows Phone 7 - NDC2010
Get a flying start with Windows Phone 7 - NDC2010Get a flying start with Windows Phone 7 - NDC2010
Get a flying start with Windows Phone 7 - NDC2010Jonas Follesø
 
Smidig brukeropplevelse med skjermbildeprototyper (Smidig2009)
Smidig brukeropplevelse med skjermbildeprototyper (Smidig2009)Smidig brukeropplevelse med skjermbildeprototyper (Smidig2009)
Smidig brukeropplevelse med skjermbildeprototyper (Smidig2009)Jonas Follesø
 

More from Jonas Follesø (13)

Introduction to F#
Introduction to F#Introduction to F#
Introduction to F#
 
Hvordan lage en vellykket Windows Phone 7 App
Hvordan lage en vellykket Windows Phone 7 AppHvordan lage en vellykket Windows Phone 7 App
Hvordan lage en vellykket Windows Phone 7 App
 
Introduction to MonoTouch
Introduction to MonoTouchIntroduction to MonoTouch
Introduction to MonoTouch
 
Hvordan lage en vellykket WP7 applikasjon
Hvordan lage en vellykket WP7 applikasjonHvordan lage en vellykket WP7 applikasjon
Hvordan lage en vellykket WP7 applikasjon
 
Why learn new programming languages
Why learn new programming languagesWhy learn new programming languages
Why learn new programming languages
 
Smidig 2011 TDD Workshop
Smidig 2011 TDD WorkshopSmidig 2011 TDD Workshop
Smidig 2011 TDD Workshop
 
Cross platform mobile apps using .NET
Cross platform mobile apps using .NETCross platform mobile apps using .NET
Cross platform mobile apps using .NET
 
An overview of the Windows Phone 7 platform
An overview of the Windows Phone 7 platformAn overview of the Windows Phone 7 platform
An overview of the Windows Phone 7 platform
 
Windows Phone 7 lyntale fra Grensesnittet Desember 2010
Windows Phone 7 lyntale fra Grensesnittet Desember 2010Windows Phone 7 lyntale fra Grensesnittet Desember 2010
Windows Phone 7 lyntale fra Grensesnittet Desember 2010
 
NNUG Trondheim 30.09.2010 - Windows Phone 7
NNUG Trondheim 30.09.2010 -  Windows Phone 7NNUG Trondheim 30.09.2010 -  Windows Phone 7
NNUG Trondheim 30.09.2010 - Windows Phone 7
 
Generating characterization tests for legacy code
Generating characterization tests for legacy codeGenerating characterization tests for legacy code
Generating characterization tests for legacy code
 
Get a flying start with Windows Phone 7 - NDC2010
Get a flying start with Windows Phone 7 - NDC2010Get a flying start with Windows Phone 7 - NDC2010
Get a flying start with Windows Phone 7 - NDC2010
 
Smidig brukeropplevelse med skjermbildeprototyper (Smidig2009)
Smidig brukeropplevelse med skjermbildeprototyper (Smidig2009)Smidig brukeropplevelse med skjermbildeprototyper (Smidig2009)
Smidig brukeropplevelse med skjermbildeprototyper (Smidig2009)
 

Recently uploaded

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 

Recently uploaded (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 

Silverlight 2 for Developers - TechEd New Zealand 2008

  • 1.  
  • 2. Silverlight 2 for Developers Jonas Follesø Senior Consultant Capgemini Session Code: WEB304
  • 3.  
  • 4.
  • 6. Outside data Public Internet mashup APIs Existing Intranet services New services you build RSS/Atom Feeds Images Sounds Videos
  • 7. A bit of history: Silverlight 1 JavaScript HTML ? AJAX (XmlHttpRequest) 1.0 <XAML/> Public Internet mashup APIs Existing Intranet services New services you build RSS/Atom Feeds Images Sounds Videos
  • 8. Today: Silverlight 2 2 Managed Code (C#/VB) HTML Public Int e rnet mashup APIs Existing Intr a net services New services you build RSS/Atom Feeds Images Sounds Videos
  • 9. Services that describe themselves Computer-Readable Metadata (e.g. WSDL) Automatic Proxy Generation WCF SOAP services in the enterprise Services for your Silverlight project ADO.NET Data Services SOAP services on the Internet
  • 10. Securing Silverlight Services Silverlight will use auth. info in the browser HTML E.g.: ASP.NET Login User: Password : Credentials Auth info (e.g. cookie) Service calls + Auth info Silverlight code does not normally deal with credentials… DiveLog.com …/Login.aspx ../MyApp.aspx ../MyService.svc
  • 11. HTTP Requests in Silverlight HttpWebRequest High-level components and User Code Browser Plugin APIs Web Browser - Cookies - Authenticated sessions - Caching - Proxy server to use Windows/Mac Networking Layer Restrictions Restrictions
  • 12. Blend – The dark is not that scary…
  • 13. Dive Log UI and Data
  • 14. Everything in code behind …is probably not a good idea
  • 15. A team of sad coders and designers
  • 16.  
  • 17. Different people reading about MVC in different places take different ideas from it and describe these as “MVC”. Martin Fowler, GUI Architectures Essay
  • 19. Data & Domain Logic (Model) UI (View) Interaction (Controller/Presenter)
  • 20. Represent the state and behavior of the presentation independently of the GUI controls used in the interface. Martin Fowler, Presentation Model Essay
  • 21. Makes your app easier to design …makes the designers like you
  • 22. Everything in code-behind Data Model View XAML Code-Behind Event Handlers
  • 23. Presentation Model Change notification Data-binding and commands Data Model View XAML Code-Behind Presentation Model State + Operations
  • 24. Dive Log Presentation Model Change notification Data-binding and commands Dive Log Service Dive Log XAML Code-Behind Dive Log View Model State + Operations
  • 25.
  • 26.
  • 27.
  • 29.
  • 30. Objects are used to represent actions. A command object encapsulates an action and its parameters. This allows a decoupling of the invoker of the command and the handlers of the command.
  • 31. Commands in Silverlight View < Button Content =&quot;Save Dives&quot; input:CommandService.Command =&quot;SaveDives&quot; /> Presentation Model public PageViewModel() { Commands .SaveDives.Executed += new EventHandler < ExecutedEventArgs >(SaveDives); } private void SaveDives( object sender, ExecutedEventArgs e) { // code to save dives.. }
  • 32. The strategy pattern is a software design pattern, whereby algorithms can be selected at runtime . Presentation Model public PageViewModel() { if ( HtmlPage .IsEnabled) { client = new DiveLogServiceClient (); } else { client = new ServiceStub (); } }
  • 33.  
  • 34.  
  • 35.
  • 36.
  • 37.
  • 38. IoC Containers Presentation Model [ Inject ] public PageViewModel( IDiveLogServiceClient proxy) { this. proxy = proxy } View public Page() { InitializeComponent(); IKernel iocContainer = new StandardKernel (); this .DataContext = iocContainer.Get< PageViewModel >(); }
  • 39.
  • 40. Using DI on the ViewModel
  • 42.
  • 43.
  • 44. Unit Testing in Silverlight
  • 45.  
  • 46.
  • 47.
  • 48.
  • 49. Please complete an evaluation
  • 50. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • 51.

Editor's Notes

  1. 06/04/09 12:30 © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.