The same featureCodeTo put them together (a separate project in IDE or a separate folder in the project), these codes are either all or none, and they work together to complete a feature, if you no longer need this feature, you can delete it as a whole without leaving any code that is useless to the system as garbage. if you want to see how a feature is implemented, all the relevant code will be together and you do not need to skip in a large code library.
The ideal situation is:Source codeThe name of all the project files in the tree, or the name of the folder, you will know what functions the system provides. It can correspond to your requirement description, whether using user story or use case, they can be used as the project name or folder name for easy maintenance.
The default physical file organization of the popular MVC framework is not like this. The controller, model, and view are in different folders. ASP. net MVC provides virtualpathprovider and viewengine, which allows us to package a feature controller, model, or view into a project or folder, while the corresponding action and view can still be found during running, this is the feature we are using.
What is the impact of this Code Organization on the architecture?
This basically leads to the architecture based on plug-ins/extensions. put it on a larger scale, that is, SOA. SOA is king. this word is too big. Focus on the application of a process first ....
- How to aggregate the UI? The UI seen by the end user is an aggregation result, which may come from different parts of the system. the extension points to solve this problem include client Ajax or server-side renderaction. (Question: What should I do with CSS? How to determine the display sequence and layout of different parts ?)
- How does feature communicate? Feature cannot depend on each other. For example, the same data and business logic may be used. bounded context, context mapping, DCI... are the solutions to this problem.
- How are databases divided? Different feature uses their own independently defined data tables for ing and synchronization.
- How can we assemble these feature items together? The Java platform has osgi, And. Net does not currently see similar solutions like osgi. It is basically a path for registration or dynamic discovery, and follows the open and closed principles...