Welcome Guest, Not a member yet? Register   Sign In
view location for ajax forms
#3

It depends on a variety of things. On a site I'm working on, our ajax requests will all be answered with JSON-encoded objects -- no HTML at all. That being the case, we don't need any AJAX views.

If you are outputting HTML in response to your AJAX requests, I can think of two ways to approach organization of hte views:
1) organize by general function as in both of your examples above.
2) for some AJAX functionality, it may apply in many ways across your site. E.g., a view that corresponds to a 3-column table might be used by every controller on your site. In this case, you might want to organize AJAX according to what kind of output structure it defines. E.g., data table, image with caption, etc.
Reply


Messages In This Thread
view location for ajax forms - by lloydie-t - 01-19-2015, 08:41 AM
RE: view location for ajax forms - by CroNiX - 01-21-2015, 01:54 PM
RE: view location for ajax forms - by sneakyimp - 01-22-2015, 02:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB