The battle for the presentation layer Joe Winchester Technical Staff Member IBM winchest@uk.ibm.com JoeWinchester@sys-con.com Desktop Java Editor Java Developer’s Journal Joe Winchester winchest@uk.ibm.com www.javadevelopersjournal.com © 2008 IBM Corporation What does it all really mean ? In designing a client-server application, there is a decision to be made as to which parts of the task should be done on the client, and which on the server. This decision can crucially affect the cost of clients and servers, the robustness and security of the application as a whole, and the flexibility of the design to later modification or porting. Wikipedia Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation The death of the desktop application Customers who use software delivered of the Internet can be assured of a state-of-theart experience as the software is centrally and continually updated. Microsoft has to distribute code for any change to the hundreds of millions of PCs where its desktop software resides. It thus releases new products infrequently. Vista, the upcoming version of Windows, is the first big upgrade since Windows XP in 2001. http://money.cnn.com/magazines/fortune/fortune_archive/2006/05/01/8375454/index.htm The basic pros and cons are simple: Web applications are easier to deploy, while rich clients offer faster response times enabling much more interesting user interfaces. Joel Spolsky Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation A problem has been detected and windows has been shut down to prevent damage to your computer The problem seems to be caused by the following file: SPCMDCON.SYS PAGE_FAULT_IN_NONPAGED_AREA If this is the first time you’ve seen this error screen restart your computer. If this screen appears again follow these steps: Check to make sure any new hardware or software is properly installed. If this is a ne installation, ask your hardware or software manufacturer for any windows updates you might need If problems continue disable or remove any newly installed hardware or software. Disable BIOS memory functions such as caching or shadowing. If you need to use Safe Mode to remove or disable components, restart your computer, press F8 and select Advanced Startup Options, and then select Safe Mode. Technical information: *** STOP: 0x00000050Af,0xFD3094C2,0x00000001,0xFbFE7617,0x00000000) *** SPCMDCON.SYS – Address FBFe7617 base at FBFE5000, DateStamp 3d6dd67c </joke> Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation The death of the browser application Billions of dollars are wasted every year in lost productivity as people wait for Web pages to perform duties that could have been handled better by a 1984 Macintosh-style graphical user interface application Jakob Nielsen There was one feature that was temporary in Mosaic: the Back and Forward buttons. That never made a lot of sense to us. Back to what? Forward to what? We thought there would be a better way to navigate. But no one ever came up with one Marc Andreessen Web based applications with their sucky, high latency, inconsistent user interfaces are a huge step backwards in daily usability. I love my rich client applications and would go nuts if I had to use web versions of the applications I use daily Joel Spolsky Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation The back and forward buttons never made a lot of sense Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation The double post apology Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation The lazy programmer and the suffering user Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation The usability paradox Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation Server is Server, Client is Client and where do they meet ? AJAX Thin/Dumb Fat/Thick Client Presentation Win32, etc… Logic Java Swing EclipseLogic RCP Business Presentation Rendering XAML, WPF JNLP HTML Flex Laszlo JSP, ASP Server Presentation Logic Business Logic Data Joe Winchester winchest@uk.ibm.com Data © 2008 IBM Corporation HTTPRequest SERVER FORM SUBMIT BUTTON NEW PAGE Joe Winchester NEW SCRIPT PAGE winchest@uk.ibm.com © 2008 IBM Corporation AJAX REQUEST DATA FORM JAVASCRIPT DATA RESPONSE XMLHTTPREQUEST SERVER Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation Write Once, Run Somewhere var xmlHttpRequestHandler = new Object(); xmlHttpRequestHandler.createXmlHttpRequest = function(){ var XmlHttpRequestObject; if (typeof XMLHttpRequest != "undefined"){ XmlHttpRequestObject = new XMLHttpRequest(); } else if (window.ActiveXObject){ // look up the highest possible MSXML version var tryPossibleVersions=["MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp", "Microsoft.XMLHttp"]; for (i=0; i< tryPossibleVersions.length; i++){ try{ XmlHttpRequestObject = new ActiveXObject(tryPossibleVersions[i]); break; } catch (xmlHttpRequestObjectError){ //ignore } } } return XmlHttpRequestObject;} Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation What’s Up with AJAX This Year ? ● Cool – GoogleMaps is cool – It makes the browser experience less bad ● Doom Joe Winchester – Because JavaScript doesn’t scale – Proprietary browser extensions will extinguish it – It’s the server trying to control presentation – People will stretch it and become disillusioned winchest@uk.ibm.com © 2008 IBM Corporation What’s Up with the Desktop? ● Cool – GoogleEarth is cooler – It makes the browser look like a dumb screen ● Destiny – PCs can do more than just render HTML – First class mature GUI toolkits – It gives a better user interface experience – It gives a better developer experience ● Java improvements – Mustang improvements in all areas of Java desktop – Eclipse Rich Client Platform very successful cross platform framework – JNLP delivery of software solid. 85% PCs now have Java runtime ● Microsoft improvements Joe Winchester – XAML and WPF are very rich ways to deliver UIs over HTTP. – 3D graphics, vector based user interfaces, data binding and ease of use development tools. – Vista will make use of multi core PCs and XAML will exploit this winchest@uk.ibm.com © 2008 IBM Corporation </presentation> ● The important argument is not about fat vs. thin or dumb vs. intelligent. ● ● ● ● ● It’s about rich content delivered in different ways Browser is reclaiming the client with alluring technologies like AJAX, Flex and Laszlo Win32, Java Swing and Java SWT are mature proven GUI toolkits You can’t build Google Earth or office applications on the web using scripting languages The client is back. Usability and not engineering ease of development is the new focus of IT. Microsoft with XAML and WPF combined with Vista will change the rule book and browsers will face the same exinction that 5250/3270 mainframes did 20 years ago, with AJAX being the historic equivalent of a green screen pop-up menu. Joe Winchester winchest@uk.ibm.com © 2008 IBM Corporation