Skip to main content

Posts

Showing posts from December, 2007

Ajax with the ASP.NET MVC Framework

Hopefully everyone had a good few days off. Before the holiday break, I did some app-building on top of the ASP.NET MVC framework. Actually rather than building some sort of fancy app, instead I was prototyping some features on top of the framework bits slated for an initial release. I've shared out the sample code, sample app and tests - yes, sorry for another tease :-)... but stay tuned... and you'll soon have actual bits to play with as well. Until then, you can download the sample code and browse it locally, and follow along the rest of the post. In particular there are two projects within the solution: TaskList (the web app) and AjaxMVC (a class library with Ajax extensions). One of the prototypes is around bringing some basic Ajax functionality - basically to get post-back-less partial rendering and some behavior-like extensions to associate with DOM elements - sort of like ASP.NET Ajax but in a manner that fits with the pattern around how controllers and views are writte...

Script#

Script# brings the C# development experience (programming and tooling) to the JavaScript/Ajax world. The Script# compiler is a C# compiler that generates JavaScript as its output instead of IL. A key goal of the compiler to produce readable JavaScript (as if you had authored it by hand), and would be comfortable deploying into real apps. Hence the translation works from C# source directly into JavaScript without an intermediate IL layer. The compiler can also produce equivalent, but much more compact script for use in release mode deployment. The compiler does not introduce any additional levels of abstraction, thereby allowing you full control of what your application does. In essense the best of script with the best of C#! The Script# compiler can optionally be used with the Script# Framework that provides a more productive application development platform for larger, and more complex applications.

Embeddable IM Control

The folks from Windows Live Messenger just released an embeddable messenger control that you can embed into any web site, without any programming. Basically you can head over to the Messenger settings page to create the HTML snippet (an iframe) that you can embed into your page. You do need to allow publishing your presence information and grant permission to let anonymous site visitors to initiate an IM session. The control allows the visitor initiate a chat session with the invitee specified in the iframe URL. In most cases, for example if you're adding this chat control to your own site, the invitee would be you. However, I can see some application scenarios where the application dynamically picks the invitee ID at runtime. The screenshot of the control is on the left. It is a pretty basic chat control at this point. I have a few ideas for what I'd like to see from the control. More on that below. One super exciting aspect of this control for me personally is that it was c...

Facebook.NET

Facebook.NET provides a .net library for use in developing Facebook applications and accessing Facebook APIs. The library primarily geared around and optimized for developing ASP.NET-based Web applications, both FBML and IFrame-based Facebook applications through an intuitive API and small set of server controls. It does support the use of the Facebook API from desktop applications as well, and will eventually enable Silverlight application usage. The library is built on .NET 2.0, but should run on future versions of the .NET framework as well. Applications using Facebook.NET can be written in either C# or VB.NET. The library is still in early form (some APIs haven't been implemented yet, there are only a couple server controls: FacebookApplication, and FqlDataSource at the moment, etc.) but the intent is to grow this over the course of building some Facebook applications, and through community usage/feedback as well. Please help improve this project by submitting bugs and feature ...

Web Development Helper

Web Development Helper is an Internet Explorer plugin that provides a set of useful tools to both Ajax/JavaScript developers as well as ASP.NET page and control developers. For client-side script-based development, Web Development Helper provides HTTP tracing capabilities, as well as much improved script diagnostics, and tracing facilities, as well as an immediate window. For ASP.NET developers, when developing against your site on your local development machine, this tool provides the ability to view ViewState, ASP.NET trace messages, contents of your cache etc. http://projects.nikhilk.net/Projects/WebDevHelper.aspx

Solution to an IE gotcha when developing Facebook App in an IFRAME

This was a very frustrating problem for us in our app Jobs ( http://apps.facebook.com/getthejob ). The problem was that in IE, if a parent frame has a different domain than the child page, the session data (stored in the Session object) is not preserved as a security precaution. Anyway, if you have this problem, the answer is available on Microsoft's website. Simply put, in your ASP.NET page codebehind, add the following code: protected override void OnPreRender(EventArgs e) { Response.AppendHeader("P3P", "CP=\"CAO PSA OUR\""); base.OnPreRender(e); } This will add the right headers to every page.