10 May 2011

xSiteable 3.0 and Jankles 1.0, first views

Ok, time for a more serious update and a show and tell on what I'm currently working on. In my last blurb on this I talked about xSiteable which is the underlying framework used to create the application (which basically is an Intranet application) which we currently call 'Jenkles' (but might change if we find an even cuter name ...). And this time, let's jump straight to the application and get to the framework through it ;

Jenkles 1.0

Jenkles is basically an application for doing a few common things you might want for a portal, intranet or similar. It currently supports searching and browsing of documents, news and comments, various social media widgets (like Twitter). But the specifics of this isn't too important as they are to be extended and changed all the time.

Shown to the left is basically the front page which basically is a widget dashboard. You can add, delete and move widgets around (drag'n'drop) as administrator, or create pages where users can edit them yourself, like a personal dashboard. Everything is configurable, including the tabs at the top, all widgets, and the system is built on JQuery UI which means you can go to their website and roll your own complete look and feel.

In short, the main purpose of Jenkles is ;

1) Find, synchronize and harvest PDF (and a host of other formats to follow) files from a network drive.

2) Make documents accessible, searchable (in a few interesting ways, including faceted), browsable, previewable, printable, taggable, listable, etcable. And chuck in configurable meta data on top to create a document control system.

3) User access through (currently, more to come) Active Directory / LDAP. We've got NTLM support as well.

4) Widgets! Widgets for information access! Widgets for news! For fun! For profit! (And the next 3 months will be spent creating a bucketload of widgets, so join the fun!)

And of course the scope of the application will continue to grow as we and the community grows and extend it. The way it can grow is almost unlimited, thanks to the flexible plugin architecture of xSiteable.

Showing left is the browse functionality, but you can equally well browse documents through the faceted keywords searching, or other means as we develop them.

All documents have one page to represent them, with a preview pane, metadata sections (including document control if you're an admin), where the persistent identity scheme from Topic Maps come in handy. This is where we deal with all things identity control, including links from the document to various instances of control, be it internal or external (which might include a Wiki page that talks about the page in question, or even is the original editor place for it ... the options are endless)

xSiteable 3.0

xSiiteable is a framework I've been working on for many years. The first version was an XSLT framework that took Topic Maps input and spat out a complete website (there's a few dozen websites around the world running it still, poor things). The second version a heavy extension of that that was never released (due to laziness), and runs for example the National Treasures of Australia website. This is the third version which is some 3 years in the making, but things have dramatically changed.

The XSLT framework has been re-shaped into a kick-ass templating engine (still using some Topic Maps concepts, but is more about making good templating for professionals as easy and flexible as possible), but it is now a PHP framework created from scratch with some more modern ideas and concepts. I'll let the Wiki do the talking ;

xSiteable is a (yet another) PHP framework that tries it hardest to be simple, understandable, extensible, modern and flexible. It encompasses certain paradigms and technologies ;
  • event-driven; all class instances and their methods are driven by a structured event-stack, guaranteeing that every part of the framework is extensible, overridable, and fixable.
  • Everything is pluggable; all classes hooks into the event-stack as plugins, modules, widgets and actions. If it doesn't plug in, you're doing it wrong.
  • fully object-oriented and relying on PHP 5.3+ to make sure we don't spend a lot of time and code on past mistakes
  • topic-maps; a semantic technology for easily working with complex structures and meta data, and persistent identification management, and also makes parts of the framework ontology aware
  • a variation over the Model-View-Controller paradigm with more intuitive action classes
  • JQuery and JQuery UI as a base for JavaScripting

Basically, everything you do is write plugins and action classes that deal with the app and data, and XML templates to deal with the output (usually XHTML, but there's default support for XML, JSON, JSONP and text output as well)

Plugins, modules and widgets all share the underlying event-stack, and things happen in and out of it. There's a profiler in the logger. REST runs the underlying concepts of HTTP. There's a Topic Maps-driven data model for data interaction. And heaps of other goodies.

Sure, there's tons of PHP frameworks out there, some probably better than this one. But I do seriously think it embraces some very interesting concepts that makes it an interesting environment for rather quick development of complex application, without killing the fun, it's still easy to do, and is infinitely extensible including jumping on, overtaking and extending existing code and plugins.

Hopefully this sounds tasty. In some future installments I'll go through with some code examples and such, but do have a peak at the Wiki to see some good examples there, and otherwise let me know what you think.

2 May 2011

Ubuntu 11.04 - disaster, fear, loathing, all wrapped up in one!

I'm a huge fan of Linux (the kernel) and the many incarnations of operating systems that use from, from humble devices and cool smart-phones (using Android), to servers and desktop systems. It is today probably the most used operating system for computers today, and it all started in humble beginnings and embrace complete freedom and collaboration. It is nothing short of an amazing feat of humanity, thanks to an open and sharing geeky Finn.

I am myself an Ubuntu user of about two years or so. I've had various incarnations in the past (Red Hat and Slackware, specifically), but more or less found that Ubuntu was the distribution for me; easy to use, easy to maintain, stable, effective, well supported and well packaged.

And now, all of that might change. Well, all of the things about Ubuntu, that is. I started with Ubuntu 9.04, then I had version 9.10 for a while, and then upgraded to 10.04 (not without a hitch or two), and then a couple of months ago I upgraded to version 10.10 (which was a roaring success). If you look at the calendar you'd notice that my 10.10 upgrade is fashionably late, and that's because I have one principle in regards to upgrading my OS;

  • Wait at least 3 months until the forums are filled up with actual solutions to all the problems you might bump into.

And then on Saturday I broke my principle, partly because I felt brave and confident that Canonical (the people behind the Ubuntu distribution) had it all under control, and partly because of the success of the last upgrade. What could possibly go wrong?

Well, the first problem was that I hadn't been paying attention to the gossip of the Ubuntusphere, and didn't know that they had replaced the Gnome2 window manager with Unity, a window manager spawned from a more successful netbook line of software. I'm sure it might have been a good choice for netbooks and lighter machines, or even lighter users, but for us heavy-weight developers it turned out to be a disaster, bordering on unusable.

Just like the disastrous change in Ubuntu 10.04 of moving the window control icons from the right-hand side (where we all know them, from Windows and Mac to most Linux) to the left (back to some distant past x-windows time-travelling exercise gone wrong) against all cries, and simply ignoring all usability issues that came from it, Unity brings with it a whole bucketload of additional confusing and counter-intuitive concepts. And, against the nature of Linux itself of complete freedom and a multitude of choices, Unity is pretty much non-tweakable. A lot of the time as I was trying to get to grips with the new user-interface I thought to myself, "surely there's a config option where I can tweak this to be usable?" but no such thing exists. Want the taskbar at the bottom instead of the left-hand side of the screen? Tough. The menus were confusing enough, but the plain stupidity of Unity as a screen real-estate saver then filled up with advertisement for programs I might want to download and install? Unbelievable. And moving the menus from the top-left panel where you could rely on a consistent and static place for all your programs and settings you now get a mish-mash of scattered options by right-clicking and clicking on "more" options! I'm sure a lot of it sounded cool on paper, but in practice this is just terrible.

Anyway, the biggest gripe I have (apart from shifting the window bar icons and titles into the top-panel when maximized!) is the new taskbar concept, which is a taskbar and quick-start menu, wrapped into one. It's similar to the Max OSX bar where you fly over your programs, and if it's running you get some little indicator that it is indeed already running, meaning instead of starting it when you click on it, you switch to it. Fine enough unless you're like me and have many windows of the same program open at the same time. At all times I have at least 7-9 Chrome windows open, each sporting an assortment of tabs. Want to switch between these windows? Why, simply flick your mouse to the left-side of the screen to open the taskbar (with the added delay until it comes up), scroll till you get to the Chrome icon, click it. It has a tiny indicator on it saying there's more than one window open, so you click it again where minimized versions of those windows zoom out and gets placed on the screen with a cool animation, and now you click the window you wish to switch to (and note the small windows have no titles just graphics, and if you squint really well you might pick out what the window might contain, but most of the time it's a random click'n'try process). So when I'm in multiple windows that rely on eachother (one window is the program I'm developing, another a test window, then there's the debug window, a JS debug window, documentation, and on and on) I have to go through this whole ordeal to switch between them if I was arrogant enough to want them maximized (and when you develop complex programs that is a guarantee). The only solution is to have them not maximized and placed around in some fashion where I can click on them, if I can read the window bar text. Horrible.

I'm almost lost for words as to why Ubuntu has chosen to now use Unity as the default window manager, given that a majority of users would still be geeks and more or less tech-savvy people. As a supplement, fine, but the default thing for all Linux geeks and users? Shocking.

Needless to say I was less than impressed, and pondered what to do. And then a stupid thought came to me; I just read about the sexiness of Gnome3, so why not try that? Yeah, a bit premature at this point, but I was seriously that disappointed with the whole Unity ordeal, willing to try desperate measures to get away from it (also, not realizing that Gnome3 and Unity are actually terribly similar, and if the story had a successful ending at this point, I'd actually probably been very, very unhappy at this point, so it's kind good that it didn't happen as planned).

Ok, so I found a page or two that showed how to add a ppa to do the trick, and a apt-get dist-upgrade later I rebooted. However I rebooted into a black screen where nothing except a solitary mouse happened. Oops.

Fast forward a number of reboots and apt-get install/upgrade gnome* later, I just thought, hmm, this isn't going to work. Could be graphics drivers, but I had a mouse so I had no idea. And reverting back to Unity was not really an option (as the big warnings had told me), however someone had made a ppa for purging the Gnome3 from the system. I ran that, and it make things even worse (but in a good way I learned later) where I couldn't even open a session of any kind. Ok, back to the terminal and Lynx trying to work things out, and then I stumbled upon a tool which I can't for the life of me remember (menustat, statmenu, something like that?), but is a console tool for tagging what your distribution should contain. So I tagged out ubuntu and in kubuntu (because I thought might as well give that a try), let the program churn away, and rebooted ...

... into a Ubuntu 11.04 with Gnome 2.* classic user-interface. And yes, in hindsight I should have known that the way to do it is to log out of Unity, click my username again for login, but before putting in the password select 'ubuntu-classic' from a drop-down menu at the bottom, and then log in, and I would have gotten something almost like what I've got now, but doing it correctly is for wimps.

However, what I've got right now is somewhat better; it's a mutated mix of Ubuntu gnome 2.* and KDE (and I'll see what I want to remove, little by little), but in the purging effort it cleaned up a few snags I had been struggling with, like the graphics card (graphics now much smoother and faster), now unstuck options, some sound problems in some packages, and a cleaner theme throughout.

All in all, over the weekend I thought I'd screwed up my system seriously (although I did use the great Ubuntu One service to back up my essentials). But after a purge or two, everything snapped back to normal, all programs working, all personal settings intact. Now that stands as a testament to the greatness of Linux if nothing else, and I'm back to being a somewhat happy camper.

But I'm not happy in that I think Ubuntu is not going to be for me anymore. Both Unity and Gnome3 seems like a step in the wrong direction, so perhaps KDE is my next try, we'll see as the next version of the Ubuntu saga unveils. Or, failing that, this might be a good time to go shopping for another great distribution. The options are, unlike Unity, endless.