Welcome Guest, Not a member yet? Register   Sign In
Question about the MVC pattern
#25

[eluser]Randy Casburn[/eluser]
@loathsome -- rather than me brandishing the sword blind folded, why don't I just tell you how I build my castles ;-) [ just trying to bring some humor to this ]

Here is the way I solve this type of...

Quote:I have this status thingy that updates every so often on every page and yada yada yada...

That doesn't mean it is the only way, the best, way, or even a good way.

I use AJAX extensively. I use AJAX extensively because of things like this. Asynchronous calls back to specialized controllers that handle security specifically designed for AJAX requests, pull data directly from models designed specifically for formulating data as JSON responses. I made a conscience DESIGN decision to break the MVC chain (please forgive me wirebydesignz) by having my JSON responses echo directly out of my models back to my calling pages.

Here is a post that sort of lays out the sequence http://ellislab.com/forums/viewreply/423884/

If you don't know what AJAX is or don't know what JSON is or what asynchronous page updates are there are lots of posts in these forums to help.

Now if you start to think about designing your system with these types of capabilities, you might think about sending "server load" indicators with your JSON data. That might lead to you applying the ability of adjusting the call-to-server timing based upon the "server load" characteristics. So now you are strapped to "10 minute" updates, but maybe the status is now one of those "sliding window" things you studied about in college (maybe last week or last year or in 1990 or not ever Smile ). You can adjust it on-the-fly.

I'm not saying this is good, bad, right, wrong, better, worse, up or down. I'm just saying this is how I solve similar dillemmas. Maybe you'll find this more helpful than my previous posts.

Randy


Messages In This Thread
Question about the MVC pattern - by El Forum - 07-11-2008, 11:05 AM
Question about the MVC pattern - by El Forum - 07-11-2008, 04:33 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 08:05 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 08:28 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 09:40 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 09:41 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 10:24 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 10:42 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 10:58 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 10:59 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 11:02 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 11:05 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 11:17 PM
Question about the MVC pattern - by El Forum - 07-11-2008, 11:22 PM
Question about the MVC pattern - by El Forum - 07-12-2008, 12:40 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 02:17 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 07:13 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 08:43 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 09:09 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 09:30 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 09:39 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 09:48 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 10:29 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 11:04 AM
Question about the MVC pattern - by El Forum - 07-12-2008, 01:07 PM
Question about the MVC pattern - by El Forum - 07-12-2008, 06:51 PM
Question about the MVC pattern - by El Forum - 07-12-2008, 08:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB