Page 1 of 2
What is the most pointless use of PHP?
Posted: Tue Jun 04, 2002 5:14 pm
by gotDNS
What does everyone think the most pointless use of PHP is?
Just wondering.
I'd say for, oh say, someone making a site about their cat and wanting to put in a login that says "wow, like my login? (how about my cat!?)"
Posted: Tue Jun 04, 2002 5:19 pm
by cwcollins
i may offend some people here, but i thnk using php to do simple form validation (is X field not empty) is silly. why wait for another page to load when you can just use a pretty simple bit a JavaScript? It's faster, and easier on the server.
-c.w.collins
Posted: Tue Jun 04, 2002 5:22 pm
by gotDNS
Remember kids, when using JS, make sure you test it on every browser you've ever heard of!
Posted: Tue Jun 04, 2002 5:25 pm
by qads
i do that cwcollins
why? well cos i want learn php and i wanna know all the functions of it

it is just for fun.
useless use?
hmm, i'd say buying a book about php and then smashing it on your head cos u don't understand it

Posted: Tue Jun 04, 2002 5:33 pm
by cwcollins
gotDNS wrote:Remember kids, when using JS, make sure you test it on every browser you've ever heard of!
unless you are working in a controlled environment :). While this certainly can lead to lazy programming, it does make things so much easier.
good point, though, gotDNS.
c.w.collins
Posted: Tue Jun 04, 2002 8:08 pm
by jason
Also considering you don't want people with JavaScript turned off. The problem with controlled environments is that they are rarely controlled, even if you develop for intranets. Trust me, I have worked on them.
You can't assume for a moment everyone will be using the same browser. Using PHP for form validation is a rather responsible task, and one which isn't done enough.
Yep...
Posted: Tue Jun 04, 2002 9:16 pm
by zorka
You cannot trust that the user has java script turned on. He/she might be using some unknown obscure beta relase of some new Linux browser that doesn't even support java script.
--ZorKa
Posted: Wed Jun 05, 2002 4:58 am
by mikeq
Agreed, you can't always rely on JavaScript being there, you should always vaildate the data at the server (in addition to frontend checking) or you end up with a lot of crap data in your database.
Posted: Wed Jun 05, 2002 8:23 am
by enygma
most pointless? PHP template engines....*sigh*
Posted: Wed Jun 05, 2002 8:34 am
by Sergiy
besides that... there are many evil hackers

who just dream of cracking your site...
they definitely will not use JavaScript checking

Posted: Wed Jun 05, 2002 9:34 am
by cwcollins
ok, so was wrong about the JS form validation thing, but what's wrong with template engines?
enygma wrote:most pointless? PHP template engines....*sigh*
c.w.collins
Posted: Wed Jun 05, 2002 9:37 am
by enygma
they're silly when the same thing could be done with just PHP....
Why cater to people who will, more than likely, make pretty bad web pages because they are too lazy to really learn PHP?
Posted: Wed Jun 05, 2002 9:47 am
by cwcollins
what about using templates within a CMS framework? wouldn't this be a good way to prevent people from making nasty pages?
user: i want to make a webpage for my department
admin: ok, here are the templates you have to choose from. you can change the content, but you can not modify the layout or the color scheme.
user: ok. but i want to make this line bigger, and red and flashing.
admin: sorry, that is not available in these templates.
c.w.collins
Posted: Wed Jun 05, 2002 9:48 am
by zorka
cwcollins wrote:ok, so was wrong about the JS form validation thing, but what's wrong with template engines?
enygma wrote:most pointless? PHP template engines....*sigh*
c.w.collins
The bigger problem with PHP template engines is they cause more work for web designers and developers since you have to learn "their" tags. Why not just use industry standard tags for god sakes? There are also speed concerns that template engines add because all of the code has to be doubly parsed and executed. Also, (not that I have tested it) but I using Dreamweaver and those tools would definitely not be compatable with these add-hoc templating engines.
--ZorKa
Posted: Wed Jun 05, 2002 9:55 am
by cwcollins
maaybe this is a foolish question, but how would you implement a content management system, if not by using something at least akin to templates?
is the issue that templates are a bad idea, or that bulky, difficult to use template engines are a bad idea?
c.w.collins