Hi everyone, I just wanted to see if anyone else had had a good long think about this sort of thing before I decided one way or the other.
Basically I have been playing with the context switch action helper, and it has opened a whole new world of possibilities in terms of application structure, but i'm not certain if i'm about to head down a path of over-engineering or not. As an example, my controllers have an autocomplete action. It essentially switches off the layout and returns the appropriate data in JSON format - all of which is fine and dandy, and there's a bit of processing in the whole thing so it's not unreasonable that it's its own action, HOWEVER... stopping and thinking for a bit, retrieving a list of autocomplete options IS just a "list", and hence shouldn't it be a function of the /list action? with the format simply decided by the context switcher? it seems to make sense to me, but then i start to think about how many other actions this might mean reworking - where do you draw the line? i guess you could make your entire application a context switch of /, which is obviously taking it too far, but you see the point... I'm just thinking out loud, I'm guessing the answer is that there's no "perfect" structure, and it's better to just write the code and get it working rather than philosophize endlessly over the best possible solution, i just thought this one might be an interesting debate for the mailing list.