[snip]
The application that is the example for the concept is a diet tracking
system that allows users to input the food/beverages they intake in
meals and tracks the amount of calories, fat, carbs, vitamins, etc
that they take in on a daily basis.
This is a basic CRUD-type application and there is no question that
this can be done without using any client-side scripting. The client-
side scripting can be used to enhance the user experience when client-
side feature testing shows that the features needed for the
enhancements are available. This is a concept called "progressive
enhancements" (or perhaps better known as but a worse name "graceful
degradation".)
I understand that my questions are vague, as the approach is still a
little unclear in my head. I am hoping to get feed back on how
developers feel on the topic. My feeling is that any data
manipulation or data accessed from the database should be done
separately and then handed back through an AJAX call to my PHP
scripts, however, something that is all Presentation related (such as
echoing the data to the screen using PHP (though that may be a bad
example due to the fact that this can be achieved with JavaScript).
That paragraph is a little unclear to me. I understand you might be
trying to have all presentation done in the browser and the server
more-or-less as a data validator and data store. Architecturally, this
is a nice idea and there are web sites built like this; however, this
is not really either the intention of how the web was to be used
(sharing documents) or the way to reach the broadest audience (i.e.
those with JavaScript disabled or insufficient JavaScript support for
what your client-side application requires.)
If you are willing to say "this application only works with Internet
Explorer 6+, FireFox 2+, Opera 9+, Safari 2+ with images, CSS,
JavaScript, cookies all enabled and ActiveX enabled on IE6" then you
can build an application that has presentation performed only on the
client-side. These requirements are quite restrictive (e.g. thinking
about some disabled users or users with slightly older cell phones)
and since this application could be built without any of these
requirements (i.e. this application could be written to work with IE4,
Netscape Navigator 4 with JavaScript disabled, for example), then why
shouldn't it be written that way? Then progressive enhancements can be
used to make the user experience "slicker."
If your example was a web-based chat application then perhaps
requiring JavaScript would be mandatory and the decisions about how to
design the application would likely be completely different. It
matters what you are building before you decide how you will build it
and which technologies will be required for functionality.
Peter