310 likes | 451 Views
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
E N D
Silverlight forLazy“Smart”Programmer Code smart. Not code hard. By OoiKeng 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 • 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
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
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.
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.
You don’t need to create all those thing by your own. Third Party Silverlight control
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.
Silverlight Toolkit • Homepage: http://silverlight.codeplex.com • Interesting Silverlight control • Date Picker • Auto Complete Box • Navigation • Theme • Data Form • Data Grid • And many more…
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…
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.
Silverlight Drag Drop Manager • Homepage: http://silverlightdragdrop.codeplex.com/ • Award winning free third party Silverlight control • Contain all function required for drag & drop control
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
Silverlight & WPF Timeline Control • Homepage: http://timeline.codeplex.com/ • Everything you need for timeline control
Bing Maps Silverlight Control • Download: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=beb29d27-6f0c-494f-b028-1e0e3187e830 • Bing Maps on Silverlight!
CodePlex • Homepage: http://www.codeplex.com/ • An open source community • Host lot of third party useful Silverlight / WPF control and third party useful library
Run your Silverlight from your local host server not from your Visual Studio Deploy Silverlight to Local Host
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!
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
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
Deploy Silverlight to Local Host (3/7) • Enable cross domain in IIS (for WCF) • Add clientaccesspolicy.xml to IIS root folder or • Addcrossdomain.xml to IIS root folder Default location for IIS root folder: C:\inetpub\wwwroot
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.
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.
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 OKand close IIS Manager.
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.
Don’t let the bug go into your party. “No” bug in Silverlight
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.
Ultimate Handler in Silverlight (1/3) • The Application_UnhandleException function in App.xmal.cs will handle all unhandled exception error throw in Silverlight
Ultimate Handler in Silverlight (2/3) • Delete / comment out the ReportErrorToDOM function to prevent error pop out in browser.
Ultimate Handler in Silverlight (3/3) • Recommended to add your own custom error handler to record the error. • Is a good programming practice too.
Question? • For more questions regarding Imagine Cup visit • http://www.facebook.com/myimaginecup