摘要 |
The present disclosure discloses a method and apparatus for processing a request. The method includes: receiving a request, where the request carries a first identifier for indicating a first module layer module located on a module layer, a second identifier for indicating a first control layer module located on a control layer, and a third identifier for indicating a first function module in the first control layer module, where the first module layer module has one or more control layer modules that include the first control layer module; acquiring the first identifier, the second identifier, and the third identifier from the request; and invoking the request and allocating the request to the first function module in the first control layer module in the first module layer module according to the first identifier, the second identifier, and the third identifier that are acquired. The present disclosure solves a technical problem of a code structure disorder caused by that a control logic layer code inside an existing MVC architecture is too massive and has a high degree of coupling, and achieves technical effects of separating the module layer from a data layer and enhancing module independency. |