1
SL4BIZ - Silverlight for Business
Session
2
Some points…› Microsoft MVP› MCP, MCTS.› Trainer (hopefully MCT in short ;)› Technical writer & speaker.› Barcelona Developers User Group Leader› INETA Speaker
Contact details› Name: Jose Luis Latorre› E-mail: [email protected]› Twitter: @joslat› Phone: Sorry! ;)
Speaker
3
SL4BIZ - Silverlight For Business
SL4BIZ – Silverlight for Business
• Introduction to Silverlight• Silverlight 4 Business – actual
capabilities• Coding Demo• Futures? What will 5.0 bring?• Question time.
4
IndexIntroduction to Silverlight technology. Silverlight for Business right now.Demo time!Futures & what will V5 bring?Question time.
5
Silverlight enters the market as an alternative to develop rich islands inside web pages or, better, to design and develop whole sites completely with Silverlight technology – which is really complicated doing so with other technologies. Silverlight also provides high integration with other development environments that we all know.
In any case, Silverlight is a Cross-browser plug-in that works in multiple platforms, with high performance including a multi-core technology and designed to solve the most usual (and unusual) RIA Application problems, like loading/unloading of content, flexible layouts, media reproduction and other..
Why Silverlight?
6
Silverlight comes from WPF, Windows Presentation Foundation and is, by now a subset of this technology adapted to web execution.
In fact, in its first versions, it was called WPF/E (Windows Presentation Foundation Everywhere).
Origins
7
Easy development of RIA applications. Development on a confortable environment (VS 2008 & VS 2010) Based on known and reliable technology (.NET). Thought for intense communications (Webservices, JSON, REST, WCF, etc..) Based on the evolution of graphical interfaces (WPF, XAML).
› It is important to let clear what XAML is, known as “eXtensible Application Markup Language”. XAML is a declarative language derived from XML which functionality is allow us to define the visual interface, its elements and their layout. It is very similar to other XML derived languages for describing interfaces, like XHTML.
Decoupling the tasks of the Designer (View) and the Developer (Back End, Model, ViewModel, etc..)
Multi-device & multi-Browser.
Main concepts
8
Basically, Silverlight is a browser plug-in that renders XAML and allows us to execute code on the client machine and thus saving us from sending the information to the server, its procesor time and the callback with the information, which is what happes with ASP.Net pages (and similar technologies).
High performance in multimedia, concretely in video streaming & its reproduction.
Silverlight is vector based.
Main Concepts
9
Impressive evolution. Multi platform & Multi browser pluginof around 4Mb. Already on 60% of the world’s browsers. Actually the best solution for developing RIA
applications.
Actual State and Roadmap
10
Architecture
11
XAML based
12
Game changing technology
13
IndexIntroduction to Silverlight technology. Silverlight for Business right now.Demo time!Futures & what will V5 bring?Question time.
14
Actual capabilities (with SL4.0 & WCF RIA Services 1.0)
Displaying data• Binding enhancements• DataGrid enhancements• Rich Text Box• Stacked series Charts Filter Grouping Sorting Paging WebBrowser
Professional look and feel• ICommand• Right-Click• Context Menu • Implicit Styles / Themes• Fluid UI• Mouse Wheel
Getting user input• Drag & Drop• Webcam / mic• RIA Services• Multi touch• COM
Validating user input• INotifyDataErrorInfo• Async Validation• IDataErrorInfo• Cross-field Validation• Authentication
Saving data and sharing it• Printing• Clipboard• Office Integration
15
WCF RIA Services Vision – now with 1.0 flavor!
Simplify n-tier data-driven application development A higher level framework on top of existing building blocks› LINQ, Data Access Technologies, WCF, Metadata
Provide an application architecture that scales to fit needs of breadth line-of-business applications
16
Actual capabilities (with SL4.0 & WCF RIA Services 1.0)
Displaying data• Binding enhancements• DataGrid enhancements• Rich Text Box• Stacked series Charts Filter Grouping Sorting Paging WebBrowser
Professional look and feel• ICommand• Right-Click• Context Menu • Implicit Styles / Themes• Fluid UI• Mouse Wheel
Getting user input• Drag & Drop• Webcam / mic• RIA Services
Validating user input• INotifyDataErrorInfo• Async Validation• IDataErrorInfo• Cross-field Validation• Authentication
Saving data and sharing it• Printing• Clipboard• Office Integration
17
Vision and Goals
Simplify RIA-style application development› n-tier is hard, and un-natural› Focus on data-driven apps
Bring ASP.NET-style productivity to RIA development› Building blocks for data, security, etc.› Focus on scenarios
Client as an extension of the server A single logical application
18
ApplicationBrowser Rich Internet Application
DB
Service
Other Applications
A Unified Story for Client and Server
Data Access Layer
AppLogic
Services
HTMLPresentati
onLogic
Network
19
Scaling your DomainServices
AppLogic
DatabasesADO.NET,ORMs (LTS, EF, …)
Lists/ObjectsRepository(NHibernate, …)
ServicesREST/SOAP(Azure, …)
.NET ClientsSilverlight, Phone,WPF
Standards ClientsJavaScript
Server RenderingHTML, Sitemaps
ServicesSOAP, XML,JSON, OData Unit Test
Code
20
WCF RIA Services
Application
DB
Services
Data Access Layer
AppLogic
Presentation
LogicNetwor
k
DomainServiceStateless CRUD + App Logic
class BookShelfServiceIQueryable<Book> GetBooks()void ShareBook(Book)void UpdateBook(Book)void UnshareBook (Book)Validation, authorization, business rulesData Model class Book
DomainContextStateful view + Bindable Data
class BookShelfContextEntitySet<Book> Books { get }EntityQuery<Book> GetBooksQuery()
Entitiesclass BookData members + Validation
Data Model +Metadata +Shared Code
DomainService.Query Invoke GetBooks() Compose query, execute, serialize resultsDomainService.SubmitChanges Authorize, Validate, Execute, Persist
var q = Context.GetBooksQuery()Context.Load(q);
Context.Books.Add(newBook);Context.SubmitChanges();
Queries and ChangeSets
21
A Prescriptive Pattern
Rich Internet Application
DB
Services
Data Access Layer
AppLogic
Presentation
LogicNetwor
k
DomainServiceStateless CRUD + App Logic
class PlateViewDomainServiceIQueryable<Restaurant> GetRestaurants()IQueryable<Restaurant> SearchRestaurant(string)void AddRestaurant(Restaurant)Validation and authorization rules, Application workflows, …
Data Model class Book
DomainContextStateful view + Bindable Data
class PlateViewDomainServiceEntityList<Restaurant> Books { get }EntityQuery<Restaurant> GetRestaurantQuery()EntityQuery<Restaurant> SearchRestaurantQuery(string)
class RestaurantData members + Validation
Data Model +Metadata +Shared Code
DomainContex
t
Domain
Service
Under the covers infrastructure
24
IndexIntroduction to Silverlight technology. Silverlight for Business right now.Demo time!Futures & what will V5 bring?Question time.
25
Demo
26
IndexIntroduction to Silverlight technology. Silverlight for Business right now.Demo time!Futures & what will V5 bring?Question time.
27
Futures & what will V5 bring?
5 to 6 months for next version (Beta - only for developers) Some suggested features:› Improved databinding (non fw elements, styles,
ancestors-relative binding, static…)› 3D support› More platforms, iPhone, iPad, ..› Encoding & Streaming from the client› Consolidate SL & WPF› Reporting› Better GPU Usage; Shaders› Local DB› Better Text Rendering..
See more & participate here:› http://dotnet.uservoice.com/forums/4325-silverlight-
feature-suggestions› http://dotnet.uservoice.com/forums/57026-wcf-ria-
services
28
Futures & what will V5 bring?
See more & participate here:› http://dotnet.uservoice.com/forums/4325-silverlight-
feature-suggestions› http://dotnet.uservoice.com/forums/57026-wcf-ria-
services
29
IndexIntroduction to Silverlight technology. Silverlight for Business right now.Demo time!Futures & what will V5 bring?Question time.
30
Thanks!!