28. Fact 2/2
Silverlight always a little ahead
Silverlight release every 6
months
HTML release every 6 years
http://en.wikipedia.org/wiki/HTML#Version_history_of_the_standard
http://en.wikipedia.org/wiki/Microsoft_Silverlight#Release_history
30. What we need?
• Push updates to connected users
• Not polling the server
• Support lots of users > 2000
• Immediate Updates
• Push updates 4x sec
• Update delay max ~1/4 sec
42. Advantages of Silverlight
• Target 1 runtime
• Instead of
Browser version
IE 6 …
IE 9
FireFox 3
FireFox 4
Chrome 10
Safari 4
Safari 5
...
43. Advantages of Silverlight
• Target 1 runtime
• Instead of
Browser version OS version
IE 6 … Windows XP
IE 9 Windows 2000
FireFox 3 Windows 2008
FireFox 4
Chrome 10
x Windows 7
Mac OSX 10.4
Safari 4 Mac OSX 10.5
Safari 5 Mac OSX 10.6
... ...
44. I called Adam Cogan:
"HTML5 is the future"
"jQuery gets you almost there"
"XAML is harder than HTML"
"Who cares if AJAX polls -
Teach them to press F5"
"Don't worry too much about
what clients want
Push back on that 4x sec"
45.
46.
47.
48. #1 Making Silverlight walk
• Linq to Entities
• RIA Services - Automatic CRUD over
WCF
• [x] Checkbox
Note: IObservable makes the data feel
local
Eg. from c in Customer
...
49. #2 Making Silverlight run
• Client has to initiate the
connection
• Back to Adam's F5 solution
50. Q: How do you push data from the
server to the client?
Eg Skype?
A:
Web services (slow polling)
Remoting
UDP
Sockets
51. #3 Making Silverlight dance
Sockets
WCF
Connecting over sockets
netTcpBinding
Limitation port range: 4502-4532
52. Q: How do you push data from the
server to the client?
Eg Skype?
A:
Web services (slow, polling)
Remoting
UDP
Sockets
53. #3 Making Silverlight dance
• WCF
• Fallback to HTTP long polling
"httpPollingDuplexBinding"
54. Additional technologies
• ASP.NET MVC 3
• SQL Server 2008
• SQL Reporting Services
• Lots of automated tests
• Stress test over night
• TFS 2010
55. Additional practices
• Scrum (2 week sprints)
• MVVM (SSW Designer worked by himself)
• XP (Pair programming)
• Tests (Confidence to Refactor)
• Code reviews (Internal and by Adam)
• Automated deployment (1 click "go live")
• War room
Adam asks:
"What about TFS work items?"
"Where are my Done emails?"
87. #8 CDN for the XAP
• Testing on localhost?
• Dynamic URLs
88. #9 Obfuscate SL on Build Server
"Sometimes things are hidden under the
surface.
You just gotta know how to bring 'em out."
MacGyver
http://blog.gfader.com/2011/04/silverlight-5-easy-steps-to-obfuscate.html
89. #9 Obfuscate SL on Build Server
• Silverlight Spy
• Reflector?
• IL Spy
• Just Decompile
• dotPeek
• ...
90. #10 DTO size
"The tighter your plan, the more likely
you are to run into something
unpredictable."
MacGyver
Silverlightvs. HTML5 - How to get the best out of the webhttp://blog.gfader.com
Comparison between online auctions: Ebay, GraysOnline, AuctionsPlusThe technology showdown: HTML5 vs SilverlightHow to implement communicationTechnologies usedSoftware development practicesMy lessons learned
Living room Plank
http://blog.gfader.com
AuctionsPlusJava applet
Selling cattle and sheep over the Internet
Selling cattle and sheep over the Internet
Why not selling enough sheep
Eager=eifrig
Why did they sell
1983, Australian farmers were dialing into AuctionsPlus using a single phone number and a modem, and placing bids on rudimentary "green-screen" computers, making them unlikely tech pioneers.
2002 - Java applet screenConnect to auctionRunning for 30minCountdown 1minCool! Cutting edge at the time
They call SSW: "We need some good German engineering"
Had a long night...Next morning went to the clientDecision: I consider everything that he said
No consortium, no long agreements, not multiple interests/vendors
you need to understand bothyou need to pick the platform that lets you do your job most effecteflymake your customers the happiest Use HTML when it makes sense to your solution. Use a plugin when it provides unique functionalityWhat gets you there faster?
you need to understand bothyou need to pick the platform that lets you do your job most effecteflymake your customers the happiest Use HTML when it makes sense to your solution. Use a plugin when it provides unique functionalityWhat gets you there faster?
In order to take decision, you need to know bothAdvantages/DisadvantagesKnow the technologyKnow your toolsKnow the key featuresyou need to pick the platform that lets you do your job most effecteflyMake you customer happy!
http://johnliu.net/blog/2011/4/29/rich-or-reach-pick-one.htmlSummarizes a blog post from Martin Fowler http://martinfowler.com/bliki/CrossPlatformMobile.html
Many weeks went into thisThis is not allowed to shareEvery time Silverlight comes out we confirm
Had a long night...Next morning went to the clientDecision: I consider everything that he said
My resultsAdam's arguments....
Explain: what we seeAuction, lots, detailsBid button
Demo connection: TCP fallback HTTPOpen Cports and show the TCP socket connectionFirebug HTTP
SQL Reporting Services
SQL Reporting Services
That's ours
No emails No done criteriaURL
Details?Picture browser?
Details?Picture browser?
Not just best practice, but the only way to createSimilarities with MVC..XAML Databinding magic..
"The best way to not get spotted following someone is not following him"
Mime types on serverURL is dynamic, for local testingAdded Silverlight paramAllowHtmlPopupWindow=true so that the external XAP can open popupsAdded ExternalCallersFromCrossDomain="CrossDomainAccess" for the biddingclient
Mime types on serverURL is dynamic, for local testingAdded Silverlight paramAllowHtmlPopupWindow=true so that the external XAP can open popupsAdded ExternalCallersFromCrossDomain="CrossDomainAccess" for the biddingclient
SL SpyReflector single DLLsReflector replacement
GOOD Messages over the wire are very cryptic now Size of messages much smallerNot so good Our DTOsare very cryptic now as well ;-)
Date in XAP urlconst string filename = @"MySilverlightApp.xap"; string version = (new System.IO.FileInfo(Server.MapPath(filename))).LastWriteTime.ToShortDateString();Response.Write(" <param name=\\"source\\" value=\\"" + CDNDownloadURL + filename + "?" + version + "\\" />");
1987, Australian farmers were dialing into AuctionsPlus using a single phone number and a modem, and placing bids on rudimentary "green-screen" computers, making them unlikely tech pioneers.