Welcome Guest, Not a member yet? Register   Sign In
Access $this->validation->Name inside Models
#5

[eluser]Colin Williams[/eluser]
You lost me somewhere there Randy. It ain't philosophy or religion, it's just good application design. Let's say we're in a different part of our application. We need to save data, but in this context there is no user input to process (maybe information was copied from elsewhere, maybe it came from a call to an external API, etc.) Should we create other versions of save() in our model to handle these different contexts? Methods that don't sniff out posted data?

I don't see anywhere, in anything you quoted or linked to, where it says this would be a good idea.

Quote:Then the HTTP request (Event) has already been handled and we are in a steady state with nothing to do but process data.

No kidding. So why would the Model go back and sniff out posted data? Maybe you aren't actually disagreeing with me. I can't tell.

Quote:So from a design perspective, you’re sitting on a boundary condition (Controller <-> Model) with sanitized data loaded in an object and no events to operate on whatsoever.

Why, where has the event changed? In my example, the event was save a message. So we've got sanitized data loaded in an object, so we can save it!


Messages In This Thread
Access $this->validation->Name inside Models - by El Forum - 07-12-2008, 03:56 PM
Access $this->validation->Name inside Models - by El Forum - 07-12-2008, 04:13 PM
Access $this->validation->Name inside Models - by El Forum - 07-12-2008, 07:46 PM
Access $this->validation->Name inside Models - by El Forum - 07-12-2008, 09:48 PM
Access $this->validation->Name inside Models - by El Forum - 07-12-2008, 11:01 PM
Access $this->validation->Name inside Models - by El Forum - 07-12-2008, 11:36 PM
Access $this->validation->Name inside Models - by El Forum - 07-13-2008, 12:07 AM
Access $this->validation->Name inside Models - by El Forum - 07-13-2008, 01:16 AM
Access $this->validation->Name inside Models - by El Forum - 07-13-2008, 03:15 AM
Access $this->validation->Name inside Models - by El Forum - 07-13-2008, 03:20 AM
Access $this->validation->Name inside Models - by El Forum - 07-13-2008, 03:21 AM
Access $this->validation->Name inside Models - by El Forum - 07-13-2008, 03:23 AM
Access $this->validation->Name inside Models - by El Forum - 07-13-2008, 03:33 AM
Access $this->validation->Name inside Models - by El Forum - 07-13-2008, 09:38 AM
Access $this->validation->Name inside Models - by El Forum - 07-13-2008, 09:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB