5. Admin Stuff Attendance You initial sheet Hands On Lab You get me to initial sheet Certificate At end of 10 sessions If I say if you have completed successfully
7. AJAX - behind the scenes http://en.wikipedia.org/wiki/XMLHttpRequest Connectionstring (local)vslocalhostvs. http://weblogs.asp.net/jgalloway/archive/2005/12/02/432062.aspx Shared memory comes always first on local machine http://msdn.microsoft.com/en-us/library/ms187662.aspx Last week - Additional
13. Written in JavaScript It is a lightweight JavaScript library (compressed based lib, 19 kb) Helps developer / designer to keep things simple and reusable Visual Studio supports JQuery Part of every web app / site Intellisense support A great library for developing AJAX-based application What is JQuery?
14. 1- Cross-browser (IE 6.0+, Firefox 2+, Safari 3.0+, Opera 9.0+, Chrome) 2- Powerful and easy to use Same selectors as in CSS Designer can learn it fast More readable JavaScript code 3 – Animation Tons of useful plug-ins and functionalities Why JQuery?3 good reasons
16. JavaScript “onload” is only loaded when all images are loaded in the page JQuery “$(document).ready” is loaded as soon as the Document Object Model is ready Similar to init() method in aspx page 1- Cross-browser – Explanation
21. Open Standard Media Player (jQuery + HTML5) - http://www.mediafront.org/project/osmplayer jsPlumb connector - http://morrisonpitt.com/jsPlumb/html/demo.html jQuery.popeye - http://dev.herr-schuessler.de/jquery/popeye/demo.html AutoSuggestjQueryplugin - http://code.drewwilson.com/entry/autosuggest-jquery-plugin Ajax Upload (show a preview of the file being upload) - http://www.zurb.com/playground/ajax_upload jQuery - Technically cool
32. Not just cool... Not just for testability... Not just because you get more control... Because you get more perspective! Why ASP.NET MVC?
33. Web is an HTTP highway Cool Tech Controls HTTP / HTML
34. Separation of concerns Controllers (Actions) Views Models More expressive of HTTP protocol Testable features Strongly typed support Background to ASP.NET MVC
35. The key actors in ASP.NET Webforms ASPX page gets request Page lifecycle with events Codebehind methods
36. The key actors in ASP.NET MVC Browser Request Model Controller View Response ViewModel
39. .Net 3.5 SP1 http://www.microsoft.com/downloads/ MVC http://www.asp.net/MVC/download/ Install VS2010 Advanced steps MVCContribhttp://www.codeplex.com/MVCContrib Moqhttp://code.google.com/p/moq/ What you need to get started in MVC
40. Watch the NerdDinner Tutorial http://www.asp.net/MVC Watch the MVC StoreFront Demo http://blog.wekeroad.com/ Dinner Now http://dinnernow.net/ To get going quickly
41. URL structure Testability HTTP Verbs Controllers/Actions/Views View engine So what is there to control
42. ASP.NET MVC structure (aka closer to the real thing) Model Browser Request Biz Controller Routing Repository e.g. SQL/Xml View Response ViewModel
43. Write your tests first Red-Green TDD is the purest MVC has been designed to decouple for testing Test Driven Development
44. // Arrange AdminController controller = new AdminController(mockRepos.Object); // Act ViewResult results = controller.Index(); Test a Controller
48. routes.MapRoute( “Demo", "Double/{c}/{a}/{id}", new { c = "Home", a = "Index", id = "" }, new { id = @"{1,6}" } //constraint ); Routing Constraints
49. routes.MapRoute( "Archive", "archive/{year}/{month}/{day}", new { controller = "Archive", action = "Index", year = "“, month = "", day = "" }, new { year = new YearRouteConstraint(), month = new MonthRouteConstraint(), day = new DayRouteConstraint() } ); Constraints implement IRouteConstraint Routing Constraints - Custom
50. Code from Nhaml Global.asax ViewEngines.Engines.Add(new NHaml.Web.Mvc.NHamlMvcViewEngine()); Changing the View Engine
53. Agenda - Silverlight Silverlight? RIA? Why Silverlight? “Hello world” in Silverlight Silverlight under the hood Cool stuff How to + / -
54. Microsoft Silverlight is a cross-browser, cross-platform implementation of .NET for building and delivering the next generation of media experiences & rich interactive applications for the Web.
60. Pain with web applications Scalability - Server based Performance - Request / Response Developers - UI is hard to develop Different browser different UI Intelligence on the client requires JavaScript/jQuery
61. Easy to develop and maintain Write once, run anywhereJava slogan, when Sun introduced Java 1.0 1996 Awesome User experience Look Feel Usability We want
63. Features/functionality of traditional desktop applications State maintained on BOTH client and server Run within a secure web browser environment (a sandbox) No additional software installation Rich Internet Applications
64. Client engine, between user and server Download Engine – browser extension Program logic (executes compiled programs) Rendering user interface Server communication State-ful client Changes to the view don't require (re)loading a new page RIA
65. Cross platform Browser plug in Rich Internet Application .NET / CLR in the browser (VB/C#) 4MB download Simple install Competes with other products Silverlight = RIA from MS
68. Goal: Parity in developer productivityWhat platform Richness Reach
69.
70. Goal: Parity in developer productivityWhat platform Richness Reach
71. 2000 ~ .NET .NET platform for Windows and Web applications AJAX: Web feel like Desktop WPF: (Windows Presentation Foundation) Separate UI from Code Too much Not Cross browser WPFe (everywhere) Silverlight Silverlight "History"
72. Adobe Flash, Flex Flash: Technology for animations Flex: Collection of tools to dev Flash apps Java applets / applications JavaScript / AJAX Google's GWT framework (Google Web Toolkit) JQuery Microsoft Silverlight List of RIA Platforms / Approaches
73. Windows Forms of Very limited Responsive UI Rich UI CLR on the web .NET Why Silverlight
83. XML eXtensible Mark-up Language X Application ML UI mark-up language Used in Silverlight, WPF (and Work Flow) Tools Visual Studio, Expression Blend, Notepad Can generate UI with code or XAML (faster) XAML
84.
85. Expression Design Blend 4 Visual Studio Visual Studio 2010 Silverlight Tools for Visual Studio 2010 Silverlight SDK Silverlight Tooling
95. Silverlight Limitations Offline support SL4 has Offline and Out of Browser support although more limited than WPF No Sync Framework No local DB Can manually serialize data on the Isolated Storage
96. Silverlight Limitations No Context menu No Right Click Event No context menu triggered by Right Click. Hacks exists but are not recommended due to the need to put the SL plug-in in windowless mode, introducing performance issue No “Right click – Open in new tab”
97. Silverlight Limitations No printing support Server side PDF or Open XML generation Client side manual HTML generation. Need to implement the formatting logic twice one for XAML and one for HTML Final version of SL 3 should provide more “hacks” for generating bitmaps from visuals enabling some more options for client side printing compared to the manual HTML generation. Still done through HTML bridge. This will for example enable printing of Charts.
102. Cross-browser, cross-platform support It runs on the MAC Quick to learn Core CLR on the web Easy to build better web applications Already good take up Advantages
103. Consistent .NET programming model Any .NET language, C#, VB.NET, IronPython Your favourite languages are supported on the client Significantly reduces the need for Javascript Easy deployment Advantages
104. Silverlight works in a myriad of browsers and platforms Any Web server can host Silverlight Silverlight plug-in available for Windows and Mac Moonlight the plug-in for Linux clients Mono for Silverlight in v1 Silverlight on other platforms Silverlight on other platforms
105. Platforms & Browsers (Microsoft support) Novell Support (Moonlight) IE 6.0+ Firefox 1.5+ Safari 2.0 Konqueror Firefox Opera Windows Vista, XP, 2003, 2000* Mac OS X 10.4.8+ Linux (various distros)
106. Disadvantages FUD / New Fear of the unknown XAML New technique to learn Download a plugin Small 4MB, quick install process Moving goal posts new versions = breaking changes iPhone collateral damage from Flash
107. Silverlight is quick to learn Great for .NET developers Easy to build better web applications XAML layout can be a pain (slow) Significantly reduces the need for JavaScript Conclusion: Developer Perspective
108. A great tool to overcome browser limitations Greatly improves the user’s web experience Strongly supported by Microsoft In Oz, Silverlight jobs are going up faster than the overall market In the US, Silverlight jobs are going up, at a time when IT jobs are declining Conclusion: Business Perspective
109. Already have .Net developers on staff Already have a significant .Net code base If you need cool .Net stuff like LINQ in the browser If you want a consistent language / environment in front end For now, if you don’t mind… Asking users to install Silverlight control Beta software (I would not worry, if delivery will be late 2008) Use Silverlight if:
110. Open XAML in code only mode http://www.85turns.com/2009/04/23/visual-studio-tip-open-xaml-in-code-only-mode/ How to open application in full screen mode http://www.silverlightshow.net/tips/Tip-How-to-enter-full-screen-mode.aspx Chris Anderson Business Application Demo http://www.silverlightshow.net/awweb2/AdventureWorksLOB.aspx Chris Anderson Business Application Article series http://www.silverlightshow.net/news/Welcome-Chris.aspx Silverlight Tips
114. Firebug for Silverlight http://silverlightspy.com/ Flash vs Silverlight Gallery http://www.shinedraw.com/flash-vs-silverlight-gallery/ Resources
115. Silverlight Designer and Developer Network http://www.sddn.org.au/ Sydney .NET Users Group http://www.ssw.com.au/ssw/NETUG/Sydney.aspx Sydney Deep .NET User Group http://www.sdnug.org/ Newcastle Coders Group http://www.ncg.asn.au/ Resources - Usergroups
117. Step to the next level! From Microsoft and the founders of Scrum (Ken Schwaber) Innovative For developers Learn Modern engineering practices Visual Studio 2010 and Team Foundation Server Scrum framework Assessments and certifications are available Find a local class http://go.microsoft.com/fwlink/?LinkId=187778 Professional Scrum Developer (PSD)
119. Thank You! Gateway Court Suite 10 81 - 91 Military Road Neutral Bay, Sydney NSW 2089 AUSTRALIA ABN: 21 069 371 900 Phone: + 61 2 9953 3000 Fax: + 61 2 9953 3105 info@ssw.com.auwww.ssw.com.au
Editor's Notes
Peter Gfader shows asp.netjQuery, MVC and Silverlight
Java current version 1.6 Update 171.7 released next year 2010Dynamic languages Parallel computingMaybe closures
Why?How?AJAX History ManagerSolves Back buttonSend links
(since VS 2008 SP1)http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx
jQuery is independent of browser
Open firefoxOpen www.ssw.com.au or http://www.petersofkensington.com.au/Home/ Open firebug F12Did you know Ctrl+Shift+C in Firebug?Open consoleRun $("a")Show found itemsAttach something to those links$("a").click(function() { alert(“HACKED!"); });
OpenurlShow accordion and autocomplete
PeterG Is MVC a step back to ASP script????
MVC is not a new
In MVC, the controller gets the request (actually the Action on the controller)In ASP.NET the view (.aspx page) gets the request and then the code behindhttp://www.codeproject.com/KB/aspnet/ASPDOTNETPageLifecycle.aspx
In MVC, the controller gets the request (actually the Action on the controller)In ASP.NET the view (.aspx page) gets the request and then the code behind
Create a new MVC appBrowse through the appShow URL mapps to controllerShow what controller doesShow ViewShow on what VS can do for MVCShow out of the box tests part of MVC
RIA’s introduce a client engine, between user and serverDownloaded as part of the instantiation Client engine acts as an extension of the browserResponsible for Program logic (executes compiled programs)Rendering the application's user interface and For server communicationProvides a stateful client where significant changes to the view don't require (re)loading a new page
UI Quality
MENTION HUGE DIFFERENCE BETWEEN FLASH HERE!!!!By late 2000 the first beta versions of .NET 1.0 were released2000 ~ .net.netplattform for windows and web applicationAJAX better applicationsWPF e Silverlight
Compiled to produce executable codeDynamically loaded (parsed or pre-parsed)
Silverlight Tools for Visual Studio 2008 SP1: add-on for Visual Studio 2008 Visual Studio updates, Silverlight project templates, developer runtime, and SDK.
Silverlight is quick to learnGreat for .Net developersEasy to build better web applicationsSignificantly reduces the need for JavascriptGreat for intranet line of business applicationsGreat for public web sitesBeware of your user baseFear Uncertainty Doubt (FUD) exists
Silverlight is quick to learnGreat for .Net developersEasy to build better web applicationsSignificantly reduces the need for JavascriptGreat for intranet line of business applicationsGreat for public web sitesBeware of your user baseFear Uncertainty Doubt (FUD) exists
Windows (XP, Vista, 2000?)Firefox, Safari, Opera (future)Microsoft Internet Explorer 6/7/8Max OSOnly on Intel CPU’s, not on older Power PC / M68000 modelsFirefox, Safari, Opera (future)LinuxFirefox, Safari, Opera (future), Konqueror (future)Mono Moonlight project, run by Novell
Silverlight is the answer, the question is irrelevant!