What is Glow?
API Quick Reference
JavaScript is required to use the quick reference
Glow is a JavaScript library which aims to make working with JavaScript and the DOM easier. It tries to do this by abstracting common tasks, hiding cross-browser issues, and providing a set of user interface widgets.
If you want to a quick introduction to using Glow, try our getting started guide, or browse the API documentation to see the full range of features.
Why did we build Glow?
Glow isn鈥檛 the 成人论坛鈥檚 first JavaScript library, although it is the first to be released as open source software.
Previous libraries built by 成人论坛 for internal use had been around since 1999, and offered fairly primitive features compared to the range of modern libraries available today. Some were built to support Internet Explorer 3 and Netscape Navigator 3, which gives an indication of their vintage.
In 2007 it was clear that these libraries were in need of attention. The 成人论坛 was beginning work to modernise its , refresh the of the site, and update its .
These events prompted us to start looking at potential replacements for our ageing JavaScript libraries.
Why not use an existing library?
There are a range of excellent open source JavaScript libraries available, the most popular amongst the 成人论坛 developers we spoke to being . In fact, an early version of the new 成人论坛 homepage was built using jQuery, and we still admire it enormously.
However, on reviewing the major libraries we found that none met our , with browser support in particular being a major issue.
Our support standards are based on many factors including usage stats and the upgrade paths available to users. For instance, when we had a significant number of users on Safari 1.3, we refrained from asking them to upgrade to Safari 2 as that would require them to buy a new operating system (OSX 10.4).
At the time we were still fully supporting IE5.5 and Safari 1.3, among others, and we continue to support Safari 2. On top of this, we actively avoid causing errors in our 鈥淟evel 2鈥 browsers. No major libraries were compatible with these requirements, and there was no guarantee that even if they were, they would not change their policies.
How about contributing to a library?
Perhaps we could have contributed code to an existing library to add support for the older browsers our users had? Many of the libraries had previously supported some of our "problem" browsers, and actively chosen to drop that support. We felt it was unlikely they would be enthused about bringing back old browsers they were probably glad to see the back of!
Forking an existing library to add the necessary browser support was another option, and one that might have had short term benefits. However, as our fork inevitably drifted apart from the parent project we would be left with increasing work to maintain feature parity, or risk confusing developers using our library. We quickly dismissed this idea.
Also, as many 成人论坛 pages are built by separate development teams, we needed a library that could work alongside different versions of itself, without encountering namespace issues or CSS clashes. None of the major libraries were capable of doing this.
Weighing up all the factors, we decided to build a JavaScript library tailored to our requirements. Naming it Glow, now that's a story for another day...
Why open source Glow?
The 成人论坛 has a strong tradition of supporting open source software, we use it widely across many of our platforms and it performs a vital role in our day to day business.
We have also released numerous software projects under open source licences in the past, including various , , even state of the art .
Glow was an obvious candidate for open sourcing. As a JavaScript library, it's free of dependencies, self contained and therefore easy for anyone to use outside the 成人论坛. The more important question we felt was, "why not open source Glow?". We couldn't think of any answers to that.
We chose to release Glow now, at version 1.5, as we think it's quite stable and reasonably useful for a variety of users. More importantly, we are beginning to plan what changes to make for version 2.0. We have always sought the opinions and suggestions of our users, the talented developers around the 成人论坛.
Building a wider community to seek their feedback and help us shape the next generation of Glow was an opportunity we couldn't miss.
So, we invite you to take a closer look at Glow, try it out and let us know what you think.