ProcessWire Weekly #471

In the 471st issue of ProcessWire Weekly we're going to check out the latest core updates, introduce a new third party textformatter module for video embedding, and more. Read on!

Welcome to the latest issue of ProcessWire Weekly. In this week's issue we'll check out the latest ProcessWire core updates, which among other things include major updates for the WireCache caching feature, and we'll also check out a brand-new third party module called TextformatterLiteVideoEmbed.

As always we've also got a brand-new site of the week to check out. This week that is a very interesting recruitment website for the municipality of Langenbach in Germany — Der Bachdoktor.

Thanks to all of our readers for being here with us again, and as always, any feedback is most welcome – please don't hesitate to drop us a line if there's anything in your mind you'd like to share with us. Enjoy our latest issue and have a great weekend!

Latest core updates

The latest weekly update from Ryan covers a couple of brand-new additions to the dev branch, focused on updates related to caching, and most prominently a new version of the $cache API variable, or the WireCache core class.

Separating the implementation from the interface in WireCache

As Ryan explains in the post, these updates separate the implementation of WireCache from the interface (or API) it provides, resulting in a new WireCacheDatabase core class. This class is then responsible for storing cached data in the database, or fetching it from the database.

What makes this update interesting is that it will, eventually, allow us to have different caching implementations behind the familiar WireCache class, or $cache API variable. The developer can use a familiar set of commands, and behind the scenes data could be cached (depending on installed WireCache modules) to the database, on disk, or perhaps into a separate Redis server.

This feature is still a work in progress and the core only ships with a database caching class, but a disk based class is already in the works. Other caching classes may be added as third party modules later on.

New API method for finding and caching Page IDS

As for other updates, there is a new API method $pages->loader()->findCache($selector), but for now that is also a work in progress. As Ryan explains in his post, this method works just like $pages->find(), except that it caches found page IDs for a set period of time, which is by default 60 seconds.

This method is currently being evaluated, but if it is found useful enough, it will likely end up being implemented as $pages->findCache().

That's all for our core updates section this week. For more details, be sure to check out the weekly update from Ryan as well. Thanks!

New module: TextformatterLiteVideoEmbed

TextformatterLiteVideoEmbed is a new third party module from millipedia. This module — which adds support for embedding videos from YouTube or Vimeo using a JavaScript based lite embed method — started out as an expansion of an earlier module called TextformatterYouTubeEmbed, which in turn is based on TextformatterVideoEmbed.

The key difference between the Lite Video Embed textformatter and the original Video Embed textformatter is indeed in the embed method: the lite version makes use of a couple of web components that avoid loading YouTube or Vimeo player dependencies until they are required, i.e. the user has clicked the "play" button. This means that the initial embed, containing a preview of the video, renders very fast.

(Additionally this version differs from TextformatterYouTubeEmbed in that it loads the required lite embed JavaScript libraries automatically, so you don't have to include those on your own.)

Other than that, the module works roughly the same as the original one: just copy and paste a video URL in a textarea (or CKEditor, or TinyMCE) input with this textformatter module applied, and you should see a video embed on the front-end of your site.

This module is not (at least for now) available from the modules directory, but if you'd like to give it a try, you can clone or download it from the TextformatterLiteVideoEmbed GitHub repository. Big thanks to the folks at millipedia for developing this very useful module and sharing it with us!

Site of the week: Der Bachdoktor

Our latest site of the week is called Der Bachdoktor. In a nutshell it is a recruitment website for the position of a new doctor, or general practitioner, for Langenbach, which is a municipality in the district of Freising in Bavaria in Germany.

Are you a doctor who would like to have your own practice? A traditional and fully equipped practice awaits you in Langenbach, which the residents of Langenbach have placed their trust in for several generations.

— der-bachdoktor.de (via Google Translate)

The site consists of several sections, which introduce Langenbach and the practice, and provide testimonials from locals — or patients, as the site describes them. Obviously there's also a contact form, as well as a contact page with more ways to get in touch with the management of the site, or the representatives of Langenbach.

This site was created by Kasper Communications GmbH, and based on a quick peek behind the scenes it seems that while the front-end of the site makes use of a few familiar dependencies — such as jQuery and PhotoSwipe — it is largely custom-built. Meanwhile, the one and only non-core module we could spot on this site is the Pro module FormBuilder.

Thanks to the folks at Kasper Communications for sharing this project with us, and our congratulations for a splendid site — and best wishes in their recruitment process — to the municipality of the Langenbach!

Stay tuned for our next issue

That's all for the 471st issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 27th of May. As always, ProcessWire newsletter subscribers will get our updates a few days later.

Thanks for staying with us, once again. Hope you've had a great and productive week, and don't forget to check out the ProcessWire forums for more interesting topics. Until next week, happy hacking with ProcessWire!

Post a comment