Displaying articles with tag "lace"

There are 16 articles with this tag.

Jun 01

Lace 0.2 is a ground-up rewrite of Lace based on my experience developing 0.1.x as well as information from the many Ajax and remote scripting websites, articles, discussions, examples, best practices and applications that have come to my attention since creating Lace.

As well as a ground-up rewrite, Lace's purpose is no longer to be a universal PHP/JavaScript framework. After releasing Lace 0.1.0 only a few weeks ago, I've realized there are a number of existing projects in this space: SAJAX, JPSpan, Dojo, SACK; other related projects: JavaScript O Lait, Sarissa, Prototype, JSON, etc., in addition to numerous Ajax blogs.

With this new information, I've decided that rather than reinventing the wheel (and likely ending up in way over my head), development of Lace 0.2 will take advantage of the wealth of existing work to build upon the chat/communications application that started it all. The core framework of Lace 0.2 will still be unique, modular and hopefully reusable, but it will be much simpler than originally planned and not meant to be used as a universal toolkit.

As a chat/communications application, Lace will still not be anything new. But it will be useful to me and my friends and colleagues and hopefully to a few of you as well.

Tags: ,

May 31

Work on Lace 0.1.x is becoming more and more difficult (because of its hodge-podginess), and 0.1.3 will be the final release of the 0.1.x codebase. Once 0.1.3 is out of the way (within another day or two), I'll be focusing entirely on 0.2 - the ground-up re-write.

Tags:

May 25

Update: (1 June 2005) The information in this article is now out of date. Lace development has changed directions slightly. Read about it here.

My recent development experiment, Lace, an 'Ajaxian' web application, has raised many questions as to what exactly Lace is, what it does, and why it exists in the first place. Rather than trying to explain Lace via the Lace demo itself, this article intends to shed some light on the Lace project, from its beginnings to its many possible futures.

In The Beginning

The idea for Lace came from many years of maintaining a very small web-based 'chat' room (10-12 users), mainly for my friends and colleagues to use when bored at work when IM services arebeing blocked by evil sysadmins. It was a small project, but working on it was something I loved to do; it had the bonus of garnering praise from my (mostly non-developer, non-designer) friends who used it nearly every day.

The features were minimal, but my little chat room looked good, and did its job very well. I was constantly thinking up ways to improve the back-end, either to ease in maintenance or to add/change features.

Ajax For Everyone

With all the buzz surrounding XMLHttpRequest (or Ajax, if you prefer) and the release of the stunning Google Maps, it finally hit me (after years of avoiding it) that JavaScript was nearly ready for mass consumption. With 5th generation browsers on their way out more than ever, and cross-browser DOM support becoming less brain-bending, the power of JavaScript (and more specifically, the XMLHttpRequest object) was a viable option for developing usable web applications.

Chat, meet Ajax. Ajax, chat. But there was more to it than that. The growing acceptance of XMLHttpRequest (be it a fad, or not) made that tiny little yellow light bulb above my head slowly light up, and the development of Lace began.

What is Lace?

Lace is not necessarily a chat room (though in its current incarnation it is being demoed as one), or a chat server, or anything related to chatting or instant messaging. Lace is the application, or framework, that the demo chat room is built upon -- a simple, open communications framework. The idea behind Lace is to allow developers to easily create web applications that consistently and continuously share data between multiple clients over HTTP. Chat rooms, RSS readers, 'rich client' web applications, server to server communications and distributed services are just some of the possible uses of Lace.

But Lace Clearly Is A Chat Room!

Lace's initial release is a simple chat room, yes. The chat room is my initial experiment, a proof of concept, to get my bearings and determine the best way to turn the idea in my head and notes into a working application. Lace isn't the chat room, but the ideas and expectations of the framework behind it.

Lace's Current Inner Workings

At Lace's core is an HTTP polling mechanism. That is, the client repeatedly connects to the server looking for changes in the data. If there is no change, then nothing happens. If there is a change, then the new data is fed to the application. This polling mechanism is dynamic. If a client shows no sign of activity beyond the automatic polling cycle, the polling interval slowly becomes larger. After a short time, it is possible for a client to stop polling altogether, and no more communication with the server will be possible until it is manually switched back on.

This dynamic polling mechanism has two side effects. The first is reduced HTTP communications back and forth to the server. Bandwidth is saved by only transmitting necessary data rather than the entire page. Additionally, by dynamically lengthening the polling interval, inactive clients become less 'greedy' over time. The second side effect, is that once a client has stopped polling it is essentially dead to all communications until switched back on. However, there's nothing preventing Lace from polling on into eternity if you so choose.

Of course I should mention that when data is submitted by the user, Lace immediately returns an appropriate response outside of the automatic polling cycle.

The alternative to clients repeatedly polling the server looking for changes is server push. With push, the client-server connection remains open and data is transferred when necessary. However, this has the side effect of bogging down the server with multiple open connections, affecting all clients with the decrease (or lack) of performance.

Because of the potential for server meltdown with push methods, it is my opinion that server polling, especially dynamically variable polling, is a more scalable solution to the problem of quickly and consistently updating clients with new data.

Walking the Walk

Sure, the ideas behind Lace are all well and good, but will it work? Will it be a viable solution to anyone's problem? Will it even get off the ground? I just don't know.

A recent backlash against XMLHttpRequest 'breaking the web' for similar reasons to the anti-Flash sentiment of a few years ago may steer Lace's future. (Usability is key on the modern web.) Or perhaps because of the enormous attention 'Ajax' is getting, it will no longer be 'in style' in a few months, and passed off as a fad. (Possible, sure.) Maybe someone, somewhere, has already developed a better alternative to XMLHttpRequest and we just don't know about it yet. (Very possible.) Or, maybe I simply decide that Lace isn't turning out the way I had hoped and it gets scrapped. (It wouldn't be the first time someone ditched an idea.)

Happy Endings

No matter what happens to Lace, and above and beyond anything else written here, it is the experience of creating something (whether viable or not) that drives me. So in that regard, I'm happy.

May 25

Lace, the simple, free Ajax Experiment version 0.1.2 is now available. Mostly a bugfix release, Lace 0.1.2 solves a few more HTML filtering issues and includes a few minor feature tweaks based on user feedback.

Download

Lace 0.1.2

Changes in Lace 0.1.2

  • Duplicate posts are now prevented in the client engine.
  • Action command now accepts forward or back slash: /me likes Google is the same as \me likes Google.
  • Idle confirmation OK and Cancel buttons now act as expected.
  • AutoLinks now support the https scheme.
  • AutoLinks: URL characters are now run through htmlentities() rather than urlencode(). This solves the "%2F" trailing slash issue.
  • Several server engine HTML filter issues resolved
  • Client engine polling interval now begins a fresh cycle when a message is posted.
  • LivePreview and the actual posted message now share the same maximum length as defined by LACE_MAX_TEXT_LENGTH in config.php.
  • Long names are now truncated to prevent layout overflow.

Thanks to everyone who stopped by with comments, and especially to those who uncovered some of these issues.

Tags:

May 23

Update: (24 May 2005) A third bug squeaked past the 0.1.1 release. Also related to AutoLinks, the third bug intermittently caused AutoLinks to add URL encoded characters to complex URLs.

The Fix: Open up /lib/lib_lace.php in your favorite text editor, and replace line 436 with the following.

$text = ''.htmlentities($urltext).'';

Or, if you're more comfortable making smaller changes, replace urlencode($url) with htmlentities($url).

Thank You

First of all, thank you to everyone who has stopped by to check out Lace. And thanks to Dion and Ben of Ajaxian, and all the fine del.icio.us folk for the unexpected exposure.

Lace 0.1.1

Lace 0.1.1 solves two issues related to the ability to post 'blank' messages. In the first issue, the HTML filter allowed a message to be created that was completey blank. A side effect of this was that names and message times were scrambled when displayed.

In the second, it was possible to create a 'blank' AutoLink. If link text was left out of the AutoLink message, its place was not being taken by the URL. So, for example, if the AutoLink messsage was simply http://www.google.com, the link text should have been http://www.google.com. Instead, no link text was created, and thus the link was 'blank' and unclickable (). This issue caused no side effects.

Download

Lace 0.1.1

Bugs & Improvements

If you happen find a bug, or have an improvement, please report it to me so that I can include it (or a fix for it) in the next release.

Tags:

May 17

A few months ago I started experimenting with the XMLHttpRequest object after seeing it work its magic in Gmail and Basecamp. The result of too many hours and not enough showers is Lace, an experimental 'Ajax' communications engine. It's sat dormant for about a month now, but it was just dying to get out - despite still being in development.

Find out more and view the Online Demo. Or, if you're feeling absoultey wacky, jump right in and Download Lace 0.1.0.

Tags: