Project

General

Profile

Why is Redmine so resource unaware?

Added by Simone Carletti over 16 years ago

I was wondering if is there any design decision behind the limited usage of route/controller resources in Redmine.
I think many models and controllers such as Projects, Issues, Users would benefit from a resource-oriented pattern.

For example, I've just come across the need to redirect to a project url.
Actually the code is full of statements like

link_to 'foo', { :controller => 'projects', :action => 'show', :id => @project.id }

while, with a resourceful architecture, it could be simplified to

link_to 'foo', project_path(@project)

Needless to say this is not the only benefit. Basically it would make the code more efficient, clean and readable.


Replies (2)

RE: Why is Redmine so resource unaware? - Added by Eric Davis over 16 years ago

I was wondering if is there any design decision behind the limited usage of route/controller resources in Redmine.

Because Redmine was started a long time ago, before Rails had a good RESTful setup. Moving to that format is a great idea but we need to keep backwards compatibility for the existing installs.

Eric

RE: Why is Redmine so resource unaware? - Added by Simone Carletti over 16 years ago

Hey Eric,
thanks for your answer!

That's a good news it's not a design decision but just a matter of "time period".

    (1-2/2)