tags:

views:

132

answers:

4

hi there,

i've read a book on PHP coding and I've also created my own project from scratch (it was a personal blog) but I would like to gain more practical experience on topics such as security, architecture, and design. I believe analyzing the code of professionals will help me gain such knowledge.

I have looked at wordpress as well as PhpBB but i feel there is too much going on at once for me to comprehend; and a lot of it isnt sinking in.

Which open source projects did you guys learn PHP from?

are there any smaller scale php projects that perhaps might be easier to follow?

any help would be greatly appreciated.

thanks!

A: 

I'd say getting involved in the community of one of the big open-source projects would probably be a good way to learn those things. Also, keep in mind that those things (security, architecture and design) are largely language agnostic. Many of the principles that apply to PHP will also apply To Ruby, Python, etc. Some open source projects that are pretty easy to extend and use include:

The idea isn't necessarily to learn any of them inside and out and become a master at them. But all of these projects have a plugin architecture of some kind. This means you can setup a basic site without doing any coding and then dive in and start doing a little coding on your own. This lets you learn at your own pace without having to write everything from scratch.

Doing this also gives you an idea of how each of these projects is setup (design and architecture) and if you're going to be writing modules/plugins for them you'll need to find out how they handle security, which will help you there as well.

Steven Surowiec
+1  A: 

The feeling of being overwhelmed with the projects is because you're trying to get a grasp of the project in whole. I think you would benefit from following/studying smaller code pieces. This should be what bigger projects contain anyway: smaller pieces (components) used as building blocks to form a greater project.

One project I have learned a lot from was Zend Framework. The components are modular so you can study them in isolation. They will allow you to improve your understanding of architecture and design.

Another thing is studying some common design patterns (singleton, factory, strategy to name three) and recognizing them being used in the projects or trying to use them in your own project and see how that improves your code.

You can get a decent grasp of security issues by reading the following guide: phpsec. Also, if you're working on a part of your project that you know needs attention in this respect, search for some articles and try to apply the advice given there.

I think one needs to take small steps. Don't think you can learn everything at once. I find that I improve fastest by focussing on one point at a time and delving more deeply into it. I try to apply it as best as I can, change some previous code based on my deeper understanding and move on until I hit another sticking point. Many times I seem to encounter things I have already studied but restudying with improved skills allows me to get a deeper understanding than the previous time.

koen
A: 

When I first started to learn PHP, I tried to build a sort of CMS, and that really helped me to learn some of the basic concepts of designing and programming an application.

And as koen said, taking a peek under the hood of frameworks can really help with your understanding of how components work individually, and also how an application can work as a whole.

Dan Bair
A: 

I am currently learning PHP so I can become a PHP wizard so I am reading a developer book and watching Lynda vids. This is a pretty easy language to learn. What's a good project to start with?

Jay