GeekArticles
XML
Core XMLOn Closures, Persistence, Web Browsers, and Yet Another Microsoft Innovation (That's Seven + Years Old) That Will Eventually Be Implemented By Everyone Else
Author: oreillynet.com |
Published: 26th May 2006 |
Visited: 126 times |
Add CommentFiled in: Core XMLUpdate: [May 25th, 2006 @ 16:34 MDT] And just like that, *POOF*, via a phantom commenter we discover a source of documentation in regards to Mozilla’s Storage API, which is kind of what I was hinting at when I mentioned code diving. However, as the above linked document points out,
Storage is a database API in Firefox 2 and above backed by sqlite. It is available to trusted callers only, which means chrome code and extensions, and not web pages.
Of course, following this sentence we discover,
It is currently “unfrozen,” which means that the API is subject to change at any time. It is likely that the API will change somewhat between Firefox 2 alpha 2 and Firefox 2 final, and also sometime between Firefox 2 and Firefox 3.
Hmmm… not so reassuring in regards to the persistence of the Storage API (pun only partially intended ;) — But not to fret,
Storage is sometimes confused with the [WHATWG DOM storage] feature in Firefox 2 which can be used by web pages to store persistent data. The Storage API is for extension authors and Firefox services only.
Which *IS* what I was referring to in my code diving comment below. What I didn’t know was the location of the documentation from which the DOM storage support sprang — namely, the [WHATWG DOM storage] document.
So we now at very least have something to focus towards in regards to documentation for something similar to what we find in IE =>5, for the next version of Fx, which for those unaware, is available in a version 2 Alpha-Bits release (definitely not trying to be funny by making any sort of connection with the bfast cereal… just in case any of you thought I might be..)
So now the next question is: How compatible is WHATWG DOM storage and Microsoft’s persistence behavior layer? Are they close enough that someone like Manos could come along and save the day with a Sarissa release that adds a common API layer for persistent storage between browsers?
To answer this should only require a bit of document comparison and some code to help determine the conclusion in one regard or another. However, if any of you know the answer to this (not the question of whether Manos will come along and save the day… > again… > but if they are compatible enough such that he, or any of the rest of us who might work with Manos to build such support, can do so and expect to be successful with these efforts) it would be greatly appreciated as to save time that could be spent coding solutions instead of researching them.
Anybody? [NOTE: Thanks for the link, phantom commenter! This is one of those cases where I don’t mind so much the Anonymous tag. Its when I find a “I hate you… you suck (at spelling)!” message that gets me all feisty towards the Anonymous label attached to such messages. Even for those who leave messages such as that mentioned, yet are willing to attach their names to their comments forces me to respect the fact that at least they are willing to stand up for what they feel. I may not like what they feel, but I at very least have a respect for them regardless :)]
Update: [May 25th, 2006 @ 14:15 MDT] Please see Len’s follow-up comments below for some EXTREMELY valuable information in regards to both Derek, as well as Neil Kipp, Len, and their combined efforts that resulted in “The MID (Metafile for Interactive Documents)” which “precedes both XUL and XAML as a markup-based GUI.”
Very cool! Thanks Len :) Information is such an important and wonderful luxury in which we all seem to either take for granted, or simply ignore due to simple ignorance to its existence. Thanks for helping me and the readers of XML.com/O’ReillyNet become a bit less ignorant than we were five minutes ago. :) Being less ignorant is something I personally seek after with vigilance. I think a lot of folks are the same way. Gracias, Amigo :)
[Original Post]
And it should!
[Post]
—
Okay, I’ve kept my mouth shut on this one for long enough. While I’ve been mostly underground hacking away at pulling together the last three years of my development life into one location (evidence), and building what I believe to be some pretty cool extension projects (even more evidence), I haven’t been completely blind to all of the talk going on regarding closures and why they do or do not matter.
NOTE: For those wondering, in a nutshell, closures allow the ability to persist state in what you could term a generic wrapper of sorts. For those of you with background in Lisp, Scheme, or Smalltalk, you already know as do those who truly understand Python, Ruby, and JavaScript.
There are others, of course, and in fact in C# 2.0 Anonymous Delegates implement, in essence, full lexical closures, and in C# 3.0/Linq — well, lets just say that the more I watch, read, listen, and code (using the latest CTPs of Linq) the more I believe Chris Sells is either a Prophet, or just happens to know a thing or two about what’s going on behind the scenes at MS.
Actually, probably both! (Wouldn’t surprise me ;)
Note: To understand what I’m talking about scroll to the bottom 1/3 of “Is The Agile Development Community Barking At The Wrong “Big Dog On Campus”?”
So, here’s the thing…
While there are those who will adamantly deny Microsoft had anything to do with the development of what is now termed Ajax, the facts are plain and simple: Microsoft via the talent pool headed by Adam Bosworth, Scott Isaacs, and Derek Denny-Brown, (Adam and Derek have since moved on, Scott is still with MS — Also: IMPORTANT — Please see footnote one below in regards the Wikipedia links provided for Derek and Scott) as well as a list of folks in whom I unfortunately don’t happen to know all that much about (If you happen to know more about who should be given credit for the development of DHTML, XMLHTTP, or anything that has to do with any of these core technologies, please let me know… It would both an honor, and my pleasure to bring these folks to the surface), were the folks behind the development of,
- The XMLHTTP object
- And DHTML.
Of course there are those who will state “Yeah, but without DOM or JavaScript Ajax wouldn’t be possible!” which I would respond with: Hmmm… Are you sure it isn’t the event model of DHTML that allows for all of the dynamic effects we find in today’s world of Ajax-enabled applications? You know the D in DHTML stands for “Dynamic”, right?
Anyway, I won’t waste any more of your or my time with such silliness. What I will do is this:
You want closures (or at very least a way to persist state between pages on the browser instead of the server) for web development, and you want to be able to do this starting with IE5 and moving forward?
No problem.
NOTE: Back on January 31st, 1999, Dave Hyatt wrote the previously linked paper in which he speaks to these same basic ideas, but does so from an XUL/RDF standpoint. So obviously this is something that has been on the brain, so to speak, of a lot of well respected (and deservedly so!) hackers from the Mozilla Foundation, as well as Safari (given that Apple is now who Dave works for), I assume Opera (need to dig deeper to find out), Konqueror (for what I hope is an obvious reason), and others in whom I’m sure have enough of an installed user base to state “We matter too!” and have this be true.
Its now May 25th, 2006. Here’s where you can find out the latest in regards to documented features of the current status of persistence in Mozilla-based projects. NOTE: From my own code diving, I happen to know that there’s more support than what’s meets the eye when visiting the previous link. But “Code Diving” and “Documentation” is obviously not the same thing.
“And the beat goes on, dada dum dadum…”
—
footnote one : I just discovered that neither Scott, nor Derek, had Wikipedia pages. I don’t have a ton of time right now to write more, but I’ve now fixed this (both linked above), adding a lead-in sentence for both. I am going to pull this out into another post as well, as if there are two people on this planet who have been more influential on the current state of todays web who don’t already have a page, then its because I don’t know about them yet (otherwise I would create a page for them as well.) If you happen to know some more details in regards to Scott or Derek, and have a few moments, please add more content, pics, links, etc… They deserve a TON of credit, and this is one way we can give it to them. Fortunately, Adam already has an entry (linked above), although its pretty small, so if you happen to know a few things that should be added, as well as links, pics, etc.. Again… Adam more than deserves to be given the extended credit for all his work that has helped shape our modern web.
Read Article Sponsored Links
Related Articles
• JQuery as Microsoft’s Library The adoption of Ajax as a programming technique has been widespread since its inception in 2005. It changed the preferences of most developers in terms of selecting the right programming language to study. Software giants have also acknowledged this feat as they release different updates on their so ...
• Microsoft on Open XML SDK A few months ago Microsoft was able to obtain control of Open XML. Because of that achievement the company fervently worked on developing Open XML not only for their own advantage but also for other developers. Among those movements is the release of Open XML SDK which will help developers in buildi ...
• CodeSnip: Unexpected behavior with C# auto-implemented properties In this code snippet, Joseph examines a scenario of an unexpected behavior which will happen while using C# auto-implemented properties with reflection. After providing a step-by-step description of the scenario, he provides the complete code listing of all the C# files used in the sample project al ...