I have taken interest in web development lately and want to get into developement of ajaxed web apps.I found out that PHP is most preferred language for developing web 2.0 apps and thus want to learn it.As i started diggin about PHP,i found the zillion pages of info.. and so, even before startin actual learning i'd end up with many doubts.. pls help me out by clearin my all newbie doubts..
1]what version to start with v4 or v5 ?
I'd read that v5 introduced OO concepts.so is it ok to directly start with v5 or shall i need to start with v4 and then upgrade myself to v5 once thorough with v4?
2]what learning approach shud be used?
I started off with 'Programming PHP' book frm O'Reilly.It goes into each fundamentals (like functions,arrays,strings etc) thoroughly with examples limiting to the concept explained.But i am looking for examples which uses multiple concepts together in one ex.
so guide me tht shall i continue with the same book or use other book for basics? (suggest books in latter case)
3]so far what i learnt is we can use both html & php script in single file.but when i think of developing large apps(being familiar with jsp/servlets) it wud become messy to code both presentation stuff and business logic in single module.so what shud be used for seperation of preso stuff and logic?
I'd read about template engines (smarty) and mvc kinda frameworks (zend) but i am still confused about difference between them and when to use what? again when i searched,there are many template engines,frameworks to use ,but i;d like to know which is good one,to start with?
4]suggest the organised way of learning php
As i said,i've come across lot of information about php like -template engines -frameworks -PHP extensions PEAR -AJAX programming with PHP,etc. so i am completely confused what to start with ,i cant learn everything at same time though i feel like doing it,as there must be dependency (which i am now unaware of) to learn something which would requre knowledge of other things .
so please suggest me what to start with then when i shud be learning (ie.sequence) things like
-template engines -frameworks -mysql connections/apps -PHP extensions PEAR -AJAX programming with PHP,etc.
5]lastly suggest me good resource for learning php (websites/links/books/pdf's/preso's/ebooks)
thanks you,
php newbie.
Absolute newbie doubts:help needed!
Moderator: General Moderators
Re: Absolute newbie doubts:help needed!
That's certainly a large list of questions and I'm not competent to answer all of them, but let me try to give you at least a few suggestions.
I believe there's no reason that you need to learn PHP v.4 before learning v.5. The only thing to keep in mind is that certain functionalities were introduced in v.5, so if you are forced to use v.4 on some future project, you would have to spend some time examining what differences might affect your programming.
Short of taking a complete programming course in college, I tend to think that you are starting off well with the O'Reilly book. Everyone has different learning modalities and what works best for one person doesn't necessarily work for someone else. But books are good for most people, because they organize your learning, just as you made reference to.
As a supplement to good books, there are some really helpful online tutorials and reference sites. At the top of my list is http://w3schools.com, where you will find quite good tutorials and references for just about every language and protocol. For PHP, there's http://php.net. And never forget: "Google is your friend!" You can find many tutorials on just about anything, just by using the keyword tutorial along with your other keywords.
You will find some disagreement within the community about the value of extreme separation of logic and presentation, although I think everyone agrees on the principle. Whether for a particular application it is appropriate to employ a complex "framework" can be a matter for discussion. This is not an area where I have a lot of experience.
But for learning, I would recommend that you begin by learning the fundamentals of the several languages and protocols that are involved. It is my belief that starting by learning a framework or library before you are fully knowledgeable about the underlying language is not a good plan. Probably some would disagree with me.
So my recommendation would be to learn the basics of HTML, CSS and Javascript first--the client side (browser) technologies. That should be followed by server side technologies, primarily PHP and databases (MySQL or Postgres). AJAX isn't a separate technology, it's only a way to use Javascript and PHP to achieve non-reloading page data refreshes. In my opinion, only then should you spend much time on using frameworks.
I believe there's no reason that you need to learn PHP v.4 before learning v.5. The only thing to keep in mind is that certain functionalities were introduced in v.5, so if you are forced to use v.4 on some future project, you would have to spend some time examining what differences might affect your programming.
Short of taking a complete programming course in college, I tend to think that you are starting off well with the O'Reilly book. Everyone has different learning modalities and what works best for one person doesn't necessarily work for someone else. But books are good for most people, because they organize your learning, just as you made reference to.
As a supplement to good books, there are some really helpful online tutorials and reference sites. At the top of my list is http://w3schools.com, where you will find quite good tutorials and references for just about every language and protocol. For PHP, there's http://php.net. And never forget: "Google is your friend!" You can find many tutorials on just about anything, just by using the keyword tutorial along with your other keywords.
You will find some disagreement within the community about the value of extreme separation of logic and presentation, although I think everyone agrees on the principle. Whether for a particular application it is appropriate to employ a complex "framework" can be a matter for discussion. This is not an area where I have a lot of experience.
But for learning, I would recommend that you begin by learning the fundamentals of the several languages and protocols that are involved. It is my belief that starting by learning a framework or library before you are fully knowledgeable about the underlying language is not a good plan. Probably some would disagree with me.
So my recommendation would be to learn the basics of HTML, CSS and Javascript first--the client side (browser) technologies. That should be followed by server side technologies, primarily PHP and databases (MySQL or Postgres). AJAX isn't a separate technology, it's only a way to use Javascript and PHP to achieve non-reloading page data refreshes. In my opinion, only then should you spend much time on using frameworks.
Re:Absolute newbie doubts:help needed!
Thank you califdon for replying
your suggestions are well taken
any other suggestions/thoughts will be appreciated..
any other suggestions/thoughts will be appreciated..