I'm working on a mid-size application and have gone through a few iterations of event handling; I'm currently using $.route extensively for navigating the app but it's come at the expense of performance, likely because I'm overlooking something... perhaps others have already solved or have good ideas on this:
Previously I was using a lot of triggerAsyncs. For example, I have a list of models on the screen, and upon receiving a click on the TR I triggerAsync the event, passing the model associated with the record which another controller can then work with, without making a new request to the server (model is already there, in the list, new model will just render it differently, in an edit box or something).
Now, utilizing $.route, instead of passing the model itself, I'm passing the model's ID in the route. I'm then fetching the model from the server (again) given the ID. The upside is, I now have a bookmarkable/emailable URL that goes to the right place in the application, the downside is, I didn't need to make that server call. The model is already sitting there in the list which made the route change when clicked, but I have no good way of passing that data.
I'm wondering if anyone else has come up with a good way of handling this? I was about to look into a decent way of "over riding" the route handler with triggerable events, basically meaning the route handlers only fire when the event isn't handled in another way, but I'm not sure what level of effort it will entail, so figured I'd check here to see if anyone else has/had a better idea.
Appreciate any thoughts!
Jason