10-4 Episode 8: Pure Client-Side Development with ASP.NET AJAX 4.0
- Posted: Feb 11, 2009 at 12:40 PM
- 76,241 Views
- 17 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- WMV (WMV Video)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
- Mid Quality WMV (Lo-band, Mobile)
In this episode of 10-4, we introduce some of the new features and functionality of ASP.NET AJAX 4.0. We’ll see how ASP.NET AJAX can be leveraged in a complete client-side environment, making it easier to develop rich web applications. This episode demonstrates the new client templates, data binding and command bubbling behavior that makes creating data-centric applications using JavaScript simpler. We’ll also see the new ADO.NET Data Services integration which makes performing CRUD operations, complete with change-tracking, very trivial.
For more 10-4 episodes, be sure to visit:
http://channel9.msdn.com/shows/10-4
Visual Studio Topic Area on Channel 9:
http://channel9.msdn.com/VisualStudio
Visual Studio 2010 CTP VPC:
http://tinyurl.com/GetCTP
ASP.NET AJAX 4.0:
http://www.codeplex.com/aspnet/Wiki/View.aspx?title=AJAX&referringTitle=Home
10-4! Over and out!
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
The new stuff that's comming looks great (2 way data binding and unit of work!) and was presented very well. The form of the presentation was also good so nothing but kudos
Awesome technology, quite different to what were normally seeing with Server Controls and having ASP.NET generate the correct runtime scripts to wireup the controls for us. As an honest comment, it seems the more fluid site like Facebook get, the more ASP.NET AJAX is trying to catch up so developers choose that technology. It's a good thing. I can remember a time when ASP.NET was considered what you used to build business apps, but if you wanted to build "fun" sites, you would create that in PHP because it was percieved as "less-heavy".
Also, it seems that there is plenty of "magic" going on too, if someone wanted to override a part of the pipeline, say if they use controls from vendors like Telerik?
Whilst interesting I'm not sure who this is targeting.. is this for purists who want control over html? because they won't use this due to how obtrusive it is.. I think this targets the webforms developers, those that don't really care about whats under the hood, or even how the web works as such, only that they can create an app online.. but then I'm wondering if this is better to them than webforms?
That's a good question. Firstly, it's important to point out that almost that entire demo could have been done imperatively, without adding anything to the HTML unneccesarily. The declarative command bubbling (sys:command) is a feature I can choose to use, but I can achieve the exact same thing strictly in JavaScript. The same goes for the conditional attributes I used (class:odd).
While ASP.NET AJAX provides a lot of functionality in terms of working with it declaratively (as some folks like), it was developed with the mindset of using it completely unobtrusively. That said, the data templates are somewhat of a gray area. Defining the template is arguably much easier (for some) to do in HTML as opposed to within JavaScript (as other libraries do). That said, it does impose a foreign component to the HTML that isn't actually valid content (i.e. the binding expressions).
If you don't like the approach of defining your templates and bindings within the markup, you can still do that in JavaScript as well. The creation of the DataView class simply requires an element that it can bind to and repeat, so there is no reason why that element couldn't be constructed using DOM methods imperatively, as opposed to retreiving it from the actual DOM as I did in the demo.
I'll put together a demo that does this and post it later.
i especially like the binding syntax
so please can we know when u are thinking to make one.
Also, the example shown in the video is one where the presentation layer and the data layer are tighly coupled. I'm not very familiar with the EF or web services, but is it possible to have the interface bind to a custom business layer instead of the data layer?
Keep up the great work with the videos.
Hy,
I don't see the real interest of this new programing method.
What is the interest to use Microsoft technology without a IIS server ?
Full Microsoft or not ?
I think it's just attracting php or others langages developers.
Jonathan, now that Beta 1 is off do I still need to include Ajax 4.0 JS libraries or are they included in the framework?
The reason of the question is because I tried to reproduce your sample (without addind ajax libraries) and
sys.application is not recognized as valid ("Sys is not defined").
Thank you
Carlo
Great video. I tried to reconstruct it on my computer, but somehow can't figure out, where do I actually find the AjaxRes.js file. I assume that might be the reason for the "Sys.InvalidOperationException: 'query' is not a property or an existing field." error message that I keep getting.
I'd appreciate a small hint.
/// /// /// Sys.Application.add_init(function() { $create(Sys.UI.DataGrid, { alternateRowClass: "odd", columnExpressions: ["Title", "FirstName", "MiddleName", "LastName", "Suffix"], dataProvider: $create(Sys.Data.AdoNetDataContext, { serviceUri: "AdventureWorks.svc" }), itemPlaceholder: $get("customer-placeholder"), fetchOperation: "Customers", fetchParameters: { $top: 20, $orderby: "FirstName" } }, null, null, $get("customer-list")); });I am not sure if this say anything but it might indicate that the dataview has been changed a little. Try typing this into the javascript editor to gain some insight. I got this from the samples download on msdn. http://msdn.microsoft.com/en-us/library/bb514232(VS.100).aspx">http://msdn.microsoft.com/en-us/library/bb514232(VS.100).aspx
var dv = new Sys.UI.DataView();
when you type dv. the intellisense should give you some more information.
fetchOperation: "Customers",
fetchParameters: { $top: 20, $orderby: "FirstName" }
... would be my first guess.
AjaxRes.js is actually an artifact of the internal builds that I was using for the video
If you grab the latest bits off of Codeplex, you won't need it.
Yep, you'll need to include the JavaScript files. Just keep in mind that the ScriptManager control in ASP.NET WebForms was the one that was including the ASP.NET AJAX libraries for you, so once you aren't using it, you'll have to include the scripts manually.
Yep, exactly. Unfortunately, because we're trying to be cutting edge with this show, stuff WILL change between an episode being published and new versions of the bits coming out
Hi, thank you for a great video.
I have a little question : is it possible (and if yes, is it easy ?) to mix this kind of client side technologie with standard asp.net webcontrols (ie. with postback/viewstate/etc..) ?
Best regards,
Lek
Remove this comment
Remove this thread
close