thank you for your post and for the blogs. Very helpful and timely.
I am working on an area in my app which has made me think very
carefully about how to structure things and how to set up the
routing. Each time I think more about it I get nearer to a clean
solution. The thing I think I face is separating the external
consideration of the resource and the representation from the data and
program structure itself. After reading your blog, I am coming to
realise that these are very separate considerations.
I am writing an office app in which all navigation is based on
buttons, and links. (Although I guess that is true of most sites
too.) What this means is that I tend to think more about how to make
something work in the view and how to travel between views without
really considering the aspect of resources.
I have need to extend existing models where customer orders are
received already created from external sources and to now allow local
creation of orders. Whilst it sounds simple, there are constraints
that have led me to partition the customers/orders. Hence there are
some parts of the MVC that are shared and some that are distinct.
I find deriving the routing scheme very difficult and am coming to a
suitable solution very slowly. It just seems to me that there is an
area here for some notation and dare I say it methodology that would
help in the process of mapping from the requirement to the development
of resources and then the mapping through the routing to the
application and structure. I sense there could even be template
solutions that could fit a wide range of requirements and that there
are a lot of us out there at the moment sweating over similar
problems. I guess it will begin to fall into place in time. Blogs
like yours do help.
As an aside, once I have created the routes, I do not always find the
the use of the path and url methods terribly intuitive. We have rake
routes, and I was wondering if there might be any way to generate the
formats available for path and url methods for a resource or group of