Ruby & Python with Silverlight O RLY? YA RLY!
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Ruby & Python with Silverlight O RLY? YA RLY!

on

  • 4,894 views

Introduction to Silverlight and dynamic languages

Introduction to Silverlight and dynamic languages

Statistics

Views

Total Views
4,894
Views on SlideShare
4,881
Embed Views
13

Actions

Likes
1
Downloads
93
Comments
0

2 Embeds 13

http://www.slideshare.net 7
http://2.pro.tok2.com 6

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Ruby & Python with Silverlight O RLY? YA RLY! Presentation Transcript

  • 1. Ruby and Python with Silverlight: Martha Rotter Microsoft Ireland Developer and Platform Group [email_address] O RLY? YA RLY!
  • 2. For Today:
    • What is Silverlight?
    • What does Silverlight look like?
    • Ruby + Python + ??? on Silverlight
  • 3. But first … D00d what iz silverlight?!?!?!1
  • 4. e X stensible A pplication M arkup L anguage
    • Declarative Language – Just XML
        • Describes the look and feel
        • Generated by Microsoft Expression tools
    • Designer / Developer Workflow
      • No More Mockups or Wireframes
    • Runtime Format
      • “ Skinable” UI
  • 5. XAML Basics
    • You can create drawings directly with XAML
    • XAML is made up of Tags
        • Represent a single item or container of the design
          • E.g. Rectangle, Ellipse, Canvas, Storyboard, etc.
        • Not all Tags are design elements (e.g. animations)
  • 6. Example XAML
    • For example:
    <Canvas xmlns=&quot;...&quot; xmlns:x=&quot;...&quot;> <Rectangle Width=&quot;200&quot; Height=&quot;150&quot; Fill=&quot;Black&quot; /> <Ellipse Width=&quot;200&quot; Height=&quot;150&quot; Stroke=&quot;Orange&quot; /> </Canvas>
  • 7. Common XAML Elements
    • Basic Vocabulary of Tags
      • Canvas
      • Brushes
      • Basic shapes
        • Rectange, Ellipse, Line, Polygon, etc.
      • TextBlock
      • Image
      • No Controls in Silverlight 1.0
  • 8. DEMOS
  • 9. Silverlight Developer’s Toolkit
  • 10. Silverlight Architecture XAML Browser Host Integrated Networking Stack DOM Integration Installer JavaScript Engine Presentation Core .NET for Silverlight Inputs Keyboard Mouse Ink Media WMV / VC1 WMA MP3 Controls Layout Editing UI Core 2D Vectors Animation Text Images Transforms DRM Media Dynamic Languages Ruby Python BCL Generics Collections Web Services REST RSS SOAP POX JSON Data LINQ LINQ-to-XML WPF for Silverlight Extensible Controls Common Language Runtime ASP.NET AJAX Libs <asp:xaml> <asp:media> Server Silverlight 1.0 Silverlight 1.1 Legend
  • 11. <Script src=“Silverlight.js”/> <Script src=“Default.html.js”/> <Script src=“Scene.xaml.js”/> Web Browser Web Page Silverlight Host UI Logic <div id=&quot;SilverlightPlugInHost&quot;> <script type=&quot;text/javascript&quot;> createSilverlight(); HTML
  • 12. Helper JavaScript in SDK
  • 13. Web Page
    • <html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;>
    • <head>
    • <title>My Silverlight Application</title>
    • <script type=&quot;text/javascript&quot; src=&quot;Silverlight.js&quot;></script>
    • <script type=&quot;text/javascript&quot; src=&quot;Default.html.js&quot;></script>
    • <script type=&quot;text/javascript&quot; src=&quot;Scene.xaml.js&quot;></script>
    • </head>
    • <body>
    • <div id=&quot;SilverlightPlugInHost&quot;>
    • <script type=&quot;text/javascript&quot;>
    • createSilverlight();
    • </script>
    • </div>
    • </body>
    • </html>
  • 14. createSilverlight()
    • function createSilverlight()
    • {
    • Silverlight.createObject(
    • &quot;plugin.xaml&quot;, // Source property value.
    • parentElement, // DOM reference to hosting DIV tag.
    • &quot;myPlugin&quot;, // Unique plug-in ID value.
    • { // Plug-in properties.
    • width:'1024', // Width of rectangular region of plug-in in pixels.
    • height:'530', // Height of rectangular region of plug-in in pixels.
    • inplaceInstallPrompt:false, // Determines whether to display in-place install prompt if invalid version is detected.
    • background:'white', // Background color of plug-in.
    • isWindowless:'false', // Determines whether to display plug-in in windowless mode.
    • framerate:'24', // MaxFrameRate property value.
    • version:'1.0' // Silverlight version.
    • },
    • {
    • onError:null, // OnError property value -- event-handler function name.
    • onLoad:null // OnLoad property value -- event-handler function name.
    • },
    • null, // initParams -- user-settable string for information passing.
    • null); // Context value -- passed to Silverlight.js onLoad event handlers.
    • }
  • 15. createSilverlightEx
    • function createSilverlightEx()
    • {
    • Silverlight.createObjectEx({
    • source: 'plugin.xaml', // Source property value.
    • parentElement:parentElement, // DOM reference to hosting DIV tag.
    • id:'myPlugin', // Unique plug-in ID value.
    • properties:{ // Plug-in properties.
    • width:'1024', // Width of rectangular region of plug-in in pixels.
    • height:'530', // Height of rectangular region of plug-in in pixels.
    • inplaceInstallPrompt:false, // Determines whether to display in-place install prompt if invalid version is detected.
    • background:'white', // Background color of plug-in.
    • isWindowless:'false', // Determines whether to display plug-in in windowless mode.
    • framerate:'24', // MaxFrameRate property value.
    • version:'1.0'}, // Silverlight version.
    • events:{
    • onError:null, // OnError property value -- event-handler function name.
    • onLoad:null}, // OnLoad property value -- event-handler function name.
    • initParams:null, // initParams property value -- user-settable string for information passing.
    • context:null}); // Context value -- passed to Silverlight.js onLoad event handlers.
    • }
  • 16. Programming a Silverlight-Based Application with a Dynamic Language
    • Root html page which calls your createSilverlight method
    • CreateSilverlight.js (implementation of parameterless createSilverlight method to start your application)
    • Silverlight.js (defines createObject & createObjectEx methods)
    • pageName.xaml (UI of your application)
    • pageName.xaml.py (code behind the UI)
      •  Compiled & executed at runtime
  • 17. DEMOS
  • 18. The Future… Examples COUNT!!1 HAI CAN HAS STDIO? I HAS A VAR IM IN YR LOOP UP VAR!!1 VISIBLE VAR IZ VAR BIGGER THAN 10? KTHXBYE IM OUTTA YR LOOP KTHXBYE FILEZORZ: HAI CAN HAS STDIO? PLZ OPEN FILE &quot;LOLCATS.TXT&quot;? AWSUM THX VISIBLE FILE O NOES INVISIBLE &quot;ERROR!&quot; KTHXBYE