I just completed a basic PHP course which was funded by my University, however I feel like I need to really put PHP into practice to get familiar with it and become more confident in writing it myself. As I don't currently h开发者_如何学运维ave a job which involves PHP, I figure I may as well set myself something to do to get me more experienced.
Does anybody have any suggestions of a simple (not too simple!) project I could set myself which would be suitable to get me more familiar with the language?
The best would be to find something that is useful for others and you enjoy to work on. Make it open source, let people contribute and you may find yourself inside of a community.
Writing a CRUD based web-site - something like a library, personal expense management, a catalog... anything that will make you play a little bit more with the language and stuff around it like SQL, for example. Adding authentication and authorization for the users will increase the difficulty but make the task more like a real one. And yet any time you can use frameworks for these things.
Have a look at Model-View-Controller design pattern, as it is the common way of developing web applications in a structured manner.
P.S. CRUD - Create, Read, Update, Delete - basic operations with data, that you'd better be familiar how to implement in the best possible way.
When I first learned PHP, I made a bunch of 'gadget' type applications for my personal webpage. They are quite easy to plug in by just importing them.
For example, a random image pulled from a directory of images each day, my class schedule loaded from a plain text file, a public guestbook that uses a text file to store messages, etc.
Also, if you know some SQL or want to learn it, you could make a simple data-driven website that stores information about something, and provides an interface to it with PHP. Something like a used car sales website, or a twitter clone, etc.
Assuming you run windows, download and install WAMP (http://www.wampserver.com/en/) and set up a CRUD site (Create, Retrieve Update, Delete) for a simple MySQL database. If you're feeling comfortable with that, add a login system with differing levels of credentials for (Retrieve) and (Create, Update, Delete)
try adding share buttons to your lists or create php files with facebook app metadata to customise the way people view the links to your files you post on social media. Try writing a set of pages that colorises text from an input box. If you have design skills try turning short text inputs into animated text.
After I learned the basics of PHP, I decided to research into frameworks, wanting to learn more about the MVC structure.
There are tons of options out there for frameworks: such as Yii, Zend, etc... but my overall favorite would have to be Laravel.
This framework makes it super simple to set up a project, and the projects that can be created out of this are limitless! You can really do anything you desire as far as making full-fledged and scalable web platforms. Using Laravel will really enhance your skills at PHP, as well as many other languages and concepts!
精彩评论