tags:

views:

174

answers:

4

I'm looking for problems I can generalize, recognize later (in design), and say "Hey, if I continue down this road I'm going to hit trouble. PHP + JS just weren't meant for this."

If I'm using PHP+JS.. what can't I do? What shouldn't I attempt? What do you suggest instead?

Thanks!

+1  A: 

It's easy to get in trouble with PHP and JS by themselves without using some type of framework. PHP can degrade into a mess of spaghetti code quickly if you do not follow some type of convention like the Zend Framework or others.

That said, I don't think you'll find anything that PHP CANNOT do ...

Jess
ok, cool. good tip, thx :)
ThomasGHenry
+1  A: 

I'd take a look at this and see what the limitations of JS are. The reason this is important to know is that xml performance on JS is just bad, use JSON. The other thing to note is that if you really need to show that many rows of data on a page, it would be better to use flash/flex solution. [warning, that link doesn't work for Firefox 3, it just dies]

I will note though that most of my experience has pointed me to the fact that there normally isn't a reason to show that many things on a page. If I come across a usecase, I usually can just AJAX something in on the fly to keep from having to load so many things at once.

Richie Rich
nice benchmarking app. thx. I'm in FF3 and it did work, btw.
ThomasGHenry
I bet it's Yslow/firebug! I'll have to turn that off.
Richie Rich
I have firebug, too. I dunno what Yslow is though.
ThomasGHenry
http://developer.yahoo.com/yslow/ - downloadhttp://developer.yahoo.com/performance/index.html#rules - what it's abouthttp://video.yahoo.com/watch/1040890/3880720 - video that will change the way you develop for the web
Richie Rich
+7  A: 

It is software, almost anything you can imagine is possible, given enough time and resources. I don't see how PHP would preclude you from doing anything in JavaScript, or anything in JavaScript could preclude you doing something in PHP. They are separate technologies which run at each end of the client/server architecture which can be built to work cooperatively.

Grant Wagner
this is the picture that's beginning to form here. thanks
ThomasGHenry
A: 

The only problem you will encounter is at least 10 years away when Javascript or some kind of open source scripting framework becomes the Web standard. Server side scripting languages like PHP, ASP, JSP, etc and Plugins like Flash, SVG, VRML fill in gaps that a relatively slow client side scripting language like Javascript cannot accomadate. In the future, as PCs get faster and Javascript engines continue to get more efficient, you will see the gradual decline of 3rd party solutions like Server side scripting and plugins. Then the only problem you will face is a bunch of old code that gets laughed at by the cyber punks zooming by on their anti gravity boards. Ofcourse, this is in the future, and by the looks of things the specs people loving dragging their feet.

So in short, PHP is your only hope for doing anything useful in a browser for the forseeable future. Your only worry should be whether you want to learn ASP instead, its pretty cool. Although PHP has a huge community and code snippets galore.

novatv.stdios
thanks for this. I dabbled in ASP (for a semester). C# is nice, but the whole notion of proprietary entrapment is unappealing to me. No knowledge is ever wasted though. Skills is skills.
ThomasGHenry