View Single Post
Old 05-18-2009, 11:40 AM   #7 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Ehh.. you could do a blog app with 1 class. I would however recomend having the database as an own class. Then all you need is a blog class, with functions for post a new entry, post comment on an entry, fetch an entry(along with its comments), fetch all entries(for the blog frontpage - possibly with a limit of 10 so it only displays the 10 latest entries), login as a user, etc.

All of that goes into 1 class. Then in the future you can expand this to have multiple classes handle several things, for example an own login class. The thing is that you mentioned it was supposed to be easy, and making a class for every "function"(basicly) is not needed. Not at this point anyhow.
__________________
Tanax is offline  
Reply With Quote