简体   繁体   中英

Media Gallery Programming Approach

I have a task to make gallery for a website. Gallery will consist of three categories audio gallery, video gallery and image gallery. Administrators of the website will be allowed to add some file. My gallery needs to figure out what is the type of the file and make the right action (convert to *.flv (for videos), to .jpg (for images) and .mp3 (for audio) and offcourse show gallery based on it's type). None of the above isn't problem.

The problem is my OOP PHP programming approach. On this link I have provided picture of my UML class diagram. http://jump.fm/YPJMF

I am looking for opinions is my approach good so that I can continue coding or is it bad and can it be improved and how?

Thanx.

Inheritance of interfaces is a bad practice, in most cases. Try to use Decorator Pattern instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM