Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Anirudhsinh Zala
On Wednesday 15 Jul 2009 8:01:14 pm Hans Zaunere wrote: > Hello, > > As I work with and need to support JSON applications more and more, I > quickly remember why the mantra "don't use javascript" from yesteryear was > in place. Worse, perhaps, is how the browser and server need to interface > with

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread y2rob
hello, yeah i'd look into extjs. ?i'm working with extjs now and all you need to do is pass it json and it will render grids for you based off a store you define in extjs calling your rest/service/gateway that renders the json. ?there are minor things you need to do like define a root for the da

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Tim Lieberman
On Jul 15, 2009, at 11:59 AM, Hans Zaunere wrote: So I think I see what you're saying. Keep all markup (aside from perhaps the initial request) off the server. I thought about this, and played around with it a bit. There are a couple of problems, or at least contradictions... -- every

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Chris Snyder
On Wed, Jul 15, 2009 at 12:35 PM, Hans Zaunere wrote: > But what would a template for this look like?  What I'm having trouble > streamlining is what those actual templates look like.  They're not > outputting dynamically generated text anymore, per se.  They're outputting > low level data stru

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Jake McGraw
On Wed, Jul 15, 2009 at 11:52 AM, Hans Zaunere wrote: >> I've had great success using Zend Framework ContextSwitch Action >> Helper: >> >> http://woo.ly/9it >> >> It is a plugin for the Zend MVC system that detects what format you're >> requesting a page in, using explicitly set context (format) in

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Ajai Khattri
On Wed, 15 Jul 2009, Jake McGraw wrote: > It is a plugin for the Zend MVC system that detects what format you're > requesting a page in, using explicitly set context (format) in the Support for different output formats like this is built-in to symfony since 1.1: http://www.symfony-project.org/bl

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Hans Zaunere
> > So I think I see what you're saying. Keep all markup (aside from > > perhaps the initial request) off the server. > > > > I thought about this, and played around with it a bit. There are a > > couple of problems, or at least contradictions... > > > > -- everyone I talk to says do as much as y

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Chris Snyder
On Wed, Jul 15, 2009 at 11:59 AM, Hans Zaunere wrote: > So I think I see what you're saying.  Keep all markup (aside from perhaps the > initial request) off the server. > > I thought about this, and played around with it a bit.  There are a couple of > problems, or at least contradictions... > >

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Hans Zaunere
> > The Javascript then takes each element from the array and manipulates the > > DOM as appropriate. Why not just stuff things in innerHTML you may ask? > > Because that's not granular enough, and should the user be interactive with > > that particular element, the user has just lost his current

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Hans Zaunere
> I've had great success using Zend Framework ContextSwitch Action > Helper: > > http://woo.ly/9it > > It is a plugin for the Zend MVC system that detects what format you're > requesting a page in, using explicitly set context (format) in the > page request: > > http://myzendapp.com/module/contr

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Chris Snyder
On Wed, Jul 15, 2009 at 10:31 AM, Hans Zaunere wrote: > The Javascript then takes each element from the array and manipulates the > DOM as appropriate.  Why not just stuff things in innerHTML you may ask? > Because that's not granular enough, and should the user be interactive with > that particul

Re: [nyphp-talk] JSON and MVC

2009-07-15 Thread Jake McGraw
I've had great success using Zend Framework ContextSwitch Action Helper: http://woo.ly/9it It is a plugin for the Zend MVC system that detects what format you're requesting a page in, using explicitly set context (format) in the page request: http://myzendapp.com/module/controller/action?format=

[nyphp-talk] JSON and MVC

2009-07-15 Thread Hans Zaunere
Hello, As I work with and need to support JSON applications more and more, I quickly remember why the mantra "don't use javascript" from yesteryear was in place. Worse, perhaps, is how the browser and server need to interface with each other in complex JSON based applications. We're all familiar