On Sunday, April 14, 2013 11:37:39 PM UTC+2, Brian Craft wrote:
In the examples I've seen, view functions directly reference model functions, which directly reference databases. I expect this makes it difficult to test the view functions, or to operate on multiple databases. Are there any common patterns for isolating these things, especially the db access? If view functions took a context, for example, they could be pure functions. But I'm not sure how the context would be passed.
- Widget is a function, returning part of the DOM tree, referenceable by an id attribute. Whole page can be built from standard content (e.g. menubar) and widgets, which hold the presentation logic.
I am not saying, that you have to use Ganelon with your app to test it properly - but that approach might inspire you for some kind of separation between logic and presentation.
The micro-framework is not Noir based itself - although it was in first versions, before Noir was discontinued :).