tags:

views:

627

answers:

16

I know OOP (but not skilled) in PHP. Nowadays I want to build something, since it is the beginning of semester holiday (3 weeks). Do you have good suggestions for me?

(note: I'm Statistician, and I know C, C++, Minitab, MATLAB, SPSS, SAS, R and database design) It does not need to be something related with statistics.

Thanks in advance.

+11  A: 

Building an ORM, MVC Framework, or a CMS is always fun :-)

prodigitalson
Small-scale CMS is a great starter project. Easy to implement on a basic level, rapidly grows out of control.
Joel Etherton
@Joel, I started a CMS that got out of control ... I ended up binding a Flex/Yacc combo in C to PHP for templating!
Aiden Bell
Same here... scope creep is always fun haha.
prodigitalson
I concur on building an MVC framework. It forces you to scour the web for functions you may not have known existed. It also forces you to research design patterns to properly structure your framework. You get to use all the goodies, including sessions, autoloading, database abstraction, etc, etc.
cballou
That is the reason that I am writing one myself... so I can learn new things.
SeanJA
+2  A: 

Build a simple blog. That's a common first assignment for someone learning and/or practicing a given language.

Ian P
how many blog engines per one single Mother Earth do we need?
naivists
@naivists - just one, mine. It rocks.
Aiden Bell
@naivists true, but this is a project simply for practice, so it doesn't matter if its unoriginal or useful.
GSto
+6  A: 

Do what everyone does! Build your own blog/blog engine

Come on! Admit it, we all have one half-finished somewhere!

You can do implement it using MVC maybe some ORM and some XML/XSLT for good measure! Get abstracting and defining your separations of concern!

You could even get a little crazy and build a viewless blog-store with a RESTful interface so people can build their own front-ends and just use you as a semantic store layer.

Aiden Bell
http://stackoverflow.com/questions/471940/why-does-every-man-and-his-dog-want-to-code-a-blogging-engine
nickf
@nickf - ;) I have read that. Spreading the love.
Aiden Bell
I like this as a starter project, because it can be as simple or complex as you want it to be. It could simply be posts that are saved and displayed, but you could add other widgets, authors, comments, tags, categories, templating/themes, searching, etc. You can learn a lot from one simple project.
GSto
+1  A: 

The good way to learn PHP is to code a lot of tutorials available online. Play around with submitting forms and using $_POST and $_GET functions.

http://www.goodphptutorials.com/tag/all/beginner+tutorials

Yada
+1  A: 

You could build a CMS (Content Management System) it would be useful and a little bit different from a blog.

Scott
+16  A: 

I would build something you care about - something in a task or problem domain you are interested in. Otherwise when the going gets tough, you say, "why bother" or "there's already something out there that does this."

If you're into stats, a good project might be to write some PHP/HTML/JS to query a dataset and run some analytics (mean, mode, filtered by date, other criteria). I'd also suggest doing some dynamic AJAX style interaction with jQuery. That way you're getting a pretty good sense of how PHP works, and how to use it to render something interesting in HTML.

Best of all, you may solve an actual problem that you or a colleague has, rather than writing throw away code with no value.

fitzgeraldsteele
+1 some good advice!
Aiden Bell
Although I would add something about learning good abstraction and OOP principles for long-term development/growth.
Aiden Bell
Personally I don't feel as though simply coding something you care about will necessarily lead to a notable code base. I believe you should start with something that *needs structure*, like an MVC framework, which would be used as the building block for your future projects.
cballou
+4  A: 

I wrote something between framework and CMS. That was very good experience for me, and I've learned a lot - how to write convenient DB library, MVC, theme handling, admin control panel, UI etc.. And I advise something similar to you.

radex
+1 for the control panel since there are few/none existing "admin-page-generators" in php today.
chelmertz
+9  A: 

Build something that you will use.

If you think you'd like to blog about things, make a blogging engine. If you want a website, build a CMS. If you're into photography, build a portfolio website with image uploading etc. If you have a heap of old Vinyl/CDs/Magic Cards/DVDs that you'd like to catalogue, build a tool for that. If you have lots of other projects going on, build a todo-list/issue tracker system. You get the idea.

You'll learn so much from eating your own dog food, and it'll really push you to improve your project.

nickf
Besides, you know all the demands from the client (you!)
chelmertz
+1  A: 

Help the community, find an opensource project where you could contribute to. Create something for Moodle, joomla, Zenphoto Gallery. This is also quite educational since you learn to code "up to standards".

naivists
+2  A: 

Build an electronic-portfolio of your competences.

You can also participate in an open source project ! -> some open source php project examples here

luxquarta
+2  A: 

I'm wrong, probobly, but I do not feel comfortable writing OOP scripts, which goes just few miliseconds. I'd better use it in a project which runs during a few minutes\days.

So, I'd try to write an UNIX deamon.

(I've read a lot of interesting sfuff about building UNIX-deamons on PHP in George Shlossneigl (or like that) "PHP Professional Programming". )

MInner
"Advanced PHP Programming" George Schlossnagle - that's what I mean
MInner
+4  A: 

Since you already know stats, why not grab one of the stats data sets available on the web for anyone to use and analyze. It may keep your interest, allow you to build something useful, and analyze real data. NYC data sets are available here: http://www.nyc.gov/html/datamine/html/home/home.shtml

Brent Baisley
+2  A: 

Probably not the best answer, but I like this little exercise as a quick warm-up

create a folder with a random number of blank files (eg 9) each with a completely random name, do a foreach loop and rename each file incrementally, then at the same time, write to each file a negative increment value

orig file-name  a b c d e f g h i
file-name       1 2 3 4 5 6 7 8 9 
file-content    9 8 7 6 5 4 3 2 1
ozona
+3  A: 

I think a social network type site is good if you want to just learn a lot of stuff because a social network type site can touch about every aspect of PHP when you build things like this for it...

  • User Auth system
  • Blogs
  • forums
  • profiles
  • admin system
  • caching
  • bulletin system
  • REST API
  • there is just sooo much more, that is why I like working on them, you get to do a little bit of everything
jasondavis
A: 

I would advice you to use some php tutorials. You watch the name of the article and try to do it yourself. Then compare both results. Success

A: 

There are different tutorials for php programmers nowdays such as http://phpforms.net/tutorial/tutorial.html

Lime