php and silverlight
TRANSCRIPT
OCTOBER 29, 2009 | SLIDE 3
WHO ARE WE?
Maarten Balliauw – RealDolmen
E-mail:
Blog:
http://blog.maartenballiauw.be
Twitter:
http://twitter.com/maartenballiauw
Kevin Dockx – RealDolmen
E-mail:[email protected]
Blog: http://kevindockx.blogspot.com
Twitter:
http://twitter.com/kevindockx
OCTOBER 29, 2009 | SLIDE 4
AGENDA
What is Silverlight?
Why Silverlight?
Why Silverlight and PHP?
Building an application using both
More on Silverlight
Q&A
OCTOBER 29, 2009 | SLIDE 5
WHAT IS SILVERLIGHT?
Rich Applications are the future, today
Adobe Flex
Microsoft Silverlight
Silverlight
“A framework for providing rich applications to the browser”
“A cross-browser, cross-platform implementation of the .NET
Framework for building and delivering the next generation of
Rich Internet Applications for the web”
OCTOBER 29, 2009 | SLIDE 6
WHAT IS SILVERLIGHT?
4-5 MB plugin
Download once, distributed through Windows Update
Also available on Linux (Moonlight) and Mac
Runs in browser, on the client
Internet Explorer
Firefox, Safari, Opera, Chrome
Subset of the full .NET Framework
Originated from Windows Presentation Foundation
Rich UI: XAML / .NET code: C# - VB.NET
OCTOBER 29, 2009 | SLIDE 7
WHY SILVERLIGHT?
HTML / PHP / ASPX / AJAX
Best days are over…
Extending HTML (CSS 3, AJAX, …)
“like putting lipstick on a pig”
Silverlight
Stateful model
.NET Framework
UI Capabilities
Cross-platform
OCTOBER 29, 2009 | SLIDE 8
WHY SILVERLIGHT AND PHP?
Best of both worlds?
PHP
Rapid application programming
Ideal as back-end using JSON or SOAP
Re-use your existing PHP logic
Silverlight
Rapid user interface development
Create rich interfaces using a rich framework
OCTOBER 29, 2009 | SLIDE 9
PROGRAMMING SILVERLIGHT
XAML
“an XML file that defines user interfaces”
Tool: Expression Blend (or Eclipse)
.NET
Rich framework offering endless possibilities
Tool: Microsoft Visual Studio (2008, .NET 3.5, SP1) (or Eclipse)
PHP
i.e. Zend Framework
Tool: Zend Studio (or Eclipse PDT)
Strong separation of UI design & logic
OCTOBER 29, 2009 | SLIDE 10
GETTING STARTED
Visual Studio 2008 SP1
Silverlight Tools for VS2008 SP1
VS2008 Updates
Project Templates
Runtime
SDK
Expression Blend 2.0 SP1
Possibility: Eclipse4SL - http://www.eclipse4sl.org/
Use Web Platform Installer(www.microsoft.com/web)
OCTOBER 29, 2009 | SLIDE 11
Under active development (ongoing)
Catching up Visual Studio 2008 Silverlight editing
possibilities
But just like VS2008: still not the rich designer that Expression
Blend is…
Currently Win & Mac
V1.0 released today! Includes full SL debugging.
http://www.eclipse4sl.org
OCTOBER 29, 2009 | SLIDE 12
WHY ECLIPSE4SL?
Allows Eclipse
developers to build
RIA with Silverlight
Allows Collaboration
between
Web Designers
.NET Developers
Eclipse Developers
(Java, PHP, ..)
Common Project System
.NET Developer
Web Designer
Eclipse Developer
OCTOBER 29, 2009 | SLIDE 14
WHAT ABOUT MY DATA?
Silverlight does not include data namespaces (client
tech)!
For most apps, this forces you to use a Service
Oriented Architecture
OCTOBER 29, 2009 | SLIDE 15
COMMUNICATING WITH DATA SERVICES
Silverlight includes support for
WebClient, WebHttpRequest-classes
REST, JSON, SOAP, …
Windows Communication Foundation
… almost any kind of service can be accessed
Preferred way to communicate: through WCF
BasicHttpBinding (BinaryEncoding)
OCTOBER 29, 2009 | SLIDE 16
ZEND FRAMEWORK SOAP
What you would expect…
Webse
rvic
eZend_Soap_AutoDiscover
Zend_Soap_Server
OCTOBER 29, 2009 | SLIDE 17
ZEND FRAMEWORK SOAP
Reality…W
ebse
rvic
e
Zend_Soap_AutoDiscover “SilverlightStrategy”
Zend_Soap_Server “DocumentLiteralProxy”
OCTOBER 29, 2009 | SLIDE 18
ZEND FRAMEWORK SOAP
Zend_Soap_AutoDiscover
Generates valid SOAP 1.2
Generates almost valid “WS-I Basic Profile 1.1”
SilverlightStrategy to fix this
Zend_Soap_Server
Almost works with WS-I basic Profile 1.1 WSDL
DocumentLiteralProxy to fix this
OCTOBER 29, 2009 | SLIDE 19
COMMUNICATING WITH SOAP SERVICE
CrossDomain.xml / ClientAccessPolicy.xml
Tells SL it/who can access the service
Add reference to generate proxy, and initialize
Add handler to completed event
Call service method (Async)
OCTOBER 29, 2009 | SLIDE 21
KEYWORDS WHEN WORKING WITH DATA
DataContext
DataBinding
INotifyPropertyChanged/CollectionChanged
ValueConverters
OCTOBER 29, 2009 | SLIDE 22
WHAT ELSE IS THERE?
Localization
Isolated Storage
OCTOBER 29, 2009 | SLIDE 23
RESOURCES – SILVERLIGHT TOOLKIT
Contains controls, components, utilities to use in SL
apps (MS, source available)
AutoCompleteBox, different Panel controls, UpDown
control, Treeview, Expander, …
Charting component
ImplicitStyleManager
Various themes included
http://www.codeplex.com/Silverlight
OCTOBER 29, 2009 | SLIDE 24
RESOURCES
http://silverlight.net/
http://codeplex.com/Silverlight
http://silverlightdragdrop.codeplex.com
OCTOBER 29, 2009 | SLIDE 26
THANKS FOR BEING HERE!
http://blog.maartenballiauw.be
http://kevindockx.blogspot.com