Is using jquery to call a WCF Data Service from the UI violating the MVC pattern.

Posted by Lee Dale on Stack Overflow See other posts from Stack Overflow or by Lee Dale
Published on 2010-05-26T15:23:48Z Indexed on 2010/05/26 22:01 UTC
Read the original article Hit count: 386

I'm fairly new to ASP.Net MVC 2 and understand the MVC pattern in itself. But my question is what's the best way to populate dropdownlists in the UI sticking to the MVC pattern. Should I be going through the controller?

Every article I've seen to do this shows how to do it using javascript and jquery. I have a test application that I'm re-writing in MVC2 I have my dropdowns working with jquery basically calling a WCF Data Service that returns JSON which populates the dropdowns. Seems to me though that this is bypassing the controller and going straight to the model therefore strictly violating the MVC pattern.

Or am I missing something obvious here. You thoughts or best practices would be greatly welcome here.

Thanks

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about jQuery