Turning complexity into clarity.

Intermediate PHP Developer - Hot Tomali - Vancouver, BC

Drupal Jobs from Indeed - 5 hours 30 min ago
Successful candidates must have prior expertise developing production web applications in PHP, including Content Management Systems such as Drupal and WordPress...
From Hot Tomali - Thu, 30 Mar 2017 11:15:00 GMT - View all Vancouver jobs
Categories: Drupal

AEM Developer - CGI - Victoria, BC

Drupal Jobs from Indeed - 9 hours 28 min ago
• Experience with other Web Content Management Systems such as WordPress, Drupal, Kentico, or Interwoven is a plus....
From CGI - Thu, 30 Mar 2017 07:17:30 GMT - View all Victoria jobs
Categories: Drupal

Intermediate Web Developer - CGI - Victoria, BC

Drupal Jobs from Indeed - 15 hours 30 min ago
• Experience with Web Content Management Systems such as Kentico, Drupal, Adobe Experience Manager (CQ) or Interwoven is strongly preferred;...
From CGI - Thu, 30 Mar 2017 01:15:31 GMT - View all Victoria jobs
Categories: Drupal

Jeff Geerling's Blog: Drupal VM on Windows - a fast container for BLT project development

News from Planet Drupal - Wed, 03/29/2017 - 22:57
AKA "Supercharged Windows-based Drupal development"

tl;dr: Use a Samba share in the VM mounted on the host instead of using a Vagrant synced folder, and use Drupal VM 4.4's new drupal_deploy features. See the video embedded below for all the details!

*/

I've often mentioned that Windows users who want to build modern Drupal sites and apps are going to have a bit of a difficult time, and even wrote a long post about why this is the case (Developing with VirtualBox and Vagrant on Windows).

Categories: Drupal

Evolving Web: Why is the Drupal Bootstrap Theme So Successful

News from Planet Drupal - Wed, 03/29/2017 - 18:50

As a Drupal themer, it's rare that I choose something other than the Bootstrap base theme for a new project. Besides its quality and popularity, there are some specific technical reasons why Bootstrap is such an attractive option.

The internet loves Bootstrap

According to BuiltWith.com, as of March 2017, almost 12 million websites use the Bootstrap library. And w3techs says it's used by 14.9% of all public internet sites. For sure that is a lot.

This makes Bootstrap the top JS Framework worldwide and the second most popular JS library ever used, right after jQuery, which is used across 72% of the web. This means that there are a lot of docs and examples out there to use as a guide.

Thousands of developers know Bootstrap and work with it every day. And because Bootstrap is not Drupal-specific, you can use Bootstrap for your Drupal theme and your other non-Drupal projects. Front-end developers who know Bootstrap can be more easily on-boarded on your project if you go with Bootstrap as a base theme.

A Bootstrap theme doesn't have to look like Bootstrap

If you start with Bootstrap and don't customize the styling of your theme, of course, you will end up with that classic Bootstrap look and feel. But the magic of Bootstrap isn't just about how it looks. It is also how it behaves and the way it provides us a solid framework of interactions and components that we can easily customize to the most precise design specs.

Parts of Bootstrap like the grid, breakpoints, messaging and modals are generic components that you can reuse and restyle for your projects pretty easily. As a themer, you can either change these using the Advanced Theme Settings or do these custom on your project.

Advanced Theme Settings 

Since Drupal 7, when Bootstrap theme was created with a lot of settings that allow site builders to customize it out of the box and without coding. This is a very common practice across most Drupal themes, but on this specific case, you can "tweak" Bootstrap library specific components that integrate with your Drupal site like the Navbar, Breadcrumbs, Modals and so on.

Even if you are not an experienced Drupal Themer, you can jump into the Settings and start moving things around while customizing your website's appearance and behavior.

Another great feature is that you can set to use Bootstrap library from a CDN, change the library version you want to support and even use different "skins" from Bootswatch.com.

For a complete list of the theme specific settings, refer to the Bootstrap Theme Settings Docs.

Your theming style matters

In 2016, among many other projects, we developed a couple of Drupal 8 corporate websites on top of Bootstrap theme for the Council for Responsible Nutrition and CARTaGene. On both projects, designers were free enough to come up with their concepts without knowing we were going to use that specific framework to make these come to life and get launched.

By the way, did I mention that this site you see right now, is also Drupal 8 + Bootstrap Theme based?

Drupal loves Bootstrap

In a previous blog post, I talked about "Drupal Theming and Site Building: 6 Best Practices' and listed a set of criteria to use when considering a base theme for your Drupal projectSo here's how the Bootstrap theme measures up against these criteria:

  • How many people use it? The Bootstrap theme had more than 140,000 Drupal 7 & 8 reported installs as of March 2017. That is more than 10% of Drupal sites out there and is the most-installed theme for Drupal 8 so far.
  • Is it increasing? Over time, more and more front-end developers are adopting Bootstrap, according to the installation statistics from Drupal.org.
  • Is it being maintained? Bootstrap theme is actively maintained. Just check the issue queue.
  • How do I get started? Well, the documentation is extensive and detailed. There is even a specific website for it at http://drupal-bootstrap.org.
  • How secure is it? Stable releases are covered by the security advisory policy.

In Drupal 8, there are templates files for almost every HTML component printed on the page, so you can easily customize the way that Bootstrap classes are applied. This makes it really easy to use the library the way you want. You're not stuck with the decisions made by the base theme developers.

The Amazing People Behind Bootstrap

Last but not least, Open Source does it again:

Bootstrap Library Github repo is mainly managed by @mdo and @fat plus an active community of contributors. The library started in 2011 and since then it's been constantly increasing with more and more contributions every day.

For the Drupal base theme there is also a long list of contributors, but I'll give a special mention to Mark Carver, who takes care of leading the project development as the main maintainer and does an amazing work while carefully mixing these two technologies in the best way possible.

If you jump into the issue queue, you will notice that, just because a patch works, doesn't mean it will go into a base theme used by +140,000 websites as an update before being carefully reviewed and tested by the community. Thanks a lot to Mark and everyone else behind the theme.

How to Get Started?

If you are new to Drupal:

If you have some Drupal theming experience I suggest you read about:

And if you are an advanced Drupal Themer, we would love to have you contributing back:

+ more awesome articles by Evolving Web
Categories: Drupal

Acquia Developer Center Blog: 10 Ways to Build Quality into Agile Drupal Development

News from Planet Drupal - Wed, 03/29/2017 - 16:19

How to move fast, be flexible, and maintain high quality while building a digital experience.

Tags: acquia drupal planet
Categories: Drupal

ADCI Solutions: Product development process

News from Planet Drupal - Wed, 03/29/2017 - 10:27

Alike any team that focuses on full cycle Drupal development we work with rather complex projects. Usually we go through all the stages: from idea to launch. We love having control over the process, that's why we created the simple yet working scheme. Following its steps gives us confidence that nothing is missed. This article describes the workflow of one of the ADCI Solutions projects and emphasize a designer's role at each stage. Try this scheme out and learn other tips that we included in the article.

Click here to get started

Categories: Drupal

Back End Developer - 6S Marketing & Drive Digital - Vancouver, BC

Drupal Jobs from Indeed - Wed, 03/29/2017 - 09:57
The ideal experience for a Back End Developer:. Working knowledge of other open source CMS’s such as Drupal is a plus....
From 6S Marketing & Drive Digital - Wed, 29 Mar 2017 09:57:28 GMT - View all Vancouver jobs
Categories: Drupal

Colorfield: Development best practices learned from the Drupal Dev Days Seville 2017

News from Planet Drupal - Wed, 03/29/2017 - 06:50
Development best practices learned from the Drupal Dev Days Seville 2017 christophe Wed, 29/03/2017 - 08:50
Categories: Drupal

Web Developer - Stellar Recruitment Inc - Burnaby, BC

Drupal Jobs from Indeed - Wed, 03/29/2017 - 00:10
Experience with content management systems specifically Drupal. Stellar Recruitment is currently working with one of our most sought-after clients to find a Web...
From Stellar Recruitment Inc - Wed, 29 Mar 2017 00:10:50 GMT - View all Burnaby jobs
Categories: Drupal

James Oakley: hook_uninstall not running? Drupal schoolboy errors #1

News from Planet Drupal - Tue, 03/28/2017 - 16:04

I'll put this here, in case it helps anyone else.

I'm owning up to Drupal Schoolboy Error #1.

I was writing a very simple module. It did so little, that I wanted to keep things as simple as possible — just a .info file, and a .module file.

Blog Category: Drupal Planet
Categories: Drupal

Web Developer - SAPSOL Technologies Inc. - Burnaby, BC

Drupal Jobs from Indeed - Tue, 03/28/2017 - 15:55
Experience with content management systems particularly Drupal, software development lifecycle,software quality assurance practices are a must....
From Indeed - Tue, 28 Mar 2017 15:55:36 GMT - View all Burnaby jobs
Categories: Drupal

myDropWizard.com: Most common Drupal site building pitfalls and how to avoid them! (Part 3 of 3)

News from Planet Drupal - Tue, 03/28/2017 - 14:58

This is the third in a series of articles, in which I'd like to share the most common pitfalls we've seen, so that you can avoid making the same mistakes when building your sites!

myDropWizard offers support and maintenance for Drupal sites that we didn't build initially. We've learned the hard way which site building mistakes have the greatest potential for creating issues later.

And we've seen a lot of sites! Besides our clients, we also do a FREE in-depth site audit as the first step when talking to a potential client, so we've seen loads of additional sites that didn't become customers.

In the first article, we looked at security updates, badly installed module code and challenges ith "patching" modules and themes, as well as specific strategies for addressing each of those problems. In the second article, we looked at how to do the most common Drupal customizations without patching.

In this article, we're going to look at some common misconfigurations that make a site less secure, and how to avoid them!

NOTE: even though they might take a slightly different form depending on the version, most of these same pitfalls apply equally to Drupal 6, 7 and 8! It turns out that bad practices are quite compatible with multiple Drupal versions ;-)

Categories: Drupal

MidCamp - Midwest Drupal Camp: Free Community Drupal Training at MidCamp 2017

News from Planet Drupal - Tue, 03/28/2017 - 13:38

It started as a question.  Why do Drupal camps only have trainings on a separate day?  The legitimate answer was that trainings and sessions should not compete for audiences for a normal Drupal camp audience.  But what if the trainings were not for that normal Drupal camp audience?

When all of the hard work was done by the MidCamp venue team to secure the DePaul University Student Center for MidCamp 2017, we immediately started exploring the idea of having half day Drupal training sessions for those that would nornally not attend a Drupal camp.  We reserved two extra rooms for this idea.

While I looked for interested parties who would be interested in attending the trainings, Joseph Purcell of Digital Bridge Solutions worked to organize an Introduction to Making Websites with Drupal itinerary and found great trainers to lead the event: Michael Chase, ‎Instructor at DePaul University College of Computing and Digital Media, and Aaron Meeuwsen, Web Developer at HS2 Solutions, along with several other volunteers, Scott Weston and Matt Ramir from HS2, and Doug Dobrzynski from PMMI Media Group.  Without them, we couldn't have made this happen. I would also like to thank my employer, Xeno Media for contributing some of my time to help organize these trainings.

We've reached out to, and are happy to be working with such great local Chicago technology groups.  Girl Develop It, which provides programs for adult women interested in learning web and software development in a judgment-free environment, the IT Knowledge and Abilities Network (ITKAN), which provides professional networking and growth organization with a focus on professionals and aspiring professionals with disabilities, and Women Who Code, a global non-profit dedicated to inspiring women to excel in technology careers all answered our call.

But we still have room for more.  Do you know of someone who would benefit from free Intro to Drupal Training?  We want you to invite them!

The trainings will cover basic CMS tasks like editing and publishing content, creating navigation menus, and placement of content on the site, and will approach into more complex tasks such as module installation and site configurations. Additionally, we’ll show the various ways the Drupal community can help through the issue queue, meetups, job boards, and mentorship.

The sessions are:

  • Friday March 31st - 9:00 am - 12:00 pm
  • Friday March 31st - 1:00 pm - 4:00 pm
  • Saturday April 1st - 9:00 am - 12:00 pm
  • Saturday April 1st - 1:00 pm - 4:00 pm

Get your free ticket today!

Don't be shy, please share and and invite anyone you think would benefit from these trainings.  Ticket enrollment is open, and we would love to have every seat filled!

Categories: Drupal

Chromatic: Configuring Redis Caching with Drupal 8

News from Planet Drupal - Tue, 03/28/2017 - 13:20

How to install and configure Redis caching for Drupal 8.

Categories: Drupal

Darren Mothersele: How to do Everything with PHP Middleware (DrupalCamp London)

News from Planet Drupal - Tue, 03/28/2017 - 09:30

At the DrupalCamp in London earlier this month I gave a talk about PHP Middleware. You can see a recording of the talk on YouTube. Here’s a summary, in case you don’t want to watch the whole talk, or the distorted audio upsets you, or if you want the links and references:

Simple vs Easy

I started with a reference to the important talk by Rich Hickey, Simple Made Easy. This is high up on my list of videos every software developer needs to watch. I began here because I think it’s important to identify the difference between simple and easy, to identify where complexity sneaks into our systems. I have found PHP Middleware to be an important tool in the fight against complexity.

“programming, when stripped of all its circumstantial irrelevancies, boils down to no more and no less than very effective thinking so as to avoid unmastered complexity, to very vigorous separation of your many different concerns.

Edsgar W. Dijkstra (1930 - 2002)

De-complecting PHP

I talked a bit about different ways to simplify development with PHP. Including: Domain-driven design, Hexagonal architecture (Ports and Adapters), Framework-independent code, Thin APIs, etc… In particular, I wanted to emphasise the importance of framework-independent code and the benefit of using common interfaces such as the ones developed as PSRs by PHP-FIG.

There was some discussion after about introducing unecessary abstractions, but I think this misses the point. Of course there is a trade off, but the key is to focus on the simplicity, on untwisting things (c.f. Rich Hickey).

De-coupled

Inspired by the Zend Expressive installation procedure, I imagined what Drupal 10 might look like, with fully-decoupled components.

Interfaces

The widespread adoption of PSR7 by the PHP community has lead to the popularity of PHP Middleware-based systems.

Why PSR7 when Symfony HTTP components were so popular? Well, that is an implementation - and rather than standardise on implementation, we should standardise against interfaces.

This allows more interoperability. I showed this pseudocode:

// Take the incoming request from Diactoros $request = ServerRequestFactory::fromGlobals(); $client = new Client(); // Response comes back from Guzzle $response = $client->send($request->withUrl($dest)); $body = simplexml_load_string( $response->getBody()->getContents()); // pass back to Diactoros (new SapiEmitter)->emit($response->withBody($body));

The example uses HTTP requests from Zend Diactoros, forwards them using the Guzzle HTTP client, and returns the response object from Guzzle using the SAPI Emitter from Diactoros.

This demonstrates the power of sharing standard interfaces. Here two packages are used together, both provide an implementation of PSR7 HTTP messages, and they work seamlessly because they both conform to the same interface, despite the differing implementation details.

Decorating Web Apps

This is what a typical web app looks like:

Which can be simplified to this:

A web app takes a request and returns a response.

The concept behind PHP Middleware is that you can decorate the app, to add new functionality, by intercepting the request on the way in, and the response on the way out. This avoids the complexity of intertwining your code throughout the ball of mud.

Here’s an example (pseudocode) for adding CORS functionality to an existing app:

$cors = analyze($request); switch ($cors->getRequestType()) { Case ERR_NO_HOST_HEADER: Case ERR_ORIGIN_NOT_ALLOWED: Case ERR_METHOD_NOT_SUPPORTED: Case ERR_HEADERS_NOT_SUPPORTED: Return createResponse(403); Case TYPE_REQUEST_OUT_OF_CORS_SCOPE: return $APP->process($request); Case TYPE_PRE_FLIGHT_REQUEST: $response = Utils\Factory::createResponse(200); Return $response->withHeaders($cors->getHeaders); default: $response = $APP->process($request); Return $response->withHeaders($cors->getHeaders); }

StackPHP first popularised the concept of middleware in PHP. This diagram is from their website:

There are other popular micro-frameworks based on this concept, such as Slim.

The core of your app is just a thin layer of business logic. Just your domain specific code. The rest can be wrapped in layers which isolate and separate concerns nicely.

Single-pass vs Double-pass

The double pass approach became the most popularly used signature for HTTP middleware, based on Express middleware from the JS community.

It looks like this:

// DOUBLE PASS function __invoke($request, $response, $next) { }

The request and the response are both passed into the middleware, along with a $next delegate that is called to pass control and carry on processing down the chain of middleware.

This double-pass approach is much newer, but used by most of the early adopters of PSR-7.

A single pass approach, looks like this:

// SINGLE PASS / LAMBDA function process($request, $delegate) { }

The issue is with how the response object is dealt with. In the double-pass approach, both are provided. The argument is that this is better for dependency inversion. Using the single pass approach you either need to hard code a dependency on a HTTP message implementation into your middleware when the response is required, or you need to inject a factory for generating the response.

PSR-15 HTTP Middleware

After the success of PSR7, with it’s wide adoption leading to much standardisation and interoperability in PHP frameworks, the next step is to standardise the middleware interface.

This is not yet an accepted PSR. At the time of writing it is still in draft status. It is available for use in the http-interop/http-middleware repo.

Invoker

As an aside, I mentioned the Invoker Interface. As per the docs:

“Who doesn’t need an over-engineered call_user_func()?”

In particular this library really simplifies the process of calling things and injecting dependencies. It also allows to call things using named parameters. I make extensive use of this, and I find making calls with named parameters makes code much easier to understand.

PSR-15 Interfaces

PSR-15 has two interfaces. Both define a method called process. One is the signature that middleware must support, which takes a PSR7 request and a PSR15 delegate. The other interface defines the process method for the delegate. The method on both interfaces is defined as returning a PSR7 response.

So you can compose a chain of middleware, pass in a request and get a response. The request is passed down the chain of middleware until a response is generated which is then passed back up the chain, possibly being decorated along the way.

For want of a better name, I refer to this chain of middleware as a stack. And, I have created a simple Stack Runner to handle the processing of a stack of PSR-15 middleware.

class StackRunner implements DelegateInterface { public function __construct( array $stack, InvokerInterface $invoker, ResponseFactoryInterface $responseFactory ) { ... } public function process(ServerRequestInterface $request) { if (!isset($this->stack[$this->current])) { return $this->responseFactory->createResponse(); } $middleware = $this->stack[$this->current]; $this->current++; return $this->invoker->call([$middleware, 'process'], [ 'request' => $request, 'delegate' => $this, ]); } } ADR (Action Domain Responder)

I went on to talk about ADR as being an adaptation of MVC that is more suitable for use in Web Apps. I’ve found this particularly useful when using Domain-Driven Design, or when used to create thin APIs where you have just a thin layer of business logic on top of a data store.

The issue with MVC is that the template is not the view. The “view” of a web app is the HTTP response, and we split this across our layers, as the body of the response is typically generated by the view, with the knowledge of HTTP being encoded into our controllers. We also bundle together various actions into one controller, which means instantiating the whole thing when we want to run one of the actions.

ADR offers an alternative separation of concerns, where the action methods of the controller are their own separate classes (or in my case anything invokable via the InvokerInterface). I use an InputHandler to deal with parsing the input from the HTTP Request, which the Invoker can then use (via the magic of named arguments).

The domain (Model in MVC terminology) is where the business logic lives. This is called domain, rather than model, to suggest use of domain-driven design.

To use ADR with PHP Middleware, add a resolver to the end of the chain of middleware to dispatch the request to the appropriate Action.

Action

I’ve created a reference implementation of an invokable Action.

Demo!

At this point in my talk I planned to give a demo of how you compose ADR with Middleware to create a working API. Unfortunately, I had some tech issues getting my computer linked up to the projector, and I was starting to feel really ill (full of cold). By this time the caffeine was starting to wear off, and I needed the talk to end!

I’ve put the example code up in a GitHub repo.

References
  • Simple Made Easy - talk by Rich Hickey
  • HTTP Middleware and HTTP Factory interfaces.
  • PSR15 Middlewares a set of really useful middlewares that can be used with a PSR15 middleware dispatcher.
  • Stack Runner my reference implementation of a very simple stack runner for executing a chain of PSR15 middleware.
  • Wafer an experimental implementation of the ADR idea to be used along with PSR15 middleware and the stack runner.

Drop me a line with any feedback. Thanks!

Categories: Drupal

Agiledrop.com Blog: AGILEDROP: Responsive Images in Drupal 8

News from Planet Drupal - Tue, 03/28/2017 - 08:56
The days of fixed-width websites are long behind us, and with fluid widths came fluid images. In many cases, we don’t want to display the same image size on a mobile and on a desktop, because we truly don't need a 2000px wide image on a 480px device. Or we want to display a completely different image at some breakpoint. For this we have a HTML5 element which can contain a multiple elements with srcset and media attributes. The browsers choose the right source based on a media query. In my case, I had to show completely different image sizes on mobile vs.… READ MORE
Categories: Drupal

Janez Urevc: Time to take some time off the Drupal community

News from Planet Drupal - Tue, 03/28/2017 - 08:11
Time to take some time off the Drupal community slashrsm Tue, 28.03.2017 - 10:11

When I joined the Drupal community I felt that I arrived in the enthusiastic, welcoming and positive environment. I felt that all contributions are appreciated and that we're all following more or less the same goal. This belief was also mostly the source of motivation for my extensive contributions to the Drupal 8 Media initiative in the past 4 years or so. This has dramatically changed in the last year or so and seems to be getting worse all the time.

Our community has governance and conflict-resolution rules. Everything should be clear and transparent. At least in theory. But in practice things don't work that way. Decisions (political and technical) are often made behind closed doors where only small fraction of the community is allowed to participate. Decision processes are nontransparent and leadership doesn't seem to feel any need to improve that. This was also the main reason why I recently decided to discontinue my DA membership.

I think that, in order to survive in the long term, we'll need to reform our community to become truly transparent and democratic. We've been "living" in a dictatorship and it has been working for us so far. But history shows that too much concentration of power in an small ruling clique almost always leads to its abuse (I strongly recommend this book).

My impression is that the community in general is getting increasingly toxic. It feels that there is more and more hypocrisy, lies, secret goals and partial interests being involved (and I think that the lack of transparency contributes to that). Best indicator for in my case are the community events which have (with some rare bright exceptions) become a burden instead of enjoyment for me. I still enjoy meeting some people that have become my friends during the years, but I recently started seeing the community in general as increasingly negative, abusing and exhausting.

Stress and bad mood directly linked to the happenings in the Drupal started affecting my personal life, including relations with my family. This is not acceptable and I decided to take some time off to think about the situation and to decide if and to what extent I want to remain active in the community. This decision was not made solely due to the most recent ousting (which also clearly showed how the community and its leadership actually work). It is based on many events that happened in last year or so.

This is my personal decision and has nothing to do with my employer. I really enjoy working at MD Systems and have no intentions to introduce any changes into that part of my life.

Categories: Drupal

Kalamuna Blog: Converting Drupal 7 Media Tags During a Drupal 8 Migration

News from Planet Drupal - Tue, 03/28/2017 - 03:37
Converting Drupal 7 Media Tags During a Drupal 8 Migration John Ouellet Mon, 03/27/2017 - 20:37

As developers of all skill levels begin to migrate from old versions of Drupal to Drupal 8, it is always good to have references for some of the more arduous tasks out there.  Many of our clients for whom we built Drupal 7 sites used the media module and the awesomeness that it gave to their sites. Now, as I migrate some of these same sites to Drupal 8, I hit a bump in the road. The Drupal 7 Media tag can’t be rendered in the Drupal 8 site I am migrating to. This is because that functionality is not present in the Drupal 8 site.

Categories Articles Drupal Guidance
Categories: Drupal

MidCamp - Midwest Drupal Camp: Two days before before MidCamp

News from Planet Drupal - Tue, 03/28/2017 - 03:19

Two days before before MidCamp, when all round the rug, not a creature was stirring, not even a bug.

Though the house was so empty, and missing it's stir, our Volunteer coordinator was out saying burrr (don't leave me out in the cold). Our Sprint lead was looking for sprinters to sprint, and our Trainers were looking for trainees to imprint!

MidCamp 2017 has 45 sessions for you to attend on Friday and Saturday, 4 Full day trainings on Thursday, and 4 Free half day trainings for you to invite anyone new to Drupal to attend.

In addition, we have socials for you to attend on Friday and Saturday, and a Sunday contrib Sprint to give back to Drupal.

It's spring in Chicago, and we hope you can join us!

Get your tickets today!

Categories: Drupal