Archive for September, 2009

Houston Techfest

JB here… Wow! Techfest was lots of fun! I got the chance to see and talk to a lot of my friends who I haven’t seen in awhile.

Also, it was nice to be finally finished with my two presentations. Both were fun but I will admit to liking my Evolve Your Code material a bit more than the WPF Input Validation. They were both a lot of work. Be sure to thank presenters. I knew work went into the presentations but I didn’t appreciate how much until I tried to do two. I learned a lesson with that decision. Never do 2 new presentations. It’s way too much work and both suffer from neglect. I will write a post on all my presentation lessons later.

Without the 2 presentations looming over me and my new job, I should be able to get back to blogging more. I love sharing what I know, even if its just to myself months from now when I forget everything. :)

For the slides I am trying out slideshare and am also using Git Hub for the slides and solutions.

Evolve Your Code:

http://www.slideshare.net/RookieOne/evolve-your-code

http://github.com/RookieOne/Evolve-Your-Code

 

WPF Input Validation:

http://www.slideshare.net/RookieOne/wpf-validation

http://github.com/RookieOne/WPF-Input-Validation

Google Chrome Frame

Chrome Frame is all about improving the web, not hurting it, functioning as a back-stop against browsers that just aren’t keeping up.
- Alex Russel

In case you’ve missed it, Google has released a plugin for IE that will render as in Chrome (WebKit). All you need is a simple meta tag:

<meta http-equiv="X-UA-Compatible" content="chrome=1"/>

This thing is hot. The Google Group is abuzz. I had to switch to daily digest after receiving 40 emails over a span of about four hours. Looks as though more than just Google is ready for IE to catch up.

I am really excited about this myself, but keep in mind this is still very early. Google’s own sites don’t appear to have the tag yet, but I expect they will soon.

What tickle’s my mind most, however, is what Google is really about to unleash. We know about Wave. What else is out there? I have been touting the benefits of SVG as a platform, and this and Google’s other recent release of svgweb sure seem to put a lot of emphasis on SVG as the potential graphics platform of choice. Could it be Google is going to go head-to-head with Flash and Silverlight with more open standards? Please let it be true!

[Update: Check out this HTML5 introductory video from Google.]

A History of Violence against HTML

[This is the second in a series on the use of MVC for building web "applications".]

HTML was designed as a document format with hypermedia connections to other, related documents. Today, however, we abuse HTML and treat it as an application platform. It somehow performs remarkably well in most cases. I suppose that’s a testament to the agility of declarative markup. Nevertheless, I think we could all agree that HTML at least started life as a document format. If this is the case, I argue that HTML is not a view format; rather it is a serialization format for a model.

I’m sure many reading this are probably calling me a fool or worse. Well, don’t take my word for it. Let’s look at what some of the leading web developer/designers are saying:

In markup, semantics is concerned with the meaning of an element and how that element describes the content it contains.
-Molly E. Holzschlag (http://www.informit.com/articles/article.asp?p=369225&rl=1)

Although it might be tempting to use the visual layout as the basis for the structure of your markup, this could lead to you overusing elements, particularly <div> elements. This will also result in establishing your content order primarily to accomplish the visual layout rather than it making sense when no style sheets are available. To avoid presentational markup and ordering problems, begin by first looking at the content and then working out from the meaning(emphasis mine).
-Andy Clarke (Transcending CSS)

The notion that HTML is a display language has been proven long ago to be a Bad Thing. CSS taught us to separate our presentation from our content, and the doors that opened when we did it were invaluable. Today, however, we’re still delivering web applications as HTML documents with a bit of scripting layered on top. This works, but is strangled by all of HTML’s limitations. Fundamentally, HTML is not an application delivery format, it is a content description language, despite the valiant efforts of the HTML5 Working Group.
- Meitar Moscovitz (SVG Is The Future Of Application Development)

No, I can’t quote them directly, but I believe my argument has the same spirit. We should look at HTML as a PresentationModel, or ViewModel if you prefer, in the client (i.e. the browser). Therefore, HTML be treated as a serialization of your object model into a document format.

What then is the view? What’s the controller? These are excellent questions. Let’s think about how MVC works. The controller is responsible for receiving requests and relaying responses. The view is supposed to display the representation of the model. For the web, the controller easily aligns with the HTTP protocol and the view to the styles, transforms, and behaviors applied to the model (our HTML document). (I’ve used styles and transforms here separately to emphasize the potential use of XSLT stylesheets in addition to CSS.) Sure, using a document serialization, you could just display the model directly, and the confusion of HTML is here emphasized. It’s a model built out like a visual representation.

Are there some exceptions to this? Sure. If you want to treat HTML as a purely view format, then you can eliminate everything from your HTML except for JavaScript bindable areas and use JSON objects as your PresentationModels. Pass some of those around instead of HTML, and you’re really treating HTML like a true view. However, we don’t generally do that. We usually serialize the model into the HTML and apply our view aspects afterward via CSS and JavaScript.

If we really want to get serious about making an excellent MVC framework, we have to recognize and use our building blocks appropriately. HTML is a model serialization format. Treat it as such.