Syndicate

Feed

A brick came into the mail yesterday

I received in the mail my pre-ordered copy of Pro Drupal Development Second Edition yesterday.

The book is a brick. 667 pages with the index.

I am a little disappointed already... To be fair, I had high expectations. The treatment JavaScript and Ajax would receive was the first thing I'd look into.

AHAH is covered but the example provided is lame. It does not cover modifications to a form... Well it does, but you only inject some text in a field of type markup, so you do not need to fiddle with the cached form, or even read anything from it in the callback function. (The callback function is the PHP function that 'writes' the JSON that's returned to the browser...).

The chapter on jQuery provides one additional example module, besides PlusOne. That other module only attaches an additional JavaScript file to the page, using HOOK_init() and a registered theme function. No Ajax.

PlusOne still doesn't does degrade in this Drupal 6 version (see comments below). The book Learning Drupal 6 Module Development provides an example that does degrade. Meaning: without JavaScript, things won't look broken, as they do with the PlusOne module.

The chapter on jQuery explains how to add a function to Drupal.behaviors, but it does not explain how to pass a variable from Drupal PHP to the client-side Drupal.settings namespace. Learning Drupal 6 Module Development does explain this. It becomes important to use drupal_add_js to pass PHP variables over to our JavaScript to always avoid hard-coding certain values in our scripts.

We learned that in Drupal 6 our JavaScript is themable. Example, please? The book provides none.
(Any module's JavaScript file that produces HTML content must now provide default theme functions in the Drupal.theme.prototype namespace.)

The book does not even show one case where Drupal.t() is used. That function should have been mentioned at least.

Coverage of JavaScript best coding practices (such as... use camelCase for 'variable' and function names, etc.) should have found its place somewhere in that second edition, because the Drupal community and this very book are pushing hard for coding standards.

The book Learning Drupal 6 Module Development has its own shortcomings in its treatment of JavaScript due to the timing of its publication probably. By the way, the author of Learning Drupal 6 Module Development, Matt Butcher, has encouraged Drupal.org to update its handbook JavaScript coding standards page, to extend it based on a more thorough definition. Kuddos to him. JavaScript and Ajax are that important. Contributed modules developer (I am part of them) need to follow some conventions.

Last edited by Caroline Schnapp about 8 years ago.

Comments

The condo’s facilities

The condo’s facilities provide full family entertainment needs for your family and loved ones. Indulge in a serene and tranquil lifestyle right in the heart of Sengkang. Rivertrees Residences in Fernvale Sengkang

Pet Grooming Centres in Singapore

dog grooming singapore esentially refers to maintaining the hygiene and cleaning of a dog. dog grooming singapore is necessary as it is important in keeping the dog comfortable and healthy. Pet Grooming Singapore

Pet Grooming Centres in Singapore

There are many different instruments in dog grooming singapore to groom dogs. Among them is the Curry Brush, Shedding Blade, Stripping Knives, Slicker Brushes and Rakes. These tools are very common among dog groomers and every pet shop should be able to supply. Pet Grooming Singapore