- Drupal 8 Module Development
- Daniel Sipos
- 296字
- 2021-07-02 12:22:36
The API site and coding standards
A lot of background knowledge is required for writing good Drupal code. Of course, the aim of a book such as this is to try to provide as much of that background knowledge as possible. However, self-documentation and research still remain key, and there are a number of resources that a Drupal developer should have on-hand.
The first is the official online API documentation. Just about every function in Drupal is documented using inline code documentation. The Doxygen program is then used to extract that documentation and format it. You can access the full API documentation online at http://api.drupal.org.
Along with using the Drupal APIs, we strive to comply with Drupal's coding conventions. Best practices in software development include keeping code clean, consistent, and readable. One aspect of this is removing nuances in code formatting by following a fixed standard.
This is particularly important on a platform such as Drupal, where thousands of developers all contribute to the code. Without coding standards, the code would become a cluttered mishmash of styles, and valuable development time will be spent merely deciphering code instead of working on it.
The Drupal site has a manual on coding standards that each Drupal developer needs to become familiar with (https://www.drupal.org/docs/develop/standards/coding-standards). It won't happen overnight; you will get better with experience, but you can also configure your IDE to, for instance, flag any issues with your code formatting.
A third resource for developers new to Drupal 8, but who have experience with Drupal 7, is the change records database (https://www.drupal.org/list-changes/drupal). On this page, you'll find an inventory of the most important API and usage changes with some handy explanations that will be extremely helpful for Drupal 7 developers looking up how certain functions have been changed.
- 從零開(kāi)始:數(shù)字圖像處理的編程基礎(chǔ)與應(yīng)用
- 測(cè)試驅(qū)動(dòng)開(kāi)發(fā):入門(mén)、實(shí)戰(zhàn)與進(jìn)階
- C語(yǔ)言程序設(shè)計(jì)(第3版)
- Beginning C++ Game Programming
- 軟件架構(gòu):Python語(yǔ)言實(shí)現(xiàn)
- Java編程的邏輯
- 微服務(wù)從小白到專(zhuān)家:Spring Cloud和Kubernetes實(shí)戰(zhàn)
- RESTful Java Web Services(Second Edition)
- Java網(wǎng)絡(luò)編程實(shí)戰(zhàn)
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- 零基礎(chǔ)學(xué)C++(升級(jí)版)
- Python預(yù)測(cè)分析實(shí)戰(zhàn)
- Building Apple Watch Projects
- 可視化H5頁(yè)面設(shè)計(jì)與制作:Mugeda標(biāo)準(zhǔn)教程
- Swift iOS Programming for Kids