Gizra.com: Yesod (and Haskell) from a Drupal (and PHP) Perspective

Planet Drupal - Wed, 21/09/2016 - 23:00

In Gizra, we run an unusual stack. Drupal, our bread and butter, serves as the backend and is complimented by Elm for the front end, and as of recently Yesod - a Haskell framework.
Before Yesod, we were running NodeJs as our proxy server for light tasks or real-time messages.

But ever since I came across Elm, Javascript and I are hardly friends. I respect it, but can no longer turn my eye from its shortcomings. Functional programming has caught my heart and mind.

In this post I’m not going to try and present strong points on why you should adapt this stack, but rather share with you the unique path we are paving.


Elm was my first dip into the functional programming (FP) world. I recommend starting from there. It’s way more gentle than Haskell, and it has, of course, one important advantage - it helps you build rock solid, crazily fast, joy-filling, web apps.

Maybe this post and video will get you excited as well.

Gentle Intro to Haskell

A good way to start explaining what’s so special about Haskell is to dive directly into Haskell. While PHP is defined (by some) as a “productive” language, Haskell is often blamed (by some) as being an “academic language”. Both statements are probably wrong.

Often when mentioning Haskell, we talk about the compiler and the type system. They are truly marvelous tools. For the type system, I think the Elm post I lined above should be enough to get the hang of it. But I’d like to continue and reveal a bit more by highlighting mini examples on how Haskell makes us approach development tasks differently.


Below are examples from the REPL (the interactive shell for Haskell)

> [1, 2] ++ [3, 4] [1, 2, 3, 4]

What we have here are two lists of integers that are appended to each other. A list of integers is represented as [Int] in Haskell. The ++ is the operation that causes those two lists to be grouped into a single one.

Haskell comes with some handy shortcuts.

Continue reading…

Categories: Elsewhere

Cheeky Monkey Media: Cheeky Monkey Media Named Leading Digital Agency

Planet Drupal - Wed, 21/09/2016 - 22:31
Cheeky Monkey Media Named Leading Digital Agency rohan Wed, 09/21/2016 - 20:31

Do you want to kick ass in the digital environment? We thought so! Our cheeky monkeys have been helping clients do just that since 2008—longer than many digital agencies have been around.

Our work speaks for itself, but we really like it when our clients speak on our behalf. Recently their input was in large part responsible for helping us make a list of the top digital agencies in Canada, compiled by Clutch, a B2B market research firm based in Washington, D.C.

We earned our spot on Clutch’s “Leaders Matrix” based on our previous work, market presence, and most importantly, client reviews conducted by Clutch analysts. Below are a few comments from some of the people we’ve worked with:

Categories: Elsewhere

Drupal.org blog: A new look for Drupal.org

Planet Drupal - Wed, 21/09/2016 - 21:09

As you can see we've put a fresh coat of paint on Drupal.org - but the changes run below the surface. This latest iteration of the front page brings the key concepts of our design system to the forefront: Clean, Modern, Technical.

This change also brings new editorial tools for Drupal.org content editors. The new home page provides us more flexibility with content and presentation, and so you'll see more frequent updates, more information about DrupalCon, and more editorial flexibility on the home page than you've seen in the past. These tools are also helping us to build cleaner, modern landing pages - like you've just seen with our Fall Membership Campaign.

We've previewed this work with several key members of the community and the board, and we want to say thank you to everyone who's given us their feedback on this first step for our new home page. We also want to give an extra special thank you to dyannenova for her contributions to this effort.

This is just the beginning - very soon we'll have a new visual look for the case studies that are featured on the home page, and then shortly after that we'll begin promoting solutions to Drupal evaluators in specific industries, like Higher Education, Media & Publishing, and Government.

If Drupal.org is the home of the community, than the front page is our front door. We want to welcome new users and evaluators of Drupal, highlight the project's strengths, and promote news and happenings from throughout the ecosystem.

We hope you like the changes, and we think you'll like the upcoming iterations even more. We'd love to hear your feedback!

Categories: Elsewhere

Four Kitchens: Component-Based Theming in Drupal 8: The Video Series

Planet Drupal - Wed, 21/09/2016 - 20:00

Check out our video series on component-based theming in Drupal 8. […]

Categories: Elsewhere

Drupal Blog: Drupal 8.1.10 released

Planet Drupal - Wed, 21/09/2016 - 18:33

Drupal 8.1.10, a maintenance release which contains fixes for security vulnerabilities, is now available for download.

See the Drupal 8.1.10 release notes for further information.

Download Drupal 8.1.10

Upgrading your existing Drupal 8 sites is strongly recommended. There are no new features nor non-security-related bug fixes in this release. For more information about the Drupal 8.x release series, consult the Drupal 8 overview.

Security information

We have a security announcement mailing list and a history of all security advisories, as well as an RSS feed with the most recent security advisories. We strongly advise Drupal administrators to sign up for the list.

Drupal 8 includes the built-in Update Manager module, which informs you about important updates to your modules and themes.

Bug reports

This is the final security release for the 8.1.x series. Future maintenance releases will be made available in the 8.2.x series, according to our monthly release cycle.

Change log

Drupal 8.1.10 is a security release only. For more details, see the 8.1.10 release notes. A complete list of all changes in the upcoming 8.2.x branch can be found in the git commit log.

Security vulnerabilities

Drupal 8.1.10 was released in response to the discovery of security vulnerabilities. Details can be found in the official security advisories:

To fix the security problem, please upgrade to Drupal 8.1.10. (Sites testing the 8.2.x release should update to 8.2.0-rc2.)

Update notes

See the 8.1.10 release notes for details on important changes in this release.

This is the final security release of the 8.1.x series. Sites should prepare to update to 8.2.0 following this release.

Known issues

See the 8.1.10 release notes for known issues.

Categories: Elsewhere

Lullabot: Modern decoupling is more performant

Planet Drupal - Wed, 21/09/2016 - 18:00

Two years ago, I started to be interested in API-first designs. I was asked during my annual review, “what kind of project would you like to be involved with, this next year?” My response: I want to develop projects from an API-first perspective.

Little did I know that I was about to embark on a series of projects that would teach me not only about decoupled Drupal, but also the subtleties of designing proper APIs to maximize performance and minimize roundtrips to the server.

Embedding resources

I was lucky enough that the client that I was working with at the time—The Tonight Show with Jimmy Fallon—decided on a decoupled approach. I was involved in the Drupal HTTP API server implementation. The project went on to win an Emmy Award for Outstanding Interactive Program.

The idea of a content repository that could be accessed from anywhere via HTTP, and leverage all the cool technologies 2014 had to offer, was—if not revolutionary—forward-looking. I was amazed by the possibilities the approach opened. The ability to expose Drupal’s data to an external team that could work in parallel using the front-end technologies that they were proficient with meant work could begin immediately. Nevertheless, there were drawbacks to the approach. For instance, we observed a lot of round trips between the consumer of the data—the client—and the server.

As it turns out, The Tonight Show with Jimmy Fallon was only the first of several decoupled projects that I undertook in rapid succession. As a result, I authored version 2.x of the RESTful module to support the JSON API spec in Drupal 7. One of the strong points of this specification is resource embedding. Embedding resources—also called resource composition—is a technique where the response to a particular entity also contains the contents of the entities it is related to. Embedding resources for relationships is one of the most effective ways to reduce the number of round trips when dealing with REST servers. It’s based on the idea that the consumer requests the relationships that it wants embedded in the response. This same idea is used in many other specifications like GraphQL.

In JSON API, the consumer can interrogate the data with a single query, tracing relationships between objects and returning the desired data in one trip. Imagine searching for a great grandparent with a genealogy system that would only let you find the name of a single family member at a time versus a system that could return every ancestor going back three generations with a single request. To do so, the client appends an include parameter in the URL. For example: 


The response will include information about four entities:

  • The entity being requested (the one that contains the relationships).
  • The entity that relationship1 points to. This may be an entity reference field inside of the entity being requested.
  • The entity that relationship2 points to.
  • The entity that nestedRelationship1 points to. This may be an entity reference field inside of the entity that relationship2 is pointing to.

A single request from a consumer can return multiple entities. Note that for the same API different consumers may follow different embedding patterns, depending on the designs being implemented.

The landscape for JSON API and Drupal nowadays seems bright. Dries Buytaert, the product lead of the Drupal project, hopes to include the JSON API module in core. Moreover, there seems to be numerous articles about decoupling techniques for Drupal 8.

But does resource embedding offer a performance edge over multiple round-trip requests? Let’s quantitatively compare the two.

Performance comparison

This performance comparison uses a clean Drupal installation with some automatically generated content. Bear in mind, performance analysis is tightly coupled to the content model and merits case-by-case study. Nevertheless, let’s analyze the response times to test our hypothesis: that resource embedding provides a performance improvement over traditional REST approaches.

Our test case will involve the creation of an article detail page that comes with the Standard Drupal profile. I also included the profile image of a commenter to make things a bit more complex.


In Figure 1, I’ve visually indicated the “levels” of relationships between the article itself and each accompanying chunk of content necessary to compose the “page.” Using traditional REST, a particular consumer would need to make the following requests:

  • Request the given article (node/2410).
  • Once the article response comes back it will need to request, in parallel:
    • The author of the article.
      • The profile image of the author of the article.
    • The image for the article.
    • The first tag for the article.
    • The second tag for the article.
    • The first comment on the article.
      • The author of the first comment on the article.
        • The profile image of the author of the first comment of the article.
    • The second comment of the article.
      • The author of the second comment of the article.

In contrast, using the JSON API module (or any other with resource composition), will only require a single request with the include query parameter set to 


When the server gets such a request it will load all the requested entities and return them back in a single swoop. Thus, the front-end framework for your decoupled app gets all of its data requirements in a JSON document in a single request instead of many.

For simplicity I will assume that the overall response time of the REST-based approach will be the one with the longest path (four levels deep). Having four parallel requests that happen at the same time will not have a big impact on the final response time. In a more realistic performance analysis, we would take into account that having four parallel calls degrades the overall performance. Even in this handicapped scenario the resource embedding should have a better response time.

Once the request reaches the server, if the response to it is ready in the different caching layers, it takes the same effort to retrieve a big JSON document for the JSON API request than to retrieve a small JSON document for one of the REST requests. That indicates that the big effort is in bootstrapping Drupal to a point where it can serve a cached response. That is true for anonymous and authenticated traffic, via the Page Cache and Dynamic Page Cache core modules.


The graphic above shows the response time for each approach. Both approaches are cached in the page cache, so there is a constant response time to bootstrap Drupal and grab the cache. For this example the response time for every request was ~7 ms every time.

It is obvious that the more complex the interconnections between your data are the greater the advantage of using JSON API's resource embedding. I believe that even though this example is extremely simple, we were able to cut response time by 75%.

If we now introduce latency between the consumer and the server, you can observe that the JSON API response still takes 75% less time. However, the total response time is degraded significantly. In the following chart, I have assumed an optimistic, and constant, transport time of 75 ms.

undefined Conclusion

This article describes some sophisticated techniques that can dramatically improve the performance of our apps. There are some other challenges in decoupled systems that I did not mention here. If you are interested in those—and more!—please attend my session at DrupalCon Dublin Building Advanced Web Services With JSON API, or watch it later. I hope to prove that you can create more engaging products and services by using advanced web services. After all, when you are building digital experiences one of your primary goals you should be to make it enjoyable to the user. Shorter response times correlate to more successful user engagement. And successful engagements make for amazing digital experiences .

Categories: Elsewhere

Drupal core announcements: Media in Drupal 8 Initiative plan posted for review

Planet Drupal - Wed, 21/09/2016 - 17:54

As we are ramping up to work on significant user improvements for Drupal 8.3, one of the key areas of progress could be with media management user interfaces and features. For that to happen, we need to agree on what we are going to work on and then have people to implement it. The Media in Drupal 8 Initiative plan is being formed and is open for feedback now if having better core media support is near and dear to your heart. Please review and post feedback on the plan.

If you'd like to get involved with the implementation, you are more than welcome! The media team meets every Wednesday at 2pm GMT on IRC in #drupal-media.

Categories: Elsewhere

Annertech: Things I Learned from the DrupalTwig Slack: Volume 1

Planet Drupal - Wed, 21/09/2016 - 16:38
Things I Learned from the DrupalTwig Slack: Volume 1

Without doubt, the greatest resource for information about Drupal frontend issues is the DrupalTwig Slack. There are over 300 of the world's most well known frontend Drupal developers - Wim Leers, MortenDK, Mark Drummond, David Hernandez, and more - offering and receiving help all day every day. It's very rare that someone asks a question and doesn't receive a reply with a solution within a few minutes, or at the very least a conversation about why the issue might be hard to solve.

Categories: Elsewhere

Kodamera Screencast: Embedding videos easily with Video Filter

Planet Drupal - Wed, 21/09/2016 - 16:29

Embedding videos can be a tricky thing to do when it comes to both the web and different CMS's. When it comes to embedding videos in the content section - the body of the page - The Video Filter module offers an easy and great solution. 

Basically, you install the module, configure it for the different text formats you want to use it with and then simply add the videos in the body text with a kind of shortcode or shorthand thingamajig.

In this video I'll go through what you need to know and how to get the videos to show in your content.

The Video Filter module only works as a text filter, so if you're looking for a solution where you can create embedded videos from a field of its own in Drupal, perhaps Video Embed Field could offer such a solution. (I'm just talking about Video Filter in this screencast.)

Read more
Categories: Elsewhere

Drupalize.Me: Drupalize.Me Now Powered by Pantheon

Planet Drupal - Wed, 21/09/2016 - 15:37

If you're following along at home, you may have seen that we recently made the move to Pantheon hosting. Last week during our maintenance window, Joe and I worked through our migration checklist, and officially moved the site over to our new host. The process had a few hiccups, but we thought it would be interesting to take a look at what went into our migration process. Hopefully sharing what went into our planning process, as well as what is in our pipeline for improvements now that we're on Pantheon, will help you if you ever find yourself facing a similar project.

Categories: Elsewhere

Unimity Solutions Drupal Blog: How Attending DrupalCon Dublin Could Benefit You?

Planet Drupal - Wed, 21/09/2016 - 14:05

DrupalCon Dublin is just a week away!! With all the excitement surrounding the event we often forget to look at key things to expect out of this event. What should one learn out of DrupalCon Dublin? Is it only for Drupal developers or should CEOs, Managers and owners attend? What’s the use of attending an event on OPEN SOURCE TECHNOLOGY? Is it useful for growth of businesses as well?

Categories: Elsewhere

Drupal Console: Make contrib modules with DrupalConsole commands compatible with RC-1

Planet Drupal - Wed, 21/09/2016 - 11:35

DrupalConsole RC-1 is close, is really really close, as close as DrupalCon Dublin, less than a week at least thats our goal.

Where are we?

We accomplish a lot of changes during the last two months, and this is an overview of the milestones completed for RC-1 release.

* Languages separated from the main project.

* Core commands and features to be shared across projects.

* Main repo.

* New global executable. 

What is next?

The next step is to fix modules with current DrupalConsole integrations once RC-1 is released, this means next week during DrupalCon.

This is the list of the known contributed commands providing commands, we have identified and we are planning to help update and fix to be RC-1 compatible.

  • Metatag
  • Webprofiler
  • Drupal Commerce
  • Configuration Split
  • Scheduled Updates

If you know of another module(s) with contributes command please let us know by commenting on this post or on this issue https://github.com/hechoendrupal/DrupalConsole/issues/2728

Are we done and ready for the stable ?

Not yet, we are close and we will continue working to complete the stable release and you help us complete it. This is how you can help.

Are you a business owner?

As a business owner has your company already leveraged the advantages of Drupal Console?. Will Drupal Console play a significant role in your business plan for  your immersion in Drupal 8?

You can contribute to complete the Goals for our 1.0.0 stable release by assigning 1 or more of your resources to work in office hours to complete the pending tasks.

Are you an independent developer?

As an independent developer, you can help us by allocating some hours. We always have issues to resolve and none of them are rocket science!

Are you going to DrupalCon?

    Feel free to join us during the sprints, you can help us in several ways:

    • Fix current modules with integrations.
    • Fix bugs and improve the project.
    • Write an integration for a contrib module.
    • If you know how to write test for Drupal 8, we really need your help.

    Do not miss the DrupalConsole sessions Enzo and I will be presenting

    Do not miss the Community Keynote enzo will be presenting

    Categories: Elsewhere

    Deeson: White men in digital - our privilege is blinding

    Planet Drupal - Wed, 21/09/2016 - 09:26

    We’re proudly sponsoring the Women in Drupal event at DrupalCon Dublin 2016. This prompted me to reflect on our own track record on employing and advancing women.

    Of course our own house is in order. Right?

    No, it is not.

    Including our current hiring round, in our team of 40 people:

    • 0% of our four most senior posts are held by women
    • 10% of our full leadership team is made up of women
    • 20% of our developers are women
    • 30% of our overall team are women

    I would describe our approach to creating a representative, safe and welcoming workplace that facilitates everyone being able to thrive as ‘well intentioned’.

    No one in the team has raised any concerns about our approach.

    I also haven’t spent much time ensuring that we understand how to address these complex issues. Or that we’re serious about rooting out the more insidious aspects of discrimination.

    So - passive, ill-informed and well intentioned.


    On further reading I realised a little more how my personal privilege contributes to my blindness on this subject.

    I’m a white male, in an industry dominated by white men and I’m the most senior person in the organisation. An organisation where the four most senior roles are held by white men.

    In what scenario would a feeling of being ‘other’ likely occur for me? Let alone the reality that I have personally experienced discrimination?

    So it’s impossible that it’s only women that we’re failing

    By failing to engage with and acknowledge our bias, we’re not actively including all people across differences in sex, age, gender, race, sexual orientation or disability. I’m pretty sure therefore our recruitment process needs deeper thought.

    Organisationally we’re likely to reveal our implicit bias through our lack of representation of some communities at a senior level - test yours here.

    And the likelihood of that being a perpetuating factor for our failure to represent the wider community within the organisation seems high.

    A lack of awareness of this bias is also likely to hurt our work - our UX, design and development practices all require empathy and different perspectives to deliver results.

    And that means we’re not proactively developing a culture that ensures that everyone knows they’re welcome, that they will be respected as themselves, that they can thrive and belong here. How will they answer the question ‘Can someone like me be successful here?’

    For example, our lack of diversity at a senior level means that we don’t interpret the signals the way that some people might about our recruitment proposition.

    Harmful consequences

    Aside from the fact this feels ethically wrong as a state of affairs, this every day passivity is harmful in terms of the following:

    • Our ability to have a truly diverse workplace where everyone feels welcome
    • Our ability to attract the widest range of potential candidates
    • Our ability to progress people to a senior level
    • Our performance as a company

    Let’s start closer to home than the pipeline issue

    The industry approach has been on occasion less than insightful: ‘if they don’t apply for our jobs, then we can’t hire them, so what can we do?’.

    It’s a pipeline problem that’s not our fault, right?

    This ignores the appalling discrimination that people have experienced in the industry. Which, for example, contributes to a shameful retention rate of women who have chosen tech as a career.

    And if you can’t see people like you succeeding in the industry how attractive (or safe) would it feel as a career choice?

    Of course it’s important and positive that the industry backs initiatives that help support poorly represented communities. But we shouldn’t ignore the inconvenient and more directly addressable truths closer to home.

    Do we really need to hear what another white man thinks about equal representation in tech?

    On the one hand, no. The tech industry is disproportionately full of our opinions on this topic already. But, as others have pointed out, under-represented communities can't fix this on their own - those in positions of power need to make a stand alongside them.

    The target audience for this post is really other people in positions of privilege and power who, like me, somehow hadn’t woken up to the fact that being passive and ill-educated on this issue perpetuates it. That it may be painful and uncomfortable to acknowledge that you may have passively perpetuated discrimination within your organisation. That you might need to challenge your thinking.

    Before you decide this is an issue you feel comfortable ignoring - reflect a while or maybe digest some more people’s experiences in the industry.

    If you disagree with a specific point is it OK to just disengage? Or could you take positive steps on the areas that do resonate?

    How are Deeson going to do better?

    I’m going to make it a standing issue on our leadership team’s agenda so that we can monitor progress and maintain an active discussion. We aren’t going to get better overnight.

    We’re going to immediately:

    • Begin annual salary audits to check for bias and rectify imbalances
    • Report on our progress when we do our quarterly planning
    • Implicit bias training for everyone
    • Stop attending conferences that don’t have a credible Code of Conduct
    • During hiring, take a more nuanced view on whether a developer has made open source contributions
    • Stop participating in all male conference panels
    • Improve our Careers page, including clarity on parental leave
    • Stop asking for previous salary during hiring - it can perpetuate pay inequality
    • Create dialogue and feedback channels within the company to offer better support
    • Stay informed and signpost groups working in the industry

    Can digital agencies and the Drupal community do better?

    I think they can. I've worked in the UK's digital agency sector since 2001 and I've been involved with the Drupal community since 2007. The impression I get is that inequality is a problem across the board.

    The Drupal community is at least doing its best to redress imbalances - there are initiatives that support poorly represented communities in STEM subjects through coding clubs, ambassadors and advocacy, for example. But is it enough, and is it working?

    Digital agencies, perhaps because they're less in the public eye, are lagging behind in terms of these initiatives. As we've seen, CEOs, CTOs and founders are largely oblivious to their own white male privilege, and this needs to change.

    So, how should this change come about, and what is your organisation doing to increase diversity?

    I'd love to hear your opinions on this, whether you work in digital or you're a member of the Drupal community. Leave a comment below this piece, or tweet me at @timdeeson

    Background and research

    I couldn’t have written this post without the material I have referenced and for the wider reading that made me realise the extent of the issue. The material they have written has been written for no personal gain by people who have had negative personal experiences of the tech industry. They bear the disproportionate burden of both suffering the consequences of these issues and making significant efforts to improve the situation for others.

    Thank you to Lisa Armstrong, our acting Marketing Director, for her support with the post and for our conversations that prompted me to realise that not everyone has the luxury of my ignorance. Her current experience as a startup founder in the fintech field has not always been positive.

    Also, in order to develop something more likely to be helpful rather than harmful I approached Meri Williams. I took part in a training workshop she gave a few years ago, the depth of her expertise on managing people at work taught me lessons that I use every day. She turned down paid consultancy but generously offered to discuss writing this post with me pro-bono. What’s useful in this post is likely to be there through her leadership and the writing of others that I’ve mentioned. She has another workshop coming up soon.

    And thank you to the team at Deeson for their thoughts and input.

    Categories: Elsewhere

    LevelTen Interactive: Drupal Tutorial: How to Sort Search Results by Content Type

    Planet Drupal - Wed, 21/09/2016 - 07:00

    For a recent website I worked on, the client wanted search results to be grouped by content type, and also wanted to control which content type results were displayed first, second, and third. While you can get most of the way there in terms of sorting search results using Views, if the desired order of the content types doesn't luckily correspond to some kind of alphabetical sorting of the content type's names, you'll need to do a little configuration and custom module work to make this happen. 

    I will walk you through how to do this using a vanilla...Read more

    Categories: Elsewhere

    Drupal core announcements: Core topic discussions at DrupalCon Dublin

    Planet Drupal - Wed, 21/09/2016 - 03:27

    DrupalCon Dublin includes a full track of core conversations where you can learn about current topics in Drupal core development, and a week of sprints where you can participate in shaping Drupal's future.

    In addition to the core conversations, we have a few meetings on specific topics for future core development. These meetings will be very focused, so contact the listed organizer for each if you are interested in participating.

    Time Topic Organizer Monday Sept. 26, 14:00 Views major triage xjm Monday Sept. 26, 15:30 PHPUnit and BrowserTestBase initiative xjm Tuesday Sept. 27, 13:00 Media Initiative slashrsm Tuesday Sept. 27, 14:30 Entity Field API major triage xjm Wednesday Sept. 28, 9:00 Contact Storage initiative tedbow Wednesday Sept. 28, 10:30 Core JavaScript maintenance nod_ Wednesday Sept. 28, 12:00 Data Modeling UIs tedbow Wednesday Sept. 28, 14:00 Ideation in Agile core process gaborhojtsy Wednesday Sept. 28, 16:00 Theme component library lauriii Thursday Sept. 29, 15:30 Default content in core tkoleary Thursday Sept. 29, 15:30 New default core theme lauriii Thursday Sept. 29, 16:40 Workflow Initiative dixon_ Friday Sept. 30, 13:00 API-first and REST Initiative prestonso

    Also be sure to watch Dries' keynote for ideas about Drupal's future!

    Categories: Elsewhere

    Palantir: The Secret Sauce, Ep. 32: Documentation and Training

    Planet Drupal - Tue, 20/09/2016 - 20:55
    The Secret Sauce, Ep. 32: Documentation and Training The Secret Sauce brandt Tue, 09/20/2016 - 13:55 Ryan Price with Allison Manley Sep 20, 2016

    We want to make your project a success.

    Let's Chat.

    There are many benefits to documenting your project and teaching someone else how to use it.

    Senior Engineer Ryan Price dives into the importance of documentation in this week’s episode of the Secret Sauce. 

    iTunes | RSS Feed | Download| Transcript

    Stay connected with the latest news on web strategy, design, and development.

    Sign up for our newsletter. Transcript

    Allison Manley [AM]: Hello and welcome to The Secret Sauce, a short podcast by Palantir.net, that offers a little bit of advice to help your business run better. I’m Allison Manley, an Account Manager, and today we have Senior Engineer Ryan Price talking about the importance of documentation and training.  

    Ryan Price [RP]: My name is Ryan Price, and I want to talk a little bit today about documentation and training. Probably the key person that I think about when I get into the role of writing documentation for a project is future me. Who is the person that will be reading this later, and who is the person that’s going to get the most benefit out of it? Then I sort of go from there, because the more people that get involved with the project — whether it’s someone on the client side, whether they’re technical or non-technical, whether it’s other members of the development team, or maybe my project manager — all of those people are going to read or edit or touch the documentation of a project at some point.

    And on a lot of projects I’ve worked on in the past, I have been in the role of training the new people who are going to be using that project, whether it’s other developers or the content editor who’s working on the client side. And all of those people need to know what this website is supposed to be doing. Beyond just the business goals, there’s lots of nuts and bolts things, and in the land of Drupal we have lots of nuts and bolts things. And for some people those things are totally new, and they have fun new words like ‘nodes’ and ‘taxonomy’ and ‘views.’ And for other people, they know those things, but they haven’t seen this way for placing blocks in this context, whatever that happens to be.

    So I think even a simple project that is just a brochure site would still have documentation that needs to be written for future me. When I come back to this project, I don’t want to spend five hours remembering my motivation behind making a new field for this. It should just be there. What does this field do and why do we have it? You want to get this stuff out of your head. If you get hit by a bus, you don’t want to be the person on the project who made something that was indecipherable and everyone needs to sit around and figure it out.

    And the other thing is, when you explain something, you learn it. There’s doing it and being able to do it yourself, versus having to write it down. For me, translating something out of my head into speaking is when I really understand what it is that I’m doing, or writing it down at the same time. And you can also discover things about the project, too. Like discovering when a requirement is unclear, or when a piece of work is not quite polished. Because you’re getting ready to document it, and you say, it’s supposed to do these nine things and it does eight of them really well.

    So there are lots and lots of benefits to documenting your project and teaching someone else how to use it, and I think probably the key person among those is future me. Thank you for listening!

    AM: Thanks Ryan. That’s the end of this week’s Secret Sauce. For more great tips, please check out our website at Palantir.net. You can also follow us on twitter at @palantir. Have a great day!

    Categories: Elsewhere

    Mediacurrent: 5 Design Ideas to Increase Engagement on Your Website

    Planet Drupal - Tue, 20/09/2016 - 17:55

    No matter what industry you’re in, chances are your website is battling for visitor attention. No less than a fully optimized web presence built to respond to any device is required to get ahead of today’s fierce, strategic competition. Cisco estimates that 50 billion smart devices will be connected to the Internet by 2020 – that’s three times the 15 billion devices that are connected today!

    Categories: Elsewhere

    BlackMesh: Best of New Orleans DrupalCon Core Conversations

    Planet Drupal - Tue, 20/09/2016 - 16:46

    DrupalCon New Orleans had many good Core Conversations. The Core Conversation track sessions are a bit different than regular session. Presenters frame a topic, discussion, or concern. And then, the conversation with the audience continues in the session recordings.

    I was the local track chair and I listened to all of the convos. Here are some choice quotes. Enjoy the highlights from New Orleans, and I'll see you in Dublin!

    Quotes from the sessions Automated javascript testing: where we are and what we actually want by dawehner

    "we should go with Mocha and Karma" @dawehner in Core Convo: Automated javascript testing https://www.youtube.com/watch?v=Uf0cc3Nnm_k&t=33m55s @drupalconNA #drupalcon

    Approaches for UX changes big and small by yoroy

    "We've done multiple usability tests on [#Drupal] core. The results have become predictable” @royscholten https://www.youtube.com/watch?v=Z99gZTEZO_E&t=1m5s #DrupalCon

    MVP should provide value for end users right from the start. @royscholten https://www.youtube.com/watch?v=Z99gZTEZO_E&t=20m05s #DrupalCon

    Is size just a number?: Reflecting on community growth, mentoring, and where we spend our efforts by David Hernandez

    "Focus on the human element" from @davidnarrabilis about #Drupal Community growth https://www.youtube.com/watch?v=uAkBPj4DDIM&t=19m57s #DrupalCon

    Just Right: Goldilocks and CMS theme systems by lauriii and Cottser

    Personas the theme system has to deal, are base for complexity we have @laurii1 https://www.youtube.com/watch?v=F88ryt1CB3A&t=3m24s #DrupalCon

    "Because we can do things :)" @Cottser https://www.youtube.com/watch?v=F88ryt1CB3A&t=27m53s #DrupalCon

    The potential in Drupal 8.x and how to realize it by Gábor Hojtsy and webchick

    "You can make big changes in Drupal 8" @gaborhojtsy https://www.youtube.com/watch?v=ddZ-McBq-Hg&t=3m39s #DrupalCon

    "Things that we want to do to the process to improve" @webchick https://www.youtube.com/watch?v=ddZ-McBq-Hg&t=14m02s #DrupalCon

    About Core MVP process proposal, @dickolsson: "Can we get an MVP of this" https://www.youtube.com/watch?v=ddZ-McBq-Hg&t=50m00s // @webchick @gaborhojtsy #DrupalCon

    The future of Drupal Performance - Parallel worlds by Fabianx

    Ha @drupalconNA "Welcome to our cooking 101 class!" @fabianfranz in The future of Drupal Performance https://www.youtube.com/watch?v=ykrPYAGIYvU&t=0m06s #DrupalCon

    "Avoid doing unnecessary work" @fabianfranz in The future of Drupal Performance https://www.youtube.com/watch?v=ykrPYAGIYvU&t=7m15s #DrupalCon

    Recruiting and retaining dedicated volunteers by stephelhajj

    Professional & funny: Recruiting and retaining dedicated volunteers @stephelhajj https://www.youtube.com/watch?v=7HJy75UXWXw&t=00m24s #DrupalCon

    Prune your garden @stephelhajj https://www.youtube.com/watch?v=7HJy75UXWXw&t=40m38s #DrupalCon

    Together we can make Drupal The Example for Diversity in Tech! by drnikki and techgirlgeek

    Diversity, Equality, Inclusion, Marginalized Group @TechGirlGeek https://www.youtube.com/watch?v=TYNGnPV3HKo&t=04m07s #DrupalCon

    Things that make you a: good developer, no. tech worker. no: human being @drnikki https://www.youtube.com/watch?v=TYNGnPV3HKo&t=19m26s #DrupalCon

    Unbias Me Chrome extension from @fureigh https://twitter.com/fureigh/status/712986115897180160 via @drnikki https://www.youtube.com/watch?v=TYNGnPV3HKo&t=32m45s #DrupalCon

    #DrupalCon audience adds @lexiconvalley E78 http://www.slate.com/articles/podcasts/lexicon_valley/2016/01/american_dialect_society_word_of_the_year_is_the_singular_they.html Diversity resource // @TechGirlGeek @drnikki https://www.youtube.com/watch?v=TYNGnPV3HKo&t=33m40s

    Learning to Let Go (Contrib Burnout) and Module Giveaway by Dave Reid

    "Be human" from @lullabot via @davereid https://www.youtube.com/watch?v=wm09T97gdtk&t=02m05s #DrupalCon

    How to do contrib: compartmentalize, therapy, afk time, todo list via @davereid https://www.youtube.com/watch?v=wm09T97gdtk&t=25m10s #DrupalCon

    Drupal (admin) as an application: More JavaScript in core? by prestonso , danigrrl , and mdrummond

    At #MidCamp "consensus about what features we want in Core for JavaScript" @prestonso @MarcDrummond https://www.youtube.com/watch?v=Sn4jDELDNMY&t=06m25s #DrupalCon

    Workflow Initiative (Drupal is a CMS) by timmillwood and dixon_

    Check the Workflow Initiative Plan for updates https://www.drupal.org/node/2721129 #DrupalCon core convo from @timmillwood @dickolsson https://www.youtube.com/watch?v=_rAB8DJnc8Y

    Leaving Drupal by eatings

    "One cant be a master without an apprentice" @eatings Leaving Drupal #DrupalCon core convo https://www.youtube.com/watch?v=_yUZjTusq7k&t=48m10s

    State of Drupal by Dries, xjm, and Gábor Hojtsy

    To help remove contribution barriers @Dries in State of #Drupal #DrupalCon core convo https://www.youtube.com/watch?v=Ct0IYLgPYos&t=15m00s

    How to find issues that are good for new contributors from @gaborhojtsy at @Dries State of #Drupal #DrupalCon convo https://www.youtube.com/watch?v=Ct0IYLgPYos&t=30m35s

    D.o, github, issue workspaces background via @xjmdrupal @joshua_io at @Dries State of #Drupal #DrupalCon convo https://www.youtube.com/watch?v=Ct0IYLgPYos&t=59m37s Don't say just. It does a great disservice to the complexity of the system @joshua_io at State of #Drupal #DrupalCon https://www.youtube.com/watch?v=Ct0IYLgPYos&t=1h02m45s

    Lessons from WordPress Core by stevector and andrew.taylor

    "We have a twin island [..] right next to us, that has all the same pressures we do.” @stevector https://www.youtube.com/watch?v=JeoCHqzvUFY&t=25m15s #DrupalCon

    DrupalDrupalCon New Orleans
    Categories: Elsewhere

    InternetDevels: Drupal 8 Module: Rules

    Planet Drupal - Tue, 20/09/2016 - 16:39

    Rules are everywhere: at school, at work, in life in general ... and there are some Rules in Drupal 8
    as well!
    Although it’s definitely not what you think it is :)

    Read more
    Categories: Elsewhere

    Zivtech: What are Hooks?

    Planet Drupal - Tue, 20/09/2016 - 15:32
    As a junior developer ramping up to learning Drupal, I spent a lot of time clicking through the UI. After getting familiar with it, I wanted to take a look behind the scenes at Drupal’s codebase. Writing code for a Drupal site can be an overwhelming experience because, even though it’s written in PHP, there’s a dense API behind it. One of the biggest parts of that API is the hook system. The first exposure I had to writing PHP with Drupal was through update hooks. So I wanted to review how hooks work, and how cool they are to use! What is a Hook? Drupal has a lot of excellent Community Documentation, and their page on hooks is thorough. It says:

    “Hooks are how modules can interact with the core code of Drupal. They make it possible for a module to define new urls and pages within the site (hook_menu), to add content to pages (hook_block, hook_footer, etc.), to set up custom database tables (hook_schema), and more.

    Hooks occur at various points in the thread of execution, where Drupal seeks contributions from all the enabled modules. For example, when a user visits a help page on a Drupal site, as Drupal builds the help page it will give each module a chance to contribute documentation about itself. It does this by scanning all the module code for functions that have the name mymodule_help($path, $arg), where "mymodule" is the module's name, e.g., the block module's help hook is called block_help and the node module's help hook is called node_help. The hook may provide parameters; hook_help's parameters $path and $arg allow the developer to determine what page or pages the help messages will appear on.
    A hook can be thought of as an event listener in the sense that an event triggers an action.”

    It’s amazing that Drupal is built on this hook system. There are hooks for anything you can think of! You can even alter a form or a whole page. As Drupal builds each page, it’s scanning the module code for the hooks in core and then runs the ones that you wrote. Alan Storm put it succinctly in one of his blog posts:

    “When a hook is invoked, Drupal will

    1. Get a list of all installed and enabled modules
    2. Ask each module “Have you implemented the do_something hook”?
    3. If so, then Drupal calls the function in those modules that implement the hook

    This way, as a core developer, you can achieve what you want while still letting other programmers “hook into” what you’re doing.”

    Update Hooks The first hook I used was an update hook. The purpose of an update hook is to run code when a database update is triggered. (See the Drupal documentation for function hook_update_N for more information). I’m assuming my reader has worked with Features development (if not, go here).

    My goal was to enable a certain contributed module programmatically when I deployed my code to the site (the Olark module). To do this, I had to find an existing feature in my project that was already enabled. A good rule of thumb is to add your code to an existing feature that is related to the code you’re writing. Since Olark is a chat module, I was looking for a feature related to customers or the homepage. I couldn’t find any feature that fit exactly with the module, so I added my code to feature_general. Within the directory of that feature, I found the feature_general.install file, and added my hook:
    /** * Enables 'olark' module. */ function feature_general_update_7006() { module_enable(array('olark')); }
    After I deploy my code, I trigger a database update. Think back to the three steps that Alan Storm mentioned. Since my feature is already enabled, when the update is triggered, Drupal asks if any update hooks have been invoked. When it sees that there is one in my feature, it knows to read the code in the install file and turn on the Olark module.

    It’s also worth noting the naming convention. I have to put the name of my feature and then _update. The number of the hook also matters (see documentation for specifics on how to number your hooks). The hooks only run once, so each hook has to be one greater than the one before.

    Writing hooks is a great way for a junior developer to be introduced to PHP in Drupal and learn about how Drupal is built. Once you can conceptualize the inner workings of Drupal, it’s much easier to tackle things like module development in the future.
    Categories: Elsewhere


    Subscribe to jfhovinne aggregator - Elsewhere