We have a product written in Flex.
We have several customers who have this product. The product is customized to each customer. When starting a new project, we copy the project of a customer who had similar requirements, and then make further changes.
We have this idea to have a base product layer and then have a customization layer where we can place project and customer-specific fuctionalities. Also: when we update the base product, these updates can be incorporated into the customized versions.
I wonder how can you accomplish this in Flex?
Developing a good plug-in architecture is *hard*.However, it's definitely worth it. The best approach will depend on exactly what you want to do. At the high level, you can:
1. Write the base application and load plug-in modules, and allow them to changes aspects of the application behavior or style
2. Turn your base application into a core application logic library and a (separate) custom component library, and turn each customer implementation into a new project that leverages these.
If you use dependency injection (e.g., SmartyPants or SwiftSuspenders), you can allow (1) a fairly flexible manner of interacting with the application without depending on gynormous "context" objects. You just need to perform injections on the loaded plugins, and they can pick up any dependencies without having to worry about anything else.
Whether (1) or (2) makes more sense will depend on exactly what you're trying to do, but in general, (2) is more flexible while (1) is somewhat simpler (and generally less per-implementation work).