开发者

Architecture(structure)-oriented vs. feature-oriented project structure

The project, I have involved, has an architecture-oriented project's file/folder structure:

Root
|____ Node1
    |____ Event Handlers
    |         |___ <all event handlers of project>
    |____ Events
    |         |___ <all events of project>
    |____ Request Handlers  
    |         |___ <all request handlers of project>
    |____ Requests
    |         |___ <all requests of project>
    |____ ...

It is a clear from the a开发者_如何学编程rchitectural point of view of system (has been proposed by development team).

It is a feature-oriented structure has been proposed by designer team:

Root
|____ Feature #1
    |____ Event Handlers
    |         |___ <all event handlers of Feature #1>
    |____ Events
    |         |___ <all events of Feature #1>
    |____ Request Handlers  
    |         |___ <all request handlers of Feature #1>
    |____ Requests
    |         |___ <all requests of Feature #1>
    |____ ...

This variant is closer to designers and it describes clearly a feature to be implemented.

Our teams have started a holy war: what is the best approach. Could somebody help us and explain cons and pros of the first and second ones. Maybe there is a third one that is more useful and beneficial for both of us.

Thank you.


I would choose the second option, in order to the mantainability of a long life application.

Let me explain it with an example:

One day, a year after the application release, and months after the team who worte the original code has left, a user detects and report a bug at a certain process. The ticket will surely look something like "This stuff does not work" which, after some email ping-pong it will end up being "I can't save a multi-product order for an australian customer".

Well, on the first project structure, you have to search among all your project Request and Event Handlers where the buggy code is. On the second one, you can narrow your search at the order saving module (or depending your structure granularity , the "overseas/multiproduct order saving" module).

It can save a lot of time, and ease mantainability IMO.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜