|
Chronicle of the Xul Revolution |
Richer Browsers or Rich Clients avoid excessive server roundtrips, allow offline and nomadic use, and offer a rich UI a la Word or Lookout using
With the rise of XML web services, rich XML UI markups a la XUL and built-in, secure, auto-installation using XML startup scripts over HTTP a la Web Start the difference between Rich Clients and Richer Browsers will blur.
Selected quotes from the Gartner and InfoWorld analyst reports sprinkled with plugs for their ad-paying clients' ware:
The Triumph of High-Fidelity ("Smart") Clients. By 2005, as much as 60 percent of new .Nyet applications will be designed with high-fidelity client deployment in mind (0.7 probability).
Translation: 2005: 60 % Windows Forms Rich Clients; 40 % Web Forms Thin Clients
Bottom Line. Enterprises should prepare for a resurgence in client-side application deployment, which will, this time around, result in more of a hybrid approach that shares code between clients and middle-tier application servers. This will mean more-capable desktop hardware requirements, but without the increase in TCO [Total Cost of Ownership] typically seen in this deployment model.
Translation: XUL + Web Start + Web Services is the future
Read the full Gartner report by D. Smith entitled "The Return of Client/Server - or, at Least, Rich Clients" online at http://www.gartner.com/reprints/microsoft/104982.html.
Emerging distributed servies-oriented computing models further call for faster, smarter workflow than is attainable via browser-based DHTML and Javascript.
Translation: Web Services call for rich UIs a la XUL and SVG
The one commonality among all vendors, however, is the mission to create a smart-presentation layer and rely on localized processing to streamline interaction.
Many of the capabilities from today's innovator may ultimately take root directly within next-generation Web browsers, or the may be embedded natively within operating systems and application servers.
Translation: Only open standards such as XUL, SVG and XHTML will get wide distribution; the Internet is for everyone; XML UI markup will relegate single-vendor runtimes to device driver status.
Rich Internet application vendors will enable developers to bring to market more useful applications in less time.
Translation: XML UI markup makes building rich Internet apps as easy as building Web pages.
Read the full InfoWorld report by James R. Borck entitled "Building a better browser" online at http://www.infoworld.com/articles/ap/xml/02/10/14/021014apclientdev.xml.
How does XUL compare with Microsoft Foundation Classes (MFC) or Windows Forms? Check out the three "Hello World" contestants and see yourself.
MFC Contestant
// HelloMFC.H class CSimpleApp : public CWinApp { public: virtual BOOL InitInstance() { m_pMainWnd = new CSimpleFrame; m_pMainWnd->ShowWindow( m_nCmdShow ); m_pMainWnd->UpdateWindow(); return TRUE; } }; class CSimpleFrame:public CFrameWnd { public: CSimpleFrame() { Create( NULL, "Hello MFC" ); } protected: DECLARE_MESSAGE_MAP(); afx_msg void OnPaint(); }; -------------------------------------------- // HelloMFC.CPP CSimpleApp helloApp; BEGIN_MESSAGE_MAP( CSimpleFrame, CFrameWnd ) ON_WM_PAINT() END_MESSAGE_MAP() void CSimpleFrame::OnPaint() { CPaintDC dc( this ); dc.TextOut( 200, 200, "Hello World from MFC" ); }
Windows Forms Contestant
using System; using System.Windows.Forms; public class SimpleForm : Form { private Label label1; public SimpleForm() { label1 = new Label(); label1.Text = "Hello World from Windows Forms"; Controls.Add( label1 ); } [STAThread()] static void Main() { Application.Run(new SimpleForm()); } }
XUL Contestant
<window> <label value="Hello World from XUL" /> </window>
And the winner is... Do I need to comment?
Paul DiLascia, King William's Court Jester of Windows++ fame, wrote a tiny XUL motor for Windope Forms in C# dubbed Motlib. Motlib (http://motlib.net) shows how a bunch of XML tags break the Visual Studio generated spaghetti code lock-in.
#region Visual Studio generated spaghetti code /// <summary> /// required method for Visual Studio lock-in - do not dare /// to touch this code by hand; always use the latest /// and greatest Micropoly Milk Machine /// </summary> private void InitializeComponent() { this.mainMenu1 = new System.Windows.Forms.MainMenu(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuItem4 = new System.Windows.Forms.MenuItem(); this.menuItem5 = new System.Windows.Forms.MenuItem(); this.menuItem6 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); this.menuItem8 = new System.Windows.Forms.MenuItem(); // // mainMenu1 // this.mainMenu1.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] { this.menuItem1, this.menuItem3}); // // menuItem1 // this.menuItem1.Index = 0; this.menuItem1.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] { this.menuItem2}); this.menuItem1.Text = "&File"; ... }
vs.
<!-- feel free to change the XUL markup with whatever text or XML editor you like --> <mainmenu id="MondeMainMenu"> <menuitem text="_File"> <menuitem text="E_xit" /> </menuitem> ... </mainmenu>
Read the full story entitled ".Net GUI Bliss: Streamline Your Code and Simplify Localization Using an XML GUI Language Parser" in the Micropoly Prawda November issue online at http://msdn.microsoft.com/msdnmag/issues/02/11/NETGUIBliss/
Paul DiLascia Quotes:
No human programmer would code this way, so why accept it from a mechanical one? A code generator is fundamentally a workaround for something that's missing. You can call it a wizard, but the wizard has no Brain.
GUI resources like menus and forms belong in files that are easily translated not embedded in procedural code instruction.
It's not hard to write a mini-XUL that supports only the widgets you need. XUL - or something like it - is just the ticket to GUI greatness!
Please send comments on our web pages to our public xul-talk mailinglist or to a member of our web team. | Copyright © 2003, 2004, 2005 Open XUL Alliance |