silverlight for lazy “smart” programmer
DESCRIPTION
Silverlight for Lazy “Smart” Programmer. Code smart. Not code hard . By Ooi Keng Siang (www.ooiks.com). You want to build the whole world, but you only have limited time…. Focus on the right things. The Right Things. F eatures that can make your solution unique - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/1.jpg)
Code smart. Not code hard.
Silverlight forLazy
“Smart”Programmer
By Ooi Keng Siang(www.ooiks.com)
![Page 2: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/2.jpg)
FOCUS ON THE RIGHT THINGSYou want to build the whole world, but you only have limited time…
![Page 3: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/3.jpg)
The Right Things
• Features that can make your solution unique• Features that required to make a smooth
presentation• Standard and user friendly interface• Focus on the “WOW” factor• Focus on the business value• Feature that can be complete in time
![Page 4: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/4.jpg)
The Wrong Things
• Common required features but not unique– Login / Logout function– Registration function– Menu function (Copy, Cut, Paste, Save, Print, Help…)– Features implemented by competitor– Features implemented by other and freely available
• Unique features but not required– 3D bombing interface– Performance tuning
![Page 5: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/5.jpg)
Example – Collaboration Tool
• More focus on– Simple UI design for simplicity– Direct language translation– Drag & drop image sharing
• Less focus on– Authentication function– Recording function
• Don’t focus on– Highly animated interface
Remember, you only
have limited time.
Don’t waste it.
![Page 6: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/6.jpg)
Stay Focus
• Write down the list of features you want to complete in time.
• Review with your team member whatever it is good enough to implement it.
• Do a simple search whatever such feature is already done by others or any library available.
• Stay focus and implement what is in the list only.
![Page 7: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/7.jpg)
THIRD PARTY SILVERLIGHT CONTROL
You don’t need to create all those thing by your own.
![Page 8: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/8.jpg)
Be Resourceful
• Remember, you only have limited time.• Some useful Silverlight control already done by
others and it is available for free.• Don’t waste time re-implement some Silverlight
control that already available out there.• Use the right control for the right task.• Only take those you need.• Bing it before ask for help.
![Page 9: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/9.jpg)
Silverlight Toolkit
• Homepage: http://silverlight.codeplex.com• Interesting Silverlight control
– Date Picker– Auto Complete Box– Navigation– Theme– Data Form– Data Grid– And many more…
![Page 10: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/10.jpg)
Blacklight
• Homepage: http://blacklight.codeplex.com/• Interesting Silverlight control
– Drop Shadow Border– Drag Dock Panel– Animated Expender– Loading Animation– Watermarked Text Box– Deep Zoom Viewer– Syndication Feed List Box– Any many more…
![Page 11: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/11.jpg)
Silverlight & WPF Chart Control - Visifire
• Homepage: http://www.visifire.com/• All about Silverlight and WPF chart control and
graph control.• Chart designer is available too.
![Page 12: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/12.jpg)
Silverlight Drag Drop Manager
• Homepage: http://silverlightdragdrop.codeplex.com/• Award winning free third party Silverlight control• Contain all function required for drag & drop control
![Page 13: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/13.jpg)
Sincorde Silverlight Library
• Homepage: http://sincorde.codeplex.com/• Award winning free third party Silverlight control• Contain all function required to create windows
or dialog control in Silverlight
![Page 14: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/14.jpg)
Silverlight & WPF Timeline Control
• Homepage: http://timeline.codeplex.com/• Everything you need for timeline control
![Page 15: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/15.jpg)
Bing Maps Silverlight Control
• Download: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=beb29d27-6f0c-494f-b028-1e0e3187e830
• Bing Maps on Silverlight!
![Page 16: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/16.jpg)
CodePlex
• Homepage: http://www.codeplex.com/• An open source community• Host lot of third party useful Silverlight / WPF
control and third party useful library
![Page 17: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/17.jpg)
DEPLOY SILVERLIGHT TO LOCAL HOST
Run your Silverlight from your local host server not from your Visual Studio
![Page 18: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/18.jpg)
Reason for Local Host Deployment
• More professional than click on Debug in VS.• Better performance than running through VS.• Prevent bug from joining the presentation.• Easy to access to the web application.• Easy to restart web application when thing go
wrong!
![Page 19: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/19.jpg)
Deploy Silverlight to Local Host (1/7)
• Enable IIS through Windows features:– Internet Information Services– IIS 6 Metabase and IIS 6 Configuration Compatibility– ASP .NET– Windows Authentication
Windows feature can be enable through Program and Feature at Control Panel
![Page 20: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/20.jpg)
Deploy Silverlight to Local Host (2/7)
• Update MIME type for WCF (if WCF is required)– Open command prompt (cmd) in Administrator mode– Go to "C:\Windows\Microsoft.NET\Framework\v3.0\
Windows Communication Foundation\“– Enter "ServiceModeReg.exe -i"
Administrator mode can be activated through Shift + Ctrl + Enter
![Page 21: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/21.jpg)
Deploy Silverlight to Local Host (3/7)
• Enable cross domain in IIS (for WCF)– Add clientaccesspolicy.xml to IIS root folder or
– Add crossdomain.xml to IIS root folder
Default location for IIS root folder: C:\inetpub\wwwroot
![Page 22: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/22.jpg)
Deploy Silverlight to Local Host (4/7)
• Deploy web service to IIS server (if any)– Open your project in VS2008 (Administrator Mode)– Right-click on ProjectName.Web at Solution Explorer
and click Properties.– Check on "Use Local IIS Web server“.– Click on "Create Virtual Directory" button (default
name will do it).– Save and rebuild the project.
• Update project’s service references to target localhost and rebuild project again.
![Page 23: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/23.jpg)
Deploy Silverlight to Local Host (5/7)
• Publish website– Right-click on ProjectName.Web at Solution Explorer
and click Publish.– The default setting will do, click Publish.
![Page 24: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/24.jpg)
Deploy Silverlight to Local Host (6/7)
• Edit access permission in Windows 7– Open Internet Information Services (IIS) Manager.– Click on Application Pools.– Select DefaultAppPool in Application Pools list.– Click on Advanced Settings on the right hand side
menu.– Edit the Identity to LocalSystem.– Click OK and close IIS Manager.
![Page 25: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/25.jpg)
Deploy Silverlight to Local Host (7/7)
• The project will be located at “http://localhost/ProjectName/ProjectWebpage.aspx”
• Remember to edit database connection string if the project is build in other machine.
![Page 26: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/26.jpg)
“NO” BUG IN SILVERLIGHTDon’t let the bug go into your party.
![Page 27: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/27.jpg)
Try… Catch…
• Make good use of Try and Catch statement.• Especially high failure operation such as input
operation such as user input and data transfer with server.
![Page 28: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/28.jpg)
Ultimate Handler in Silverlight (1/3)
• The Application_UnhandleException function in App.xmal.cs will handle all unhandled exception error throw in Silverlight
![Page 29: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/29.jpg)
Ultimate Handler in Silverlight (2/3)
• Delete / comment out the ReportErrorToDOM function to prevent error pop out in browser.
![Page 30: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/30.jpg)
Ultimate Handler in Silverlight (3/3)
• Recommended to add your own custom error handler to record the error.
• Is a good programming practice too.
![Page 31: Silverlight for Lazy “Smart” Programmer](https://reader035.vdocuments.net/reader035/viewer/2022062410/568163fe550346895dd59b5c/html5/thumbnails/31.jpg)
Question?
• For more questions regarding Imagine Cup visit– http://www.facebook.com/myimaginecup