Planet Drupal

Syndicate content - aggregated feeds in category Planet Drupal
Updated: 10 min 17 sec ago

InternetDevels: Web Development Trends 2015

Tue, 09/22/2015 - 17:39
div class=field field--name-field-preview-image field--type-image field--label-hiddendiv class=field__itemsdiv class=field__item evenimg src= width=937 height=624 alt=Web Development Trends 2015 //div/div/divdiv class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpimg src= /Fast changing technologies do not leave a chance to a target=_blank href= development services/a which have lived out their lives. Large images, responsive design, animation and clickable pages – which options still keep popular this year and which will become the issue of nasty taste? Let’s take a look on web development trends 2015./p a href= more/a/div/div/div

Mediacurrent: Intro to Drupal 8 Vocabulary

Tue, 09/22/2015 - 17:24
img typeof=foaf:Image src= width=200 height=152 alt=Intro to Drupal 8 Vocabulary title=Intro to Drupal 8 Vocabulary / pTo the Drupal developers getting started with a href=, there's a whole new set of vocabulary words we need to learn. In this short SlideShare presentation, I cover a few of thea href= key things you need to know about the new terminology/a in Drupal 8 including: /p ulliYAML/li liComposer/li liPSR-0/li liDependency Injection/li liService Containers/li liRoutingbr /

DrupalCon News: 10 Things You Must Not Miss When You Come for DrupalCon Asia 2016

Tue, 09/22/2015 - 17:14
div class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpMumbai, earlier known as Bombay, offers up an interesting mix of history and modernity that cannot be  explained in words. You simply have to experience this city./p pHere are 10 places and things you must not miss visiting when you come for DrupalCon Asia 2016./p/div/div/div

Wim Leers: Caching at the Edge: CDNs for everyone

Tue, 09/22/2015 - 13:15
pDrupal 8 has comprehensive knowledge about the cacheability of the things it renders. This opens new doors. Did you know Drupal 8 will be able to cache emeverything/emnbsp;at thenbsp;edge?/p pFor sites with many mobile users (high latency due to network), global audiences (high latency due to distance) and performance-sensitive sites (e-commerce), Drupal 8 will be a huge leapnbsp;forward./p pWe#8217;ll be showing how easy and powerful it is using the CloudFlare and Fastlynbsp;span class=capsCDN/spans./p h3strongCachenbsp;tags/strong/h3 pInstantaneous purging of all (and emonly/em!) the affected pages when an article is updated. No more manual purging by content editors. No more fiddling with span class=capsURL/spans to purge. It all just works.nbsp;Optimally./p pCache anonymous pages without any effort. On your own reverse proxy, and on many span class=capsCDN/spans — thanks to standardizednbsp;configuration./p pThis sounds nice, but that#8217;s just the anonymous user case. What about authenticatednbsp;users?/p h3strongCachenbsp;contexts/strong/h3 pThe typical example: a shopping site, users categorized in groups according to interests, and a shoppingnbsp;cart./p pAutomatic caching of the entire page, minus the shopping cart, on the edge. Reused across all users in the same group. And, if the span class=capsCDN/span supports it, even the shopping cart can be cached on the edge (and be kept up-to-date thanks to cache tags). Otherwise emonly that/emneeds to talk to the origin (via span class=capsAJAX/span, fornbsp;example)./p pCache authenticated pages without any effort.nbsp; On your own reverse proxy, and on some span class=capsCDN/spans — thanks to standardizednbsp;configuration./p h3strongGoals/strong/h3 ul liThe cachingnbsp;concepts/li liDemos/li liBigPipe, span class=capsESI/span, hybrid renderingnbsp;strategies/li liA peek at the future:nbsp;ServiceWorker/li /ul div class=field field-name-field-slideshare-link field-type-link-field field-label-inline clearfixdiv class=field-labelSlides:nbsp;/divdiv class=field-itemsdiv class=field-item evena href= at the Edge: CDNs for everyone/a/div/div/divdiv class=field field-name-field-conference field-type-text field-label-inline clearfixdiv class=field-labelConference:nbsp;/divdiv class=field-itemsdiv class=field-item evenDrupalCon Barcelona /div/div/divdiv class=field field-name-field-location field-type-text field-label-inline clearfixdiv class=field-labelLocation:nbsp;/divdiv class=field-itemsdiv class=field-item evenBarcelona/div/div/divdiv class=field field-name-field-date field-type-date field-label-inline clearfixdiv class=field-labelDate:nbsp;/divdiv class=field-itemsdiv class=field-item evenspan class=date-display-single property=dc:date datatype=xsd:dateTime content=2015-09-22T17:00:00+02:00Sep 22 2015 - 17:00/span/div/div/divdiv class=field field-name-field-duration field-type-number-integer field-label-inline clearfixdiv class=field-labelDuration:nbsp;/divdiv class=field-itemsdiv class=field-item even60nbsp;minutes/div/div/divdiv class=field field-name-field-extra-info field-type-text-long field-label-inline clearfixdiv class=field-labelExtra information:nbsp;/divdiv class=field-itemsdiv class=field-item evenpSee a href= /div/div/divul class=tags lia href=/tags/drupal typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Drupal/a/li lia href=/tags/performance typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=performance/a/li lia href=/tags/cdn typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=CDN/a/li /ul

OpenLucius: Headless Drupal Node.js | Part 1/3: Drupal 8 RESTful

Tue, 09/22/2015 - 12:07
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenRecently we launched our new corporate website, built with a ‘headless’ Drupal cms as backend and Node.js Express JS deployed at the frontend. The system is ‘decoupled’. Why and how decoupled? Read this blog. In these series of blogs I will explain how we implemented Node.js and Express JS as frontend framework, linked to a Drupal cms via a RESTful API. I am not discussing the design and development of the HTML, CSS and client-side Javascripts, which have already been developed and delivered./div/div/div

Dries Buytaert: Always be shippable

Tue, 09/22/2015 - 10:26
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpDrupal will soon be 15 years old, and 5 of that will be spent on building Drupal 8 -- a third of Drupal's life. We a href= work on Drupal early in 2011/a and targeted December 1, 2012 as a href= original code freeze date/a. Now almost three years later, we still haven't released Drupal 8. While we are close to the release of Drupal 8, I'm sure many many of you are wondering why it took 3 years to stabilize. It is not like we didn't work hard or that we aren't smart people. Quite the contrary, the Drupal community has some of the most dedicated, hardest working and smartest people I know. Many spent evenings and weekends pushing to get Drupal 8 across the finish line. No one individual or group is to blame for the delay -- except maybe me as the project lead for not having learned fast enough from previous release cycles./p h2Trunk-based development/h2 pThe past 15 years we used a href= development/a; we built new features in incremental steps, maintained in a single branch called trunk. We'd receive the feature's first patch, commit it to our main branch, put it behind us, and move on to the next patch. Trunk-based development requires a lot of discipline and as a community we have mostly mastered this style of development. We invested heavily in our testing infrastructure and established a lot of processes. For all patches, we had various people reviewing the work to make sure it was solid. We also had different people figure out and review all the required follow-up work to complete the feature. The next steps are carefully planned and laid out for everyone to see in what we call meta issues. The idea of splitting one large feature into smaller tasks is not a bad idea; it helps to make things manageable for everyone involved./p pGiven all this rigor, how do you explain the delays then? The problem is that once these features and plans meet reality, they fall apart. Some features such as Drupal 8's configuration management system had to be rewritten multiple times based on our experience using it despite passing a rigorous review process. Other features such as our work on URL routing, entity base fields and Twig templating required much more follow-up work compared to what was initially estimated. It turns out that breaking up a large task into smaller ones requires a lot of knowledge and vision. It's often impossible to estimate the total impact of a larger feature on other subsystems, overall performance, etc. In other cases, the people working on the feature lacked time or interest to do the follow-up work, leaving it to others to complete. We should realize is that this is how things work in a complex world and not something we are likely to change./p pThe real problem is the fact that our main branch isn't kept in a shippable state. A lot of patches get committed that require follow-up work, and until that follow-up work is completed, we can't release a new version of Drupal. We can only release as fast as the slowest feature, and this is the key reason why the Drupal 8 release is delayed by years./p php? print image('shippable-trunk-based-development', FALSE); ? div class=figure div class=img style=border: 1px solid #ccc; padding: 4px;display: inline-blockimg src= style=display:block alt=Shippable trunk based development//div pTrunk-based development; all development is done on a single main branch and as a result we can only release as fast as the slowest feature./p /div pWe need a better way of working -- one that conforms to the realities of the world we live in -- and we need to start using it the day Drupal 8.0.0 is released. Instead of ignoring reality and killing ourselves trying to meet unrealistic release goals, we need to change the process./p h2Feature branch workflow/h2 pThe most important thing we have to do is strongkeep our main branch in a shippable state/strong. In an ideal world, each commit or merge into the main branch gives birth to a release candidate — it should be safe to release after each commit. This means we have to stop committing patches that put our main branch in an unshippable state./p pWhile this can be achieved using a trunk-based workflow, a newer and better workflow called a href= branch workflows/a has become popular. The idea is that (1) each new feature is developed in its own branch instead of the main branch and that (2) the main branch only contains shippable code./p pKeeping the main branch shippable at all times enables us to do frequent date-based releases. If a specific feature takes too long, development can continue in the feature branch, and we can release without it. Or when we are uncertain about a feature's robustness or performance, rather than delaying the release, it will simply have to wait until the next release. The maintainers decide to merge in a feature branch based on objective and subjective criteria. Objectively, the test suite must pass, the git history must be clean, etc. Subjectively, the feature must deliver value to the users while maintaining desirable characteristics like consistency (code, API, UX), high performance, etc./p div class=figure div class=img style=border: 1px solid #ccc; padding: 4px;display: inline-blockimg src= style=display:block alt=Shippable feature branching//div pFeature branching; each feature is developed in a dedicated branch. A feature branch is only merged into the main branch when it is quot;shippablequot;. We no longer have to wait for the slowest feature before we can create a new release./p /div pDate-based releases are widely adopted in the Open Source community (a href=, a href=, a href= and are a href= for Open Source projects/a; they reduce the time it takes for a given feature to become available to the public. This encourages contribution and is in line with the release early, release often mantra. We agreed on the benefits and a href= to date-based releases following 8.0.0/a, so this simply aligns the tooling to make it happen./p pFeature branch workflows have challenges. Reviewing a feature branch late in its development cycle can be challenging. There is a lot of change and discussion already incorporated. When a feature does finally integrate into main, a lot of change hits all at once. This can be psychologically uncomfortable. In addition, this can be disruptive to the other feature branches in progress. There is no way to avoid this disruption - someone has to integrate first. Release managers minimize the disruption by prioritizing high priority or low disruption feature branches over others./p pHere is a workflow that could give us the best of both worlds. We create a feature branch for each major feature and strongonly core committers can commit to feature branches/strong. A team working on a feature would work in a sandbox or submit patches like we do today. Instead of committing patches to the main branch, core committers would commit patches to the corresponding feature branch. This ensures that we maintain our code review process with smaller changes that might not be shippable in isolation. Once we believe a feature branch to be in a shippable state, and it has received sufficient testing, we merge the feature branch into the main branch. A merge like this wouldn't require detailed code review./p pFeature branches are also not the silver bullet to all problems we encountered with the Drupal 8 release cycle. We should keep looking for improvements and build them into our workflows to make life easier for ourselves and those we are implementing Drupal for. More on those in future posts./p/div/div/div

Matt Glaman: Using Features Override to manage changes to a distribution

Tue, 09/22/2015 - 06:14
div class=field-body pThe a target=_blank rel=nofollow class=twitter-timeline-link href= module has become a de facto tool in configuration management in Drupal 7. In fact, most Drupal distributions now utilize Features to export configuration and handle updates to the configuration. There is one pitfall - Features was nbsp;meant to be a way to export a feature set. Features takes a set of configurations and its job is to ensure those are in place. That means customizations to defaults are at risk of preventing incoming changes or loss when updating. Thatrsquo;s not good! Yoursquo;re using a Drupal distribution so you save time, but now you have headaches because customizations disappear./ph2What is Features Override, then?/h2pThatrsquo;s where a target=_blank rel=nofollow class=twitter-timeline-link href= Override/a comes in and allows you to revert your feature modules and ensure configuration sticks. The name of the module speaks to its purpose. It allows you to override a feature and export those changes. But, how? Chaos Tools provides its own alter hooks for its object CRUD API. That means Views, Page Manager, Panels, and any item implementing this CRUD can be exported as anbsp;glob of PHP code representing an associative array of objects. Entity API nbsp;has its own CRUD, too; without knowing much of the history Irsquo;d assume Entity APIrsquo;s implementation was modeled after Chaos Tools. nbsp;The biggest difference is the Entity API utilizes JSON for moving items around. Features, itself, provides its own alters for items that donrsquo;t have an import/export definition - such as field bases, field instances, etc. Features Override is a UI for writing alters in your feature module./ph2Letrsquo;s Do This!/h2pWersquo;ll run through customizing a target=_blank rel=nofollow class=twitter-timeline-link href= Kickstart 2/a - the most download distribution which gets pretty customized. As a disclaimer, I am a maintainer of the project.nbsp;If you were to install Commerce Kickstart 2 and navigate to Structure -gt; Features (admin/structure/features) yoursquo;d see something like the following:/pp style=text-align:centerimg height=215 width=480 class=media-element file-default typeof=foaf:Image src= alt= title= //ppldquo;Defaultrdquo; means the Features is in its expected state. If we added a new config export or tweaked something, yoursquo;d receive it on update. Letrsquo;s change thatnbsp;because we want the Blog Post content type to hide the category and tag fields when wersquo;re displaying them as a teaser./pp style=text-align:centerimg height=230 width=480 class=media-element file-default typeof=foaf:Image src= alt= title= //ppIn the above wersquo;ve marked Category and Tags as hidden. In fact, since CK 2.27 there has been an automated test checking this change and Features Override. Thatrsquo;s right - we have automated testing to ensure your changes live on using Features Override (a target=_blank rel=nofollow class=twitter-timeline-link href= target=_blankboom/a.) Letrsquo;s look back at our Features./pp style=text-align:centerimg height=61 width=480 class=media-element file-default typeof=foaf:Image src= alt= title= //ppNow wersquo;re going to create a new Feature called ldquo;CK2 Overridesrdquo; that will contain our specific changes. That will allow us to upgrade Commerce Kickstart 2 and revert its feature modules and keep our own changes. From the Manage Features page, we will select ldquo;Create Feature.rdquo; The next step is to pick your ldquo;Feature Overridesrdquo; component./pp style=text-align:centerimg height=357 width=480 class=media-element file-default typeof=foaf:Image src= alt= title= //ppSo this is where it can get confusing. As you can see there are two component types: ldquo;Feature Overridesrdquo; and ldquo;Feature Overrides (individual mdash; advanced)rdquo; Unless you know what yoursquo;re doing - just pick the former. Featurersquo;s magic will auto-populate what specific individual overrides are required to be exported. Think of it as nitpicking what specific keys in an array export it needs to alter (because thatrsquo;s what it is!) Generate or download your feature and enable it!/pp style=text-align:centerimg height=182 width=480 class=media-element file-default typeof=foaf:Image src= alt= title= //ppAnd now we have nothing overridden!/ph3Tips and Tricks/h3pItrsquo;s not perfect - nothing is. So herersquo;s a few tips and tricks Irsquo;ve learned/pulliNot all overrides are caught, not all overrides want to stick./liliEnabling an overrides feature sometimes needs caches cleared to kick off a new features component rebuild. Manually reverting wonrsquo;t kick over the ldquo;overridden status.quot;/liliAn override feature will show up as overridden if the base feature is overridden - sometimes you just need to revert that one./li/ul /div div class=field-featured-image img typeof=foaf:Image src= width=705 height=316 / /div

OSTraining: How to Find Your Site's .htaccess File in cPanel

Tue, 09/22/2015 - 02:16
div class=ost-intro-imageimg src= alt=How to Find Your Site htaccess File in cPanel width=200 title=gantry 5 //div pWhere is my .htaccess file?/p pThis is a problem that we've helped resolve over and over again at OSTraining./p pThe .htaccess file is absolutely crucial for the correct operation of many sites, whether they're running WordPress, Drupal, Joomla or similar platforms. The .htaccess files controls the URLs for sites and also adds many important security features./p pToday, one more user was having trouble finding their .htaccess file, so we created this tutorial for her./pimg src= height=1 width=1 alt=/ Modern Drupal7 Site Building Tools

Tue, 09/22/2015 - 02:00
Why build a site with Drupal 7 Drupal8 is nearly out making Drupal 7 look like it isn#39;t an appealing choice. However, Drupal 7 is still a contender. The module ecosystem for Drupal 7 is mature and, specifically for site...

Red Crackle: Traits

Mon, 09/21/2015 - 21:51
In this blog post, you'll learn what traits are in the PHP language. You will also learn when to use them and how they can help in code reuse?

Daniel Pocock: Skype outage? reSIProcate to the rescue!

Mon, 09/21/2015 - 19:19
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpOn Friday, the reSIProcate community released the a href= beta of reSIProcate 1.10.0/a. One of the key features of the 1.10.x release series is a href= for presence (buddy/status lists) over SIP/a, the very thing that is currently a href= of action in Skype/a. This is just more proof that free software developers are always anticipating users' needs in advance./p preSIProcate 1.10.x also includes other cool things like support for a href=http://www.postgresql.orgPostgreSQL databases/a and a href= Forward Secrecy/a on TLS./p h3Real free software has real answers/h3 pUnlike Skype, reSIProcate is genuine free software. You are free to run it yourself, on your own domain or corporate network, using the same service levels and support strategies that are important for you. That is real freedom./p h3Not sure where to start?/h3 pIf you have deployed web servers and mail servers but you are not quite sure where to start deploying your own real-time communications system, please check out the a href= Quick Start Guide/a. You can a href= it online/a or a href= the PDF e-book/a./p h3Is your community SIP and XMPP enabled?/h3 pThe Debian community has a federated SIP service, supporting standard SIP and WebRTC at a href= for all Debian Developers. XMPP support was tested at DebConf15 and will be officially announced very soon now./p pA similar service a href= been developed for the Fedora community/a and it is under evaluation at a href= pWould you like to extend this concept to other free software and non-profit communities that you are involved in? If so, please feel free to contact me personally for advice about how you can replicate these successful initiatives. If your community has a Drupal web site, then you can install everything using packages and the a href=http://drucall.orgDruCall/a module./p h3Comment and discuss/h3 pPlease join the a href= mailing list/a to discuss or comment/p /div/div/div Featured Case Studies: SooperThemes Drupal Themes

Mon, 09/21/2015 - 18:01
div class=field field-name-field-mainimage field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg src= width=588 height=306 alt=SooperThemes Drupal Themes Responsive Showcase //div/div/divdiv class=field field-name-field-link field-type-link-field field-label-abovediv class=field-labelCompleted Drupal site or project URL:nbsp;/divdiv class=field-itemsdiv class=field-item evena href= class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpSooperThemes is a theme shop, selling premium Drupal themes. SooperThemes developed their sixth Drupal re-design to go with a completely new product line, based on our Glazed Drag and Drop theme./p pAs the emoldest active Drupal themes shop/em, SooperThemes has been selling designs and contributing code to the community since 2007. We have used Drupal 6 with Ubercart and Drupal 7 with Commerce. For our newest website, we started with a clean slate and browsed the Drupal ecosystem for the most effective and maintainable tools to build the home for our new themes./p pTraditionally, we have always used custom themes for our own website. This time, we built our website entirely with our own product. Our new theme is as much about its strongDrag and Drop site-building/strong tools as it is about design. We could create a unique design by editing the many settings in the Glazed theme. Thereafter, we could design pages with the integrated visual drag and drop page builder. At no point did we miss Photoshop or our favorite code editor. Photography, text, and responsive design combine intuitively in the page builder, and everything is mobile-friendly out of the box./p pimg src=/files/Desktop-Mockup-Creator-v1_2-glazed.jpg alt=Glazed Theme Workstation //p /div/div/divdiv class=field field-name-field-module field-type-node-reference field-label-abovediv class=field-labelKey modules/theme/distribution used:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/project/cmsDrupal CMS Bootstrap 3 Profile/a/divdiv class=field-item odda href=/project/bootstrapBootstrap/a/divdiv class=field-item evena href=/project/modelModel Entities/a/divdiv class=field-item odda href=/project/recurlyRecurly/a/div/div/divdiv class=field field-name-field-developed-org field-type-node-reference field-label-abovediv class=field-labelOrganizations involved:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/node/2303425SooperThemes/a/div/div/divdiv class=field field-name-field-profiles field-type-user-reference field-label-abovediv class=field-labelTeam members:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/u/jurriaanroelofsJurriaanRoelofs/a/div/div/div

Microserve: Responsive Design: Media Queries And How To Make Them More Friendly

Mon, 09/21/2015 - 17:33
img typeof=foaf:Image src=;c=73da98521c5d3c03ed69ae37007ffb92 width=760 height=250 alt=Responsive Design: Media Queries And How To Make Them More Friendly. /h1Responsive Design: Media Queries And How To Make Them More Friendly/h1divSep 21st 2015/divdivp class=lead In building responsive websites, whether Drupal or otherwise, we all need to harness the power of media queries. br / Here is a brief overview of media queries, breakpoints and the basics of the ‘Mobile First’ approach and also some simple tricks for making media queries more friendly, semantic and easier to remember and use with LESS and SASS variables. /p h2 Media queries - The basics/h2 p A CSS Media Query (originally ‘media rule’ in CSS2, renamed ‘media query’ in CSS3) is a CSS statement which targets a specific media type and/or size/size range. Inside a media query statement we can nest a collection of CSS declarations which will style content only when the conditions of that parent media query statement are true./p p So, if a media query targets a media type of ‘screen’ with a min-width of strong320px/strong, it’s nested CSS declarations will only have effect on screens (smartphones/tablets/computers etc) but only if the device has a screen with a display larger than strong320px/strong wide./p h2 span style=line-height: 1.6em;Breakpoints/span/h2 p In responsive design, a ‘breakpoint’ is a declared pixel width at which the layout of a web page or entire site should adjust (respond) to better display its content on the screen size of the device it is being viewed on. Commonly designers and developers set breakpoints at 2 or 3 size ranges to separately target mobile, tablet and larger desktop/laptop computers./p p There’s no actual limit (other than common sense) to the amount of breakpoints you could add, but these 3 are a pretty good rule of thumb and cover most needs./p p The beauty of the system is that it encourages us to target screen size ranges (all screens between ‘these sizes’) and not specific device types, so when a new model of smartphone comes out (for instance), we can be pretty sure the site will appear correctly as the device’s screen will be of a size that falls within an existing range that we are already targeting./p h2 Mobile First? (min vs max)/h2 p First thing to decide is in which direction you want to media queries to work./p p By this I mean whether you want to set strongmax-width/strong or strongmin-width/strong breakpoints. /p p You can of course use a mixture of both, but here we’re all about making things more straightforward, so I would avoid ‘crossing the streams’ and stick to one strategy./p h3 Max Width breakpoints:/h3 p Everything from zero or the last, narrower breakpoint,  up to ‘this width’ .br / Used mostly in ‘Desktop First’ and ‘Retro Fitted Mobile’ builds./p h3 Min Width breakpoints:/h3 p Everything above ‘this width’ to infinity, or until overridden by another, wider / Used mostly in modern ‘Mobile First’ builds./p blockquotep ‘Mobile First’ is widely accepted as the best way to approach responsive design, so I would advise the use of Min Width breakpoints./p /blockquote p span style=line-height: 1.6em;You can find much more in-depth information about Mobile First from the person regarded as its original architect /spana href= style=line-height: 1.6em;Luke Wroblewski/aspan style=line-height: 1.6em;./span/p p In Mobile First theory we start without any breakpoints or media queries (in essence targeting all screen sizes of 1px wide to infinity) and here set all default, site-wide styles as well as any mobile specific styles for (so that we know all screens no matter how small will be covered) and then we create media query breakpoints at which we override the default styles for layout or elements which need to appear differently on larger screens. (As opposed to styling the whole site for desktop and then overriding for smaller screens.) br / This can take a little getting used to and feel a bit ‘backwards’ for developers used to building desktop sites, who may still consider mobile a ‘bolt on’, secondary consideration, but it’s surprising how easy the switch in thinking can be./p h4 Example of a Mobile First media query/h4 pre class=prettyprint body{ background: white; } @media screen and (min-width:768px) { body{ background: black; } }/prep In this example, the body of the document will have a white background on all screens smaller than strong768px/strong - This is it’s default ‘Mobile First’ / Then on all screens larger than strong768px/strong the body will have a black background./p h2 Which and how many breakpoints to choose?/h2 p You could in theory, create a mobile first website without any media queries or breakpoints./p p You could serve the same mobile layout to all screen sizes. But because in most cases mobile layout consists of 100% width single column elements, it would start to become very difficult to use and read on larger screens. So the bare minimum we would usually consider using is one breakpoint to distinguish between mobile and more traditional desktop layouts./p p The size of strong768px/strong used in the example above would work well for this, as our site would show mobile layout on mobiles and many tablets in portrait orientation, then on tablets in landscape orientation, laptops and desktops, another layout could be displayed./p p I use Bootstrap 3 as my main front-end framework and ‘out of the box’ Bootstrap 3 has 3 defined breakpoints:/p p strongsm/strong - strong768px/strong and up /strongmd/strong - strong992px/strong  and up /stronglg/strong - strong1200px/strong  and up to infinity/p p This covers our Mobile First defaults up to strong767px/strong, a tablet aimed size range of strong768px-991px/strong, a traditional desktop width of strong992px-1199px/strong and a more modern, wider desktop width of strong1200px/strong and / *Personally, I usually add a smaller, custom breakpoint of around strong480px/strong, because I find in practice the range of strong0-767px/strong, before the first ‘sm’ breakpoint kicks in can sometimes be a bit wide for every part of my layout. Interestingly, one of the promised updates in the imminent release of Bootstrap 4 is that it will come with a similar ‘extra small’ breakpoint as standard./p blockquotep Media queries can become surprisingly complicated to keep track of. This is where LESS and SASS variables can be a godsend./p /blockquote h2 LESS and SASS Variables - Making media queries more user friendly/h2 p Although not the most complicated coding syntax in the world, media queries can be hard to keep track of, once you’ve got 3 or 4 different sizes to contend with. Having to remember the precise pixel width you are targeting and in which direction can become surprisingly complicated, especially when we start using inline queries (more coming on that later.) This is where LESS and SASS variables can be a godsend./p h3 Here’s a LESS example:/h3 p Ispan style=line-height: 1.6em;n our strongvariables.less/strong (or similar) create a variable called strong‘@tablet’/strong. *Notice we use a tilde (strong~/strong) in front of our value string, so that the quote marks are not included when processed into CSS. - We need to use quotes around our variable value as LESS syntax requires this if a value contains a string of different tokens, but once compiled to CSS, these are not needed./span/p pre class=prettyprint @tablet: ~“screen and (min-width: 768px)”;/prep Now instead of using/p pre class=prettyprint @media screen and (min-width:768px) { body{ background: black; } }/prep We can use the variable to target strong768px/strong and above./p pre class=prettyprint @media @tablet { body{ background: black; } }/prep In SASS, the same principle applies, but our syntax is slightly different. Our variable is denoted by strong‘$’/strong as opposed to strong‘@’/strong and instead of adding a tilde to interpolate our value string and remove the quotes at the point at which our variable is declared, we use #{} around our variable name at the point at which it’s referenced in our code to do the same thing.:/p pre class=prettyprint $tablet: “only screen and (min-width: 768px)”;/prep We can then use:/p pre class=prettyprint @media #{$tablet} { body{ background: black; } }/preh3 ‘Nested media queries’/h3 p So that’s given us a method of creating more memorably named variables to use in place or full hand media queries in our code, but it can still feel a bit disjointed and counter intuitive to set initial global declarations in one point of a file and then keep jumping to another point in a file or to another file altogether to set our media query overrides.  span style=line-height: 1.6em;Also imagine if you only want to override an attribute value which was a few levels down within a LESS or SASS nest. For our media query override to work we would have to include the entire nest up to the point at which the value we want to change appears./span/p p Say we want to change the color of all links on screens above strong768px/strong wide, but only if they are inside paragraphs, which are inside a div with the class of strong‘thisdiv’/strong, which are in turn inside a div with an ID of strong‘container’/strong./p p The original global code might look like this:/p pre class=prettyprint #container{ .thisdiv{ p{ a{ color: red; } } } }/prep Our media query override would need to include this whole list (LESS version shown):/p pre class=prettyprint @media @tablet{ #container{ .thisdiv{ p{ a{ color: blue; } } } } }/prep That’s a heck of a lot of nesting to keep on top of and if we add a new nest level in our original declaration between say strong'#container'/strong and 'strong.thisdiv'/strong, we would also have to update the nesting in our media / Luckily current versions of both LESS and SASS allow for the nesting of media queries so that they can essentially be used inline within existing declarations./p p So with the above example instead of having to re-write the entire nest in a separated part of our file or in a separate file, we can just specify the exact element we want to override from within the original global declaration./p p So instead of having to write:/p pre class=prettyprint #container{ .thisdiv{ p{ a{ color: red; } } } } @media @tablet{ #container{ .thisdiv{ p{ a{ color: blue; } } } } }/prep We can just write:/p pre class=prettyprint #container{ .thisdiv{ p{ a{ color: red; @media @tablet{ color:blue; } } } } }/prep br / *Notice the media query is nested inside the ‘stronga/strong’ attribute itself, after its initial, global value./p h2 Bootstrap 3 specific queries/h2 p In Bootstrap 3 we can go a little further to make sure we fully integrate our media query variables into the framework. Bootstrap depends on a grid system which is based around a collection of pre existing breakpoints./p p Although most users leave these existing breakpoints where they are, if you do need or want to changes these to custom values of your own choice, this can be done by identifying and changing the values of the corresponding variables in variables.less. For this reason it makes sense that our media queries use these existing variables as their values./p p Why? Because if we (or anyone else) updates the value of the grid breakpoint widths, our media query variables will then in turn automatically receive these new values./p p Here is our friendly name Bootstrap LESS variables:/p pre class=prettyprint @mobile-lg: ~screen and (min-width: @{screen-xs-min}); @tablet: ~screen and (min-width: @{screen-sm-min}); @normal: ~screen and (min-width: @{screen-md-min}); @wide: ~screen and (min-width: @{screen-lg-min});/prep I usually place these at the top of variables.less for easy reference./p p So to re-iterate; instead of explicitly stating ‘strong768px/strong’ as the value for min-width in the strong@tablet/strong variable, we instead reference the existing Bootstrap variable ‘strong@{screen-sm-min}/strong’. This means if the integral Bootstrap grid variable is updated, our media query variable and all dependant references will use this new value automatically./p h3 Other Front End Frameworks Are Available!/h3 p There are of course other front-end frameworks available other than Bootstrap such as Foundation by Zurb as well as some Drupal specific responsive grid-based systems like AdaptiveTheme and Omega. I only cover Bootstrap here as an example and also because it is currently the most popular framework around also but not least because it's what I personally use most and know most about. All of the principles up to the Bootstrap specific queries should still be just as relevant, no matter which framework you use or whether you indeed use one at all./p h2 Further reading/h2 p The above is intended as quite a top level, overview of media queries and their application. For more in-depth information on the technologies and concepts used I’d recommend the following further reading:/p p a href= Schools: Media Queries/abr /a href= Wroblewski - Architect Of Mobile First/abr /a href= /a href= /a href= 3/a/p /diva href=/about/martin-whiteimg typeof=foaf:Image src= alt=Martin White#039;s picture title=Martin White#039;s picture //appWritten by: a href= White/a, Drupal Themer/p/pphr /p em style=line-height: 1.6em;Microserve is a a href= Agency/a based in Bristol, UK. We specialise in Drupal Development, Drupal Site Audits and Health Checks, and Drupal Support and Maintenance. Contact us for for further information./em/p /p

Drupalize.Me: Meet Front-end Developer Kris Bulman

Mon, 09/21/2015 - 15:00
div class=field field-name-body field-type-text-with-summary field-label-hidden text-content text-secondarydiv class=field-itemsdiv class=field-item evenpWe interview Kris Bulman about what it means to be a front-end developer and share advice from his experience. Kris has been theming Drupal sites and working on the front-end since 2007. He's done a lot of work in the open source world including being a co-maintainer of Drupal’s Zen theme and building his own Sass grid system./p /div/div/divdiv id=comment-wrapper-nid-2350/div

Wunderkraut blog: How to make DrupalCon even better?

Mon, 09/21/2015 - 11:46
p class=field-ns-blog-post-lead You may have noticed that after three years of being the primary sponsor for DrupalCon Europe we#039;ve chosen to skip the traditional sponsorship this year. Many people have asked why, so here’s the answer. /p div class=field-ns-blog-post-body clearfix div class=field-item even divFor a long time we treated DrupalCon in Europe as a marketing investment. We did this even though it didn't create even nearly enough leads to justify the investment of time and money. In real life it was an HR investment, our staff liked it and it helped in our hiring. And DrupalCon is an awesome event that we are proud to support, could we support it in a better way?/divdiv /divdivThere is a real difference between DrupalCons, and in fact technical conferences in general, between Europe and the US. Customers don't go to technical events in Europe. The participant profile is much more technical in Europe. This makes DrupalCon in Europe a very attractive marketing opportunity for hosting providers, ISVs and other parties who target to developers and Drupal shops, less so for Drupal shops./divdiv /divdivAfter DrupalCon Amsterdam we sat down with the DA in order to come up with a better way to support the event. Traditional sponsorship wasn't working for us and we wanted to help improve the event. Our own staff is a big part of the Drupal community, so naturally we asked them what would make the DrupalCon even better./divdiv /divdivAfter considering quite a few different ideas, and learning a lot on the strange limitations conference venues have in the process, we decided to make contributing to Drupal more comfy. We do this by bringing loads of beanbag chairs to the venue. Naturally we paid the DA for the privilege, and in order to keep our financial support on the same level as before we also decided to be the first company to sign up for the new signature level supporting partnership./divdiv /divdivWe have more ideas in store for the future years and I would also like to hear your take on how to make DrupaCon even better. Is there something we could do to help?/div /div /div

DrupalCon News: Registration is Open! Come on By!

Sun, 09/20/2015 - 15:18
div class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpWe are set up and handing out badges here at the CCIB!  Come on over to door A of the Convention Center, step through the doors and get your DrupalCon kicked off!/p pWhen you arrive to the CCIB, go in this door:/p pimg alt= src= style=width: 300px; height: 300px; //p pAnd grab your badge:/p pimg alt= src= style=height: 300px; width: 300px; //p pThen take a pic with Dries!/p/div/div/div

DrupalCon News: Come Run with Us

Sun, 09/20/2015 - 11:10
div class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpIf you like Drupal and being in shape, Barcelona offers a lot of options for running. There are many routes to follow, each one with its own charms./p pRemember, in Google Maps, the venue of DrupalCon 2015 is next to Auditori Forum./p piframe allowfullscreen= frameborder=0 height=315 src= width=560/iframe/p pIf you are staying in the Hotel Princess or near the CCIB, you can follow these directions:/p/div/div/div

Gábor Hojtsy: Multilingual happenings at DrupalCon Barcelona

Sat, 09/19/2015 - 13:39
div class=field field-name-body field-type-text-with-summary field-label-hidden view-mode-rssdiv class=field-itemsdiv class=field-item evenpIf you are interested in to learn about, solve your problems with and/or contribute to multilingual Drupal, DrupalCon Barcelona is the place to be. Here is a quick summary of things happening so you don't miss what is going on./p/div/div/div

DrupalCon News: The Local Community Invites you to Celebrate DrupalCon!

Sat, 09/19/2015 - 11:00
div class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpIt's here! DrupalCon is in a few days and the local community has been working really hard to bring back the traditional welcome evening from past DrupalCons. On Tuesday 22nd starting at 8pm we will have an amazing time with the best company, the Drupal community!/p pWe want to give the best welcome possible at our reach to all DrupalCon attendees, so no matter if it's your first or your fifteen DrupalCon, come and have fun with us the first evening of the conference!/p/div/div/div

DrupalCon News: Come to Extended Sprints This Weekend!

Sat, 09/19/2015 - 09:23
div class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpWe are excited to welcome you to the Extended Sprints at the Makers of Barcelona co-working space this weekend./p pWe will see you at Carrer de Bailèn, 11. The exterior of the building looks like this:/p pimg alt= src= style=height: 225px; width: 300px; //p pAnd when you come in you pass a small cafe and see this:/p pimg alt= src= style=height: 224px; width: 300px; //p/div/div/div