Make Your Own Javascript Window Manager/Engine Using jQuery Draggable and Prototype

| No TrackBacks
jquery-window-engine.pngRecently I've been experimenting with jQuery and the jQuery UI interface for a few side-projects.  As of right now, I'm working on creating my own JavaScript windowing engine complete with a window manager, task bar, etc.  Not surprisingly, I found that jQuery's UI Draggable interface provides a large majority of the desired drag-and-drop functionality for free.  Using UI Draggable, I created a functional drag-and-drop windowing interface in about 20 minutes.

Here's a demo.

Even more impressive is how many lines of JavaScript it took to make this demo: six.  Eight if you count jQuery's $(document).ready:

$(document).ready(function($){
$("[id^=win]").draggable({
containment: 'document',
stack: {group: $("[id^=win]"), min: 1},
handle: $(".title"),
opacity: 0.8
});
});

Next step in this project will be to logically break things up into separate classes using Prototype's classes and inheritance.  For example, a Window class will represent a window in the browser, a TaskManager class will represent a set of Windows, etc.  To be continued ...

Did You Find this Helpful?

Did you find this post helpful, or at least, interesting?

  

Send Mark a Direct Message

If you'd like to send me a direct message, please do so below. However, I do not publicly post comments or messages submitted directly to me. So, if you're going to try to SPAM me, or my blog, you're pretty much wasting your time.

400 characters remaining

Error

About Mark

A Silicon Valley native, Mark Kolich is a full-time Software Engineer, a casual entrepreneur, and a consultant for hire. A web technologies expert, his current focus is on building powerful and robust cloud-driven web-applications using Java, PHP, Perl, AJAX, DHTML, CSS, and JavaScript. His favorite programming languages are PHP, Java and JavaScript. He uses Linux, enjoys biking to work, loves building great software, and always writes elegant, readable, and maintainable code.

No TrackBacks

No trackbacks attached to this entry.

Twitter (@markkolich)

Translate

About this Entry

This page contains a single entry by Mark Kolich published on January 28, 2009 6:00 PM.

Make Your Own Ringtones With makeownringtone.com was the previous entry in this blog.

Understanding Java's "Perm Gen" (MaxPermSize, heap space, etc.) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.