ASP.Net MVC and Progressive enhancement...

28. April 2010 14:40

I was reading an article on Google's use of hash-bang in order to provide a consistent means of Ajaxy content for crawling/display. There are three points to resolve here. 1. Handling those cases where someone posts an ajaxy url, with the hash endpoint to facebook or twitter so that the search engines have a convention to handle these types of urls. 2. Being able to deal with the Ajaxy endpoint, the original content and the ajax callback content. 3. Being able to deal with those browsers that don't have scripting.

It got me thinking, how would one could work with progressive URL's via MVC and a few thoughts occurred to me. First, if the controller name is always the first portion of the url from the application base, if the MVC routing engine could simply replace the ?_escaped_fragment_= portion of the uri to be equal to the original route. For example http://mysite/controller/action/1?_escaped_fragment_=/otheraction/2 would be equivalent to http://mysite/controller/otheraction/2 on the backend. Second, How difficult would it be for the default view engine to be transposed in the instances of an expected response type give html, vs js. Similar to how WCF over http handles JSON via the same endpoints as XML. I know this has been discussed in the past.

Where this leads me, is thinking it might be nice to have an ASP.Net MVC 2 based framework, with conventions for handling these scenarios as a default. I like ASP.Net MVC quite a bit, and have followed Castle and Fubu as well. I'm merely thinking that it would be nice if there were a default starter kit towards creating a browser and search engine friendly Ajaxy application. It really isn't easy. I think that the google hash-bang solution leaves out the people that don't have scripting enabled, getting a hash-bang endpoint is near worthless, save for a <noscript>script disabled indexable links here</noscript>. And progressive enhancement (aka Hijax) techniques don't allow for a browser engine to properly index copy/pasted urls. Having some level of convention to support both is necessary. I think it's equally necessary for google to post the _escaped_fragment_ based urls in the search results for those users who have scripting disabled.

Tags: , ,

HttpContext Items Collection

19. April 2010 11:07

Just a short little post, I do intend to followup my last post with a post with code on combining/minifying your JavaScript and CSS, this just caught my attention, and wanted to mention it. 

In the process of doing some technical screenings, it is really suprising how many people don't understand or even know about the HttpContext Items Collection in ASP.Net.  More...

Packaging JavaScript

13. April 2010 10:59

I've been working on a number of web based applications recently, and have taken to using a few techniques that I thought I would share. I won't be sharing the code so much, which is ASP.Net centric, but will discuss what I am trying to accomplish.More...

Managed JScript (Bastard, red-headed step-child in the DLR)

13. May 2009 02:34

Okay, I love Javascript.  It is hands down my favorite language (C# is a near second).  In fact, it was the first language I ever learned, even before having a good handle on html markup in the mid-90s.  I used it server-side with Livewire on Netscape server.  I transitioned to (now Cassic) ASP, and picked up vbscript (COM enumerations via JScript were so evil).  When .Net first came out, i hacked my way through using the JScript .net command-line compiler, and early ASP.Net (ASP+), after translating a litteral ton of code from VB.Net and C# samples, I caved and learned C#.  Allong the way, I picked up on several SQL Dialects, VB6, some perl and others; but I always get back to Javascript. More...

MySite - Part 1

11. November 2008 22:14

My goal is to create a personal website application that implements the features needed, and wanted for someone who wants to create a personal site that extends beyond just a blogging engine.  I've been wanting to work with ASP.Net MVC and some other technologies, so I'll be focusing on using them in MySite. More...

Tags: , , ,

Embedding the DLR (Dynamic Language Runtime)

7. July 2008 12:03

Okay, so it isn't so much embedding as it is hosting.  A lot of attention is going out to the use of the DLR for the upcoming Silverlight 2 release, which is great.  However, what gets lost is the simple ability to use the DLR as a scripting environment for your own projects.  More...

Setting up mod_mono (ASP.Net 2.0) on Ubuntu 7.10 (Gutsy Gibbon)

9. February 2008 17:57

After spending a day on this, I figured it would be worthwhile information for anyone that may be interested in configuring mod_mono2 (ASP.Net) for Ubuntu Gutsy.  I'm personally using an Ubuntu JeOS base configuration.  You may want to install your database of choice (mySQL, Firebird SQL, PostgreSQL, etc) in addition to other supported modules for apache2. More...

Tracker1

Michael J. Ryan aka Tracker1

My name is Michael J. Ryan and I've been developing web based applications since the mid 90's.

I am an advanced Web UX developer with a near expert knowledge of JavaScript.