I need to develop a generic jQuery-based search plugin for an ASP.NET MVC application that I am creating, but I cannot figure out how it should fit, or best practice. I want to do the following:
$().ready(function() { $('#searchHolder').customSearch('MyApp.Models.User'); });
While I have implemented a specific interface on Model.User, jQuery will be able to talk to the reflection service in order to build the corresponding user interface as a whole.
Sounds funny, but it seems like I'm now invoking JavaScript from a view, which in turn will perform some View-related actions to create a search user interface, and then to search and interact with the user, he is going to drop a bunch of Controller tasks there.
So where does this really fit? Is there any other way to structure my jQuery plugin to fit the idea of MVC? Does MVC work when it scales to its own form in another MVC structure? Should I just ignore these issues for the sake of a single plugin?
source share