views:

36

answers:

1

As some background I prefer the flexibility and benefits that ASP.NET MVC gives me, and have been building in MVC since its release. But the new project I am about to start requires a complex calendar / scheduler control - and none of the jQuery alternatives meet all the requirements.

This has led me to the Telerik Radtools Scheduler, which ticks all the boxes, except its targetted at ASP.NET WebForms.

The rest of the project contains basic CRUD functionality, which is a great fit for the patterns exposed through MVC.

I have seen a lot of buzz lately about OData and was wondering if this may give me the "middle ground" I am after.

Has anyone had any experience leveraging OData from Webforms (or even if its possible, or something that you would want to do).

Am still looking to create a jQuery based client side heavy UX, so any other thoughts or suggestions are welcomed.

A: 

I haven't used WCF Data Services for web forms development, yet - but the main project that I work on is next on my list to start building some WCF-DS/OData functionality for.

It's definitely something that's possible, and I think it provides a nice add-on to an existing site/application that you either want to provide some queryable feeds for and/or some additional CRUD functionality. My issue, right now, is that my web forms project does not use the Entity Framework as the underlying domain model - we have a hand-rolled set of entities. So I'll have to do a lot of (somewhat mundane) work implementing IUpdatable for the insert/update/delete functionality. But I'll get the IQueryable side of things up and running quickly in order to provide some quick wins in terms of disseminating information from the application. (Might as well go with the low-hanging fruit first to see if it's worth the effort -- I'm sure it will be worth it, but I'm also going for the quick win!)

I have given some talks around my region on WCF Data Services and OData and have leveraged a lot of jQuery for my examples. Personally, I love it. The JSON format that WCF-DS supports is great and fits in perfectly with my jQuery work.

I've integrated WCF-DS feeds in with some jQuery UI items (modals to display and/or update data, different parts of a feed on different tabs (retrieved asynchronously), etc.) and also am planning on integrating some jqGrid samples I have with my WCF-DS feeds.

If you go with jQuery, I would definitely recommend keeping everything JSON (obviously) and you really shouldn't have any issues.

Let me know if you have other questions about this. I'm surprised there aren't more answers or feedback. I think this is a really nice framework ot integrate into a number of different types of apps (web forms, jQuery, Silverlight, etc.).

Hope this helps! Good luck!!

David Hoerster
Thanks for the thorough answer... Have decided to go down the MVC path and have been able to "massage the requirements" to fit the jQuery calendar / scheduler widgets that are available. It is a jQuery heavy front end that utilises JSON resultsets in numerous places - the more I use JSON the more I like it.I will hopefully get to play with OData on a later project, it looks to be a very promising technology and definitely fills a gap.
Boycs
Sounds good. Don't forget that you can get your OData result as JSON instead of XML. Just set the jQuery.ajax() dataType option to 'json' (and this will set the contentType option to 'application/json'). Good luck!
David Hoerster