SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Stefan Schackow
Program Manager
Microsoft Corporation
Working with HTML and Javascript
Closer look at web services
Using isolated storage
Creating a file upload application using OpenFileDialog

All samples can be downloaded at:
• http://mixer1068.mixsandbox.com/
ScriptableObject



                                  is an
               HtmlObject                 HtmlPage.Window




HtmlDocument                HtmlElement
[Scriptable] enables non-visual use of managed code
 Can create managed libraries
 quot;Referencequot; them on the page with a no-op xaml page and
 code-behind class
Future iterations will remove the need for a xaml type
[Scriptable] managed types
 Properties, methods and events accessible from Javascript
 Dynamically register endpoints using WebApplication
[Scriptable] endpoints hang off the quot;Contentquot; control
property
 mySLControl.Content.MyCustomEndpoint.ManagedProperty
Type support in Silverlight Alpha
 Int, Double, String and ScriptableObject
 Use JSON to pass complex types by value
Using a [Scriptable] event
 Make sure control is loaded
 Assign Javascript method to managed event property
 Managed code can then raise event back out to Javascript
Can use custom event arguments
 Derive from EventArgs
 Mark the type and one or more properties with [Scriptable]
 Allows managed code to call quot;arbitraryquot; Javascript methods
Silverlight Alpha works with:
 ASP.NET AJAX 1.0 web services (as well as Orcas)
Works with JSON serializable types
 Primitives, string, arrays, DateTime, dictionaries, custom
 types, and collections of any of these types
 Custom type serializers not tested for Alpha
Custom slwsdl.exe proxy generator
   quot;/silverlightclientquot; switch generates a Silverlight specific proxy
   Proxy generator uses a custom System.Web.Services.dll
Custom SoapHttpClientProtocol type used by proxy
 quot;POSTquot; verb
 Content type set to quot;application/jsonquot;
 Parameters and return values serialized using
 JavaScriptSerializer
 Supports both sync and async models
Silverlight can consume JSON based app services
Need to manually generate proxy
 Take an existing Silverlight web service proxy
 Copy the type definition
 Update methods and Url to match app service method
 signatures
ASP.NET application service Urls are:
 Profile_JSON_AppService.axd
 Authentication_JSON_AppService.axd
Stream based access to a private file/directory structure
 Will have easier accessors in following iterations
Patterned after .NET Framework IsolatedStorage classes
Read and write string or binary data
For Alpha you get an iso-store per Source attribute
 contoso.com/foo.xaml and contoso.com/bar.xaml each get a
 different isostore
 1MB limit per iso-store
Same iso-store is across browsers
© 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.

Weitere ähnliche Inhalte

Andere mochten auch

Redes y su medio físico
Redes y su medio físicoRedes y su medio físico
Redes y su medio físico
John Daza
 

Andere mochten auch (10)

Google Hangout Onair
Google Hangout OnairGoogle Hangout Onair
Google Hangout Onair
 
¿Cómo E-nteractiva logró crecer 200% en ventas y 100% de clientes en un año c...
¿Cómo E-nteractiva logró crecer 200% en ventas y 100% de clientes en un año c...¿Cómo E-nteractiva logró crecer 200% en ventas y 100% de clientes en un año c...
¿Cómo E-nteractiva logró crecer 200% en ventas y 100% de clientes en un año c...
 
Lendasdomma02
Lendasdomma02Lendasdomma02
Lendasdomma02
 
Wvw offerta video
Wvw offerta video Wvw offerta video
Wvw offerta video
 
Ifsc
IfscIfsc
Ifsc
 
Vectorización automática
Vectorización automáticaVectorización automática
Vectorización automática
 
Ventoo-Leistungen-Web
Ventoo-Leistungen-WebVentoo-Leistungen-Web
Ventoo-Leistungen-Web
 
„Náborový mistr“
„Náborový mistr“„Náborový mistr“
„Náborový mistr“
 
Redes y su medio físico
Redes y su medio físicoRedes y su medio físico
Redes y su medio físico
 
IBM Webinar: ¿Está preparado para la revolución móvil en su empresa?
IBM Webinar: ¿Está preparado para la revolución móvil en su empresa?IBM Webinar: ¿Está preparado para la revolución móvil en su empresa?
IBM Webinar: ¿Está preparado para la revolución móvil en su empresa?
 

Ähnlich wie Extending the Browser Programming Model with Silverlight

Flex In Portal Final
Flex In Portal   FinalFlex In Portal   Final
Flex In Portal Final
Sunil Patil
 
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
 
Windows Phone 7 and Silverlight
Windows Phone 7 and SilverlightWindows Phone 7 and Silverlight
Windows Phone 7 and Silverlight
Glen Gordon
 
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
Sunil 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 frameworks
Sunil Patil
 
Flex And Ria
Flex And RiaFlex And Ria
Flex And Ria
ravinxg
 

Ähnlich wie Extending the Browser Programming Model with Silverlight (20)

Silverlight 2
Silverlight 2Silverlight 2
Silverlight 2
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
Flex In Portal Final
Flex In Portal   FinalFlex In Portal   Final
Flex In Portal Final
 
Ajax toolkit framework
Ajax toolkit frameworkAjax toolkit framework
Ajax toolkit framework
 
Android/iPhone/Blackberry Web Service Connector
Android/iPhone/Blackberry Web Service ConnectorAndroid/iPhone/Blackberry Web Service Connector
Android/iPhone/Blackberry Web Service Connector
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 Development
 
Walther Ajax4
Walther Ajax4Walther Ajax4
Walther Ajax4
 
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
 
Ajax toolkit-framework
Ajax toolkit-frameworkAjax toolkit-framework
Ajax toolkit-framework
 
Silverlight2 Security
Silverlight2 SecuritySilverlight2 Security
Silverlight2 Security
 
Html bridge
Html bridgeHtml bridge
Html bridge
 
Adobe Flex4
Adobe Flex4 Adobe Flex4
Adobe Flex4
 
Silverlight Training
Silverlight TrainingSilverlight Training
Silverlight Training
 
Windows Phone 7 and Silverlight
Windows Phone 7 and SilverlightWindows Phone 7 and Silverlight
Windows Phone 7 and Silverlight
 
Walther Aspnet4
Walther Aspnet4Walther Aspnet4
Walther Aspnet4
 
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
 
58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services58615764 net-and-j2 ee-web-services
58615764 net-and-j2 ee-web-services
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMING
 
Flex And Ria
Flex And RiaFlex And Ria
Flex And Ria
 

Mehr von goodfriday

Narine Presentations 20051021 134052
Narine Presentations 20051021 134052Narine Presentations 20051021 134052
Narine Presentations 20051021 134052
goodfriday
 
09 03 22 easter
09 03 22 easter09 03 22 easter
09 03 22 easter
goodfriday
 
Holy Week Easter 2009
Holy Week Easter 2009Holy Week Easter 2009
Holy Week Easter 2009
goodfriday
 
Holt Park Easter 09 Swim
Holt Park Easter 09 SwimHolt Park Easter 09 Swim
Holt Park Easter 09 Swim
goodfriday
 
Swarthmore Lentbrochure20092
Swarthmore Lentbrochure20092Swarthmore Lentbrochure20092
Swarthmore Lentbrochure20092
goodfriday
 
Eastercard2009
Eastercard2009Eastercard2009
Eastercard2009
goodfriday
 
Easterservices2009
Easterservices2009Easterservices2009
Easterservices2009
goodfriday
 
Bulletin Current
Bulletin CurrentBulletin Current
Bulletin Current
goodfriday
 
March 2009 Newsletter
March 2009 NewsletterMarch 2009 Newsletter
March 2009 Newsletter
goodfriday
 
Lent Easter 2009
Lent Easter 2009Lent Easter 2009
Lent Easter 2009
goodfriday
 
Easterpowersports09
Easterpowersports09Easterpowersports09
Easterpowersports09
goodfriday
 
Easter Trading 09
Easter Trading 09Easter Trading 09
Easter Trading 09
goodfriday
 
Easter Brochure 2009
Easter Brochure 2009Easter Brochure 2009
Easter Brochure 2009
goodfriday
 
March April 2009 Calendar
March April 2009 CalendarMarch April 2009 Calendar
March April 2009 Calendar
goodfriday
 

Mehr von goodfriday (20)

Narine Presentations 20051021 134052
Narine Presentations 20051021 134052Narine Presentations 20051021 134052
Narine Presentations 20051021 134052
 
Triunemar05
Triunemar05Triunemar05
Triunemar05
 
09 03 22 easter
09 03 22 easter09 03 22 easter
09 03 22 easter
 
Holy Week Easter 2009
Holy Week Easter 2009Holy Week Easter 2009
Holy Week Easter 2009
 
Holt Park Easter 09 Swim
Holt Park Easter 09 SwimHolt Park Easter 09 Swim
Holt Park Easter 09 Swim
 
Easter Letter
Easter LetterEaster Letter
Easter Letter
 
April2009
April2009April2009
April2009
 
Swarthmore Lentbrochure20092
Swarthmore Lentbrochure20092Swarthmore Lentbrochure20092
Swarthmore Lentbrochure20092
 
Eastercard2009
Eastercard2009Eastercard2009
Eastercard2009
 
Easterservices2009
Easterservices2009Easterservices2009
Easterservices2009
 
Bulletin Current
Bulletin CurrentBulletin Current
Bulletin Current
 
Easter2009
Easter2009Easter2009
Easter2009
 
Bulletin
BulletinBulletin
Bulletin
 
March 2009 Newsletter
March 2009 NewsletterMarch 2009 Newsletter
March 2009 Newsletter
 
Mar 29 2009
Mar 29 2009Mar 29 2009
Mar 29 2009
 
Lent Easter 2009
Lent Easter 2009Lent Easter 2009
Lent Easter 2009
 
Easterpowersports09
Easterpowersports09Easterpowersports09
Easterpowersports09
 
Easter Trading 09
Easter Trading 09Easter Trading 09
Easter Trading 09
 
Easter Brochure 2009
Easter Brochure 2009Easter Brochure 2009
Easter Brochure 2009
 
March April 2009 Calendar
March April 2009 CalendarMarch April 2009 Calendar
March April 2009 Calendar
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Extending the Browser Programming Model with Silverlight

  • 1.
  • 3. Working with HTML and Javascript Closer look at web services Using isolated storage Creating a file upload application using OpenFileDialog All samples can be downloaded at: • http://mixer1068.mixsandbox.com/
  • 4. ScriptableObject is an HtmlObject HtmlPage.Window HtmlDocument HtmlElement
  • 5.
  • 6. [Scriptable] enables non-visual use of managed code Can create managed libraries quot;Referencequot; them on the page with a no-op xaml page and code-behind class Future iterations will remove the need for a xaml type
  • 7. [Scriptable] managed types Properties, methods and events accessible from Javascript Dynamically register endpoints using WebApplication [Scriptable] endpoints hang off the quot;Contentquot; control property mySLControl.Content.MyCustomEndpoint.ManagedProperty Type support in Silverlight Alpha Int, Double, String and ScriptableObject Use JSON to pass complex types by value
  • 8. Using a [Scriptable] event Make sure control is loaded Assign Javascript method to managed event property Managed code can then raise event back out to Javascript Can use custom event arguments Derive from EventArgs Mark the type and one or more properties with [Scriptable] Allows managed code to call quot;arbitraryquot; Javascript methods
  • 9.
  • 10. Silverlight Alpha works with: ASP.NET AJAX 1.0 web services (as well as Orcas) Works with JSON serializable types Primitives, string, arrays, DateTime, dictionaries, custom types, and collections of any of these types Custom type serializers not tested for Alpha
  • 11. Custom slwsdl.exe proxy generator quot;/silverlightclientquot; switch generates a Silverlight specific proxy Proxy generator uses a custom System.Web.Services.dll Custom SoapHttpClientProtocol type used by proxy quot;POSTquot; verb Content type set to quot;application/jsonquot; Parameters and return values serialized using JavaScriptSerializer Supports both sync and async models
  • 12. Silverlight can consume JSON based app services Need to manually generate proxy Take an existing Silverlight web service proxy Copy the type definition Update methods and Url to match app service method signatures ASP.NET application service Urls are: Profile_JSON_AppService.axd Authentication_JSON_AppService.axd
  • 13.
  • 14. Stream based access to a private file/directory structure Will have easier accessors in following iterations Patterned after .NET Framework IsolatedStorage classes Read and write string or binary data For Alpha you get an iso-store per Source attribute contoso.com/foo.xaml and contoso.com/bar.xaml each get a different isostore 1MB limit per iso-store Same iso-store is across browsers
  • 15.
  • 16.
  • 17.
  • 18. © 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.