D'Arcy Lussier - Architecting Software in Silverlight
Well after the last barn burner, let's see what D'Arcy has to teach!
12:04 - We are going over the fact that Silverlight is different than ASP.NET or WinForms, so you have to ensure that you are not bringing notions from those technologies.
12:06 - What is Silverlight?
- Rich client-side technology
- New platform for creating browser-based applications (3.0 will (maybe) allow for offline support)
- Not a replacement for ASP.NET (or ASP.NET MVC). Silverlight should not be considered an alternative, but rather should be considered complimentary.
- Microsoft is highly invested in this technology.
12:08 - When you are considering Silverlight, you need to think about it first. It is not the hammer that can hammer anything.
#1- Identify the scenario(s) - keep in mind if Silverlight is the right fit.
#2- Understand the tradeoffs.
#3- Be prepared to relearn as Silverlight is a new technology and how you used to do it won't necessarily be the right way.
12:10 - Differences:
ASP.NET - Server Side Technology
WinForms - Client Side Technology with deployment
Silverlight - Client Side Technology with no deployment. While you are not deploying it, there is still a download required, so make sure to think about it.
12:11 - Some guy just razzed on my for typing too loudly. I almost swore at him, but thought that would be unprofessional.
Persistence
ASP.NET - Cookies, Session, QueryString, Database
Winforms - Local file system, Database
Silverlight - Isolated storage
-> You don't get any direct connections to databases. You need to WCF to get your domain stuff. You also don't have the ability to access the filesystem. Silverlight applications get 1mg of storage space, if you need more, then you will need to prompt the user. What happens if they don't let you? They could also disable the isolated storage all together. There is db4o which can run within the isolated storage to give you a DB if you want to.
12:19 - Communication
You have to use WCF to communicate outside of a Silverlight Application
Security
ASP.NET & WinForms are rich and mature.
Silverlight
- Client Side - Sandboxed
- Client Side - Restricted Resource Access
- Client Side - Open User Access (if anybody can browse to the .xap file, they can access the application, if you are using ASP.NET you might want to use the ASP.NET security to provide access security)
- Communications - Cross Domain Complexity (if you want to access anything outside of the domain (devteach.com -> amazon.com) sounds complex, there is a cross domain file.
12:26
Support
ASP.NET - Well supported.
WinForms - RIP... have you met my friend WPF?
Silverlight - Moving Fast, Relies on Community. Therefore, there isn't quite as much support available for it. The silverlight team is committed to doing quick turnaround on features. It should move fast! Silverlight 3 is looking like it will be release in July. There isn't the established base that you would find in the other two technologies, so it will take longer to build the software.
12:30
Tooling
Blend is a must for 2.0 but will still be important for 3.0
Don't underestimate learning curve for XAML of how properties, binding, etc, work within Silverlight.
Blend is the microsoft tool to create XAML and is supposed to work really well.
2010 will be better than 2008 as far as XAML support.
12:33
Architecture
Silverlight
Architecture patterns like MVVM which focus on utilizing databinding features of Silverlight. MVVM is worth learning about because it allows better databinding. In Silverlight (and WPF) you don't have the choice but to use databinding. So MVVM was created to deal with the issues that we used to have in winforms with databinding.
Guidance like Prism (Composite Application Block) from Microsoft on how to separate concerns in an application.
12:48
Question time!
If your code isn't obfuscated in Silverlight, then the users can see all your Intellectual Property. WCF would solve most of this problem.
LUNCH TIME!!!