Web - Post archive

Responsive design for all screens

Published by | Thursday, March 21st, 2013

Is your audience getting the whole picture?

Is your audience getting the whole picture?

Responsive design has long been on the minds of web designers and developers, and over the last couple of years, it has become a focal topic among industry insiders and clients alike. Is the site responsive? Should it be responsive? Is responsive web design a good idea, or are we focusing on it as an exclusive solution to a much broader set of problems? Going to web design conferences these days you hear as many takes on the topic as there are people, and a common theme among them is that responsive design is profoundly confusing and complicated.

But does it have to be?

Automatically back up your Drupal site’s database

Published by | Friday, February 15th, 2013

You do back up your computer, don’t you? It’s an easy process, even if you don’t use a utility like the Apple Time Machine: you simply move a bunch of files from your one place to another.

But if you try that with your Drupal site, you’ll leave out the most important part—your site’s content and configuration. That’s because those parts live in your site’s database, which is stored far away from the site’s files. The solution is to export the database as a file, then save that file along with everything else. Doing that manually can be a pretty awkward procedure, but the Backup and Migrate module makes it easy. Here’s what I do:

  1. Install Backup and Migrate the usual way (shown in the section “Expanding a Site’s Capabilities with Modules” in Drupal 7 Essential Training).
  2. Define where you want Drupal to store private files by clicking Configuration > File  system. Be sure to secure the destination by following the link on that page. If you don’t, your raw database file could become accessible to everybody.
  3. Configure Backup and Migrate to save the database into that directory. (I set up a schedule to save it once a day.) The video Backing up with the Backup and Migrate module in Drupal 7 Advanced Training shows you how.
  4. Save that database file when you save the rest of the Drupal files.

A conservative strategy: Backup and Migrate set to save six months of backups.

 

One last step: Be sure to practice restoring from that backup to make sure it works, as a bad backup is the same as no backup! Note that this is not the same as a straightforward MySQL export: you’ll need to use the Drupal Backup and Migrate module itself to reestablish your site. But while unusual, I’ve found this procedure to be far easier (and more foolproof) than noodling with my site’s Drupal database manually.

Open source—a two-way street

Published by | Monday, February 11th, 2013

Do you have a favorite open-source software you’re using in your professional work? Most open-source software is created by volunteers, organized as a project where the software is created. If you’re making money from the software, strongly consider giving back to the project.

You don’t have to know how to program to contribute. Answer software questions in discussion forums or social media. Make a financial donation to your project. Many projects would like help with issues peripheral to software development, like accounting, legal advice, marketing or SEO expertise, and more. So get involved and give back to the software you love!

Plan for Drupal 8, build for Drupal 7

Published by | Friday, February 8th, 2013

Rumor has it that early computer maker Osborne folded because it promoted its next-generation (but not-yet-released) model over the adequate (but sellable) one. People decided to wait, starving the company of revenue.

But while Drupal 8′s release is mere months away, there’s no reason to wait. Here’s why you should build your site now, in Drupal 7:

  • Drupal 7 will be good for a while. The community officially supports Drupal with security updates for two major releases. Drupal 6 came out in early 2008; Drupal 7 followed in early 2011. If the pattern continues, Drupal 7 won’t be obsolete until 2015 or later.
  • You’ll (probably) be able to upgrade your site to Drupal 8 later, as core Drupal is always upgradeable. The potential problem is in add-on modules and custom code, which sometimes lag. The good news is the biggie: Views is becoming part of Drupal core.
  • The cost for waiting is too great. While you wait for Drupal 8, your site stays locked in your imagination. There’ll always be something “even better” on the horizon.

So don’t fall victim to the Osborne Effect—build your dream Drupal site now!

Manage unplanned expenses in your web projects

Published by | Monday, January 28th, 2013

When working on a website design or redesign project, have you ever encountered small, unanticipated fees in the course of doing business? These might include costs for stock photography, fonts, content management system extensions, domain name(s), static IP addresses … the list goes on!

Rather than paying this cost from your own budget, or hitting the client up with a bunch of little fees (which gets annoying on both sides), consider quoting a separate line item for website design and development fees. I typically budget roughly 10 percent of the total for this. This is for any additional costs for assembling the site. There’s no guarantee you’ll use this at all, but if you need it, the money is there!

Why WordPress?

Published by | Wednesday, January 16th, 2013

Why WordPress?

 

What makes WordPress a good solution? Why is it so popular? Regardless of the question, the answer is the same, and it can be boiled down to three simple words:

Because WordPress works.

Of course, it’s a little more complicated than that. Let me put it into context from the perspective of the three main users of WordPress: the end user, the site owner, and the designer/developer.

 

 

Easy to find, easy to use, easy to share

A poorly kept secret about WordPress is its findability. If someone asked you how to get indexed on Google and you answered “Just set up a WordPress site,” you would not be far from the truth. The way WordPress is built makes it a magnet for search engines and other online indexes. So much so that if you don’t want your WordPress site indexed, you have to take steps to prevent it from happening.

Out of the box, WordPress has great search and share optimization. With the addition of plugins like WordPress SEO, AddThis, and Facebook for WordPress, these built-in capabilities are further enhanced, giving any site the opportunity to become the next big thing on the web. This is provided the content is great, of course. We’ll get to that later.

The purpose of many websites is to put out easily findable, accessible, and shareable information. And WordPress does this in spades. When you are searching for content on the web today, you will likely find it on a WordPress site. If you are reading or viewing content on a WordPress site, you are able to access and interact with that content through comments and RSS feeds. And once you have read the content, you will have an easy time sharing it with your friends on social sharing sites and social media.

 

Easy to publish, easy to configure, easy to maintain

WordPress is a prime example of the virtues of open source. It is built, evolved, and maintained by the people that use it and is therefore in a constant state of forward-moving flux. For site owners this means by simply running a WordPress site and keeping it up to date, they are at any time using the most current web technologies to communicate with the world.

Over the past three years, WordPress has undergone several fundamental design and development changes that have made an already easy-to-use application even easier to use. At the same time it has become more powerful and diverse. From how it is installed to how a site owner can publish content and interact with visitors, WordPress leads the way in removing the barriers that prevent anyone from publishing online. Between WordPress.com and self-hosted WordPress, most people with access to an Internet connection are now able to publish their thoughts, ideas, and creations online with minimal effort. With the challenges of web technologies all but removed, the site owner can focus on what matters: producing and publishing excellent content to share with the world.

 

Easy to build, easy to augment, easy to evolve

For me, the true power of WordPress lies in the back end. Whether you are a complete novice or a seasoned pro, building themes and plugins for WordPress will make your life easier and will enable you to do more in less time. I am walking proof.

With a design in place, building a custom WordPress site from scratch—one that looks and behaves nothing like what is expected of a WordPress site but is still just as easy to use and maintain—takes less time than with any other platform I have tried. When people ask me what WordPress can do I answer, “Whatever you want it to do.” And I stand by that statement. At its core, WordPress is a simple interface between the site owner, the database, and the end user. All the stuff in between (administration, themes, and functionalities) is available for the designer and developer to play with and add to in any way they want. And because WordPress is open source, people can step in and contribute to the WordPress community in whatever capacity they feel fit, from answering questions in the forums and building free themes or plugins to contributing to WordPress Core.

The bottom line

Though it may sound like I see WordPress as the be-all and end-all of web publishing, the reality is I am a pragmatic platform agnostic. The reason I laud WordPress and why I love teaching people about WordPress is because I see it as one of the best available solutions for most websites today. I have and continue to work with other solutions including Drupal and Joomla!, but for most of the websites I encounter, WordPress is one of the best options.

Whether you are just starting to play with the idea of publishing a blog, you want to become a web designer or developer, or if you already know all there is to know about the web and you just want to play with something new, WordPress is a great tool to use. It has both the ease of use and the advanced features to suit pretty much any need. And when that need isn’t met, a theme, a plugin, or an extension is there to fill the void.

Interested in more?

Suggested courses to watch next:

Introduction to JavaScript templating using mustache.js

Published by | Thursday, December 27th, 2012

Recently I built a small website for an event in my area. This type of project required me to manage small amounts of data—information about speakers, bios, titles, and a description of the talks. I wanted to have a speakers page, but I also wanted a rotating promo built as a component I could use on the homepage, and on other pages to highlight the event’s speakers. That meant two different views for the same data.

This was the kind of problem I used to throw a quick SQL database at, but it really wasn’t worth the pain for this project as the amount of data was so minimal.  However, I didn’t want to resort to HTML because I knew the information would change often and be a pain to update. To solve the problem, I used a library called mustache.js. It’s pretty easy to use, and solves the problem with just a few lines of code.

Why mustache.js?

Mustache is a library that allows you to read in JSON formatted data and display it using templates you design with JavaScript. There are lots of similar libraries, such as underscore.js, handlebars.js, and dust.js. So why did I choose mustache?

Converting Photoshop designs to HTML

Published by | Tuesday, December 11th, 2012

For many designers, the process of designing a website ends with a series of mock-ups that represent how the website should look in a browser. While this is a necessary aspect to web design, it is only part of the design process. Translating the web design to HTML and CSS is as much an art form as it is a technical achievement.

It is my belief that web designers should be responsible for getting their design to the browser. Imagine hiring a print designer to sketch out a design, then provide Adobe Photoshop and Illustrator files to a printer, and expecting the pressmen to do the layout in InDesign. This print workflow is unthinkable. Just as a print designer is responsible for getting the design to the plate, a web designer should be responsible for getting the design to the browser.

While I’m not suggesting designers need to code every page of an entire website on their own, translating the design into HTML and CSS ensures the integrity of the design. Once the design works in a browser, web developers can use that HTML and CSS as a starting point as they implement their responsibilities to the project.

Creating the containers
When evaluating your desired layout, one can imagine the structure, or “containers,” that will be needed to replicate the layout in HTML.

Responsive design strategy illustration

Once the HTML structure is in place, CSS is used to assign style and layout to the structure. The combination of HTML and CSS provides the presentation experience of your website. This process is not too far removed from other design methods, and can be mastered by designers in a few months.

Creating your web graphics
The process for cutting up small graphics from your Photoshop, Illustrator, or Fireworks document is referred to as slicing. Many web graphic tools have a slicing tool, or something similar, which allows you to specify a portion of your canvas as a slice.

Slicing a Photoshop document for the web

Once portions of your design are specified inside of slice regions, exporting your main canvas results in individual web-ready graphics being created based on the pixels contained within the slice regions.

Assigning layout and style with CSS
Cascading Style Sheets (CSS) allow us to give dimension, position, and style to HTML elements on our webpage. CSS is unique in that it accounts for the layout of our page, in addition to typographic style. Another great feature of CSS is the ability to assign images to the background of HTML elements. This gives us a unique opportunity to drive imagery in our design with CSS, instead of HTML. Combine this with CSS3 media queries, and we can change our images, as well as layout, based on the user’s screen size. For more on responsive download and design, see the blog post “Responsive download, not just responsive design”.

If you learn best by doing, my Creating a Responsive Web Design course shows you how to take a design mock-up into HTML and CSS. Learn a start-to-finish process for creating a responsive, CSS-based, backward-compatible HTML5 webpage… all in 91 minutes!

Suggested courses to watch next:
• More courses by Chris Converse
CSS: Core Concepts
CSS: Page Layouts