If you’re a web programmer, your experiences have taught you certain lessons—and only some of them apply well to Drupal. Drupal has its own set of programming principles that require a different approach, and many programmers make mistakes when relying on skills they’ve used for other projects. This book will show you which programming techniques you can use—and which you should avoid—when building web applications with this popular content management framework.
Updated to cover both Drupal 7 and Drupal 8, the guidelines in this book demonstrate which programming practices conform to the "Drupal way" and which don’t. The book also serves as an excellent guide for Drupal 7 programmers looking to make the transition to Drupal 8.
Get an overview of Drupal, including Drupal core and add-on modules and themes
Learn Drupal’s basic programming principles, such as the ability to customize behavior and output with hooks
Compare Drupal 7 and Drupal 8 programming methods, APIs, and concepts
Discover common Drupal programming mistakes—and why hacking is one of them
Explore specific areas where you can put your programming skills to work
Learn about the new object-oriented Drupal 8 API, including plugins and services
Chapter 1Overview of Drupal
What Is Drupal?
The Evolution of Drupal
How Drupal Handles HTTP Requests
The Drupal Cache
Automatic Class Loading in Drupal
Chapter 2Drupal Programming Principles
Principle: Drupal Is Alterable
Principle: Drupal Separates Content, Configuration, and State Data
Principle: Drupal Is International
Principle: Drupal Is Accessible and Usable
Principle: Drupal Is Database-Independent
Principle: Drupal Is Secure; User Input Is Insecure
The animal on the cover of Programmer's Guide to Drupal is a French angelfish (Pomacanthus paru). The French angelfish is native to shallow reefs in the Atlantic Ocean, from New York in the north to Brazil and Ascension Island in the south.
French angelfish typically pair up for life, beginning with an early morning rendezvous between April and September. Playfully chasing each other leads to spawning and then tending stable abodes hidden among the coral during the night. Pairs of French angelfish fiercely defend the territory of their chosen hiding places against neighbors but can also demonstrate a charming curiosity in the presence of snorkelers.
Juvenile banderitas, as they are called in Spanish, appear with markedly different coloring from that of the adults, for whom the vertical yellow stripes of youth have dissolved into pervasive, yellow-tinged black scales. When still young, French angelfish glean food by wiping ectoparasites with their pelvic fins from other fish on the reef who venture into "cleaning stations." Adults of the species live less symbiotically, consuming algae, sponges, and other invertebrates living on the reef.
Many of the animals on O'Reilly covers are endangered; all of them are important to the world. To learn more about how you can help, go to animals.oreilly.com.
The cover image is from Cuvier's Animals. The cover fonts are URW Typewriter and Guardian Sans. The text font is Adobe Minion Pro; the heading font is Adobe Myriad Condensed; and the code font is Dalton Maag's Ubuntu Mono.
Comments about oreilly Programmer's Guide to Drupal, 2nd Edition:
Jennifer is one of the Drupal Core documentation maintainers, and it shows is this book. Her writing is clear and concise, but not watered down. Writing about Drupal principles, rather than subsystems, will help users understand *why* Drupal works, and as a result, write better code. This is a valuable resource for any Drupal developer's bookshelf.
Bottom Line Yes, I would recommend this to a friend