6 Must-Have Tools in a PHP Developer’s Toolkit

Original Source: http://blog.teamtreehouse.com/6-must-have-tools-in-a-php-developers-toolkit

PHP is a popular back-end programming language that allows you to quickly and effortlessly create simple, dynamic websites. It’s so popular, in fact, that around 80% of all websites now use it! Once you’ve decided to learn PHP and join the awesome community of developers, you may be wondering, what are some essential tools I’ll need? We asked expert PHP teacher, Alena Holligan to share her top picks!

Start learning to code today with your free trial on Treehouse.

Reference PHP.net documentation

The first and most fundamental tool you should have at your disposal as a PHP developer is the PHP.net documentation manual bookmarked in your browser or downloaded to your desktop. This go-to resource will cover everything PHP from installation and configuration to a full list of language references and features. As a developer, don’t expect to be able to remember everything (no one can!), but keeping this manual handy is a great way to look something up quickly.

Access or download the PHP.net manual here.

Be part of the collaborative GitHub community

Octocat via GitHub

GitHub is a collaborative development platform built on top of a distributed version control system called Git. As a PHP developer – and any developers for that matter – GitHub can be the most valuable place for you to share & collaborate with other developers. If you’re new to GitHub, we also recommend checking out the GitHub Basics course on Treehouse to learn how to navigate the GitHub site, explore open source software, and best practices.

Sign up for GitHub here.

Rely on Xdebug to exterminate bugs

Xdebug is a great debugger and profiler tool for PHP. Use it to test your code and assist with debugging and development. Trust us, it’ll save you valuable time and avoid unnecessary frustrations!

Install Xdebug here.

Master management with Composer

php developer's toolkit

Composer is a dependency manager for PHP that allows you to manage both dependencies of PHP software and required libraries in one place, saving you time and effort. Since the software’s initial released in 2012, it has literally changed how PHP is developed and is a popular choice among the PHP community, from beginners to pros.

Download Composer here.

Testing, testing with PHPUnit

If you’re going to write unit tests in PHP, look no further. PHPUnit is a programmer-oriented unit testing framework for PHP and is a favorite tool with our teachers for writing unit tests in PHP. It’s flexible, powerful and easy to use. The great news is that we teach a course on PHP Testing with guest teacher, Chris Hartjes and there’s even a section specifically about using PHPUnit!

Get started with PHPUnit here.

Tap into the power of PHPStorm

php developer's toolkit

PHPStorm is an awesome super tool. It’s a PHP IDE from JetBrains that can also integrate with the other tools we’ve mentioned above. PhpStorm works with frameworks like Drupal, WordPress, Laravel, Magento, CakePHP, and the list goes on… With built-in developer tools, you can also carry out routine tasks right from the IDE. With so many capabilities, the editor is also able to truly understands your code and offers valuable code completion, error prevention, and more to help you code efficiently and productively.

Learn more and buy PHPStorm here to start coding.

BONUS: Join Local User Groups

Another top tip from Alena is to make an effort to connect with local PHP user groups. The PHP community is awesome, welcoming and supportive, and always happy to welcome new members. So how do you find your local group? Easy, just head on over to php.ug to access every PHP-Usergroup worldwide, find your local group and sign up for their next event!

These are only a few of the PHP tools out there, we’d love to hear what you would add to the list in the comments below!

8 Must-Have Tools in a Beginner Developer’s Toolkit

The post 6 Must-Have Tools in a PHP Developer’s Toolkit appeared first on Treehouse Blog.

Animating Border

Original Source: https://css-tricks.com/animating-border/

Transitioning border for a hover state. Simple, right? You might be unpleasantly surprised.

The Challenge

The challenge is simple: building a button with an expanding border on hover.

This article will focus on genuine CSS tricks that would be easy to drop into any project without having to touch the DOM or use JavaScript. The methods covered here will follow these rules

Single element (no helper divs, but psuedo-elements are allowed)
CSS only (no JavaScript)
Works for any size (not restricted to a specific width, height, or aspect ratio)
Supports transparent backgrounds
Smooth and performant transition

I proposed this challenge in the Animation at Work Slack and again on Twitter. Though there was no consensus on the best approach, I did receive some really clever ideas by some phenomenal developers.

Method 1: Animating border

The most straightforward way to animate a border is… well, by animating border.

.border-button {
border: solid 5px #FC5185;
transition: border-width 0.6s linear;
}

.border-button:hover { border-width: 10px; }

See the Pen CSS writing-mode experiment by Shaw (@shshaw) on CodePen.

Nice and simple, but there are some big performance issues.

Since border takes up space in the document’s layout, changing the border-width will trigger layout. Nearby elements will shift around because of the new border size, making browser reposition those elements every frame of the animation unless you set an explicit size on the button.

As if triggering layout wasn’t bad enough, the transition itself feels “stepped”. I’ll show why in the next example.

Method 2: Better border with outline

How can we change the border without triggering layout? By using outline instead! You’re probably most familiar with outline from removing it on :focus styles (though you shouldn’t), but outline is an outer line that doesn’t change an element’s size or position in the layout.

.border-button {
outline: solid 5px #FC5185;
transition: outline 0.6s linear;
margin: 0.5em; /* Increased margin since the outline expands outside the element */
}

.border-button:hover { outline-width: 10px; }

A quick check in Dev Tools’ Performance tab shows the outline transition does not trigger layout. Regardless, the movement still seems stepped because browsers are rounding the border-width and outline-width values so you don’t get sub-pixel rendering between 5 and 6 or smooth transitions from 5.4 to 5.5.

Strangely, Safari often doesn’t render the outline transition and occasionally leaves crazy artifacts.

border artifact in safari
Method 3: Cut it with clip-path

First implemented by Steve Gardner, this method uses clip-path with calc to trim the border down so on hover we can transition to reveal the full border.

.border-button {
/* Full width border and a clip-path visually cutting it down to the starting size */
border: solid 10px #FC5185;
clip-path: polygon(
calc(0% + 5px) calc(0% + 5px), /* top left */
calc(100% – 5px) calc(0% + 5px), /* top right */
calc(100% – 5px) calc(100% – 5px), /* bottom right */
calc(0% + 5px) calc(100% – 5px) /* bottom left */
);
transition: clip-path 0.6s linear;
}

.border-button:hover {
/* Clip-path spanning the entire box so it’s no longer hiding the full-width border. */
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

clip-path technique is the smoothest and most performant method so far, but does come with a few caveats. Rounding errors may cause a little unevenness, depending on the exact size. The border also has to be full size from the start, which may make exact positioning tricky.

Unfortunately there’s no IE/Edge support yet, though it seems to be in development. You can and should encourage Microsoft’s team to implement those features by voting for masks/clip-path to be added.

Method 4: linear-gradient background

We can simulate a border using a clever combination of multiple linear-gradient backgrounds properly sized. In total we have four separate gradients, one for each side. The background-position and background-size properties get each gradient in the right spot and the right size, which can then be transitioned to make the border expand.

.border-button {
background-repeat: no-repeat;

/* background-size values will repeat so we only need to declare them once */
background-size:
calc(100% – 10px) 5px, /* top & bottom */
5px calc(100% – 10px); /* right & left */

background-position:
5px 5px, /* top */
calc(100% – 5px) 5px, /* right */
5px calc(100% – 5px), /* bottom */
5px 5px; /* left */

/* Since we’re sizing and positioning with the above properties, we only need to set up a simple solid-color gradients for each side */
background-image:
linear-gradient(0deg, #FC5185, #FC5185),
linear-gradient(0deg, #FC5185, #FC5185),
linear-gradient(0deg, #FC5185, #FC5185),
linear-gradient(0deg, #FC5185, #FC5185);

transition: all 0.6s linear;
transition-property: background-size, background-position;
}

.border-button:hover {
background-position: 0 0, 100% 0, 0 100%, 0 0;
background-size: 100% 10px, 10px 100%, 100% 10px, 10px 100%;
}

This method is quite difficult to set up and has quite a few cross-browser differences. Firefox and Safari animate the faux-border smoothly, exactly the effect we’re looking for. Chrome’s animation is jerky and even more stepped than the outline and border transitions. IE and Edge refuse to animate the background at all, but they do give the proper border expansion effect.

Method 5: Fake it with box-shadow

Hidden within box-shadow’s spec is a fourth value for spread-radius. Set all the other length values to 0px and use the spread-radius to build your border alternative that, like outline, won’t affect layout.

.border-button {
box-shadow: 0px 0px 0px 5px #FC5185;
transition: box-shadow 0.6s linear;
margin: 0.5em; /* Increased margin since the box-shado expands outside the element, like outline */
}

.border-button:hover { box-shadow: 0px 0px 0px 10px #FC5185; }

The transition with box-shadow is adequately performant and feels much smoother, except in Safari where it’s snapping to whole-values during the transition like border and outline.

Pseudo-Elements

Several of these techniques can be modified to use a pseudo-element instead, but pseudo-elements ended up causing some additional performance issues in my tests.

For the box-shadow method, the transition occasionally triggered paint in a much larger area than necessary. Reinier Kaper pointed out that a pseudo-element can help isolate the paint to a more specific area. As I ran further tests, box-shadow was no longer causing paint in large areas of the document and the complication of the pseudo-element ended up being less performant. The change in paint and performance may have been due to a Chrome update, so feel free to test for yourself.

I also could not find a way to utilize pseudo-elements in a way that would allow for transform based animation.

Why not transform: scale?

You may be firing up Twitter to helpfully suggest using transform: scale for this. Since transform and opacity are the best style properties to animate for performance, why not use a pseudo-element and have the border scale up & down?

.border-button {
position: relative;
margin: 0.5em;
border: solid 5px transparent;
background: #3E4377;
}

.border-button:after {
content: ”;
display: block;
position: absolute;
top: 0; right: 0; bottom: 0; left: 0;
border: solid 10px #FC5185;
margin: -15px;
z-index: -1;
transition: transform 0.6s linear;
transform: scale(0.97, 0.93);
}

.border-button:hover::after { transform: scale(1,1); }

There are a few issues:

The border will show through a transparent button. I forced a background on the button to show how the border is hiding behind the button. If your design calls for buttons with a full background, then this could work.
You can’t scale the border to specific sizes. Since the button’s dimensions vary with the text, there’s no way to animate the border from exactly 5px to 10px using only CSS. In this example I’ve done some magic-numbers on the scale to get it to appear right, but that won’t be universal.
The border animates unevenly because the button’s aspect ratio isn’t 1:1. This usually means the left/right will appear larger than the top/bottom until the animation completes. This may not be an issue depending on how fast your transition is, the button’s aspect ratio, and how big your border is.

If your button has set dimensions, Cher pointed out a clever way to calculate the exact scales needed, though it may be subject to some rounding errors.

Beyond CSS

If we loosen our rules a bit, there are many interesting ways you can animate borders. Codrops consistently does outstanding work in this area, usually utilizing SVGs and JavaScript. The end results are very satisfying, though they can be a bit complex to implement. Here are a few worth checking out:

Creative Buttons
Button Styles Inspiration
Animated Checkboxes
Distorted Button Effects
Progress Button Styles

Conclusion

There’s more to borders than simply border, but if you want to animate a border you may have some trouble. The methods covered here will help, though none of them are a perfect solution. Which you choose will depend on your project’s requirements, so I’ve laid out a comparison table to help you decide.

My recommendation would be to use box-shadow, which has the best overall balance of ease-of-implementation, animation effect, performance and browser support.

Do you have another way of creating an animated border? Perhaps a clever way to utilize transforms for moving a border? Comment below or reach me on Twitter to share your solution to the challenge.

Special thanks to Martin Pitt, Steve Gardner, Cher, Reinier Kaper, Joseph Rex, David Khourshid, and the Animation at Work community.

Animating Border is a post from CSS-Tricks

Logo Wave Awards International: Open for Entries

Original Source: http://justcreative.com/2017/10/10/logo-wave-awards-international/

Want more logo design & branding gigs?

Need to attract more qualified design clients so you can land those $2k, $5k, $20k logo identity and branding projects?

If you’re anything like me, I’m always finding ways to up my value to potential clients.

But to add value, you need to establish credibility and trust.

And the way to do this, is by gaining recognition.

So if you want to add “Award-Winning” to your title and win more design projects, I’ve got the answer…

» Logo Wave Awards International

Did I mention you can win $1000 + a crystal trophy?

Awards Reinvented

How does Logo Wave work?

With Logo Wave, you simply upload your best logos into the latest “wave” consisting of 25-50 other designers. Then the judges pick the winners!

I’m part of the judges panel, along with David Airey, Bill Gardner (LogoLounge), Kyle Courtright, Nadir Balcikli and Ian Paget.

LogoWave Judges

What do you win?

The 1st place winner from each wave receives $1,000.00 cash, a crystal engraved trophy, official certificate, digital badge set and recognition on the site & social media. The top 5 winners will receive all of the above, minus the $1k and trophy.

Crystal Award

Enter Logo Wave Awards Today

Entries are just $49 (one of the cheapest in the industry), but unlike traditional design awards sites, there aren’t specific entry dates. Once they hit that 50 designer (max) threshold, then a new wave begins right away–just like waves in the ocean, it’s continuous in nature.

» Enter your logos today before this wave washes to shore!

Good luck!

Successful Strategy for Integrating Web and Print Design

Original Source: http://feedproxy.google.com/~r/visualswirl/~3/uEv0ykGnIeE/

Today’s marketplace demands that designers be versatile enough to create an integrated print and web media campaign. This is easier said than done, however, as the differences between designing for these two media are extensive, however, and each presents its own challenges and opportunities.

Designers that are able to successfully navigate these differences and create a unified marketing strategy are highly valued. Here are some tips for how to overcome the disparities and integrate your print and web designs:

Challenges of Bringing the Two Media Together

Though they share some basic principles, designing for print media and designing for the web are two entirely different tasks. Knowing the standards for each will allow your work to be easily translated from one into the other.

In print media, designers usually have more exact control over the appearance of the final product. When creating custom business cards, for example, the designer need only worry about the finished product appearing in one size. The same is not true for web design, however. There are several standard monitor sizes, not to mention mobile devices, and designers must create fluid layouts that will work for all of these displays (and possibly more).

In addition, the design of the will always be viewed as “complete”—no scrolling or sliding is necessary to take in the entire concept. Contrast this with web media, where “big” designs require careful planning and modification to bring off.

For itself, web design offers some benefits that print media cannot match. Web designers have the freedom to take advantage of some incredible techniques that are hard to replicate via digital printing: gradients, small details, and movement in design, for example.

One thing that both print and web designers have in common is color selection—digital printing can often render colors differently than the designer had envisioned, while web designers must be cautious about how different monitors and displays will produce colors.

Successful Integration

The differences between the two media, then, are challenging, but not impossible, to overcome. No matter which medium you begin working in, you must keep the challenges of the other in mind in order to bring them together. Print designers must work within the restrictions of file and image size for digital media, for example, while web designers must keep in mind that subtle details that are easy to bring off on the web may be lost to the printer.

This is important primarily because of branding and brand recognition—your clients’ audience must be able to connect successfully with the colors and images used in both media and recognize them as coming from the same organization. It’s important, then to keep your clients’ specific strategies in mind as you create your designs.

More Tips for Integration

Apart from creating a design that works in both media, there are some other things to keep in mind as you create both that can help create a better unification between the two media. As you work with marketers and designers on both sides of the design aisle, make sure to use cross-promotions and teasers that promise to “enhance” the users’ experience. The website should offer more to the users’ print experience and vice versa.

You should also be sure to mention the other medium with the other—include URLs in offline ads and flyers, for example, or use the website to promote a special direct mailer.

With a solid understanding of the tips and techniques involved in both types of design, you will be able to create designs that are sending the same message no matter the medium.

What are your tips for integrating web and print media? What successes have you had in unifying the two?

Images by ollily and Sergiu Bacioiu 

The post Successful Strategy for Integrating Web and Print Design appeared first on Visual Swirl Design Resources.

A Big List of Typography Books

Original Source: http://mediatemple.net/blog/tips/big-list-typography-books/

For your holiday gift shopping needs! These my picks for some of the most popular books out there on typography, with a tilt toward web typography. Plus a couple of bonus picks by our own Robin Rendle.

Direct Link to Article — Permalink

A Big List of Typography Books is a post from CSS-Tricks

Common WordPress Errors & How to Fix Them

Original Source: http://webdesignerwall.com/tutorials/common-wordpress-errors-fix

WordPress is an amazingly stable platform thanks to the dedication and talent of the hundreds of professionals contributing to it, and the strict code standards they follow. Even so, the huge variety of themes, plugins and server environments out there make it difficult to guarantee nothing will ever go wrong. This guide will help you […]

The post Common WordPress Errors & How to Fix Them appeared first on Web Designer Wall – Design Trends and Tutorials.

The Three Developers and the Insightful User Tester

Original Source: https://www.24a11y.com/2017/three-developers-and-the-insightful-user-tester/

A story by Scott O’Hara:

The first of the developers, why he thought he knew best.
“I’ll get this done ever so quick!” he said, puffing out his chest.

“While the others review wikis, knowledge bases, and specifications,
I’ll lean on my deep knowledge of CSS to circumvent such onerous proclamations.

Specificity will be lax, and BEM classes will be king!
Everyone will marvel at the CSS of this thing.

Direct Link to Article — Permalink

The Three Developers and the Insightful User Tester is a post from CSS-Tricks

How to Win at Email Design

Original Source: http://justcreative.com/2017/12/04/how-to-win-at-email-design/

Below is an interview with Mike Smith, the art director for Aweber (the email marketing service I use for JUST Creative) and he has answered a few common questions on email design.

On a side note, if you’ve designed a great email newsletter, enter it into EmailMonks’ free newsletter competition and win your share of $10k in prizes.

1. How can using a consistent template build brand trust?

Templates are beneficial for many reasons, but specific to your customers, a consistent template design helps to establish expectations. A consistent template makes the cognitive load on subscribers lighter because they see a recognizable structure and aesthetic. This minor mental trigger builds a subconscious trust with readers which goes a long way to making your brand stronger.

2. What are the best colors and placements for CTAs in emails?

The best way to know how subscribers will respond is through testing, but here are some tips we’ve learned with our own testing. If you can place a link or button just under a header image or headline we’ve seen marked increases in the click through.

When it comes to color, matching your brand is important but so is contrast. The higher the contrast between a button and the background it sits on the more actionable it will appear.

3. How much do I really need to change on the template to make it unique?

Aweber Email Template

The templates in your email provider have been designed to make your life easier. If you only change the colors and logo that is sufficient enough to make a well designed email. No need to go crazy with changing all the elements just to “make it your own”.

The templates are also created to be flexible so adding additional images and content should be easy to make work within the constraints the email designer created for that specific template.

4. Should my template match my website?

Aweber Website vs Email

It’s a big challenge to match an email and web experience 1 to 1. The use cases for each are quite different so there isn’t a point in beating yourself up to make it perfectly match. The important elements of your site–fonts, colors, logos, image styles– are enough to make the two coexist.

Think about your email in the way that old school correspondence kits were designed. Your business card and letterhead don’t look identical, because they have different purposes. But they did obviously live as part of the same brand. That is the same logic that applies to a website and email template, similar but designed with the medium’s intent in mind.

5. Should design or content come first when thinking about creating an email newsletter?

A flexible email template design should allow for all types of content.

6. What are fun and unique ways to make your email stand out from other brands?

Let your personality shine! This doesn’t have to be through witty copy or flashy GIFs but it could be. Whatever you do make it true to you. Every person and brand are a unique mix of their history, their convictions, and their personality. Allow that to come through in your design decision making, don’t focus on “being different”.

7. What’s the number one mistake you see marketers make in email designs?

Don't be fancy

Trying to be fancy. Clip art images, crazy fonts or font colors, or whacky layouts aren’t necessary. Drive home the value every time you send an email and subscribers will want to hear from you. Don’t put a bunch of silly distractions in the way of getting to the value!

Win at Email Design: Video Series

Mike Smith has been working on a series of videos about email design. Below is the first video which teaches you how to design an awesome welcome email, focusing on the principles of brand aesthetics, setting expectations and showing humanity.

Enjoy!

A Front End Developer’s Guide to GraphQL

Original Source: https://css-tricks.com/front-end-developers-guide-graphql/

No matter how large or small your application is, you’ll have to deal with fetching data from a remote server at some point. On the front end, this usually involves hitting a REST endpoint, transforming the response, caching it, and updating your UI. For years, REST has been the status quo for APIs, but over the past year, a new API technology called GraphQL has exploded in popularity due to its excellent developer experience and declarative approach to data fetching.

In this post, we’ll walk through a couple of hands-on examples to show you how integrating GraphQL into your application will solve many pain points working with remote data. If you’re new to GraphQL, don’t panic! I’ll also highlight some resources to help you learn GraphQL using the Apollo stack, so you can start off 2018 ahead of the curve.

GraphQL 101

Before we dive into how GraphQL makes your life as a front end developer easier, we should first clarify what it is. When we talk about GraphQL, we’re either referring to the language itself or its rich ecosystem of tools. At its core, GraphQL is a typed query language developed by Facebook that allows you to describe your data requirements in a declarative way. The shape of your result matches the shape of your query: in the example below, we can expect to receive back an object with a currency property and a rates property containing an array of objects with both currency and rate keys.

{
rates(currency: “USD”) {
currency
rates {
currency
rate
}
}
}

When we talk about GraphQL in a broader sense, we’re often referring to the ecosystem of tools that help you implement GraphQL in your application. On the backend, you’ll use Apollo Server to create a GraphQL server, which is a single endpoint that parses a GraphQL request and returns data. How does the server know which data to return? You’ll use GraphQL Tools to build a schema (like a blueprint for your data) and a resolver map (just a series of functions that retrieve your data from a REST endpoint, database, or wherever else you choose).

This all sounds more complicated than it actually is — with Apollo Launchpad, a GraphQL server playground, you can create a working GraphQL server in your browser in less than 60 lines of code! 😮 We’ll reference this Launchpad I created that wraps the Coinbase API throughout this post.

You’ll connect your GraphQL server to your application with Apollo Client, a fast and flexible client that fetches, caches, and updates your data for you. Since Apollo Client isn’t coupled to your view layer, you can use it with React, Angular, Vue, or plain JavaScript. Not only is Apollo cross-framework, it’s also cross-platform, with React Native & Ionic supported out of the box.

Let’s give it a try! 🚀

Now that you’re well-versed in what GraphQL is, let’s get our hands dirty with a couple of practical examples that illustrate what it’s like to develop your front end with Apollo. By the end, I think you’ll be convinced that a GraphQL-based architecture with Apollo can help you ship features faster than before.

1. Add new data requirements without adding a new endpoint

We’ve all been here before: You spend hours building a perfect UI component when suddenly, product requirements change. You quickly realize that the data you need to fulfill these new requirements would either require a complicated waterfall of API requests or worse, a new REST endpoint. Now blocked on your work, you ask the backend team to build you a new endpoint just to satisfy the data needs for one component.

This common frustration no longer exists with GraphQL because the data you consume on the client is no longer coupled to an endpoint’s resource. Instead, you always hit the same endpoint for your GraphQL server. Your server specifies all of the resources it has available via your schema and lets your query determine the shape of the result. Let’s illustrate these concepts using our Launchpad from before:

In our schema, look at lines 22–26 where we define our ExchangeRate type. These fields list out all the available resources we can query in our application.

type ExchangeRate {
currency: String
rate: String
name: String
}

With REST, you’re limited to the data your resource provides. If your /exchange-rates endpoint doesn’t include name, then you’ll need to either hit a different endpoint like /currency for the data or create it if it doesn’t exist.

With GraphQL, we know that name is already available to us by inspecting our schema, so we can query for it in our application. Try running this example in Launchpad by adding the name field on the right side panel!

{
rates(currency: “USD”) {
currency
rates {
currency
rate
name
}
}
}

Now, remove the name field and run the same query. See how the shape of our result changes?

the data changes as you describe your query differently

Your GraphQL server always gives you back exactly the data you ask for. Nothing more. This differs significantly from REST, where you often have to filter and transform the data you get back from the server into the shape your UI components need. Not only does this save you time, it also results in smaller network payloads and CPU savings from loading and parsing the response.

2. Reduce your state management boilerplate

Fetching data almost always involves updating your application’s state. Typically, you’ll write code to track at least three actions: one for when the data is loading, one if the data successfully arrives, and one if the data errors out. Once the data arrives, you have to transform it into the shape your UI components expect, normalize it, cache it, and update your UI. This process can be repetitive, requiring countless lines of boilerplate to execute one request.

Let’s see how Apollo Client eliminates this tiresome process altogether by looking at an example React app in CodeSandbox. Navigate to `list.js` and scroll to the bottom.

export default graphql(ExchangeRateQuery, {
props: ({ data }) => {
if (data.loading) {
return { loading: data.loading };
}
if (data.error) {
return { error: data.error };
}
return {
loading: false,
rates: data.rates.rates
};
}
})(ExchangeRateList);

In this example, React Apollo, Apollo Client’s React integration, is binding our exchange rate query to our ExchangeRateList component. Once Apollo Client executes that query, it tracks loading and error state automatically and adds it to the data prop. When Apollo Client receives the result, it will update the data prop with the result of the query, which will update your UI with the rates it needs to render.

Under the hood, Apollo Client normalizes and caches your data for you. Try clicking some of the currencies in the panel on the right to watch the data refresh. Now, select a currency a second time. Notice how the data appears instantaneously? That’s the Apollo cache at work! You get all of this for free just by setting up Apollo Client with no additional configuration. 😍 To see the code where we initialize Apollo Client, check out `index.js`.

3. Debug quickly & painlessly with Apollo DevTools & GraphiQL

It looks like Apollo Client does a lot for you! How do we peek inside to understand what’s going on? With features like store inspection and full visibility into your queries & mutations, Apollo DevTools not only answers that question, but also makes debugging painless and, dare I say it, fun! 🎉 It’s available as an extension for both Chrome and Firefox, with React Native coming soon.

If you want to follow along, install Apollo DevTools for your preferred browser and navigate to our CodeSandbox from the previous example. You’ll need to run the example locally by clicking Download in the top nav bar, unzipping the file, running npm install, and finally npm start. Once you open up your browser’s dev tools panel, you should see a tab that says Apollo.

First, let’s check out our store inspector. This tab mirrors what’s currently in your Apollo Client cache, making it easy to confirm your data is stored on the client properly.

store inspector

Apollo DevTools also enables you to test your queries & mutations in GraphiQL, an interactive query editor and documentation explorer. In fact, you already used GraphiQL in the first example where we experimented with adding fields to our query. To recap, GraphiQL features auto-complete as you type your query into the editor and automatically generated documentation based on GraphQL’s type system. It’s extremely useful for exploring your schema, with zero maintenance burden for developers.

Apollo Devtools

Try executing queries with GraphiQL in the right side panel of our Launchpad. To show the documentation explorer, you can hover over fields in the query editor and click on the tooltip. If your query runs successfully in GraphiQL, you can be 100% positive that the same query will run successfully in your application.

Level up your GraphQL skills

If you made it to this point, awesome job! 👏 I hope you enjoyed the exercises and got a taste of what it would be like to work with GraphQL on the front end.

Hungry for more? 🌮 Make it your 2018 New Year’s resolution to learn more about GraphQL, as I expect its popularity to grow even more in the upcoming year. Here’s an example app to get you started featuring the concepts we learned today:

React: https://codesandbox.io/s/jvlrl98xw3
Angular (Ionic): https://github.com/aaronksaunders/ionicLaunchpadApp
Vue: https://codesandbox.io/s/3vm8vq6kwq

Go forth and GraphQL (and be sure to tag us on Twitter @apollographql along the way)! 🚀

A Front End Developer’s Guide to GraphQL is a post from CSS-Tricks

20 Famous Animated Logos for Your Inspiration

Original Source: http://justcreative.com/2017/10/15/20-famous-animated-logos-for-your-inspiration/

This article was contributed by Anil Parmar.

Looking for logo animation ideas? You’ve come to the right place.

Animated logos have the power to draw attention and communicate messages in ways that a static logo can not. Get inspired by these 20 famous animated logo designs.

Amazon

Amazon Logo Animation

The Amazon logo not only delivers a smile but it also depicts that they sell everything from A to Z.

Takeaway

Define the services you provide in the logo itself.

Mozilla Firefox

Firefox Logo Animation

The well-known browser shows a fiery fox encircling the earth conveying its global reach around the entire world. The fox represents the blazing speed of the browser.

Takeaway

Convey your brand’s values within the logo. eg. speed

Google

Google Logo Animation

This name needs no introduction. The animation demonstrates the Google Speak Now functionality in the brand’s colors.

Takeaway

Use color and motion to convey your brand in its simplest form.

Intel

Intel Logo Animation

Intel is the world’s best commercial microprocessor chip making company. The logo conveys this, showing that it makes processors for tablets, computers and mobile phones.

Takeaway

Make your animation show your unique selling point, such as Intel’s chips.

Burger-King

Burger King Logo Animation

The Burger King logo is animated in piece by piece, in a 3D manner.

Takeaway

Consider giving dimension to your logo animation.

FedEx

FedEx Logo Animation

A well known courier delivery service uses the arrow for demonstrating its service.

Takeaway

Use your logo’s key feature / negative space to convey motion.

Hype Film

Hype Logo Animation

Hype film is a production company and camera film revolves around a loudspeaker to spell HYPE.

Takeaway

Don’t be afraid to add new elements to the logo animation sequence such as how HYPE uses film to build their loudspeaker.

Pixate

Pixate Logo Animation 

Pixate runs mobile app prototypes and the black background with four colorful leaves shows the creative side of the app.

Takeaway

Speed is crucial in animation, making for a smooth animation.

Nat Geo

National Geographic Logo Animation

The National Geographic’s famous yellow border is broken up and brought in piece by piece.

Takeaway

Don’t be afraid to split your logo into separate pieces for the animation.

Mail Chimp Snap

Mailchimp Snap Logo Animation

Send simple email newsletters from your mobile. (now discontinued)

Takeaway

Build your logo up, with dimension.

Fanta

Fanta Animated Logo

The bubbly fun nature of the type and orange circle shape is brought to life with animation.

Takeaway

Use your logo’s key attritbutes for the animation such as the type and orange circle in this case.

Uber

Uber Animated Logo

Building on the line ways points of a map, it creates a nice sequence to reveal the logo.

Takeaway

Use elements from your app or brand for the animation.

LinkedIn

LinkedIn

The professional network connects business people all over the world, which is conveyed by the bouncy man and case.

Takeaway

Business can also be fun!

Instagram

Instagram Animated Logo

The photo sharing app owned by Facebook combines the traditional camera and polaroid to form their text based logo.

Takeaway

Illustrate your brand’s key features and then the logo itself.

Vimeo

Vimeo Animated Logo

Vimeo’s video sharing platform uses video buttons such as play, pause to illustrate their service.

Takeaway

Make the logo functional and leave subtle hints to the brand.

Master Card

Mastercard Animated Logo

Mastercard illustrate’s its multifaceted uses such as experiences, travel and food. Priceless.

Takeaway

Show how diverse your product is by illustrating various elements.

Dell

Dell Animated Logo

Dell’s high-performance laptops  and PCS are illustrated by 4 icons coming together. The ultimate collaboration of security, handling documents, analytics and cloud storage.

Takeaway

Depict the most effective characteristics of the product you supply to your customers.

Spotify

Spotify Animated Logo

Get instant access to millions of songs with Spotify.

Takeaway

Pick the logical part from the service/product and give it motion.

Pinterest

Pinterest Animated Logo

The logo in the animation shows a pin / P followed by written text ‘Pinterest’, a platform to discover information globally, by images.

Takeaway

A single symbol can show the entire motive of the brand and its identity.

Flickr

Flickr is one of the most significant platforms for sharing videos and photos. The logo conveys a world of creativity and inspiration.

Takeaway

A simple idea is often the most effective. Two dots can evolve into something so large!

Nike

Nike Animated Logo

The Nike Swoosh animated with bright vivid paint, highlighting the active nature of the swoosh.

Takeaway

If your logo already has motion, use it to its advantage.

Do you have any other favorite famous animated logos? Let us know!

Anil Parmar is the co-founder of Glorywebs that aims to help clients with professional web design services, app design & development, digital marketing and more. Find him on Twitter @abparmar99.