Welcome Guest, Not a member yet? Register   Sign In
Blog application breakdown...
#1

[eluser]CodeTroll[/eluser]
Hi,

I am trying to develop an application where a blog is a part of it. I am a little baffled as how to best implement what I need so I am turning to the collective braintrust here on the board Smile

Currently I have a controller (blog) that handles both the actual blog entries, as well as the comments for each blog. I also have a model (blog_model) to handle all the DB action.
Both on the actual blog page of the application, as well as in other parts of the application I want to show a list of the latest 5 blog entries. I have a list of blog components that I would like to be able to show in various combinations:

showLatest5BlogEntries (this will be shown on various other pages besides the actual blog pages)
showLatestBlogEntry
showBlogComments (shows blog comments for a specific blog entry)
showAllBlogEntriesThisMonth
showBlogSearchForm (takes year + month as input)
showBlogSearchResults (shows a list of blog entries matching the above criterias)
showBlogEntryForm (this is where the owner enters a new blog entry)
showBlogCommentForm (this is where visitors and owner comments on each blog entry)


On the blog entry page I want to have the following components shown:
Main content area:
showLatestBlogEntry
showBlogComments
showBlogCommentForm

Sidebar area:
showLatest5BlogEntries (clicking on a title here will take the user to a page with the chosen blog entry and the corresponding comments)


On the blog search page:
Main content area:
showAllBlogEntriesThisMonth

Sidebar area:
showBlogSearchForm (takes year + month as input)

On the blog search results page:
Main content area:
showBlogSearchResults (clicking on a title here will take the user to a page with the chosen blog entry and the corresponding comments)

Sidebar area:
showBlogSearchForm (takes year + month as input)


There are more pages of course (blog entry form page ie, but the above covers the main functionality). I am using views, rather than templates, but I am not sure how all this should be broken down into controllers and views?
Would it be a good idea to have a controller for the blogcomments for example? (this would make it possible to have the same url endings for both a blog entry and a blog comment (ie /blog/edit/1, blogcomment/edit/4 etc... )

Any one can point me in the proper direction of how to break things down to accomplish this task?


Thank you for your time Smile


Messages In This Thread
Blog application breakdown... - by El Forum - 12-31-2009, 06:42 AM
Blog application breakdown... - by El Forum - 12-31-2009, 10:05 AM
Blog application breakdown... - by El Forum - 01-02-2010, 05:59 AM
Blog application breakdown... - by El Forum - 01-02-2010, 06:44 AM
Blog application breakdown... - by El Forum - 01-04-2010, 01:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB