MVC

Programming, for all ages and all languages.
Post Reply
Ziggyfish
Posts: 1
Joined: Sun Dec 20, 2009 8:24 pm

MVC

Post by Ziggyfish »

I know this isn't the best place to ask this, but:

In an application I am building, I have to create an image which based on something from the view (i.e a URL to a page), it produces a different image.

So my question is where should I generate that URL be generated.

Putting it in the view is not good as it is a model thing (the URL is not linked anywhere on page).

Putting it in the model, means i am mixing up the Model and Controller to generate the URL, I need the Routing class to get where that URL will point to.

Putting it in the controller means that I will duplicate code, as the routing class needs to know the controller and action and id that URL will point to.

So my question is should there be a middle step between the model and controller?
Post Reply