SlideShare una empresa de Scribd logo
1 de 15
Raffaele Rialdi Twitter: @raffaeler Email:malta@vevy.com Articoli e codice: http://www.iamraf.net Blog:http://blogs.ugidotnet.org/raffaele Profilo MVP:https://mvp.support.microsoft.com/profile/raffaele Scoprire il Micro Frameworkcon C#
Il mondo dei device Ieri PC  Full Windows Apparati industriali  Windows Embedded / CE PDA, Cellulari  Windows CE Piccole schede  Micro Framework Domani PC  Full Windows Apparati industriali  Windows Embedded / CE PDA, Cellulari  Full Windows vNext (SoC) Piccole schede  Micro Framework
Caratteristiche dell'hardware Circa 256K di RAM, 512K di ROM WinCE è intorno ai 10MB RAM / 10MB ROM CPU 32 bit tipicamente tra 27 e 100MHz ARM 7 in poi, Analog Devices Blackfin, Renesas SH2/SH2A Memory Management Unit non necessaria … Porting Kit!
Caratteristiche del MF Nasce nel 2001 dal progetto "Smart Personal Object Technology" (SPOT) usata per gli orologi MSN Codebase indipendente da CF o fx.net Open source http://netmf.codeplex.com Subset del full fx.net Il runtime del CLR interpreta il codice IL Pieno controllo delle periferiche hardware Supportato da VS2010 (anche express) Wizard, emulatore, esempi, help Tool diagnostici e conversione font truetype
Architettura HTTP(S) Managed Application Application Services SDK SSL DPWS XML Parser Advanced Graphics Managed Libraries Threading Collections Sockets Reflection USB client I/O: USB,  UART, SPI, I2C Basic Graphics Porting Kit (PK) Security File System Touch Panel Managed Run-Time CLR, Interpreter, Executive, and Interop PAL – Platform Abstraction Layer approximately 40 functions (preferred)HAL - Hardware Abstraction Layer approximately 60 functions (optional)Host OS Hardware
Ambiente di sviluppo
Librerie – Supporto Base Suddivise tra i namespace System.* e SPOT.* ArrayList (unica collection), Hashtable, Queue, Stack XmlWriter, XmlReader, XmlTextReader Thread, Timer, AutoResetEvent, … Reflection IO: File, streams, SerialPort Crypto API GC, delegate, AppDomain, String, Uri, WeakReference, …
Librerie - Hardware Microsoft.SPOT.Hardware Battery, PowerState, PowerEvent, SleepEvent Cpu I2CDevice Port, InputPort, OutputPort, InterruptPort, TristatePort SPI Watchdog, WatchdogEvent Microsoft.SPOT.Hardware.UsbClient SDK Specifici dei produttori OEM. Per es. GHI Electronics: CAN, PWM, RealtimeClock, OneWire USB client (mouse, kbd, …), USB host (mouse, kbd, …) …
Librerie – User Interface Implementa WPF! (versione super-ridotta) Niente XAML o binding, solo API essenziali Microsoft.SPOT.Presentation Controlli Border, Canvas, Image, ListBox, Panel, ScrollViewer, StackPanel, Text, … No Button:http://www.nielsderdaele.be/post/2010/10/12/WPF-Based-Touch-Button-for-NET-Micro-Framework-41.aspx Disegno Brush, Color, Pen, ImageBrush, DrawingContext, … Ellipse , Line, Polygon, Rectangle, Shape Touch Ink, Touch, TouchEvent, TouchPanel, InkCanvas Event routing e input providers
Librerie - Network Network: Socket HttpWebRequest, HttpWebResponse and HttpListener Esistono esempi di Webserver pronti all'uso HTTP/1.1 compreso chunking e keep-alive SSL con certificati X.509! Transport: 802.11 [WiFi] supportato (necessita di supporto sdk OEM) 802.15.4 [ZigBee] implementato ma ancora non documentato
Librerie - DPWS Implementa WCF (Device Profile for Web Services)! Può essere client o server Implementa WS-Discovery Generazione proxy con MFSvcUtil Implementazione ridotta: http://msdn.microsoft.com/en-us/library/ee435399.aspx Solo Http binding WSDL 1.1, SOAP 1.2, WS-Addressing, WS-MetadataExchange, WS-Transfer, WS-Discovery, WS-Eventing
C# nel Micro Framework Non implementati: Generics Linq Workaround:http://blogs.oberon.ch/tamberg/2009-02-06/implementing-linq-on-the-dotnet-mf.html Expression trees anonymous types partial classes nullable types tipi puntatori (e.g. IntPtr) supporto limitato per unsafe code blocks Solo unsafe/fixed in un numero di casi limitati e su array custom attributes
Real-world samples http://www.tinyclr.com/ by GHI http://www.netduino.com/projects/ by Netduino Micro Framework sources (+ contributions) by NetMF team http://netmf.codeplex.com/documentation
Votate le feature perla prossima release! http://netmf.codeplex.com/ Login via LiveId Issue Tracker Votate! REST: http://netmf.codeplex.com/workitem/751 Generics: http://netmf.codeplex.com/workitem/750 Video Streaming: http://netmf.codeplex.com/workitem/749 Il team del Micro Framework legge tutte le richieste È possibile collaborare al source tree ufficiale (direttamente sul TFS di codeplex)
Domande ? Uno grazie speciale a Lorenzo Tessiore e Zach Libby del team di Micro Framework per la disponibilità e i suggerimenti

Más contenido relacionado

Más de DotNetMarche

UI Composition - Prism
UI Composition - PrismUI Composition - Prism
UI Composition - PrismDotNetMarche
 
Model-View-ViewModel
Model-View-ViewModelModel-View-ViewModel
Model-View-ViewModelDotNetMarche
 
Refactoring ASP.NET and beyond
Refactoring ASP.NET and beyondRefactoring ASP.NET and beyond
Refactoring ASP.NET and beyondDotNetMarche
 
Refactoring 2TheMax (con ReSharper)
Refactoring 2TheMax (con ReSharper)Refactoring 2TheMax (con ReSharper)
Refactoring 2TheMax (con ReSharper)DotNetMarche
 
Silverlight in Action
Silverlight in ActionSilverlight in Action
Silverlight in ActionDotNetMarche
 
Soluzioni Microsoft per l'e-Learning
Soluzioni Microsoft per l'e-LearningSoluzioni Microsoft per l'e-Learning
Soluzioni Microsoft per l'e-LearningDotNetMarche
 
Installing and Administering MOSS
Installing and Administering MOSSInstalling and Administering MOSS
Installing and Administering MOSSDotNetMarche
 
Microsoft SharePoint Server 2007 Technical Overview
Microsoft SharePoint Server 2007 Technical OverviewMicrosoft SharePoint Server 2007 Technical Overview
Microsoft SharePoint Server 2007 Technical OverviewDotNetMarche
 
[Hands on] testing asp.net mvc
[Hands on] testing asp.net mvc[Hands on] testing asp.net mvc
[Hands on] testing asp.net mvcDotNetMarche
 
Asp.NET MVC Framework
Asp.NET MVC FrameworkAsp.NET MVC Framework
Asp.NET MVC FrameworkDotNetMarche
 
Introduzione al Testing
Introduzione al TestingIntroduzione al Testing
Introduzione al TestingDotNetMarche
 
Introduzione a CardSpace
Introduzione a CardSpaceIntroduzione a CardSpace
Introduzione a CardSpaceDotNetMarche
 
Introduzione a Workflow Foundation
Introduzione a Workflow FoundationIntroduzione a Workflow Foundation
Introduzione a Workflow FoundationDotNetMarche
 
Domain Model e SOA (Service Oriented Architecture)
Domain Model e SOA (Service Oriented Architecture)Domain Model e SOA (Service Oriented Architecture)
Domain Model e SOA (Service Oriented Architecture)DotNetMarche
 
Introduzione al Domain Driven Design (DDD)
Introduzione al Domain Driven Design (DDD)Introduzione al Domain Driven Design (DDD)
Introduzione al Domain Driven Design (DDD)DotNetMarche
 

Más de DotNetMarche (20)

UI Composition - Prism
UI Composition - PrismUI Composition - Prism
UI Composition - Prism
 
UI Composition
UI CompositionUI Composition
UI Composition
 
Model-View-ViewModel
Model-View-ViewModelModel-View-ViewModel
Model-View-ViewModel
 
WPF basics
WPF basicsWPF basics
WPF basics
 
Refactoring ASP.NET and beyond
Refactoring ASP.NET and beyondRefactoring ASP.NET and beyond
Refactoring ASP.NET and beyond
 
Refactoring 2TheMax (con ReSharper)
Refactoring 2TheMax (con ReSharper)Refactoring 2TheMax (con ReSharper)
Refactoring 2TheMax (con ReSharper)
 
jQuery Loves You
jQuery Loves YoujQuery Loves You
jQuery Loves You
 
Silverlight in Action
Silverlight in ActionSilverlight in Action
Silverlight in Action
 
Open XML & MOSS
Open XML & MOSSOpen XML & MOSS
Open XML & MOSS
 
Soluzioni Microsoft per l'e-Learning
Soluzioni Microsoft per l'e-LearningSoluzioni Microsoft per l'e-Learning
Soluzioni Microsoft per l'e-Learning
 
Installing and Administering MOSS
Installing and Administering MOSSInstalling and Administering MOSS
Installing and Administering MOSS
 
Microsoft SharePoint Server 2007 Technical Overview
Microsoft SharePoint Server 2007 Technical OverviewMicrosoft SharePoint Server 2007 Technical Overview
Microsoft SharePoint Server 2007 Technical Overview
 
[Hands on] testing asp.net mvc
[Hands on] testing asp.net mvc[Hands on] testing asp.net mvc
[Hands on] testing asp.net mvc
 
Asp.NET MVC Framework
Asp.NET MVC FrameworkAsp.NET MVC Framework
Asp.NET MVC Framework
 
Introduzione al Testing
Introduzione al TestingIntroduzione al Testing
Introduzione al Testing
 
Introduzione a CardSpace
Introduzione a CardSpaceIntroduzione a CardSpace
Introduzione a CardSpace
 
Introduzione a Workflow Foundation
Introduzione a Workflow FoundationIntroduzione a Workflow Foundation
Introduzione a Workflow Foundation
 
Domain Model e SOA (Service Oriented Architecture)
Domain Model e SOA (Service Oriented Architecture)Domain Model e SOA (Service Oriented Architecture)
Domain Model e SOA (Service Oriented Architecture)
 
Introduzione al Domain Driven Design (DDD)
Introduzione al Domain Driven Design (DDD)Introduzione al Domain Driven Design (DDD)
Introduzione al Domain Driven Design (DDD)
 
Esempi pratici
Esempi praticiEsempi pratici
Esempi pratici
 

Scoprire il Micro Framework con C# (Raffaele Rialdi)

  • 1. Raffaele Rialdi Twitter: @raffaeler Email:malta@vevy.com Articoli e codice: http://www.iamraf.net Blog:http://blogs.ugidotnet.org/raffaele Profilo MVP:https://mvp.support.microsoft.com/profile/raffaele Scoprire il Micro Frameworkcon C#
  • 2. Il mondo dei device Ieri PC  Full Windows Apparati industriali  Windows Embedded / CE PDA, Cellulari  Windows CE Piccole schede  Micro Framework Domani PC  Full Windows Apparati industriali  Windows Embedded / CE PDA, Cellulari  Full Windows vNext (SoC) Piccole schede  Micro Framework
  • 3. Caratteristiche dell'hardware Circa 256K di RAM, 512K di ROM WinCE è intorno ai 10MB RAM / 10MB ROM CPU 32 bit tipicamente tra 27 e 100MHz ARM 7 in poi, Analog Devices Blackfin, Renesas SH2/SH2A Memory Management Unit non necessaria … Porting Kit!
  • 4. Caratteristiche del MF Nasce nel 2001 dal progetto "Smart Personal Object Technology" (SPOT) usata per gli orologi MSN Codebase indipendente da CF o fx.net Open source http://netmf.codeplex.com Subset del full fx.net Il runtime del CLR interpreta il codice IL Pieno controllo delle periferiche hardware Supportato da VS2010 (anche express) Wizard, emulatore, esempi, help Tool diagnostici e conversione font truetype
  • 5. Architettura HTTP(S) Managed Application Application Services SDK SSL DPWS XML Parser Advanced Graphics Managed Libraries Threading Collections Sockets Reflection USB client I/O: USB, UART, SPI, I2C Basic Graphics Porting Kit (PK) Security File System Touch Panel Managed Run-Time CLR, Interpreter, Executive, and Interop PAL – Platform Abstraction Layer approximately 40 functions (preferred)HAL - Hardware Abstraction Layer approximately 60 functions (optional)Host OS Hardware
  • 7. Librerie – Supporto Base Suddivise tra i namespace System.* e SPOT.* ArrayList (unica collection), Hashtable, Queue, Stack XmlWriter, XmlReader, XmlTextReader Thread, Timer, AutoResetEvent, … Reflection IO: File, streams, SerialPort Crypto API GC, delegate, AppDomain, String, Uri, WeakReference, …
  • 8. Librerie - Hardware Microsoft.SPOT.Hardware Battery, PowerState, PowerEvent, SleepEvent Cpu I2CDevice Port, InputPort, OutputPort, InterruptPort, TristatePort SPI Watchdog, WatchdogEvent Microsoft.SPOT.Hardware.UsbClient SDK Specifici dei produttori OEM. Per es. GHI Electronics: CAN, PWM, RealtimeClock, OneWire USB client (mouse, kbd, …), USB host (mouse, kbd, …) …
  • 9. Librerie – User Interface Implementa WPF! (versione super-ridotta) Niente XAML o binding, solo API essenziali Microsoft.SPOT.Presentation Controlli Border, Canvas, Image, ListBox, Panel, ScrollViewer, StackPanel, Text, … No Button:http://www.nielsderdaele.be/post/2010/10/12/WPF-Based-Touch-Button-for-NET-Micro-Framework-41.aspx Disegno Brush, Color, Pen, ImageBrush, DrawingContext, … Ellipse , Line, Polygon, Rectangle, Shape Touch Ink, Touch, TouchEvent, TouchPanel, InkCanvas Event routing e input providers
  • 10. Librerie - Network Network: Socket HttpWebRequest, HttpWebResponse and HttpListener Esistono esempi di Webserver pronti all'uso HTTP/1.1 compreso chunking e keep-alive SSL con certificati X.509! Transport: 802.11 [WiFi] supportato (necessita di supporto sdk OEM) 802.15.4 [ZigBee] implementato ma ancora non documentato
  • 11. Librerie - DPWS Implementa WCF (Device Profile for Web Services)! Può essere client o server Implementa WS-Discovery Generazione proxy con MFSvcUtil Implementazione ridotta: http://msdn.microsoft.com/en-us/library/ee435399.aspx Solo Http binding WSDL 1.1, SOAP 1.2, WS-Addressing, WS-MetadataExchange, WS-Transfer, WS-Discovery, WS-Eventing
  • 12. C# nel Micro Framework Non implementati: Generics Linq Workaround:http://blogs.oberon.ch/tamberg/2009-02-06/implementing-linq-on-the-dotnet-mf.html Expression trees anonymous types partial classes nullable types tipi puntatori (e.g. IntPtr) supporto limitato per unsafe code blocks Solo unsafe/fixed in un numero di casi limitati e su array custom attributes
  • 13. Real-world samples http://www.tinyclr.com/ by GHI http://www.netduino.com/projects/ by Netduino Micro Framework sources (+ contributions) by NetMF team http://netmf.codeplex.com/documentation
  • 14. Votate le feature perla prossima release! http://netmf.codeplex.com/ Login via LiveId Issue Tracker Votate! REST: http://netmf.codeplex.com/workitem/751 Generics: http://netmf.codeplex.com/workitem/750 Video Streaming: http://netmf.codeplex.com/workitem/749 Il team del Micro Framework legge tutte le richieste È possibile collaborare al source tree ufficiale (direttamente sul TFS di codeplex)
  • 15. Domande ? Uno grazie speciale a Lorenzo Tessiore e Zach Libby del team di Micro Framework per la disponibilità e i suggerimenti