A metaphor for Drupal module's inner workings

后端 未结 4 1938
夕颜
夕颜 2021-02-05 16:02

What is the best application workflow metaphor for Drupal module? In PHP frameworks we think MVC-style. How do we think inside Drupal?

Asumming I am writing some user-or

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 16:22

    This is a bit of a high level question, but I will have a stab.

    Drupal is a content managment framework, there is a good overview here.

    Drupal is bassed on some object orineted principals. It has seperations of concerns, much like MVC. There is a database abstraction layer, a logical layer and theming system.

    When programming a drupal module it is often advisable to make use of one or more of the hooks available. This will allow you to tightly integrate your code into the drupal system. There is a lot of functionality built into the core, which you can leverage in your modules. Making use of these will reduce the code that you have to write as well as making your code more drupalish.

提交回复
热议问题