cake-php
[Arriba] [Todas las Listas]

Re: Dato de sesión del ahorro de una vista

To: "cake-php@xxxxxxxxxxxxxxxx" <cake-php@xxxxxxxxxxxxxxxx>
Subject: Re: Dato de sesión del ahorro de una vista
From: Michael Gaiser <mjgaiser@xxxxxxxxx>
Date: Mon, 17 Jun 2013 01:08:32 -0400
Delivery-date: Mon, 17 Jun 2013 01:08:44 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-beenthere:mime-version:in-reply-to:references:date:message-id :subject:from:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-google-group-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=Q+RT98u+LlTIcJFsv3dvhEzRl/+ucfmCmeItdH2DORA=; b=DieoTF1Sv96uqNsOKcsFFmM6pIQ7nCBGPkr6mRnEUCKZLEabd16wHpMYZtZj3/upmp 7gleGK6/u7KDr9eqaV0QThi5lCwtdullbnVvZZOVjBcEgim9IoJs/TLjBZFWmfx867rw GLMx1bmbgXgpvGTLyYISoeKEy3UspJqjvzedboDIACSVXppbBGzg9Oep5WjyLkmMcv8w bo/WPpXNK4OgKmocz/ZalBYn3iAJw4XAmwdm23X7pocY7eFkuHQUdhp+snrE/Z3MuVFn PDgSzMGkz4byZUD60uw6/jX5911PslVxKxWjWrcK/TBZ0ldA/qjambAWWa8JA4UuE2VE 3HtA==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-beenthere:mime-version:in-reply-to:references:date:message-id :subject:from:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-google-group-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=Q+RT98u+LlTIcJFsv3dvhEzRl/+ucfmCmeItdH2DORA=; b=ua+8KC1bs6+Amr3h+r2Np1h58c8hxcs2C0AoLUlJY1hUG1fF3eSeU0/rbplNMg3xmD iJuHpsYyc8XpOIFiLiybxMAAXy9TCe1nzVnpJRC94oFJIdUB4tyoEPsrLhbiS0AxS52+ z36NYx+Rb3AhUAkdgn4p0P7M6fyA2rblhZ0jhntJuislcTy5d3eQhTgJexD+zFFjzW+v sshotFmghmgBikL6ah+cp8NVHwslaJ6vq0BmQy26526Tg2MqNWkLzw0i7TyccVHFJyBO t0DmF9pb8xmBKu6HTqliE0xAvO/ywZqyennxHlrV7kKCqkNHvCp0mfP2r77FC+3pL1Di UEzw==
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <3fcea8fd-236a-45a3-b218-8927410c0133@googlegroups.com>
List-archive: <http://groups.google.com/group/cake-php>
List-help: <http://groups.google.com/support/>, <mailto:cake-php+help@googlegroups.com>
List-id: <cake-php.googlegroups.com>
List-post: <http://groups.google.com/group/cake-php/post>, <mailto:cake-php@googlegroups.com>
List-subscribe: <http://groups.google.com/group/cake-php/subscribe>, <mailto:cake-php+subscribe@googlegroups.com>
List-unsubscribe: <http://groups.google.com/group/cake-php/subscribe>, <mailto:googlegroups-manage+1003367825667+unsubscribe@googlegroups.com>
Mailing-list: list cake-php@xxxxxxxxxxxxxxxx; contact cake-php+owners@xxxxxxxxxxxxxxxx
References: <5054b3a5-bee8-4e33-ba97-9c7ff2bc42d4@googlegroups.com> <e9e14c48-1de1-41d8-bca7-d80bf7c1df51@googlegroups.com> <5b07d41a-55fb-43d2-9511-7f7b384d3701@googlegroups.com> <3fcea8fd-236a-45a3-b218-8927410c0133@googlegroups.com>
Reply-to: cake-php@xxxxxxxxxxxxxxxx
Sender: cake-php@xxxxxxxxxxxxxxxx
John es bien. Vuestra vista sólo tendría que ser preocupada con cómo el dato es
presentado, no qué es manejado / manipuló. En el fin, tendrías que ser
capaz a completamente *swap fuera de vuestras vistas sin teniendo que ajustar vuestro
controlador nada. Seguir el vínculo John te dio y leído arriba de en él. Te
salvará mucho tiempo a la larga. Más de suerte.



En Sol, *Jun 16, 2013 en 9:23 PM, John <spiliot@xxxxxxxxx> escribió:

> no estás pensando *MVC<*http://*en.*wikipedia.*org/*wiki/Modelo%*E2%#80%93vista%*E2%#80%93controlador>.
> Si hay dato que necesita ser tomado a cuenta #por estados
> de aplicación diferente (como un clic que provoca un método de controlador) entonces
> el modelo/de controlador lo tendría que manipular, no la vista. Si vuestro razonamiento
> era válido, casi todos los  datos que acabaron arriba en la vista tendría que ser manejada en
> la Vista, como si los clics de usuario en el *logout vínculo la vista tendría que hacer
> *parse lo.
>
>
> En domingo, junio 16, 2013 2:24:42 PM *UTC+3, David *Suna escribió:
>>
>> *Thanks para vuestra respuesta.
>>
>> Cuando no tuve ninguna elección que es lo que acabé arriba de hacer.  Aun así, la información
>> fui interesado en almacenar era sólo pertinente a la vista (*i.*e.
>> Qué carta fue abierta cuándo el usuario *clicked en un vínculo) y sólo significado para
>> uso en la vista (*reopen la carta que fue abierta en el tiempo el usuario
>> *clicked).  Parece que ahora he empujado conocimiento de la vista al
>> controlador para un propósito enteramente arbitrario.
>>
>> En viernes, junio 14, 2013 11:08:57 PM *UTC+3, John escribió:
>>>
>>> Vuestra vista es allí para producir el HTML no manipula dato (otro que para
>>> mostrarles). El propio *MVC la manera es para hacerlo en el controlador y justo
>>> pasar el dato requerido a la vista a *render lo.
>>>
>>  --
> Gustarnos en *FaceBook *https://www.facebook.com/*CakePHP
> nos Encuentra en *Twitter *http://*twitter.*com/*CakePHP
>
> ---
> Recibiste este mensaje porque eres *subscribed al *Google Grupos
> "*CakePHP" grupo.
> A *unsubscribe de este grupo y la parón que recibe *emails de él, enviar un
> *email a pastel-*php+unsubscribe@xxxxxxxxxxxxxxxx.
> A correo a este grupo, envía *email a pastel-php@xxxxxxxxxxxxxxxx.
> Visita este grupo en *http://grupos.*google.*com/Pastel/de grupo-*php.
> Para más opciones, visita *https://grupos.*google.*com/Los Grupos/optan_fuera.
>
>
>

-- 
Gustarnos en *FaceBook *https://www.facebook.com/*CakePHP
nos Encuentra en *Twitter *http://*twitter.*com/*CakePHP

--- 
Recibiste este mensaje porque eres *subscribed al *Google Grupos "*CakePHP" grupo.
A *unsubscribe de este grupo y la parón que recibe *emails de él, enviar un *email a pastel-*php+unsubscribe@xxxxxxxxxxxxxxxx.
A correo a este grupo, envía *email a pastel-php@xxxxxxxxxxxxxxxx.
Visita este grupo en *http://grupos.*google.*com/Pastel/de grupo-*php.
Para más opciones, visita *https://grupos.*google.*com/Los Grupos/optan_fuera.


John is right. Your view should only be concerned with how the data is
presented, not how it is handled / manipulated. In the end, you should be
able to completely swap out your views without having to adjust your
controller at all. Follow the link John gave you and read up on it. It will
save you a lot of time in the long run. Best of luck.



On Sun, Jun 16, 2013 at 9:23 PM, John <spiliot@xxxxxxxxx> wrote:

> You're not thinking MVC<http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller>.
> If there's data that need to be taken into account through different
> application states (like a click that triggers a controller method) then
> the controller/model should manipulate it, not the view. If your reasoning
> was valid, almost all data that ended up in the view should be handled in
> the View, like if the user clicks on the logout link the view should do
> parse it.
>
>
> On Sunday, June 16, 2013 2:24:42 PM UTC+3, David Suna wrote:
>>
>> Thanks for your response.
>>
>> As I had no choice that is what I ended up doing.  However, the
>> information I was interested in storing was only relevant to the view (i.e.
>> which menu was opened when the user clicked on a link) and only meant for
>> use in the view (reopen the menu that was opened at the time the user
>> clicked).  It seems that I have now pushed knowledge of the view into the
>> controller for an entirely arbitrary purpose.
>>
>> On Friday, June 14, 2013 11:08:57 PM UTC+3, John wrote:
>>>
>>> Your view is there to produce HTML not manipulate data (other than to
>>> display them). The proper MVC way is to do it in the controller and just
>>> pass the required data to the view to render it.
>>>
>>  --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscribe@xxxxxxxxxxxxxxxx.
> To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


<Anterior por Tema] Tema Actual [Siguiente por Tema>