I'm building an online music player, with a "Play Music" page, and all associated generic music functionality therein. I would like now like to have a "Play Flac" page, a "Play MP4" page, a "Play AAC" page and so on. Each "Play" page is different enough so as to warrant its' own page, but has functionality common to the "Play Music" page. (for example the current user functions and adverts and so on.)

I would like to style and show functionality on each page differently based on genre; such that "Play Flac" for classical music looks different to "Play Flac" for hip hop; but that all "Play ..." pages are similar across genres.

What options do I have with minimal custom implementations of "core" MVC components? ("Core" being items like IControllerFactory, IViewEngine etc)

I can for example, think of having one "Play" controller, with multiple actions for each "Play ", and then map route to those actions depending on file type. In each action, I could return the appropriate view template. (That though, would lead to a very long controller...)

I'm sure though, that there are other ways I'm not thinking of; could I for example, inherit controllers and map routes around that? .. When I say could, I mean appropriate in terms of design and best for performance.

Regards,

Related posts

Recent Viewed