Over the past week I’ve described Network-Oriented Architecture (I’m going to refer to it as NOA in this post to save my fingers), which is a my "ideal" Web-based programming model that I’ve been brainstorming for about a year, and given a simple example of it in action. The reason is that I’ve been talking with a few other people who are thinking along the same lines–that the current programming models are limiting what Web applications are capable of, there’s a better way to do things, and we’d like to figure it out sooner rather than later. I get the feeling that the wider technology community is sensing this as well, as evidenced by Read/WriteWeb’s article asking "What’s next after AJAX?"
When I started brainstorming a new programming model, I started by asking myself this question: "In a perfect world, with no limitations, how would you want to program Web applications?" The posts you saw on NOA are a key part of that puzzle, but there’s one more piece that I haven’t shared yet. And that is the actual development workflow and programming environment in which new applications are constructed. So bear with me, one more post on this topic and then I’ll get back to some easier reading
What I realized when I asked myself this question is that the programming environments we had a few years ago (to build desktop applications) were actually much more advanced than what we have now (to build Web applications). I consider this to be because we currently don’t have a good programming model for the Web which blurs the line between the browser and the server like I tried to outline with NOA.
So I think the answer to my question is: "I want what we were using to build desktop applications, and then some." The "and then some" harnesses the additional functionality we get from running applications on the Internet, namely cross-boundary connectivity and always-on remote resources.
In case you haven’t read my posts on NOA, I’ll save you some reading: it essentially makes server-side objects and classes accessible on the client, aka browser. What I realized after working with it for a while is that all you really need to use an object in the user interface is its URI, and you can get a list of objects that live on a server pretty easily. With a list of URI’s that correspond to objects you can pretty easily construct an programming environment that will allow you to drag and drop objects onto the application interface, something like this:
Even better, you can use objects that live on more than one server and even more than one domain, because all you really need is its URI. When an object is dropped onto the user interface is that a new DIV tag is created in the browser DOM with the object URI as an attribute. The parser recognizes the URI and requests the object from the server, which spits back the HTML representation of the object. I wrote an entire post on this piece a while back–if you’re interested in more details I’ll refer you back to it.
So now we have the capability to drop a server-side object onto the user interface and the object will even take care of rendering itself. It’s basically just drawing objects onto the UI. When an object is used in the UI an event hook is also set up so that the object is notified whenever it changes on the server, so that it’s always consistent with the state of the object everywhere else.
What is YOUR perfect programming model?
Well, that’s it, my perfect programming model. If I had a genie in a bottle I’d wish to have it today, but I don’t, and there’s still some leg work to be done before this type of environment can become a reality. No real technical hurdles, just elbow grease. But before venturing down that path and potentially wasting time, I’m really hoping that other people can throw their ideas out there and we can come up with some kind of consensus about "what’s next". I’m not at all attached to any particular technology or methodology, I’m really only interested in what’s best.
So that being said, how would you want to program Web applications if you could have anything you wanted? I think if we can get a dialogue going about this and get a workgroup together to hammer out the final solution, we’ll have the opportunity to create software capable of things that the world has never seen before.