[Phpwm] PHP or JavaScript
Mo Awkati
mawkati at yahoo.co.uk
Tue Feb 23 15:32:12 UTC 2010
> /* This is not intended to fuel a heated debate about which is better! */
>
> I just need to be clear in my mind as to which is appropriate to use and
> when. I recognise that one is server side and the other is browser side.
> I see both as tools in a toolbox and therefore use as appropriate.
>
> The way I see them: JavaScript for presenting web pages, PHP for data
> handling and processing.
>
> Am I on the right tracks? I would welcome your thoughts on this, if you
> can give me an example/s where one is more appropriate to employ than
> the other, or indeed where they both live happily together! Obviously
> there are areas where they overlap.
>
>It should be the case that Javascript merely enhances the user
>experience - e.g. adding a popup calendar, rather than someone having to
>type in 2010/01/21 or provides e.g client side validation (i..e no need
>to click submit and wait for the server to respond).
>In an ideal world, PHP does everything (validation, data presenting etc)
>and then Javascript perhaps makes the page more interactive - but if JS
>is turned off everything continues to be usable.
>David.
Hi David
This is how I see it. I just need to mindful of the "if JS is turned off everything continues to be usable."
I have seen some very nice and well presented content using JS which you can't do with PHP, hence my question.
Mo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/phpwm/attachments/20100223/f452d745/attachment.htm
More information about the Phpwm
mailing list