vincent wrote:
1. what should be implemented as a module? A module should contains its own set of information without sharing with others. So it can installed into other instance has its independent development.
As you mentioned you have many different content type (news, poll, blog). You are storing them in the same folder with different "Content Type". This makes them linked tightly with each other. So you losing your type model or other things. Is it an idea to separate them? So that they can be developed and installed separately?
I'm not storing them in the same folder, each module is independent, I have another folder that store a reference to each content and it's content type, and my idea is to use that schema script function to save in this folder in the after insert of the module folder, my point here is what I can use in the schema function, I mean, can I use A module repository class?
will it work only inserting from the admin panel or adding from the module it will work too?
vincent wrote:
2. Module and position. A module should not contains any information regarding position. A module is a sub application, should and can be installed into any position in the later stage. Module should be totally seperated from Content template and layout template.
I understand that, makes perfect sense, so let's change my idea
It would be nice if I Add a module with no UI, and use the module classes inside a conten template, this way I can create some complex logic outside kooboo and them use it inside kooboo, it's more like a library.
vincent wrote:
3. Layout template and content template. It was our idea that position tag should be defined in the layout template, and in the page configuration, you add all those modules in the right position. If you want to hide certain module based on certain condition, you can also do this in the layout template. In some cases, you may want to do this by API. That is also fine to do so.
Content template was meant for content display. For example, News can have only two content template, one is new list page, one is news detail page. This can be done by two content templates. It might not necessary to implement everything in a module.
What i did was to use a content template to show a module, but my major deal was about the code, in the previous question
vincent wrote:
4. Module content storage. A module does not necessary use Kooboo Content Repository for content storage. If you feel like a database table strorage looks good for you and we do not need the content inheritance of Kooboo repository, go ahead with what you get used to.
I prefer to use the kooboo storage, this can control some conflicts for me, and this is another module good point, is I use the module /home/generate to create the schema files I can use this script to create the schemas, is there another way to create a restore schemas?
with this explanations I ended up with only two suggestions:
a) Create a way to add a module library (no UI) and allow to use it inside content templates and schema functions
b) Create a way to import/export schema and folders, like module installation does, something like a kooboo database module