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
>
>
>
|