Pete Brown Applied Information Sciences, Inc. www.AppliedIS.com  Personal Site: www.irritatedVowel.com
<ul><li>Balloons </li></ul>
Carbon Calculator Project <ul><li>May to July 2007 </li></ul><ul><ul><li>Started on 1.0, moved to 1.1 early June </li></ul...
Carbon Calculator CO 2 CO 2
<ul><li>HTML </li></ul><ul><li>JavaScript </li></ul><ul><li>All hard-coded </li></ul><ul><li>Difficult to maintain </li></...
Direction and Constraints <ul><li>Deliver on or before 7/7/7 for the LiveEarth event </li></ul><ul><li>Use original calcul...
Direction and Constraints <ul><li>Keep Conservation International interaction to a minimum </li></ul><ul><ul><li>Going thr...
Our Version <ul><li>Silverlight 1.1 </li></ul><ul><li>Virtual Earth </li></ul><ul><li>Media </li></ul><ul><li>MOSS 2007 </...
<ul><li>Carbon Calculator </li></ul>
SharePoint Integration Client Silverlight Web Site MOSS Site JSON-Enabled ASMX Silverlight 1.1 Calculator Client Impersona...
Virtual Earth Integration <ul><li>JavaScript integration layer </li></ul><ul><li>Translate points from Virtual Earth into ...
UserControls as Screens <ul><li>One UserControl per screen </li></ul><ul><ul><li>Wizard page </li></ul></ul><ul><ul><li>Fu...
UserControls as Screens Main Page Page.xaml UserControl Screens FooScreen.xaml Shown/Hidden as-needed UI elements ListBox,...
Screens in the Carbon Calculator FooPage.xaml Known Animations ControlPageBase + void Show() + void Hide() - void LogPageT...
<ul><li>UserControls As Screens </li></ul>
Designer – Developer Workflow <ul><li>Fairly clean hand-off between designer and developer </li></ul><ul><ul><li>Not as go...
What Worked Well <ul><li>Basic XAML-based design </li></ul><ul><li>LINQ </li></ul><ul><li>Tools, despite being alpha/beta ...
Alpha Challenges <ul><li>No in-box controls - yet </li></ul><ul><ul><li>Created everything from buttons to drop-down lists...
Common Stumbling Blocks <ul><li>Only communicate with same server, domain, port </li></ul><ul><ul><li>http://www.AppliedIS...
Changes We’d Make <ul><li>Better animations now that performance has improved </li></ul><ul><ul><li>Used to take 50-75% CP...
Resources and Links <ul><li>Silverlight Community Site </li></ul><ul><ul><li>www.silverlight.net   </li></ul></ul><ul><li>...
Prochain SlideShare
Chargement dans…5
×

Pete Brown - AIS - Real World Siverlight Dev Camp DC

2 106 vues

Publié le

Slides from my Real World Silverlight presentation at Silverlight Dev Camp DC on November 3, 2007

Publié dans : Formation, Technologie

Pete Brown - AIS - Real World Siverlight Dev Camp DC

  1. 1. Pete Brown Applied Information Sciences, Inc. www.AppliedIS.com Personal Site: www.irritatedVowel.com
  2. 2. <ul><li>Balloons </li></ul>
  3. 3. Carbon Calculator Project <ul><li>May to July 2007 </li></ul><ul><ul><li>Started on 1.0, moved to 1.1 early June </li></ul></ul><ul><li>Jointly sponsored by Microsoft and AIS </li></ul><ul><li>Client: Conservation International </li></ul><ul><li>AIS Staff: </li></ul><ul><ul><li>Pete Brown – PM and Silverlight code and User Experience </li></ul></ul><ul><ul><li>Steve Suing – Virtual Earth, SharePoint, and some Silverlight rough-ins </li></ul></ul><ul><ul><li>Both: zero prior Silverlight / RIA, or SharePoint experience </li></ul></ul>
  4. 4. Carbon Calculator CO 2 CO 2
  5. 5. <ul><li>HTML </li></ul><ul><li>JavaScript </li></ul><ul><li>All hard-coded </li></ul><ul><li>Difficult to maintain </li></ul><ul><li>Works well, but not engaging </li></ul>Original Carbon Calculator
  6. 6. Direction and Constraints <ul><li>Deliver on or before 7/7/7 for the LiveEarth event </li></ul><ul><li>Use original calculator as starting point and keep simple </li></ul><ul><ul><li>Use existing data and algorithms </li></ul></ul><ul><ul><li>Rehost / rewrite ok </li></ul></ul><ul><li>Integrate Virtual Earth, Images and Video to show projects </li></ul><ul><li>Use MOSS 2007 lists and libraries for data store </li></ul>
  7. 7. Direction and Constraints <ul><li>Keep Conservation International interaction to a minimum </li></ul><ul><ul><li>Going through entire site redesign for multiple domains </li></ul></ul><ul><li>Keep Silverlight Team interaction to a minimum </li></ul><ul><ul><li>Preparing Silverlight 1.0 release </li></ul></ul><ul><ul><li>Use only public bits and information </li></ul></ul><ul><li>Keep download size small – no bitmaps </li></ul><ul><ul><li>Direction later retracted right before delivery </li></ul></ul>
  8. 8. Our Version <ul><li>Silverlight 1.1 </li></ul><ul><li>Virtual Earth </li></ul><ul><li>Media </li></ul><ul><li>MOSS 2007 </li></ul>
  9. 9. <ul><li>Carbon Calculator </li></ul>
  10. 10. SharePoint Integration Client Silverlight Web Site MOSS Site JSON-Enabled ASMX Silverlight 1.1 Calculator Client Impersonation Configuration MOSS Native Web Services Security, DoS Protection MOSS Lists Web Service Proxy Domain Objects (Populated with LINQ) Forms Auth Handler Document Libraries List Access Functions Host Page
  11. 11. Virtual Earth Integration <ul><li>JavaScript integration layer </li></ul><ul><li>Translate points from Virtual Earth into Silverlight </li></ul><ul><li>Draw all vectors in Silverlight </li></ul><ul><li>Handle all interaction via Silverlight </li></ul><ul><ul><li>Lots of examples now available </li></ul></ul>
  12. 12. UserControls as Screens <ul><li>One UserControl per screen </li></ul><ul><ul><li>Wizard page </li></ul></ul><ul><ul><li>Full Screen </li></ul></ul><ul><li>One XAML file per screen </li></ul><ul><ul><li>Easily maintained in Blend </li></ul></ul><ul><li>Provides a familiar window-like model </li></ul><ul><ul><li>Optimized for bunch-of-boxes UI, but could extend to more creative UX </li></ul></ul><ul><ul><li>Named storyboards for Show and Hide </li></ul></ul><ul><li>Easier to work than dynamic screens using CreateFromXaml() </li></ul><ul><ul><li>Separate classes / code-behind </li></ul></ul>
  13. 13. UserControls as Screens Main Page Page.xaml UserControl Screens FooScreen.xaml Shown/Hidden as-needed UI elements ListBox, Checkbox etc. Tip: Put semi-transparent full-screen canvas behind usercontrol for modal-like behavior
  14. 14. Screens in the Carbon Calculator FooPage.xaml Known Animations ControlPageBase + void Show() + void Hide() - void LogPageToHitbox() ControlBase # T FindByName<T>() FooPage … < AnimateShow /> < AnimateHide /> HitBox via Javascript Callback
  15. 15. <ul><li>UserControls As Screens </li></ul>
  16. 16. Designer – Developer Workflow <ul><li>Fairly clean hand-off between designer and developer </li></ul><ul><ul><li>Not as good as WPF - Yet </li></ul></ul><ul><li>Example 1 </li></ul><ul><ul><li>Steve wrote video player functionality, left it ugly </li></ul></ul><ul><ul><li>Pete styled up the UI without affecting any code </li></ul></ul><ul><li>Example 2 </li></ul><ul><ul><li>Pete created wireframe for Virtual Earth viewer and left it ugly </li></ul></ul><ul><ul><li>Steve worked with wireframe </li></ul></ul><ul><ul><li>Pete reworked UI without touching any code </li></ul></ul><ul><li>Decide on a contract </li></ul><ul><ul><li>Control names, types </li></ul></ul>
  17. 17. What Worked Well <ul><li>Basic XAML-based design </li></ul><ul><li>LINQ </li></ul><ul><li>Tools, despite being alpha/beta </li></ul><ul><li>Control Model </li></ul><ul><li>Designer / Developer Workflow </li></ul><ul><ul><li>But not as well as in WPF </li></ul></ul><ul><li>JSON Web Service Integration </li></ul>
  18. 18. Alpha Challenges <ul><li>No in-box controls - yet </li></ul><ul><ul><li>Created everything from buttons to drop-down lists </li></ul></ul><ul><li>No window / screen model </li></ul><ul><ul><li>Created based on a pattern I used in VB6 </li></ul></ul><ul><li>No concept of focus or tabbing </li></ul><ul><li>Poor animation performance / High CPU load </li></ul><ul><ul><li>Fixed in August and September refreshes </li></ul></ul><ul><li>Error handling / reporting </li></ul><ul><ul><li>Only slightly better than the old Method ‘~’ of Object ‘~’ failed . </li></ul></ul>
  19. 19. Common Stumbling Blocks <ul><li>Only communicate with same server, domain, port </li></ul><ul><ul><li>http://www.AppliedIS.com is not the same as http://AppliedIS.com or http://www.AppliedIS.com:8080 </li></ul></ul><ul><ul><li>The most common question on the silverlight.net forums </li></ul></ul><ul><li>Default file names (foo.html.js) choke AVG antivirus </li></ul><ul><li>Can’t click through to HTML page </li></ul><ul><ul><li>Silverlight doesn’t pass clicks to underlying page </li></ul></ul><ul><li>Popup Blockers don’t understand Silverlight yet </li></ul><ul><ul><li>Any HTML page you pop up gets blocked </li></ul></ul><ul><ul><li>If you accept, IE7 reloads page, trashing your app’s state </li></ul></ul><ul><ul><ul><li>Must store state at server or in isolated storage </li></ul></ul></ul><ul><li>Test Your Encoded Media Files </li></ul>
  20. 20. Changes We’d Make <ul><li>Better animations now that performance has improved </li></ul><ul><ul><li>Used to take 50-75% CPU for basic animation </li></ul></ul><ul><li>Richer Graphics : Get outside the box/screen model </li></ul><ul><ul><li>Client likes current version, but the RIA is lacking in “R” due to time / alpha / experience constraints </li></ul></ul><ul><ul><li>Still feels like a Windows application in many ways </li></ul></ul><ul><ul><li>Will be easier when layout panels included </li></ul></ul>
  21. 21. Resources and Links <ul><li>Silverlight Community Site </li></ul><ul><ul><li>www.silverlight.net </li></ul></ul><ul><li>Conservation International Carbon Calculator </li></ul><ul><ul><li>www.biodiversityhotspots.org/CarbonCalculator/Pages/CarbonCalculator.aspx </li></ul></ul><ul><li>Applied Information Sciences, Inc </li></ul><ul><ul><li>www.AppliedIS.com </li></ul></ul><ul><li>All links and demos available from my blog </li></ul><ul><ul><li>www.irritatedVowel.com </li></ul></ul>

×