Tuesday, May 2, 2017

The Meaning and Purpose of Responsive Web Design

Just as developers and designers got used to building websites for phones, along came tablets, watches, TVs, cars, glasses, larger desktop screens, high-resolution screens, and even web browsers built into walls. (Okay, I made that last one up.) Supporting this seemingly endless stream of new devices is becoming ever more challenging.

So how do we support this ever-increasing array of devices? The answer is responsive web design, which harnesses technologies that allow websites to adapt to screens of all sizes.

Continue reading %The Meaning and Purpose of Responsive Web Design%


by Chris Ward via SitePoint

Location-Based Marketing Will Rely on Mobile in 2017

More than 74 percent of adults own a smartphone. What's more, most of these adults won't leave the house without their phones. This obsession allows organizations to collect endless amounts of data. Phones with GPS beacons and apps make it easy for stores to gather data and develop insights regarding the typical actions of consumers. It's not surprising that location-based marketing (LBM) has centered on mobile.

Study Shows Mobile Location-Based Marketing Creates Deeper Relationships with Customers

Recently, the Location Based Marketing Association (LBMA) released a semi-annual Global Location Trends Report, revealing huge trends in usage and investments regarding location-based marketing and projections for implementing relevant technology in 2017.

Continue reading %Location-Based Marketing Will Rely on Mobile in 2017%


by Ariel Elkin via SitePoint

GIF, PNG, JPG or SVG. Which One To Use?

If this article feels a little familiar, we published the first edition of it way back in 2009. While SVG has added a whole new dimension to web design, questions such as “What is the difference between JPEG and PNG?” are still as relevant as ever. We thought it was time to take a fresh look at the state of play in web-image formats.

Today’s short guide will give you the quick rundown of the various file types and where they work best. Enjoy.

JPG vs PNG vs GIF vs SVG - What is the Difference?

  Category Palette Use for
JPG Lossy Millions of colors Still Images
Photography
GIF Lossless Maximum 256 colors Simple animations
Graphics with flat colors
Graphics without gradients
PNG-8 Lossless Maximum 256 colors Similar to GIF
Better transparency but no animation
Great for icons
PNG-24 Lossless Unlimited colors Similar to PNG-8
Handles still images and transparency
SVG Vector/lossless Unlimited colors Graphics/logos for web
Retina/high-dpi screens

GIF: The Graphic Interchange Format

[caption id="attachment_148665" align="alignright" width="400"]256 color palette. 256 color palette.[/caption]

Unless you just stepped out of a faintly smoking DeLorean straight from 1985, you're very likely already familiar with the web's goofiest image format – the GIF (Graphics Interchange Format).

The GIF format is a type of bitmap, but unlike JPEG or PNG, GIF files are limited to a maximum palette of 256 colors. Essentially each GIF image contains a preset 'box of crayons' and there is no way to truly mix those colors to make new colors.

While 256 might sound like a lot of crayons to work with, complex photographs typically have many thousands of tones. This color range is lost during the GIF conversion process and this is the key reason not to use GIF for color photos.

While GIF is generally a poor choice for images with wide color variation, that 256 color limit can help keep file sizes small which is ideal for even the slowest of internet speeds. For many years, GIF provided the web's only transparency option – though PNG and SVG now offer this too.

Category: Lossless

Choose GIF for:

  • Simple animations
  • Small icons
  • Graphics with low pixel-to-pixel variation (i.e. lots of flat color like logos and flags)

JPEG

Depending on your preference, you may refer to this format as either ‘JPEG’ or ‘JPG’ – both are accepted variations of the same acronym – Joint Photographic Experts Group.

Unlike GIF, JPEG is a 16-bit format, which means that it can blend red, blue and green light to display millions of color. This makes JPG very ‘photo-friendly’. This is partly why it is a standard format when it comes to most digital cameras on the market.

The JPEG format also allows you the flexibility to choose the how much you compress your image – from 0% (heavy compression) to 100% (no compression). Generally, a 60%-75% compression setting will shrink your file considerably while keeping your image looking decent on most screens.

While JPEG is well suited to compressing and rendering photography, it is a lossy compression type which means it's less useful for ongoing editing of an image. Exporting a JPEG results in a loss of quality, and these losses get worse with each successive export – like a photocopy of a photocopy. This is why professional photographers generally shoot in lossless RAW format.

Also note that, unlike the GIF and PNG, JPEG can not preserve transparency.

Category: Lossy

Use JPEG for:

  • Still Images
  • Photography
  • Images with complex colors and dynamic

PNG

A newer file format than GIF and JPEG, the PNG (Portable Network Graphics) is like a marriage between both the GIF and JPEG format thanks to its two variants.

PNG-8

PNG-8 is similar to GIF in many ways and uses the same 256 color palette (maximum). It has better transparency options and usually exports slightly smaller file sizes. However, PNG-8 has no animation function.

PNG-24

PNG-24 allows you to render images with millions of colors – much like JPEG – but also offers the ability to preserve transparency. Because PNG-24 is a lossless format file type, you are likely to get larger files, but if image quality is more important than file size, PNG-24 is your best option. Even so, services like TinyPNG.com can often make a big difference to your file size. Compared to their cousin JPEG, PNG-24 files are not as universally compatible with every app and platform which makes the format marginally less ideal for web sharing. However, it is capable of being edited without diminished qualities.

 

Category: Lossless

Use PNG for:

  • Web graphics that require transparency
  • Color heavy and complex photographs and graphics
  • Images that require re-editing and re-exporting

SVG

Unlike the three formats mentioned above, SVG (Scalable Vector Graphics) is not a pure bitmap format. Instead it is a vector format – a close cousin to Adobe Illustrator’s AI format and EPS – that is steadily becoming an attractive option for web and UI designers.

Sometimes it's helpful to think of SVG as ‘HTML for illustrations’ and you need to think about it quite differently to other image formats we've listed.

SVG is best-suited to displaying logos, icons, maps, flags, charts, and other graphics created in vector graphics applications like Illustrator, Sketch, and Inkscape. Written in an XML-based markup, your SVG can be edited in any text editor and modified by JavaScript or CSS. As vectors can be scaled to any size while retaining crisp image quality, they are ideal for responsive design.

Though SVG is a vector format at its core, it is possible (even common) to embed bitmap graphics inside your SVG file – just as you might embed JPEGs in your HTML.

You can do this by either linking to an image source via its URL (as you might link to JPG in a webpage) or by encapsulating the pixel image as a Data URI. This gives SVG unchallenged flexibility and power.

Though SVG can help keep your images looking beautiful on the web, it isn’t necessarily a format that the everyday person can utilize to save and upload images via their website or social media platforms.

Online services like WordPress, Flickr, Medium, Tumblr, and Facebook will either forcibly convert your SVG to a format they like, or – more likely – outright block your SVG upload. There are a handful of SVG hosting options including svgur.com, imgh.us and even Github, as Alex demonstrated here.

As happy as I am to see smaller hosting services tackle SVG, Github is currently the only SVG-friendly service I’d be 99% confident will be around in 5 years. If you are using SVG to design for the web, you will find that you can almost always reduce file size when compared to something like the JPEG or PNG. But note that the more complex your SVG the larger the file will become.

Category: Vector/Lossless

Use SVG for:

  • Logos and icon with strong, geometric, vector-friendly design
  • Graphics that may need to be displayed in multiple sizes and screens
  • Graphics that respond to their device
  • Graphics that need to be edied, updated and redeployed.

Compare and Contrast

Now that we have covered the differences between popular file formats it is time to see them side by side. Below you will see how GIF, JPEG, PNG and SVG formats handle images with both simple and complex colors along with photographic images.

Flat Color Graphics

The first type of image we're going to look at are flat color graphics. This covers most logos and branding, icons, simple maps, charts, and diagrams. The original image is a 23.4 KB PNG image with a 1280 x 1280 dimension.

Below you will be able to see the difference in compression size as well as image quality. Note the images were saved using Photoshop’s “Save for Web and Devices” option at the highest quality settings.

Continue reading %GIF, PNG, JPG or SVG. Which One To Use?%


by Gabrielle Gosha via SitePoint

Can 9-to-5 Developers Be Good Developers?

Stock photo of clock indicating a ticking timepiece

While picking talks for the conference he's organizing, James Titcumb recently tweeted that well known speakers get picked over others because, among other things, they're reliable (i.e. they don't cancel). I would argue that "among other things" carries more weight - I believe that most conference organizers pick such talks and speakers because they like to play it safe and fear risks.

A Safe Play

The number of times I've seen a well known name from the PHP world hold a trivial (and, on their end, too, a "play it safe") talk is staggering, and it always makes me feel like I try too hard with my submissions. In this day and age of almost instantly-available recordings, why have a talk more than a few times? By the second or third time around, it's accessible to everyone online anyway. Why pick "safe" topics - who are you if you don't push the limits of your own comfort zone? Invite discussion, polarization, and disagreement - grow yourself by learning from and educating those who disagree with you, find common ground, see things from people's various perspectives, prevent the formation of an argument from authority. Stop acting like a prophet, and instead act like a human - fallible, capable of learning, and always curious.

When your whole career is banking on being a speaker, then I suppose it makes sense to have evergreen talks you don't need to prepare. Traveling around the world and reciting the talk from the top of your head is a pretty good gig and I can't fault such speakers for this approach any more than I can fault McDonalds for continuing to sell hamburgers. It works. But even McDonalds introduces a salad or a chicken wing from time to time.

Continue reading %Can 9-to-5 Developers Be Good Developers?%


by Bruno Skvorc via SitePoint

The “Most Loved” One Page Websites from April 2017

one-page-love-hosting-reviews-bh-unlimited

This "Most Loved" One Page website round-up is brought to you by hosting provider, Bluehost.

Bluehost is the most affordable hosting option to host your One Page websites. They have an incredible $2.95/month deal exclusive to One Page Readers where you can host your website with 50GB diskspace and unlimited bandwidth. They also throw in a free domain!

If you want to get notified about the "Most Loved" awards each month, subscribe to our Inspiration Newsletter.

Below are the 4 One Page websites awarded “Most Loved” in April – hope you enjoy!


Tech Radar 2017 (Annual Report, Informational)

Gorgeous design and transitions in this One Pager hosting an interactive Tech Radar infographic. The Single Page site by Kollegorna displays all the emerging tools and technologies they’re an eye on. The mobile adaption, that includes Force Touch functionality, is simply stunning.


Studio Ultra (Portfolio)

Unique and beautifully minimal One Page portfolio for motion graphics studio, Studio Ultra. The project list is hover sensitive and previews the videos as you scroll. Lovely touch how the project close icon also acts as the video preloader. Awesome work this as usual from Second Cousins.


Marjoe Bacus (Portfolio)

Beautiful load transitions and clear, spacious typography in his AJAX-loading One Page portfolio for Marjoe Bacus. Lovely touch with the subtle progress bar as you scroll though the home section and convenient how it-auto-scrolls to the top once you get to the end. It’s difficult to capture in this screenshot so make sure you take a look at the live site ⚡️


Heather Vandervecht (Portfolio)

Phenomenal One Page portfolio encapsulated in a vintage operating system interface (similar to Windows 95) for front-end developer, Heather Vandervecht. There is so much to love.. from the interactive chat console (with a lovely personal tone), the work/contact pop-up windows that are draggable, closable and even minimize to a taskbar, the mobile adaption to only a chat window and what a lovely touch with the shut-down button blackening the screen leaving only a wave emoji.. Bravo 👏🏻


Hope you enjoyed these beautiful One Pagers from April!

Big love to hosting provider Bluehost for sponsoring the round up ❤️


by Rob Hope via One Page Love

Swift From Scratch: Access Control and Property Observers

Learn to Create a WordPress Theme Options Page in Our New Course