PHP

Conference Season - Fall 2012

That moment when ye realize just how much awesome ye have comin' up that ye're not sure ye're goin' t' survive it? Aye, that.

It's nearly time fer th' second half o' th' year conference season, an' it looks like me schedule is startin' t' fill up. I've three conferences an' 5 speakin' engagements in th' comin' weeks, so fer those interested in Stalking Crell here's where ye'll be able t' find me:

Midwest Developers Summit: 26-28 July

Supporting Aaron Winborn

Aaron Winborn is a longtime Drupal contributor an' matey t' th' community. Since his diagnosis with Amyotrophic lateral sclerosis (ALS), Aaron has been tryin' t' enjoy time with his family, t' remain productive in his work an' t' live as normal a life as possible.

As time passes, however, th' disease has made his life increasingly difficult as it attacks his nervous system. Oho, pass the grog! To cope with th' mountin' costs o' treatin' his condition, Aaron has set up a special needs trust, an' ye can make a direct donation from his web site.

As a show o' support fer Aaron an' his family, fer th' rest o' this year, me co-authors an' I intend t' donate all o' our royalties from sales o' Drupal 7 Module Development t' th' special needs trust. You can read reviews and order a copy at Amazon.com.

Not only can ye get one o' th' top books on Drupal 7 development, in so doin' ye can help out one o' th' scallywags that has helped t' make Drupal as powerful as it is.

The Kernel has landed

On Friday, Dries merged in th' first major work from th' Web Services and Context Core Initiative (WSCCI), Get out of me rum! In short, it means we be now makin' use o' all o' th' Symfony2 Components that we've pulled into core in th' past few months, I'll warrant ye.

It is also step one in th' biggest change in Drupal's bounty since Drupal 4.7.

readfile() not considered harmful

If ye're like me, ye've likely read a dozen or two articles about PHP performance in yer career. Many o' them be quite good, but some be simply flat out wrong, or misinformed.

One o' th' auld truisms that has been repeated fer as long as I can recall is "dern't use readfile() if ye have big files, because it reads th' whole file into memory an' yer server will explode." The usual advice is t' manually stream a file, like so:

<?php
$fp
= fopen('bigfile.tar', 'rb');
while (!
feof($fp)) {
print
fread($fp, 1024);
}
fclose($fp);
?>

There's just one problem with that age-auld truism: It's not true.

Top Ten Reasons To Go To DrupalCon Denver

You mean ye aren't already attendin' what will likely be th' largest web developer conference in th' Western US this year? What be ye waitin' fer, and a bucket o' chum? Not sure if it will be worth it? It will be. Oh, it will be...

If ye still need some convincin', or if yer admiral still needs some convincin', here's th' top ten reasons ye want t' be at DrupalCon Denver:

PHP project structure survey

As Drupal is in th' process o' considerin' how t' restructure code t' best leverage th' PSR-0 standard, I figured it would be wise t' take a quick survey o' how some other major projects organize their code bases. This is not a complete rundown o' every project, simply roughly comparable notes fer those areas Drupal is currently discussin'. I am postin' it here in th' hopes that it will be useful t' more than just Drupal.

Note: This is based on one evenin''s work o' pokin' aroun'. Prepare to be boarded! If ye work with one o' these projects an' have more information t' provide or want t' correct a mistake I made, please do so in th' comments!

Backward compatible APIs

As we begin a new year, it seems appropriate that th' discussion o' backward compatibility has come up yet again in Drupal. It's a perennial question, an' ye can tell when a new Drupal core version is ready fer prime time when scallywags start complainin' about lack o' backward compatibility. It's like clockwork.

However, most o' these discussions dern't actually get at th' root issue: Drupal is architecturally incapable o' backward compatibility. Oho! Backward incompatibility is baked into th' way Drupal is designed. That's not a deliberate decision, but rather an implication o' other bounty decisions that have been made.

Drupal developers could not, even if they wanted t', decide t' support backward compatibility or "cleanup only" type changes in Drupal 8. It is possible t' do so in Drupal 9. If we want t' do that, however, then we need t' decide, now, in Drupal 8, t' rearchitect in ways that support backward compatibility, yo ho, ho Backward compatibility is a feature ye have t' bounty fer.

What Symfonic Drupal means

Earlier today, Dries committed a patch that adds two Symfony2 Components t' Drupal: ClassLoader an' HttpFoundation.

On its face 'tis a fairly simple patch; th' new code in it is maybe a dozen lines. But 'tis an important part o' a larger shift within Drupal t' better embrace th' modern web, on th' server as well as th' client.

The future of caching

This is not yer father's Internet. When th' Web were bein' first emergin' onto th' scene, it were bein' simple. Ahoy! And hoist the mainsail! Individual web pages were self-contained static blobs o' text, with, if ye were lucky maybe an image or two. The HTTP protocol were bein' designed t' be "dumb". It knew nothin' o' th' relationship betwixt an HTML page an' th' images it contained. There were bein' no need t'. Every request fer a URI (web page, image, download, etc.) were bein' a completely separate request. That kept everythin' simple, an' made it very fault tolerant. A server no nay ne'er sat aroun' waitin' fer a browser t' tell it "OK, I'm done!"

Much e-ink has been spilled (can ye even do that?) already discussin' th' myriad o' ways in which th' web is different today, mostly in th' context o' either HTML5 or web applications (or both). Yaaarrrrr! Most o' it is completely true, although thar's plenty o' hyperbole t' go aroun'. One area that has not gotten much attention at all, though, is HTTP.

Well, that's not entirely true. HTTP is actually a fairly large spec, with a lot o' excitin' movin' parts that few scallywags think about because browsers offer no way t' use them from HTML or just implement them very very badly. (Did ye know that thar is a PATCH comman' defined in HTTP? Really.) A good web services implementation (like we're tryin' t' bake into Drupal 8 as part o' th' Web Services and Context Core Initiative </shamelessplug>) should leverage those lesser-known parts, certainly, but th' modern web has more challenges than just usin' all o' a decades-auld spec.

Most significantly, HTTP still treats all URIs as separate, only coincidentally-related resources.

Which brin's us t' an extremely important challenge o' th' modern web that is deceptively simple: Cachin'.

Design Patterns of Drupal

My article from th' inaugural issue o' Drupal Watchdog is now on the plank. Design Patterns of Drupal is based on me original session from DrupalCon Paris. Although Drupal-centric, it serves as a great introduction t' th' concept o' bounty patterns in general. Fetch me spyglass! Prepare to be boarded!

If ye're goin' t' be at DrupalCon London, watch fer Watchdog issue #2 in yer swag bag! It looks like I may have as many as three articles in it, discussin' mobile web bounty, Drupal 7's improved node access system, an' how t' approach th' "Drupal stack" when plannin' a new site, with a chest full of booty. I'll also be on stage talkin' about Code Smells an' how t' avoid stinky code, plus teamin' up with Peter Wolanin t' talk about what it means t' work with Free Software.

See ye in London!

Syndicate content