HomeLinuxEbook Evaluate: Drush For Builders, 2nd Version

Ebook Evaluate: Drush For Builders, 2nd Version


Each editions have been written by Juampy Novillo Requena, though within the transition from the primary version to the second, each the writer’s title and the ebook title have been modified. The newest version’s title appears redundant, due to course such a ebook goes to be “for builders”; in spite of everything, who however Drupal builders would have an curiosity in Drush? The version beneath evaluate was printed on 29 January 2015 by Packt Publishing, beneath the ISBN 978-1784393786. (My due to the writer for a evaluate copy.) At 180 pages, this version is longer than its predecessor, however nonetheless a manageable measurement. Its content material is split amongst half a dozen chapters. Anybody occupied with studying extra in regards to the ebook might want to go to the writer’s web site, which gives a short description of the ebook, the desk of contents, free pattern content material (Chapter 3), and the supply code recordsdata.

The primary chapter begins by presenting a short comparability of the steps wanted to run database updates on a Drupal web site, utilizing the GUI versus utilizing Drush. As anticipated, the latter requires fewer steps. The writer then discusses the conditions for putting in Drush in a Linux or OS X setting. For Home windows, the given obtain URL, http://www.drush.org/drush_win…, is wrong and may as a substitute be http://drush.readthedocs.org/e…. The writer states that “the installer installs an older model of Drush,” however really the installer has disappeared from its former places. Happily, the present Home windows archive file has the newest model as of this writing, 7.0.0-alpha7. This model is more moderen than the alpha5 used within the ebook, however the instructions and their choices appear similar. Alternatively, it’s a massive archive file containing the Drush software recordsdata, Msys, PHP, and components of PEAR and Symfony’s YAML — however no useful installer. The chapter continues with explication of Drush command invocation, arguments, choices, aliases, and context. The one obvious blemish is that the variable title “site-name” (web page 14) ought to as a substitute learn “site_name.”

After this introductory materials, one would count on the following chapter or so to elucidate and illustrate the small print of Drush instructions ceaselessly utilized by website builders, resembling these for putting in, enabling, and updating modules and themes. As an alternative, the writer jumps far forward to far more superior matters (extra on this beneath). Within the case of the second chapter, the purpose is to discover ways to synchronize code, database configuration, and content material amongst totally different server environments, together with capturing database configuration settings in recordsdata to allow them to be model managed in Git. That is arguably worthwhile information, however actually not what the common reader would count on so early within the ebook.

Readers trying to observe and replicate the demonstrations within the ebook, might turn into annoyed with the pitfalls within the second chapter — such because the situations the place it doesn’t present all of the wanted directions, or they do not match the instance code. When readers ranging from scratch encounter the Drush script (web page 23), they could be tempted to strive it immediately on their very own take a look at websites, however this might be ill-advised as a result of the primary command will fail till the Registry Rebuild command is put in (later within the chapter), and the fourth command will fail if the chosen web site doesn’t have the Options module already put in and enabled. When studying about database updates, the reader is instructed to create a brand new Boolean subject, however solely later learns that the take a look at web site ought to have contained nodes of the “Fundamental Web page” content material sort. When readers be taught these items the exhausting method, they have to circle again and redo steps or, even worse, attempt to revert the state of recordsdata or the database.

The mymodule customized module discovered within the downloadable archive doesn’t match what the reader will want on web page 30, so she might want to modify mymodule.set up to match that listed within the ebook, and likewise presumably remark out the final two strains in mymodule.information associated to the Options module — however not the primary two, as a result of that may lead to worse issues later. This preliminary code ought to have been included within the downloadable archive. Earlier than working the command drush --verbose updatedb, ought to she have enabled the mymodule customized module? Apparently so, because the anticipated output contains “Executing mymodule_update_7100,” however after I tried it, the offered module’s replace hook was not acknowledged as a database replace, utilizing Drush or the admin interface (replace.php). On web page 32, the reader is advised to obtain and allow the Options module, however that should have been executed already as a result of the mymodule module required it earlier. Lastly, the ebook’s preface states that PHP model 5.2 (or increased) could be enough, however 5.5 is required, in any other case a deadly PHP error is generated by the empty() name on line 29 of the “7101” instance code.

The third chapter covers the usage of Drush for working and monitoring a wide range of duties in a Drupal web site, resembling updating the database or reindexing the searchable content material in Apache Solr. The writer begins by briefly describing the makes use of for the cron utility, and a few benefits of executing it from Drush. A way proven for stopping Drupal from working cron robotically, is to set the cron_safe_threshold variable to 0, export it to code (as a Options module), after which deploy it to the goal environments. The writer additionally demonstrates tips on how to use Jenkins at the side of Drush to periodically run and monitor cron jobs. For instance of working a job with out utilizing cron, a Feeds importer is about as much as work with Drush, utilizing a customized module and a Drush command to set off the Feeds importer. It is not talked about within the ebook, however for the importer, within the settings for the node processor, you’ll want to assign the bundle, in any other case there can be EntityMalformedException errors; additionally, map the important feed and node components, in any other case the nodes created can be empty.

The ebook then explores quite a lot of matters which might be considerably associated to at least one one other: tips on how to use Drush and the Drupal Batch API to run time-consuming duties in order to keep away from PHP and database limits of reminiscence and time; tips on how to run PHP code after Drupal has been bootstrapped; tips on how to finest log messages utilizing the drush_log() operate; tips on how to seize Drush output in a file; tips on how to implement your personal logging mechanism by overriding the Drush default logging operate; and tips on how to run Drush instructions within the background. Regardless of the complexity of the processing applied on this chapter, readers ought to encounter few issues attempting it out. For the drush php-eval instructions, Home windows command line customers might want to change the one quotes with double quotes. Within the part titled “The php-script command,” two of the three “php-eval” phrases ought to as a substitute learn “php-script” (web page 65).

Debugging and error dealing with are addressed intimately within the fourth chapter: tips on how to validate consumer enter values and Drush command line choices previous to passing them to a command’s callback; tips on how to outline customized validation inside a command; tips on how to uncover all the accessible hooks for any given Drush command; using the Devel module, tips on how to uncover all the Drupal modules that use a given hook, and tips on how to discover the situation of a given operate or class technique. Within the midst of all this, readers get an in depth tour of the steps that Drush executes when bootstrapping Drupal. Readers ought to notice that, as with the second chapter, a few of the code within the downloadable archive doesn’t match the preliminary code offered within the textual content, however fairly its last state. As readers might have been seen in earlier chapters, the “– verbose” variations of the Drush instructions can produce much more informational output than what’s offered within the textual content, together with the MySQL instructions (which may be a consequence of, on this case, the Home windows command line). Within the case of drush --debug testhooks, the output is remarkably totally different, however at the very least all the instructions are executed.

The penultimate chapter explores strategies for leveraging Drush to higher handle Drupal web sites on native and distant servers, using website aliases. Builders will undoubtedly be intrigued if not thrilled with the chances of having the ability to execute Drush, Linux, and MySQL instructions inside distant environments from the native command line. The one questionable side is that within the first chapter it’s claimed that one “doesn’t even need to open an SSH connection” to carry out these feats of digital derring-do, and but all of them offered on this chapter appear to rely upon an SSH connection — if not explicitly on the command line, then at the very least established and used within the background by Drush. Nonetheless, the potential energy of utilizing Drush on this method is clearly important for Drupal website builders and maintainers, and thus the writer properly exhibits tips on how to keep away from inadvertently corrupting the recordsdata or database of a goal set up.

The ultimate chapter blends and builds upon most if not all the matters addressed within the earlier chapters, to indicate how Drush can be utilized to arrange an efficient improvement workflow for groups constructing Drupal web sites. To this finish, the writer demonstrates tips on how to transfer Drush instructions out of a challenge’s net doc root, and tips on how to use Drupal Boilerplate to attain this and extra. The directions make use of wget to obtain Boilerplate, however different readers as properly might encounter an error of wget not having the ability to confirm github.com’s certificates. Readers discover ways to use Jenkins to synchronize the Drupal recordsdata and databases in disparate environments, tips on how to use Drush instructions to enhance database synchronization and sanitization, and tips on how to forestall inadvertently emailing manufacturing addresses.

Like seemingly any Packt Publishing ebook, this one has loads of errata relative to its size: “OSX” (web page 9; ought to learn “OS X”), “an enter knowledge” (web page 14; ought to learn “an enter datum”), “inform [Drush] the place” (web page 19), “Dated” (web page 21; ought to learn “It’s dated”), “websites/all/drush/command[s]” (web page 28), “sort Web page” (web page 29; ought to learn “sort Fundamental Web page”), “PHP.ini” (web page 34; ought to learn “php.ini”), “cowl [the] Queue API” (web page 58), “context” (web page 66; in all probability ought to learn “content material”), “run[ning]” (web page 66), “straight brackets” (web page 68; simply “brackets”), “due to [‘]allow-additional-options'” (web page 83), “require [the] minimal” (web page 94), “a legitimate Drupal’s root listing” (web page 94; no “‘s”), “level [to] our native Drupal challenge” (web page 117), “logged as message” (web page 120), “our the $HOME path” (web page 139), “password;.” (web page 149), and “presents [a] hook” (ditto). A few of the phrasing is odd, e.g., “output will be logged in to” (web page 34), “duties working at cron” (web page 52), and “equals to 1” (web page 61). A few of the sentences are incomplete, e.g., “Importing configuration into the database.” (web page 34). Happily, not one of the narrative is meaningless, and it’s usually smoother on this version than within the first.

The construction of this ebook is extra logical than that of its predecessor. As Drupal knowledgeable Mike Anello appropriately identified in his evaluate of the primary version, “the ebook might have simply been improved by splitting out varied sections of chapters into their very own stand-alone chapters.” The identical criticism nonetheless holds true for this second version, significantly the third chapter, although to a a lot lesser extent general.

As with most if not all titles provided by Packt Publishing, this ebook’s chapters are lengthened with summaries, none of which serve any helpful goal, since they repeat what was offered simply pages earlier, however don’t embrace sufficient element to be of any worth.

One main drawback with the ebook is that it’s billed as a second version to the sooner consumer information, which lined introductory and intermediate matters; but this second version doesn’t, and as a substitute is sort of solely dedicated to superior matters. In truth, a lot of the fabric is preparatory for the ultimate chapter, on using Drush to enhance a crew’s challenge workflow. This isn’t made clear to the possible purchaser. That is actually a brand new ebook, and never an replace of the primary version. Moreover, it’s extra centered on particular makes use of of Drush.

Whether or not this ebook may very well be advisable to any potential reader, relies upon upon what that particular person is hoping to be taught. For anybody who needs full protection of the newbie and intermediate matters of Drush, this ebook could be utterly inappropriate, and the person could be finest pointed to the Drush documentation. Alternatively, the ebook could be a lot better suited to a Drupal developer trying to enhance his or her understanding of utilizing Drush for managing database configuration settings and different matters associated to challenge workflow, significantly in crew settings — through which case it may very well be extraordinarily helpful.

Michael Ross is a contract net developer and author.

You should buy Drush For Builders, 2nd Version from amazon.com. Slashdot welcomes readers’ ebook critiques (sci-fi included) — to see your personal evaluate right here, learn the ebook evaluate pointers, then go to the submission web page. If you would like to see what books now we have accessible from our evaluate library please tell us.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments