Well, the original idea was to have a Halcyon application behave as a single Controller in and of itself, but it appears to be moving towards a more robust structure with the need to separate collections of methods, much like the module ability in 0.4.0 but with much more performance-mindedness and stability...
In this regard, a decision needs to be made, but this decision must be based on experimentation and taste... can we use modules inside of the general Halcyon::Application? Do all actions need to be subclassed anyways? Should routes be defined per-controller?
Just think about these:
class HApp < Halcyon::Application
route do |r|
# ...
end
def foo; ok; end
submodule do
def bar; ok; end
end
end
This can automatically generate a module that includes the linking module (in order to bind methods unbound from the generated controller).
class HApp < Halcyon::Application
route do |r|
# ...
end
class Application < Controller
def foo; ok; end
end
class SubModule < Controller
def bar; ok; end
end
end
Everything could be under a "controller"...
class HApp < Halcyon::Application
route do |r|
# ...
end
def foo; ok; end
module SubModule
def bar; ok; end
end
end
Or inside of a module with some magic happening...
A decision must be made. (Do we even need this functionality? Kinda, yeah, I think so, especially if Halcyon is to be RESTful.)