2008年9月9日星期二

[fw-mvc] Design decision, need suggestions

Hi,

I am having concerns about my design decisions, badly need your
feedback/suggestions. Sorry for the long email.

Disclaimer:
First project using both MVC and Zend Framework.

Successful:
Reading the manual and mailing list I have been able to implement User
registration, Authentication and ACL (thanks guys) :)

Website brief:
Portfolio and news website with controlled access.
Member can manage her own project and press release. Each project or
pr can have one-or-more images (no max limit).

Database tables (brief):
Projects = my_project (id, name, body, ...)
Press releases = my_pr (id, name, body, ...)
Images = my_image (id, content_id, content_type, ...) where the {id}
is the image id, {content_id} is the project or pr id and
{content_type} is either "project" or "pr".

Controllers:
Projects
Pr
Images

URIs (proposed):
domain.tld/projects/list (project listing)
domain.tld/projects/show/id/123 (show a project with a link to its
image gallery)
Similar for pr.

domain.tld/images/list/ctype/project/cid/123 (lists all images for project 123)
domain.tld/images/show/ctype/project/cid/123/id/432 (show an image,
432 is image_id, along with previous, next and list links)
Also, the images controller has two actions (thumbnail and large)
which do not render a view, instead output resized images...
(e.g. <img src="/images/thumbnail/ctype/project/cid/123/id/432.jpg" ...)

Modules (for convenience):
Default (view projects, pr, images, etc...)
Backstage (where members can manage projects, pr, images)
Admin (for managing members and site maintenance)

Questions:
1. Am I visualizing this correctly?
2. If everything written above needs to be dumped. May I please have
suggestions?

Finally:
I have tried to be as brief, but still provide as much information as
possible. If you'd like more information to help you help me, please
feel free to ask.

-R

P.S. No custom routes have been incorporated (yet). Using the default
ZF routing mechanism

没有评论: