Rust + Gtk = Wow

As I’ve been experimenting with writing Rust apps, I attempted to create a small little GUI application. At first I attempted to setup everything with Qt, but C++/Qt interoperability with Rust is painful. Very, very painful. I experimented with some more radical UI frameworks such as Azul and Conrad. These have a lot of promise going forward. However for the here and now, I recommend looking at gtk-rs, Rust binding for Gtk.

With a bit of experimentation, looking through gtk-rs examples, some other projects using gtk-rs, and lots and lots of searching, I was able to create this:

This is a code viewer that lets you open Rust code, and view it. Yes, you are looking at a portion of the code that runs that code viewer. Getting the GtkSourceView working took some coaxing. Also I had to learn how to use the Glade UI editor for Gtk. Overall it took me about 2 to 3 hours to pull this off. I am very impressed with the results, and it opens up new possibilities for me.

Web Play Made Fun with ExtJS

At work I’ve started working with ExtJS for the user interface for the web application I’m helping develop.  I’ve always had reservations about using Javascript.  Or rather I’ve always hated dealing with inconsistencies in DOM handling in browsers.  Whenever I deal with CSS, I always hate dealing with cross-browser checking.  Fortunately with increased popularity of Gecko-based browsers (Mozilla Firefox) and Webkit-based browsers (Google Chrome), I have to deal with headaches of a browser incompatibilities less often.  However writing pure Javascript can be a bit daunting, and a library like JQuery or ExtJS comes in handy.  So I’m still not sold on the concept of building everything in a RIA (Rich Internet Application) context.  However using a Javascript library sure makes my website coding-hacking more palatable.

Web 2.0: Hype or Future?

I recently applied for a web designer job, and among the requirements was a knowledge of Javascript and this new thing, AJAX. Truth be told, I never loved (or love) Javascript and never really enjoyed most client-side based web gimmicks (applets, Flash, etc.). In a few cases, these technologies were beneficial to the site deployed. For the most part I just found them to be irritating and in the way. Not to mention browser incompatibilities (Heck, they can’t handle a simple idea like CSS correctly why should they a full blown scripting language).

Needless to say, I avoided Javascript through most of my career, and mostly used it to “authenticate” on the client side (if there is such a thing as security on the client). When I heard of AJAX, I thought oh know… another gimmick and now it wants to “grope” my precious server with its “XMLHttpRequests”. Then my good friend Dima mentioned Bindows. Interesting a full desktop-like application in a browser. Today at a web seminar by MySQL, they showcased Zimbra. An open source full communications suite in AJAX. Impressive.

So what is this Web 2.0? The idea is to get more interactive applications on the web. The goal is to integrate all the information floating on the web, condense it and present in a dynamic manner. Hence the use of AJAX (or Javascript) as the underlying front end for web browsers. Yet the idea is broader than that. Not only are computers with web browsers involved, but also the myriad of different network-capable handheld devices. An interesting and lofty goal but can it be achieved?

Technology wise, the extensive use of Javascript and XML is produces impressive results. The idea of finally separating the presentation layer from the business logic and data is commendable. Before anyone starts waving the flag of revolution and buys stocks for the Web 2.0 boom, here are a few thoughts. The use of Javascript is SO intensive there is a need for whole UI and layout toolkits. In the open source community there are around 30 right now. In the desktop realm there is maybe 10 UI development kits: Swing/AWT, Gtk, Qt, along with the native Mac and Windows widgets being the most popular. Some standards exist for linking the many parts together but they vary widely. As with any standard, every vendor has their own perspective of how it should be implemented. Microsoft who is the founder of this entire paradigm, is shifting their attention to .net, which will mean locking in the client to the platform. And a swift kick to the head for the community effort. Finally even what to expect from a Web 2.0 application is not set in stone.

My analysis is this: the current situation is a messy free-for-all. The standards will almost certainly be abused, and you can look to the usual suspects for that one. The toolkits are all over the place. Finally a known fact is that a project without a rigorous specification is going to go off on a tangent. Tangents like these cause what is called in my part of the woods “development hell”.

A case in point is CSS. The W3C has done in my opinion an amazing job of nailing down the idea of what a stylesheet should do, and how. The details are there, and the theory is beautiful. Now lets look at the vendors or what-my-web-browser-really-does side. The specification is rarely ever held to, and thanks to Microsoft’s Vader-like grasp on the browser market is abused terribly. The folks at Netscape and the Mozilla Foundation do a much better job but its not perfect. Just ask any web designer who wrote an aesthetic layout in CSS how many hoops they had to jump through to get it work on the majority of browsers. If we can not get something as simple as CSS right, then I fear other more complex technologies will simply break.

In the end, I think AJAX will benefit a few large companies. Web developers and designers will still groan and will dream of a better, simpler web. Web 2.0 will not finally get everyone on the same page. Then again, I might be completely wrong.