Print

Print


I'd be really curious to see the different ways you all speak of
accomplishing this, and would stand to learn a lot along the way. As a
beginner with much of this, I have patched together this app using methods
and means that I know, rather than the 'right' way.  So, that said, I'm
sure I'm doing a lot of somewhat basic operations in a rather roundabout
manner.  Do correct me.

I intentionally left this project at work today so I wouldn't play with it
at home tonight, but in the morning I'll share the various files so anyone
who feels like it can pick them apart and demonstrate their alternative
(and likely far more efficient) ways of doing things.

Thanks to all of you who have chimed in.  Much appreciated.

N

On Mon, Dec 5, 2011 at 6:04 PM, Godmar Back <[log in to unmask]> wrote:

> On Mon, Dec 5, 2011 at 6:45 PM, Jonathan Rochkind <[log in to unmask]>
> wrote:
>
> > I still like sending HTML back from my server. I guess I never got the
> > message that that was out of style, heh.
> >
> >
> I suppose there are always some stalwart defenders of the status quo ;-)
>
> More seriously, I think I'd like to defend my statement.
>
> The purpose of graceful degradation is well-acknowledged - I don't think
> no-JS browsers are much of a concern, but web spiders are and so are
> probably ADA accessibility requirements, as well as low-bandwidth
> environments.
>
> I do not believe, however, that such situation warrant any sharing of HTML
> templates. If they do, it means your app is, well, perhaps outdated in that
> it doesn't make full use of today's JS features. Certainly Gmail's "basic
> html version for low bandwidth environments" shares no HTML templates with
> the JS main app. In Nate's case, which is a heavily JS-dependent app (he
> uses various jQuery plug-ins to drive his layout, as well as qtip for
> tooltips), I find it difficult to see how any degraded environment would
> share any HTML with his app.
>
> That said, I'm genuinely interested in what others are thinking/have
> experienced.
>
> Also, for expository purposes, I'd love to prototype the client-side for
> Nate's app. Then we could compare the mixed PhP server/client-side AJAX
> version with the pure JS app I'm suggesting.
>
>  - Godmar
>
>
> On Mon, Dec 5, 2011 at 6:45 PM, Jonathan Rochkind <[log in to unmask]>
> wrote:
>
> > I still like sending HTML back from my server. I guess I never got the
> > message that that was out of style, heh.
> >
> > My server application already has logic for creating HTML from templates,
> > and quite possibly already creates this exact same piece of HTML in some
> > other place, possibly for use with non-AJAX fallbacks, or some other
> > context where that snippet of HTML needs to be rendered. I prefer to
> re-use
> > this logic that's already on the server, rather than have a duplicate
> HTML
> > generating/templating system in the javascript too.  It's working fine
> for
> > me, in my use patterns.
> >
> > Now, certainly, if you could eliminate any PHP generation of HTML at all,
> > as I think Godmar is suggesting, and basically have a pure Javascript app
> > -- that would be another approach that avoids duplication of HTML
> > generating logic in both JS and PHP. That sounds fine too. But I'm still
> > writing apps that degrade if you have no JS (including for web spiders
> that
> > have no JS, for instance), and have nice REST-ish URLs, etc.   If that's
> > not a requirement and you can go all JS, then sure.  But I wouldn't say
> > that making apps that use progressive enhancement with regard to JS and
> > degrade fine if you don't have is "out of style", or if it is, it ought
> not
> > to be!
> >
> > Jonathan
> >
> >
> >
>



-- 
Nate Hill
[log in to unmask]
http://www.natehill.net