Re: [nyphp-talk] JSON and MVC

2009-07-23 Thread Chris Snyder
Hey Hans, if you haven't moved on, or decided to ignore this thread already, take a look at http://johnnycoder.com/blog/2008/12/18/jtemplates-with-jquery-ajax-and-json/ (via Jon Baer's blog) Template system for jQuery, you just inline them with your HTML. __

Re: [nyphp-talk] JSON and MVC

2009-07-22 Thread Tim Lieberman
On Jul 22, 2009, at 1:23 PM, Mitch Pirtle wrote: Agreed - and Joomla does it by allowing you to assign the view as the document type. For example, you can create different views for html, rss, json output. As well, you can just output directly from the controller and exit. Been too busy with wo

Re: [nyphp-talk] JSON and MVC

2009-07-22 Thread Brian D.
> Time for another framework folks :) This technically is not a framework, but it's interesting: http://www.persvr.org/ - Brian D. realm3 web applications [realm3.com] Information architecture, application development. phone: (917) 512-3594 fax: (440) 744-3559 On Mon, Jul 20, 2009 at 8:21 AM

Re: [nyphp-talk] JSON and MVC

2009-07-22 Thread y2rob
not i can clarify... ~rob -Original Message- From: Mitch Pirtle To: NYPHP Talk Sent: Wed, Jul 22, 2009 1:23 pm Subject: Re: [nyphp-talk] JSON and MVC Agreed - and Joomla does it by allowing you to assign the view as the document type. For example, you can create different view

Re: [nyphp-talk] JSON and MVC

2009-07-22 Thread Mitch Pirtle
Agreed - and Joomla does it by allowing you to assign the view as the document type. For example, you can create different views for html, rss, json output. As well, you can just output directly from the controller and exit. Been too busy with work to play with all the other frameworks out there,

Re: [nyphp-talk] JSON and MVC

2009-07-22 Thread Paul A Houle
I'd say that practically frameworks need to have some way to disable the "view" layer, at least the HTML templates, to let a controller output raw data. In my experience, for instance, business applications often need to output csv or xls so that people can load content into a sprea

Re: [nyphp-talk] JSON and MVC

2009-07-21 Thread Mitch Pirtle
Took the same approach with Jooma 1.5, although there is a little more work to it ;-) -- Mitch On Tue, Jul 21, 2009 at 1:08 PM, Nate Abele wrote: > On Mon, 20 Jul 2009, Hans Zaunere wrote: > > I think this really begs some questions on current server-side frameworks > > and the MVC methodology.  

Re: [nyphp-talk] JSON and MVC

2009-07-21 Thread Nate Abele
On Mon, 20 Jul 2009, Hans Zaunere wrote: I think this really begs some questions on current server-side frameworks and the MVC methodology. Changes like this have already begun, namely in RoR and other platforms. In Cake 3.0 we have a class called Media (http://code.cakephp.org/cake3/sour

Re: [nyphp-talk] JSON and MVC

2009-07-20 Thread Ajai Khattri
On Mon, 20 Jul 2009, Jake McGraw wrote: > Zend Framework already does this with Dojo: > > http://woo.ly/zfdojo > > and jQuery (though not as extensively as Dojo): > > http://woo.ly/zfjquery symfony has a jQuery plugin that replaces the existing JS helpers which sounds similar. In addition, th

Re: [nyphp-talk] JSON and MVC

2009-07-20 Thread Jake McGraw
On Mon, Jul 20, 2009 at 12:38 PM, Ajai Khattri wrote: > On Mon, 20 Jul 2009, Hans Zaunere wrote: > >> I think this really begs some questions on current server-side frameworks >> and the MVC methodology.  Changes like this have already begun, namely in >> RoR and other platforms. >> >> Time for ano

Re: [nyphp-talk] JSON and MVC

2009-07-20 Thread Ajai Khattri
On Mon, 20 Jul 2009, Eddie Drapkin wrote: > ... I've > always thought something like the "view-first" PAC model makes much > more sense for web development and MVC was/is a fad brought on by > another fad, RoR. Mind you, RoR has been good in the sense that it encouraged developers to look more

Re: [nyphp-talk] JSON and MVC

2009-07-20 Thread Ajai Khattri
On Mon, 20 Jul 2009, Hans Zaunere wrote: > I think this really begs some questions on current server-side frameworks > and the MVC methodology. Changes like this have already begun, namely in > RoR and other platforms. > > Time for another framework folks :) Time for dual framework applications

Re: [nyphp-talk] JSON and MVC

2009-07-20 Thread Eddie Drapkin
> I think this really begs some questions on current server-side frameworks > and the MVC methodology.  Changes like this have already begun, namely in > RoR and other platforms. > > Time for another framework folks :) > > H > I think there are plenty of pre-existing questions about current MVC im

Re: [nyphp-talk] JSON and MVC

2009-07-20 Thread Hans Zaunere
> In a prior engagement, we were using XUL as the view and JSON as the > communication protocol. This was nice, since the entire user interface > resided on the user's desktop (as a Firefox Add-on), all we needed to > transmit was the data. Of course, you need to be using HTML, so > transpose the

Re: [nyphp-talk] JSON and MVC

2009-07-18 Thread Felix Shnir
On Jul 18, 2009 11:20 AM, "Daniel Convissor" < dani...@analysisandsolutions.com> wrote: Hello again: > $result = ; > > $out = array(); > foreach ($result as $row) { > $out[$row['loa... Oh, make that: $out[$row['loan_id']][] = $row; :/ --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M

Re: [nyphp-talk] JSON and MVC

2009-07-18 Thread Daniel Convissor
Hello again: > $result = ; > > $out = array(); > foreach ($result as $row) { > $out[$row['loan_id']] = $row; > } > > echo json_encode($out); Oh, make that: $out[$row['loan_id']][] = $row; :/ --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y d

Re: [nyphp-talk] JSON and MVC

2009-07-18 Thread Daniel Convissor
Hey Hans: In a prior engagement, we were using XUL as the view and JSON as the communication protocol. This was nice, since the entire user interface resided on the user's desktop (as a Firefox Add-on), all we needed to transmit was the data. Of course, you need to be using HTML, so transpos

Re: [nyphp-talk] JSON and MVC

2009-07-17 Thread Christopher Hendry
On Fri, Jul 17, 2009 at 11:03 AM, Chris Snyder wrote: > On Fri, Jul 17, 2009 at 10:06 AM, Christopher Hendry > wrote: > > > I'm curious though about javascript's introspection abilities, might it > be > > possible for an element to look into itself (or clone its children) and > > render from ther

Re: [nyphp-talk] JSON and MVC

2009-07-17 Thread Christopher Hendry
On Fri, Jul 17, 2009 at 4:08 PM, Seth J Hersh wrote: > H...i live in the Catskills (near Fleischmanns) and cannot run out of > firewood. > Nice - we should get the Catskills PHP group started then! I'm in Boiceville. Ok, lemme be more specific. Firewood that doesn't burn up in 3 seconds.

Re: [nyphp-talk] JSON and MVC

2009-07-17 Thread Seth J Hersh
: [nyphp-talk] JSON and MVC Christopher Hendry wrote: > The real question is - why is it that I live in the middle of the > Catskills and it's nearly impossible to find decent firewood? uhh, find? What kind of chainsaw do you have? -- = Michael Southwell Vice President

Re: [nyphp-talk] JSON and MVC

2009-07-17 Thread Michael Southwell
Christopher Hendry wrote: The real question is - why is it that I live in the middle of the Catskills and it's nearly impossible to find decent firewood? uhh, find? What kind of chainsaw do you have? -- = Michael Southwell Vice President, Education NYPHP TRAINING: http://nyph

Re: [nyphp-talk] JSON and MVC

2009-07-17 Thread Chris Snyder
On Fri, Jul 17, 2009 at 10:06 AM, Christopher Hendry wrote: > I'm curious though about javascript's introspection abilities, might it be > possible for an element to look into itself (or clone its children) and > render from there? Yes! I've seen schemes that used class names () or custom attribu

Re: [nyphp-talk] JSON and MVC

2009-07-17 Thread Christopher Hendry
As Anirudh and Snyder (and pretty much everyone else) has said, it comes down to either innerHTML and blocks of server-side rendered HTML or js templating. I'm curious though about javascript's introspection abilities, might it be possible for an element to look into itself (or clone its children)

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
l 15, 2009 2:31 pm Subject: Re: [nyphp-talk] JSON and MVC 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 pla

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