PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 23rd, 2003, 12:19 AM
cwebmedia cwebmedia is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Calgary, Alberta, Canada
Posts: 9 cwebmedia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Best Methods for Learning PHP?

I'm curious as to what the best methods for self learning PHP would be? I've been playing with PHP for over a year now but have not really mastered it as I use it for what I need then move on.

In THIS THREAD I started earlier today, I was asking one specific question but was given some other advice and ideas that lead me to end up learning quite a bit today. I don't want that to stop.

Any thoughts?

Reply With Quote
  #2  
Old July 23rd, 2003, 06:58 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via ICQ to dhouston
I'd say do more projects and increase their complexity. The more you have on your plate, the more incentive you have to learn efficient ways of doing things and to dig into the core functionality of PHP that you haven't had to touch before. Most basic things you find yourself wanting to be able to do are probably already covered in the core functionality or can be accomplished using a pretty simple combination of core functions.

Reply With Quote
  #3  
Old July 23rd, 2003, 09:23 AM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 650 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
Three things that you need to do:

Read about it, play with it, and code in it... those are really the only things that you need to do

Sit down and make yourself read a new chapter in a php book every night, or every other night (as some of the books are really mind numbing)

Reply With Quote
  #4  
Old July 23rd, 2003, 10:15 AM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 785 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 16
I assume you already have a PHP book. You have most likely mastered everything contained in that book.

Time to move on and explore the syntax even further. Play with functions that you find on the www.php.net documentation.

Your best asset is need. You have to build projects where you have no choice but to learn certain new parts of PHP.

PHP Code:
 not really mastered it as use it for what I need then move on
It is ok to use PHP for what you need to complete a project and get it done... however, you should revisit your past projects and figure out what you could have done better, more effieciently, how you could have created a component that could have worked for this project and been reused many times over in other projects.
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
  #5  
Old July 23rd, 2003, 10:31 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 16
Going back to your original thread, and looking at this one, the first thing you need to do IMHO is to find a host that gives you DB access; you can get one for pennies a day. You should only use flat text files to store cached pages, configuration settings, etc.. - and not actuall usable/searchable data.

Doing anything of sizable matter with flat text files is a waste of time. Storing data in text files is only efficient to a point of maybe 10kb per file, after that it will become rather clunky, inefficient and resource intensive once these files get large and not even close to the speed and ease of use a database will give you.
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
  #6  
Old July 23rd, 2003, 01:24 PM
cwebmedia cwebmedia is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Calgary, Alberta, Canada
Posts: 9 cwebmedia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
jpenn: I do have a host with MySQL but in what I'm doing, there is not nor ever will be so I decided to use a flat file system as opposed to hard coding every page and then getting them to use something crummy like FrontPage to edit it. I did separate alot of my files so that there are 'more files - less clutter' and the page itself consists of less than 20 files so I'm not too concerned about that.

laidbak: I do have a PHP book. PHP for the World Wide Web by Larry Ullman. Excellent book for the price. I've not mastered it completely ... yet ...

I really think the idea of the 'forced to learn' projects is very effective. Then the revisiting as well. I've learned more in the past week than I did in the year prior to that as this is not a 'just for fun - fartin' around' thing.

I suppose what it comes down to is finding a way that works best for me indiviually and go with that.

What if I changed the wording of my question to:

If a person was looking to learn PHP, what main function (processes) etc should the absolutly know? (IE: arrays, variables etc)

Reply With Quote
  #7  
Old July 23rd, 2003, 02:20 PM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 785 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 16
Good question... I answered the same question for a friend of mine. For a moment I thought I had answered it here on Devarticles, but I recall the phone converation now.

I've found that learning the following is critical to a sucessful PHP project (in order of importance IMHO):

1. Creating Arrays - Multidimensional, Associative, Simple
2. Manipulating Arrays - join, explode, implode, split, etc... Any array related function... learn it.
3. String manipulation functions and especially the ones that relate to changing strings to arrays and vice versa. You would be surprised at how many helper function a novice PHP coder will write to produce the same results one of these intrinsic functions can produce.
4. Learn how and when to use the var_dump, print_r functions.
5. Learn to use objects... you don't have to start off creating classes. Get a base by downloading some php classes and instanciate an instance of that object, dump the information from the object, inspect the results.
6. Learn to create classes... it can be as simple as writing a class to "wrap" the functionality of the mysql db connection. You don't even have to go as far as creating methods to support the mysql connection... just create a class that creates a connection object and returns the handle. Really cool stuff.
7. Learn the error handling functions

Reply With Quote
  #8  
Old July 23rd, 2003, 02:21 PM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 785 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 16
I should mention that just doing 1 - 4 will help you with the 5-7.
Once you master 1-4 you will feel like you can do anything.

Reply With Quote
  #9  
Old July 23rd, 2003, 02:22 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 650 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
Quote:
Originally posted by cwebmedia
If a person was looking to learn PHP, what main function (processes) etc should the absolutly know? (IE: arrays, variables etc)


I would say that what you would want to know is the simple logic of any programming language.. Structure & flow... what someone needs to really know before venturing into any programming language is that development is at least in my view like thinking. If you can think something, and put it down on paper and make it make sense then you can program it. I program like I think, myself. (I guess that's why some of my stuff is scatter brained every once in a while.. )

My suggestion would be to read up on something like Javascript, C#, C, C++, VB, and compare the logic and flow process for each of those languages, and once you've done that then compare the different ways that each language does things. Ask yourself a few questions:

1. How do the different loop process (For, while, Do while, etc) differ from VB/VBA as compared to either C, C#, or Java/Javascript ? How are they alike compared to PHP?

2. How do each of the languages compare in flow? Do you call a proceedure (which only does something, and doesn't return a value) or a function (which does return a value) similarly to each of the programming languages you've read up on?

I'm sure that there are more but right now i'm out of ideas... laidbak, jpenn, stumpy, everybody any ideas or suggestions you could add?

When it comes to knowing a programming language those are basically the essentials that you need.. everything else is gravy. There are certain things that people MUST know about each language they write in, but those things that one person has to know won't be the same set that another person has to know.. it just really depends on what you need to do. Like in PHP, there really isn't a set of proceedures you *have* to know, or functions that you *must* know, there are some (that most books cover) that are the most widely used... but I agree with Wil (laidbak) php.net is your friend.. so is google

My main suggestion if you really want to get the most out of learning how to program, no matter what language it is, is to take a course on computer science (I learned in Pascal and C) to give you a good grip and a good base to learn on...

Just my $.02

Reply With Quote
  #10  
Old July 23rd, 2003, 02:37 PM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 785 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 16
I should also add that some of the functions I listed above are quite common in a lot of languages like c, c++, vb, javascript, etc, so it will serve you well not only to learn those functions but imagine how they are producing their results. Essentially, these functions had to be written either by the programmer as a helper function or the language writters decided the programmer would need these functions and included it in the language. Either they write it or you do. So, how do you think the function for JOIN was written? Any ideas anyone? Good excercise.

Now, about this statement:
Quote:
My main suggestion if you really want to get the most out of learning how to program, no matter what language it is, is to take a course on computer science (I learned in Pascal and C) to give you a good grip and a good base to learn on...
I dunno about this one. I'm a little biased here I guess because the best computer related class I've ever taken was Oracle because the instructor actually knew what the hell she was doing. I took advanced C++ and advanced VB without the intro course because the intro classes would have been a waste of time. Even in these courses the material was pushed at a very slow rate. I took these courses at the same time against the will of my councelor. It was not a problem.

My point here is that classes tend to be as good as the instructor, so before you go waste time and money make sure you know who your instructor is. You could take your course at a professional institution where the instructor is someone that is truly knowledgable... but good luck in some random college course. I expect this will get a little better in a few years, but not right now.

The logic of it is pretty simple though. With all the time and resources you have put into learning this stuff, would you become a teacher and put up with hard headed students for little pay? The ones that do are usually sub-par.

I've had so many arguments with instructors that were not teaching a technology correctly and could not admit they were wrong. You are better off on your own.

Reply With Quote
  #11  
Old July 23rd, 2003, 03:12 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 650 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
My instruction was all in high school.. I had the same instructor for 3 years (last two were Advanced Placement) so I guess that helped make the difference for me

Reply With Quote
  #12  
Old July 23rd, 2003, 03:16 PM
cwebmedia cwebmedia is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Calgary, Alberta, Canada
Posts: 9 cwebmedia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Holy smokers ... that's some pretty awesome info guys. I appreciate this big time. That's not to say I want the thread to stop! Keep em' coming!

Its funny you bring up the 'good instructor - bad instructor' thing. I myself instruct a course at the college level. I took the New Media Production & Design course and then 4 month after graduating landed a gig teaching the Introduction to Multimedia course.

I was not overly impressed with a lot of the instructors I had hence I've really been working hard to offer my students all that I can and more.

You're so right when you say, 'it depends on the instructor'. I was asked if I would take a full-time gig if the offer came up and after some thinking, I said no. I don't think I could be half the instructor I am without being out, working in the industry every day like I am.

Anyway ... way off topic ... Back to PHP!

Reply With Quote
  #13  
Old July 23rd, 2003, 05:04 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 16
Quote:
jpenn: I do have a host with MySQL but in what I'm doing, there is not nor ever will be so I decided to use a flat file system as opposed to hard coding every page and then getting them to use something crummy like FrontPage to edit it. I did separate alot of my files so that there are 'more files - less clutter' and the page itself consists of less than 20 files so I'm not too concerned about that.

The same thing was said 4 years ago on a site I just overhauled. The general thought of the site in 1999 was that it will be just a few pages here and there, as people add articles, i (the orignal owner of the site) will work with flat text files to post them, blah blah blah - I just overhauled the site; it had close to 7,000 bits and pieces of files spread all over the domain. What would have taken a few days worth of work (to overhaul the site) turned out to be a few weeks all becuase of poor planning.

Now, the best method by far to learning php (any programming language) would be to first not even worry about the langauge - The very first thing that should be done is to get a strong understanding of application logic and business logic; then presentation logic. Without first understanding the logic, it is very hard to succeed and you will find yourself doing the same stuff over and over again and wasting your time.

Now, if you want to jump right into code and aviod the steep learning curve of business logic, rules, etc., i would recommend to first get a grip on Object Oriented Programming (as it applies to mostly all upper level langauges and php) rather than first learning all the little stuff with php.

Reply With Quote
  #14  
Old July 23rd, 2003, 05:20 PM
cwebmedia cwebmedia is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Calgary, Alberta, Canada
Posts: 9 cwebmedia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by jpenn

The same thing was said 4 years ago on a site I just overhauled. The general thought of the site in 1999 was that it will be just a few pages here and there, as people add articles, i (the orignal owner of the site) will work with flat text files to post them, blah blah blah - I just overhauled the site; it had close to 7,000 bits and pieces of files spread all over the domain. What would have taken a few days worth of work (to overhaul the site) turned out to be a few weeks all becuase of poor planning.


Interesting ... I really pushed for a db too but they didn't want it ... oh well. If we ever get to the critial point, I'll have the power of 'I TOLD YOU SO!' on my side.

Quote:
Originally posted by jpennNow, the best method by far to learning php (any programming language) would be to first not even worry about the langauge - The very first thing that should be done is to get a strong understanding of application logic and business logic; then presentation logic. Without first understanding the logic, it is very hard to succeed and you will find yourself doing the same stuff over and over again and wasting your time.


Interesting again ... where do I find out about those types of topics? I've decided that I really want to get into PHP hard core and as I've never really done any serious programming, this would all be good for me no doubt.

Reply With Quote
  #15  
Old July 23rd, 2003, 05:30 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 16
Quote:
Interesting again ... where do I find out about those types of topics? I've decided that I really want to get into PHP hard core and as I've never really done any serious programming, this would all be good for me no doubt.

The key word(s) are bolded above - If that is the case, the logic side of things would be the best starting point. Logic is a large topic and there are no really really good articles any where around that really discuss this. You can read articles pertaining to different things and kind of piece together the whole logic issue. The type of articles you would pick this sort of stuff out of is articles that talk about templating or sperating application code from presentation, Object Oriented Programming articles, etc.. A good book that will apply to the application logic would be http://www.amazon.com/exec/obidos/t...e=ATVPDKIKX0DER .

Reply With Quote
  #16  
Old July 23rd, 2003, 06:45 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,240 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Quote:
Originally posted by jpenn
Now, the best method by far to learning php (any programming language) would be to first not even worry about the langauge - The very first thing that should be done is to get a strong understanding of application logic and business logic; then presentation logic. Without first understanding the logic, it is very hard to succeed and you will find yourself doing the same stuff over and over again and wasting your time.


I agree with Joe on this one... I remember my first programming course in university. It was called "Introduction to Application Development". Let me tell you, it was horrible.

When I look back at it, we were creating VB applications, but had no idea how or why they were working. The instructor taught us NOTHING about application logic and critical thinking.

Needless to say, I transferred schools, and I found that my first college course (Introduction to Application Development using Java) taught us more about the foundations rather than the language. The foundations were reinforced by using Java, but we were taught logic first and foremost.

Had it not been for courses like this, I may still have been making applications, without knowing how the innerworkings were working!

Hope that helps...
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #17  
Old July 23rd, 2003, 07:31 PM
cwebmedia cwebmedia is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Calgary, Alberta, Canada
Posts: 9 cwebmedia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unlike PHP, it looks as though Logic and Critial Thinking is not something that I can read a few tutorials on and be headed in the right direction.

I wonder if the UofC has anything like that ... do computer science courses teach any of this stuff?

Reply With Quote
  #18  
Old July 23rd, 2003, 07:54 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 16
Quote:
I wonder if the UofC has anything like that ... do computer science courses teach any of this stuff?

Yes, C/C++ courses (most of them) also do. That logic pretty much applies somewhat to php also as php is only a wrapper for C/C++ anyways...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Best Methods for Learning PHP?


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap