[ovirt-devel] Thoughts on modularization
Vojtech Szocs
vszocs at redhat.com
Wed Nov 5 15:04:24 UTC 2014
Hi guys,
I've discussed this recently with Yair and Mark, I just wanted to share
some more thoughts on this topic -- in particular, how modularization
problem can be approached (regardless of implementation details).
I see two approaches here. The typical one is to define APIs for modules
to consume. For example, oVirt Engine extension API has API for auth
stuff; oVirt UI plugin API has API for showing tabs and dialogs, etc.
The advantage is strict consistency, disadvantage is burden of having
to maintain the whole API. With this approach, you tell modules: "This
is the API to work with system, defining how you can plug into it."
Now turn 180 degrees. The other approach, which is really interesting,
is to let modules themselves export API. This naturally leads to module
hierarchies. Ultimately, this leads to micro-kernel-style development,
where all logic resides in modules. Now you might ask: "What if we want
to employ some consistent work flow across multiple modules? For example,
have some pluggable *auth* infra?" -- this can be done via some "higher"
level module, that exports API and "lower" level modules consume that API.
If you have any ideas, please share!
Vojtech
More information about the Devel
mailing list