If you had a library / framework / class implementing something like Rake’s dependency management it seems like it would be useful for general purpose programming, ie by breaking code up into tasks and dependencies.
eg, Imagine an app for managing a users photo library on flickr. The app might be broken down into Rake-like tasks with interdependencies. Logging in might be one task, syncing the users photos might be another task that depended on the logging in task, deleting a photo might be a task that depended on the user’s data being upto date.
This seems like a simple/(fundamental) concept that may already exist as a Design Pattern or even as a library (ideally in c or objective-c), unless it is a really bad idea.. (please comment)?
Would this be reinventing the wheel to implement Rake in Objective-c (or your language of choice) for use internally in a desktop app, instead of as a build utility?
If what you’re talking about is the actual dependency management, I wouldn’t call it a design pattern.
Read about how to do a topological sort of a directed acyclic graph, dependency management boils down to that.
I think it’s highly possible that such a library exists.
Edit
I just found this library, it might prove useful. Actually it’s a fairly large library, but it contains a class that does (or claims it can do) the topological sorting.
I should add that I’m pretty sure there isn’t a design pattern that deals with this. Figuring out in which order a given sequence of interdependent tasks should be completed is just a graph theory problem. The wikipedia articles I linked contain pretty much everything you need to know.
Shouldn’t that class work, I figure it wouldn’t be difficult to implement it from scratch, or by translating from another language (Python for instance: I seem to recall that Twisted provides you with such a capability).
Even more edit
I don’t think implementing dependency management in your app would be just another case of wheel reinvention. If you need it, code it. That is, unless you can find a generic, working library with a compatible license that suits your need. In that case, by all means use it. It really is that simple.