PDA

View Full Version : Need Suggestions for PHP programming



Extol11
July 5th, 2012, 01:33 AM
Hi! I'm currently learning php for a webpage I've been asked to make and I would like some suggestions on some matters. These are the things I'd like to know more of:

Is there any program like notepad++ for Ubuntu that I can use for the code? This or anything that would help me with php. I searched for notepad++ in the ubuntu repertories but it did not return any results. Or is there something specifically designed to help you program in PHP?

Also, I've been looking for a book to learn PHP in amazon and the top-rated one was published in 2009. Has much changed in that time? Is it safe to go and order a book that old?

Thanks in advance.

spjackson
July 5th, 2012, 09:00 AM
Is there any program like notepad++ for Ubuntu that I can use for the code? This or anything that would help me with php. I searched for notepad++ in the ubuntu repertories but it did not return any results. Or is there something specifically designed to help you program in PHP?

For an editor similar to notepad++ I'd suggest Geany.



Also, I've been looking for a book to learn PHP in amazon and the top-rated one was published in 2009. Has much changed in that time? Is it safe to go and order a book that old?I'm not familiar with any PHP books, so I can't really help with that. I wouldn't say that PHP has changed greatly since 2009, but how up to date was the book at time of publication?

na5h
July 5th, 2012, 10:07 AM
Aptana Studio (http://aptana.com/) is great for web-development! Bluefish is quite nice too...

edit: Notepad++ works great in Ubuntu with Wine. Sooner or later, however, you'll probably outgrow the capacity of a simple text-editor and will want to use something with a little more kick, hence the IDEs mentioned above...

Extol11
July 5th, 2012, 07:53 PM
Thanks for the help. Jackson, the book was published in October 26, 2009 and was up to php 5.3. Wikipedia shows doesn't mention any php version after that, but considering it's been 3 years I wanted to make sure there were no small changes with considerable impact on how to get things done in PHP. Here's the book, just in case.
http://www.amazon.com/Beginning-PHP-5-3-Wrox-Programmer/dp/0470413964/ref=sr_1_2?ie=UTF8&qid=1341514326&sr=8-2&keywords=PHP+5+in+books

And I'll give those a try, Nash. I'm trying to look for a program that helps me out but doesn't walk me by the hand. I don't want the program doing things for me but rather letting me know when I messed up and pointing me in the right direction.

Thanks for your help.

alexlpratt
July 5th, 2012, 08:00 PM
As far as literature for PHP goes, I found the tutorials at w3schools invaluable. Other than that, the O'Reilly books have never failed to get me where I needed to go.

Regarding your text-editor question, I actually find the best method for me is to use a CLI editor like Nano or VIM while actually developing, as they I am able to apply changes directly to the files, make backups, run scripts, etc...

Hope this helps!

nikonian
July 5th, 2012, 11:55 PM
Eli the computer guy, does some AMAZING tutorial videos. He doesn't make the usual, fatal mistake of assuming the viewer knows things...

http://www.youtube.com/user/elithecomputerguy

What an amazing person :)

epicoder
July 6th, 2012, 07:58 PM
Please see the link in my signature as to why you should never, EVER use W3Schools as a resource. The MDN (http://developer.mozilla.org) is much better, and the W3C itself has some good articles. W3Schools is full of crap and old code, and they are NOT endorsed by the W3C. You should never use it.

As a Notepad++ veteran myself, I agree with the earlier poster that Geany is a very good alternative to it. Gedit (the default editor in Ubuntu) is not half bad either. In the end, it's mostly personal preference.

The book seems mostly up to date. 5.4 is out, but you'll probably have trouble finding a cheap webhost that goes beyond 5.3. If you do need resources on 5.4 there's always php.net (http://php.net).

Extol11
July 6th, 2012, 10:45 PM
I'm checking out all of these resources. Thanks a lot for the help.

alexlpratt
July 7th, 2012, 07:40 PM
Please see the link in my signature as to why you should never, EVER use W3Schools as a resource. The MDN (http://developer.mozilla.org) is much better, and the W3C itself has some good articles. W3Schools is full of crap and old code, and they are NOT endorsed by the W3C. You should never use it.

As a Notepad++ veteran myself, I agree with the earlier poster that Geany is a very good alternative to it. Gedit (the default editor in Ubuntu) is not half bad either. In the end, it's mostly personal preference.

The book seems mostly up to date. 5.4 is out, but you'll probably have trouble finding a cheap webhost that goes beyond 5.3. If you do need resources on 5.4 there's always php.net (http://php.net).

The link in your signature appears to be a childish vendetta against a good learning resource. The majority of it is re-iteration of the same points over and over again, and the examples at the bottom don't justify the gravity of the claims. I would still argue that w3schools (while not the best resource on the net) is still a good place to learn.

na5h
July 7th, 2012, 08:25 PM
The link in your signature appears to be a childish vendetta against a good learning resource. The majority of it is re-iteration of the same points over and over again, and the examples at the bottom don't justify the gravity of the claims. I would still argue that w3schools (while not the best resource on the net) is still a good place to learn.

+1

It's not like using W3Schools as a resource is going to make you a bad programmer or anything. Surely they are far from perfect and from what I've heard, their so called "certifications" are not recognized by anyone...but it's still a pretty good and easy-to-use resource for beginners.

From what I've seen, they seem to have pretty descent tutorials and examples...at least for commonly used elements and methods. I mean, how wrongly can you explain something like "<h1>" or "echo()" anyways?

trent.josephsen
July 7th, 2012, 08:56 PM
I usually recommend against using W3Schools because they don't seem to make more than half an attempt at accuracy. Better than some, certainly, but I don't approve of their casual attitude toward the material they pretend to teach or their refusal to disclaim any connection with the W3C.

W3Schools might not be the worst resource out there, but I think it's important to remind people (especially on a forum like this one with lots of beginners) that it's not affiliated with the W3C and has many accuracy issues. Otherwise you'll end up with people who vehemently defend their way of doing things based on W3Schools.

That said, there's probably no reason to have a long drawn-out argument every time it comes up, so perhaps we can agree to mention the drawbacks once per thread in which W3Schools is mentioned and not get up in arms about it.

trent.josephsen
July 7th, 2012, 09:01 PM
It's not like using W3Schools as a resource is going to make you a bad programmer or anything.

Let's see, not using a DOCTYPE, border attributes on tables, inline elements directly inside <form>, confusing ISO-8859-1 with UTF-8, and repeatedly describing HTML elements by what they look like in certain browsers rather than their structural role as document markup... seems like a recipe for mediocrity to me. Maybe not bad, but certainly not good.

na5h
July 8th, 2012, 12:36 AM
Let's see, not using a DOCTYPE, border attributes on tables, inline elements directly inside <form>, confusing ISO-8859-1 with UTF-8, and repeatedly describing HTML elements by what they look like in certain browsers rather than their structural role as document markup... seems like a recipe for mediocrity to me. Maybe not bad, but certainly not good.

I didn't say you should use w3schools as your ONLY reference...but it's quite convenient for a quick check on basic methods or elements, such as this one* (http://www.w3schools.com/php/func_string_explode.asp) (although php.net probably has more advanced examples).

*random method that came to mind since I recently used it in a script.

Yes, there are probably better sites to go to...I just don't really get all the fuzz about w3schools being some sort of evil supervillain or something. Believe me, I've stared down the source code of quite a few webpages, and I've seen a lot scarier examples of bad coding practices than I've ever managed to find in any examples over at w3schools.com :)

Come to think of, php.net is quite a nice resource too!

na5h
July 8th, 2012, 01:08 AM
I usually recommend against using W3Schools because they don't seem to make more than half an attempt at accuracy. Better than some, certainly, but I don't approve of their casual attitude toward the material they pretend to teach or their refusal to disclaim any connection with the W3C.

W3Schools might not be the worst resource out there, but I think it's important to remind people (especially on a forum like this one with lots of beginners) that it's not affiliated with the W3C and has many accuracy issues. Otherwise you'll end up with people who vehemently defend their way of doing things based on W3Schools.

That said, there's probably no reason to have a long drawn-out argument every time it comes up, so perhaps we can agree to mention the drawbacks once per thread in which W3Schools is mentioned and not get up in arms about it.

Yes, I can see what you mean! :) I have to admit: back when I started learning about web-developing, I actually thought w3schools was part of the W3C...:oops:

lykwydchykyn
July 8th, 2012, 02:07 AM
Geany, Kate or Gedit (with plugins) are comparable to Notepad++; but later you may want to look at something like Emacs or Eclipse.

A book from 2009 is going to be fine. Where differences have come about, they are likely to be minor. The bigger changes happened between 5.2 and 5.3.

I'd recommend against w3schools (for LEARNING PHP; I don't rule it out completely as a quick-n-dirty reference) simply because, from what I can tell, their approach to using PHP is kind of out-dated and will lead you to unmaintainable code. One telling example, they teach using the old mysql_* methods of accessing a database, when PHP now has a much cleaner, safer, and cross-db method of accessing data in PDO.