Open jhnns opened 11 years ago
I don't think that components always have their own model. Many components share a model or might not have a model at all.
That's true, but I didn't meant that every component needs a model.
We should decide about this issue before we freeze the API. This would be a big change imho.
Yep, this needs to be discussed sync.
There's currently also no place to but base-stuff like base-pages or base-services.
alamid currently forces a rails-like directory structure like
I've following tj's components now for a while and I agree that it's better to think in self-contained components (like tj points out here). So instead of dividing our classes by their type (model, views, pages), you'd divide them by their domain (typically named after the model):
As you notice, Pages are very app-specific and therefore in their one
pages
folder.This structure allows you, to write components that are used across several apps which is a common use-case I think. Imagine an application that has a frontend and an admin interface (like Wordpress). These two applications share some components, but you usually wouldn't implement both interfaces into the same application.