Web Dev Update: ASP.NET Templates – YUI 2 – Grails

I’m going to combine these two short comments together

ASP.NET MVC 2 Templates

Brad Wilson does a good job explaining some features of the asp.net mvc 2 templates:

http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.html

 

YUI – Treeview and Datatable Together

Carlos Bueno blogs about the YUI 2 features of linking a treeview and datatable together:

http://www.yuiblog.com/blog/2009/10/12/using-yui-treeview-and-datatable-together

Carlos was kind enough to email me a response on using this with asp.net mvc.  Here is the snippet:

You create an AJAX endpoint that returns data in the format described in that link. 
Then instead of a static javascript datasource, you instantiate a json data source 
and give it the URL to pull from:

var myDataSource = new YAHOO.util.DataSource("/foo/bar/some-data");
myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;

To change the URL (and thus refresh the table) you would call datasource.sendRequest() 
with a new querystring, like so:

var requestString='QUERY=’ + some_query + ’&sort=timestamp&dir=asc&startIndex=0&results=25';
var oCallback = {
  success : myDataTable.onDataReturnSetRows,
  failure : myDataTable.onDataReturnSetRows,
  scope   : myDataTable,
  argument: myDataTable.getState()
};
myDataTable._oDataSource.sendRequest(requestString, oCallback);
 
See: http://developer.yahoo.com/yui/examples/datatable/dt_dynamicdata.html

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

 

More on Grails – Simplifying Java EE With Grails

Graeme Rocher introduces Groovy and its corresponding web framework, Grails, followed by a code writing demo intended to highlight the advantages of using Grails over Java EE in order to develop web applications.

Learn more here:

http://www.infoq.com/presentations/Web-Development-Grails-Graeme-Rocher

I’m very impressed with Grails!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s