Archive

Archive for March, 2017

Best of 2016: 100 Free Resources for Sketch

March 9th, 2017 No comments

Bohemian Coding are no longer newbies in the design arena. Over the years, they have matured, advanced and grown up, becoming a distinct player that offers a compelling toolset for prototyping purposes. Truth be told, their tool Sketch gradually conquers the World, winning over more and more followers.

And that is not surprising. Made with designers in mind, the application meets specific needs of the artists, providing flexibility on daily works as well as ensuring fast and efficient prototyping. It boasts of having a genuinely convenient and pleasant environment with a great asset of general features where creative folks can achieve the desired result without much pain. It focuses both on the functionality and user experience trying to strike a balance between these two thereby resulting in a harmonious lightweight but powerful instrument.

What’s more, thanks to a massive upsurge in popularity, and lots of ardent and keen artists that regularly contribute to the community, SketchApp has managed to bridge the gap between the application and novice designers. While the product still remains an exclusive product for Mac OS systems, anyone can feel and enjoy its potential. The Web is overpopulated with helpful stuff such as tutorials, guides and most importantly free extensions and resources including GUIs, icons, web templates, mockup devices, etc. to make your first steps in it. Free resources are going to be our today’s center of attention.

Our list consists of assorted graphical material presented in Sketch format that may come in handy in different tasks. Enjoy the roundup and share with us your thoughts. Do you prefer SketchApp? How often do you use it in your regular basis?

Flow chart Kit for Sketch

Creator: Greg Dlubacz
License: CC BY 4.0.

iOS 10 app icon template for Sketch


Creator: Josh Holloran
License: MIT.

Timesheet and statistics


Creator: Uzers
License: Declared as Free, no proper license given.

Exchanger Dashboard


Creator: Uzers
License: Declared as Free, no proper license given.

TinyFaces


Creator: Maxime De Greve
License: Declared as Free, no proper license given.

Bold Blog Homepage


Creator: Luka Dadiani
License: Declared as Free, no proper license given.

Conversational UI


Creator: Dawid Wozniak
License: Declared as Free, no proper license given.

Design Studio Mockup


Creator: Mike Ivanchyshyn
License: Declared as Free, no proper license given.

Concept Detailpage


Creator: Zelah Hoekstra
License: Declared as Free, no proper license given.

User flow Assets


Creator: Emanuel Serbanoiu
License: Declared as Free, no proper license given.

Dashboard Sketch


Creator: Burak Erenoglu
License: Declared as Free, no proper license given.

Cloud App Lander


Creator: Luka Dadiani
License: Declared as Free, no proper license given.

Nudged


Creator: Kevin Woodhouse
License: Declared as Free, no proper license given.

Web Wireframe Kit


Creator: Robowolf marketplace
License: Declared as Free, no proper license given.

iOS User Flow: Messages


Creator: STRV Design Team
License: Declared as Free, no proper license given.

Tomicons Iconset


Creator: STRV Design Team
License: Declared as Free, no proper license given.

iOS 10 GUI


Creator: Facebook
License: Declared as Free, no proper license given.

Craft Library


Creator: Talha Kaya
License: Declared as Free, no proper license given.

Native UI Kits


Creator: Myroslav Fanta, Source
License: Declared as Free, no proper license given.

Flexible Grid Ruler


Creator: Vitaliy Petrushenko
License: Declared as Free, no proper license given.

Favicon/iOS icon template


Creator: Marco ten Donkelaar
License: Declared as Free, no proper license given.

Minimax


Creator: Cue Blocks
License: Declared as Free, no proper license given.

Ugly Kit


Creator: David Kovalev
License: Declared as Free, no proper license given.

iOS 10 GUI


Creator: Tushar Merwanji
License: Declared as Free, no proper license given.

Flat Landing Page


Creator: Andrei Dulcu
License: Declared as Free, no proper license given.

App Icon Template


Creator: Soren Clausen
License: Attribution.

Onboarding Screens


Creator: Alexey Matyushkin
License: Declared as Free, no proper license given.

SCENTixx – Perfume shop iOS app


Creator: Robert Berki
License: Commercial use is not allowed.

1800 Free Minimal Icon Pack [20×20


Creator: Alexandru Stoica
License: Declared as Free, no proper license given.

Nippy – Free Sketch Landing Page


Creator: Srdjan Pajdic
License: Declared as Free, no proper license given.

GUACAMOLE 3-IN-1 UI KIT


Creator: Avocode
License: Declared as Free, no proper license given.

Starter Wireframe Templates


Creator: Mark Ludemann
License: Declared as Free, no proper license given.

Based UI Kit


Creator: Stream
License: Declared as Free, no proper license given.

Flag Kit


Creator: Viktor Kirichenko
License: MIT.

Facebook Analytics UI


Creator: Mike Finch
License: Declared as Free, no proper license given.

Black UI Kit


Creator: Lorenzo Perniciaro
License: Declared as Free, no proper license given.

Collection of Sketch Freebies


Creator: Serhiy Semenov
License: Declared as Free, no proper license given.

Google Inbox UI


Creator: Sam Mountain
License: Declared as Free, no proper license given.

4 Landing Page Templates

Creator: Artem Tolstykh
License: Declared as Free, no proper license given.

Minimal UI Kit


Creator: Mohamed Kerroudj
License: Free for personal and commercial use.

Wirebase


Creator: Patryk Zabielski
License: Declared as Free, no proper license given.

UI Kit of a Music App


Creator: Ananason
License: Declared as Free, no proper license given.

Mercatus


Creator: rui paz, Vasco
License: Declared as Free, no proper license given.

Mobile UI Kit for Music Apps


Creator: Angelika Sosnova
License: Declared as Free, no proper license given.

Slides Resources


Creator: Designmodo
License: CC 4.0.

Chart UI Kit


Creator: Xer.Lee
License: Declared as Free, no proper license given.

Mini UI Kit 2


Creator: Awesomed
License: Declared as Free, no proper license given.

Carbon – Material Wireframe UI Kit


Creator: Panagiotis
License: Free for personal and commercial use.

Recipes App UI Kit


Creator: Alex Dapunt
License: Free for personal and commercial use.

Wireframe of web app, web site, and blog


Creator: Lauralee Flores
License: Declared as Free, no proper license given.

Jobby


Creator: Stefano De Rosa
License: Declared as Free, no proper license given.

100 Icons


Creator: icon54
License: Declared as Free, no proper license given.

Material Design Wireframe Kit v_02


Creator: Dan Shipley
License: Declared as Free, no proper license given.

Move | Mobile UI Kit


Creator: Kurbatov Volodymyr
License: Declared as Free, no proper license given.

Personal Landing Page


Creator: Designer Bundle
License: Free for personal and commercial use.

Fashion App Freebie


Creator: Designer Bundle
License: Free for personal and commercial use.

iPhone 7 Mock-ups


Creator: Designer Bundle
License: Free for personal and commercial use.

Social App Freebie


Creator: Designer Bundle
License: Free for personal and commercial use.

MagicMirror Freebie


Creator: emilie badin
License: Declared as Free, no proper license given.

Sketch Plugin Scripts


Creator: Thomas Seng Hin Mak
License: Totally free for any usage.

Sketch Charts and Graphs


Creator: Dave Albert
License: Free for personal and commercial use.

Cosmic Discoveries



Creator: Alexander Boychenko
License: Free for personal and commercial use.

Cleaning Order Sketch Process Free Icons


Creator: Max Khomenko
License: Declared as Free, no proper license given.

Golden Spiral Grid Template Sketch


Creator: Abinash Mohanty
License: Declared as Free, no proper license given.

Oxygen – Starter UI Kit


Creator: Srdjan Pajdic
License: Declared as Free, no proper license given.

Portal iOS Pack


Creator: Igor Savelev
License: Declared as Free, no proper license given.

Subtle Devices


Creator: Hanson Wu
License: Declared as Free, no proper license given.

Vector Icons


Creator: Xiaoxue(Ellie) Zhang
License: Free for personal and commercial use.

Space UI Kit


Creator: Rodrigo do Carmo
License: Declared as Free, no proper license given.

Citysets


Creator: Bryn Taylor
License: Declared as Free, no proper license given.

SilveHype – Free Fashion Sketch Template


Creator: Michal Kozina
License: Declared as Free, no proper license given.

Apple Icons Set


Creator: WORAWALUNS
License: Declared as Free, no proper license given.

UI Icons


Creator: Marco Lopes
License: Declared as Free, no proper license given.

Interstellar Home Page UI Theme


Creator: Lucas Vallim
License: Declared as Free, no proper license given.

The Sketch Gem


Creator: Christian Krammer
License: Declared as Free, no proper license given.

Flat UI Delivery App


Creator: DEGRANGE Quentin
License: Free to use for commercial and non-profit use.

Landing Page Mockup


Creator: Mike Ivanchyshyn
License: Declared as Free, no proper license given.

Fugly UI Kit


Creator: Anton Chandra
License: Declared as Free, no proper license given.

130 Icons


Creator: Han Wang
License: Declared as Free, no proper license given.

Free Taxi Drive App – concept UI Kit


Creator: Oleksii Chernikov
License: Declared as Free, no proper license given.

MeshApp – flat mobile app landing page


Creator: Andrei Dulcu
License: Declared as Free, no proper license given.

Stripe Devices


Creator: Daniel Sofinet
License: Declared as Free, no proper license given.

Agency Website


Creator: Ali Sayed
License: Declared as Free, no proper license given.

Calendar UI


Creator: Dan Vineyard
License: Creative Commons.

App Landing Page


Creator: Omar Aly
License: Declared as Free, no proper license given.

Facebook Photos Redesign


Creator: Rahul Chakraborty
License: Declared as Free, no proper license given.

Gradients


Creator: Sedki Alimam
License: Declared as Free, no proper license given.

Productivity Timer – Apple Watch UI Kit


Creator: Jaroslaw Ceborski
License: Declared as Free, no proper license given.

Social Leads App


Creator: Drew Andersen
License: Declared as Free, no proper license given.

Paypal Free Sketch IOS UI Kit


Creator: Flexi Blee
License: Declared as Free, no proper license given.

Minimalist iPhone Presentation Mockup


Creator: Gavin Anthony
License: Declared as Free, no proper license given.

App Landing Page


Creator: UI/UX Assets
License: Declared as Free, no proper license given.

Music Player UI


Creator: Andrei Rotariu
License: Declared as Free, no proper license given.

Windows 10 Project NEON Groove Music UI


Creator: Chip Dong Lim
License: Declared as Free, no proper license given.

42 Mime Types


Creator: Sandro Tavares
License: Royalty free license for both personal and commercial use.

Facebook Share & Connect UI for prototype


Creator: Matthieu Laroche
License: Declared as Free, no proper license given.

Free Login Page


Creator: Mahisa Dyan Diptya
License: Declared as Free, no proper license given.

Fresh market app design


Creator: Mahisa Dyan Diptya
License: Declared as Free, no proper license given.

Tine Insane Icons


Creator: Rocco Barbaro
License: Declared as Free, no proper license given.

Order Status Page


Creator: Mahisa Dyan Diptya
License: Declared as Free, no proper license given.

Categories: Others Tags:

7 Secrets for Designing Great Forms

March 8th, 2017 No comments

Almost every website design includes some type of form. From simple email address collection to sign up for a newsletter or notification to full payment collection forms, it is imperative that you design a form that’s easy to use and understand.

The standards of form design are evolving as well. While many forms used to include multiple columns and ask for lots of information, most best practices now suggest keeping forms as simple as possible. And there’s a lot to the design as well. A good form is scannable, doesn’t require a lot of typing and includes smart labeling and formatting to help users fill out forms correctly the first time.

Here are a few secrets to ensure you are designing a form that users actually fill out.

1. Make It Easy to Scan and Read

You know that users scan websites to glean information and determine what actions they will take or whether the content and design interests them or not. The same is true of forms. User should be able to tell what information is needed at a glance and provide a clear explanation of what the form is for and how to submit it.

A highly-scannable form includes the following:

  • Contrast: Text needs to be short and easy to read. Avoid lots of color and stick to traditional dark on light text-background combinations.
  • Grouping and space: Group information that’s similar on longer forms. When collecting payment information for example, group customer information, payment information and shipping information. Three shorter blocks are easier to digest than one long one. Use smart spacing to that labels are connected to the field they explain, rather than uniform spacing between text and field elements.
  • Clear finish/call to action: Make the button big and easy to see. The microcopy inside the button should tell users what will happen, such as “submit,” “pay now” or “proceed to next step.” Remember to close the feedback loop and let users know when a form is properly submitted.

2. Consider Floating Labels

There’s been a lot of debate about whether or not to use hint text inside form fields. The main problem is that too often this text doesn’t go away with a click and users have to actively delete it to start typing. That’s awkward.

Further, the Nielsen Norman Group found that blank fields can draw the eye and help users input information more clearly.

If you feel the need to use hints, consider an interactive solution—floating labels. Include your label information inside form fields so that it looks like placeholder text, but allow the text to animate and shift to the top left position once a user hovers over or clicks into the field. The label or hint never goes away and it does not get in the way of the user trying to fill out the form. (Plus the little animation is a fun surprise for users.)

3. Use Field Masks

Field masks can provide some of the same clues and form hints but without getting in the way of the usability. A field mask only appears once a user activates a field and provides an additional scanning clue as to what information is needed. The mask can assist the user further by automatically formatting information in an effort to avoid errors that will kick the form out on submission.

A good example of a field mask in action is with phone numbers. Consider the multiple format options:

  • (000) 000-0000
  • 000-000-0000
  • 0000000000

How does a user know which one will work? The form field will specify and adjust the format as a user types, so he or she does not have to think about it and only has to key in numbers. (This also saves the hassle of having to switch between keyboards on a mobile device.)

4. Make Forms Keyboard-Friendly

You have no way of knowing what type of device a user will encounter your form on, but it should be equally easy to fill out anyway. Consider all the different types of keyboards that could send information to the form and adjust fields to detect and use the appropriate option.

On desktops, users should be able to enter a form and fill out each field without having to click a mouse. Advance automatically from one field to the next upon completion or use tabs or enter to move around. W3.org has a solid set of keyboard recommendations for you to follow.

On mobile devices, match the keyboard type to the data required. If the input is for letters, bring up the alpha keyboard; for numbers, bring up the numeric option. From Google: “App users appreciate apps that provide an appropriate keyboard for text entry. Ensure that this is implemented consistently throughout the app rather than only for certain tasks but not others.”

5. Opt for Vertical Format

Vertical forms are easier for users than multiple column formats. To best practice rule is to ensure that all the fields can fit on the screen without scrolling in a top to bottom format.

The one exception is for super-short forms where a user only needs to enter an email address or name and email address. Two side-by-side columns followed by a call to action button can work well in this situation as long as the email box is long enough for users to see all the letters of their address.

Remember to order elements logically in a vertical form as well. If you are collecting first name, last name, email address, and hair color sequence them in that way.

6. Limit Typing

Use as many pre-fill solutions as possible with forms. Nothing is more delightful then going to add an address and after the first few taps, the Google API kicks in and suggests address options.

This does three things:

  • It makes it easier for users, particularly on mobile.
  • It helps limit the number of fields necessary.
  • It can help eliminate some user error, such as mistyping.

Consider the same thing with email addresses, such that users are given popular email domains after the @ symbol. When a user types in web@g …. the field automatically suggests web@gmail.com.

7. Keep It Short and Sweet

You are going to be tempted to ask users for a lot of information in forms. Resist the urge!

Only ask for vital information in forms. There’s a stronger likelihood that users will fill out forms that require less commitment. If you need more information later, you can then email them from your list as ask for additional details. (As someone who has already opted in, the user is more likely to engage with you for more at this time.)

Avoid optional fields. Don’t ask for redundant information. Don’t use multiple fields where you could use one (phone numbers for example).

Conclusion

Give users something in return for filling out a form. Make it fun or interesting. Thank the user.

Creating a form that’s easy to read and easy to use will increase your chances of collecting data and turning a website visitor into a repeat user.

302 Found

Found

The document has moved here.


Apache Server at www.mightydeals.com Port 80

Source

Categories: Designing, Others Tags:

My Journey Of Learning Programming Through Flatiron School #14

March 8th, 2017 No comments

My name is Mason Ellwood, and I’m currently working on Flatiron School’s Online Full Stack Web Development Program. Each week, I’ll be writing about my experience, what I’m learning, and tips on learning to code.

So here it is, one of the biggest pains in the butt I have ever experienced. Object Oriented Programming.

“An object-oriented approach to application development makes programs more intuitive to design, faster to develop, more amenable to modification, and easier to understand” – Apple inc.

An object in code is basically a “thing” that holds all the data and all the logic required to complete a task. Ruby, in this particular circumstance comes out of the box with a few built-in objects such as integers, strings, and arrays. To create a new object, Ruby uses the “class” keyword.

Classes and Instances

A class is basically a blueprint that defines how to build and object. A Ruby class both contains the instructions for creating new objects and has the ability to create those objects.

Class names are camel-case (Ex: NewClass) because they are stored as Ruby constants.

The NewClass is defined with the class keyword, followed by the class name and closed with “end”. The body is between these keywords. On the NewClass class, we call the .new method and that will instantiate (bringing a new object to life) a new NewClass. Each particular NewClass is an individual that was instantiated when we called NewClass.new. Each individual NewClass is an instance.

An instance is a single occurrence of an object. Instances refer to the individual object produced from the class.

Returned when calling the instance of the new class you have created will return the Ruby Object Notation. It is Ruby’s way of telling you that you are dealing with an object or instance of a particular class.

  • NewClass: = the object of a particular class
  • 0x07fb3b4826828 = where the object lies within the computer

This is a brief intro to Ruby Object Oriented Notation. This concept took me a while to grasp and get a hold of. If you understand Procedural Ruby that is it a little easier to grasp this concept. This allows your code to be more reusable and allows the ability to extend your application more quickly. Thank you for reading and I hope you learned something. I am still tackling this concept conceptually, so bare with me and I apologize in advance if the future post and a bit confusing.

Read More at My Journey Of Learning Programming Through Flatiron School #14

Categories: Designing, Others Tags:

How To Simplify Android Networking With The Volley HTTP Library

March 8th, 2017 No comments

In a world driven by the Internet, mobile apps need to share and receive information from their products’ back end (for example, from databases) as well as from third-party sources such as Facebook and Twitter.

These interactions are often made through RESTful APIs. When the number of requests increases, the way these requests are made becomes very critical to development, because the manner in which you fetch data can really affect the user experience of an app.

The post How To Simplify Android Networking With The Volley HTTP Library appeared first on Smashing Magazine.

Categories: Others Tags:

Try Out the Most Efficient Website Building Tools and Platforms

March 8th, 2017 No comments

Picking a top-of-the-line website builder can be a challenge. Since, there are so many to choose from, it can be difficult to distinguish the good ones from those not quite so good. Affordability and ease is important, but not enough.

Customization, flexibility, and user experience are vital for the success of your design efforts:

  • Selecting a tool or platform that underlines simple and flexible content management should be a priority.
  • You want your website to be user friendly as well as competitive within its niche. For both to happen, it needs to be responsive to play well with the mobile
  • Look for a platform that offers a wealth of widget choices. The functionalities they provide will make you a more proficient and productive designer.
  • Today’s websites integrate with social media, since that is where much of the action is on building brand recognition.

SnapPages

SnapPages has been redesigned from the ground up. The latest release makes it faster and easier than ever to create up-to-date, responsive websites. SnapPages’ powerful drag and drop tools make it easy for anyone to build a website. Its professionally-created website template designs are easy to customize. And, the SnapPage team makes managing your website a snap, as they take care of web hosting and server considerations.

Rather than throw a list of features at you to convince you to purchase their product, the SnapPages team has chosen to focus on what users want and need, to make this the best website builder editing experience on the market.

As a user, you’re able to store your website and design files in the cloud. There’s a special app for blogging that features spam filtering for comments, so you can spend less time monitoring. The drag-and-drop HTML5 editor is optimized for touchscreen use, so you can use it in your tablet right in the browser. Social plugins are provided; plus, you’ll get even more for your money.

Webflow

Webflow gives designers the ability to develop responsive websites visually — without writing a single of code. And unlike similar tools, you’re not bound into using pre-made templates. Instead, you can start from a blank canvas and build exactly what you’re envisioning.

Even better, you can create a totally custom database for every website you build using Webflow’s CMS — again, without writing code. So you can design around your client’s or company’s content, so your design decisions are driven by real data.

If you’re a freelancer, you can build and launch a site without the need to subcontract a developer, so you’re always in control of the design process. And if you’re an in-house designer, you can use Webflow to build high-fidelity, fully functional prototypes to hand over to developers, run user testing, and even launch landing landing pages.

Webflow’s also free to try, and there’s no trial period to worry about. So give it a try, and see why over 500,000 other designers have made it their go-to tool for web and product design.

Pixpa

Whether you’re a creative pro, a business owner, or simply someone who wants a website to suit your own needs, Pixpa was developed with you in mind. With Pixpa, you can create and manage your website, e-commerce store or your blog through a single, seamless, platform.

With a great selection of professionally-designed, customizable themes, Pixpa’s do-it-yourself, drag-and-drop, website builder enables you to build a beautiful, engaging, and professional-looking website in no time at all. If selling online is your objective, Pixpa has just the right mix of tools and resources to make building an e-commerce website and growing your business a snap.

Pixpa websites are search engine optimised, responsive, and social media enabled. You can also use this platform to share your work with clients, by delivering files to them digitally. Check out

Pixpa’s cost-effective pricing plans that also takes into account your hosting and bandwidth needs.

Themify Builder

No coding or special technical skills are needed to produce attention-getting, engaging websites if you’ve added Themify Builder to your designer’s tool kit. You can drag and drop your way to converting your ideas into digital realities, and preview in real time what’s happening as you proceed.

You can, if you choose, use the Builder within the Themify framework, or use it as a plugin with a third-party theme.

Simbla Website Builder

Simbla is based on Bootstrap, the popular open source software solution that allows you to build websites that are responsive, and are not browser dependent. Simbla is an especially smart choice when building mobile-first websites is a priority.

This platform, with its excellent collection of design, development, and SEO tools, is an ideal choice for businesses and startups.

Bookmark

Let Artificial Intelligence create your perfect website at Bookmark. Be prepared to be amazed at what this AI-based design platform can do for you.

AI-generated facts and figures enable Bookmark to zero in on your needs, making your website as close to perfect as possible. Watch the demo to view Bookmark ADI capabilities.

uCoz

uCoz is a good choice if you want to make website building easy, and let the software platform do much of the work. To achieve exactly what you want, and have total control over your design however, it sometimes pays to get under the hood and do some necessary code editing. uCoz lets you do that precisely.

Whichever category you fit into, give this feature-rich, flexible website building tool a look. You’ll get real value for your money.
uKit

uKit has something for everyone, including hundreds of designer-made templates, with each design consisting not only of themed images, but with high-quality, industry-specific texts as well. Everything is drag and drop, with no coding or special technical skills required.

Built-in promotional tools that enable you to analyze your website’s performance provide an added plus. Use them to indicate if you are ready to go online.

SITE123

SITE123 is a website-building tool anyone can use. Whether you’re a design pro, a singer, a plumber, a freelancer, or a blogger, you can have a website up and running as easy as 1-2-3. No coding or special skills are required, and you’ll have a nice selection of ready-made styles and layouts at your fingertips.

All that’s required of you is to enter your own content. Best of all – SITE123 is absolutely free!

Simvoly

Some web design platforms advertise mobile friendliness as a feature. With Simvoly, mobile friendliness is front and center; along with ease of use and stunning design.

Simvoly can be the ideal solution if your objective is to build an online store, a blog, or a presentation website, and you can be assured it will be fast, beautiful and mobile friendly.

Sign up for a free trial. Live chat is available should you have any questions.

Summing up

These best tools and platforms have several things in common. They let you get a website up and running and online quickly. They require no coding or special technical skills to work with. And, they all make it possible for you to deliver high-performing, high-quality websites that perform superbly on any device.

If you feel the need to edit some code to achieve near-perfection in your design, there’s even a tool here that lets you do just that.

Read More at Try Out the Most Efficient Website Building Tools and Platforms

Categories: Designing, Others Tags:

Build a Custom Serverless CMS: Part 2

March 8th, 2017 No comments

In our previous proof-of-concept demo, we built a bare bones admin for generating a web page with the ability to edit some text on the page and set the site title and description. For this next demo, we build on our example and add rich text editing and image upload capabilities.

Article Series:

  1. Build a Custom CMS for a Serverless Static Site Generator + Repo
  2. Build a Custom Serverless CMS: Part 2 (you are here!) + Repo

Rich Text Editing

TinyMCE is the most widely used web-based Rich Text Editor around, so let’s use it. We can add it to our admin form pretty easily. There are many configuration options available for TinyMCE. For this demo, we only need a few.

tinymce.init({
  selector: '#calloutText',
  menubar: false,
  statusbar: false,
  toolbar: 'undo redo | styleselect | bold italic | link',
  plugins: 'autolink link'
});

The rich text editor will encode its content as markup, so we have to update the JSRender template to output the data value for calloutText as HTML.

<div class="jumbotron">
  <div class="container">
  <h1 class="display-3">{{>calloutHeadline}}</h1>
  {{:calloutText}}
  ...

Image Uploads

Now we add an image background to our Jumbotron. First, we need to add a new form field so an admin can select a file to upload, then update our form submit handler to upload the image to S3.

With multiple uploads and callbacks happening here, we can create an upload helper method and use Deferred objects to make our Ajax calls run simultaneously.

$('body').on('submit','#form-admin',function(e) {

  e.preventDefault();

  var formData = {};
  var $formFields = $('#form-admin').find('input, textarea, select').not(':input[type=button], :input[type=submit], :input[type=reset]');

  $formFields.each(function() {
    formData[$(this).attr('name')] = $(this).val();
  });
 
  var jumbotronHTML = '<!DOCTYPE html>' +
    $.render.jumbotronTemplate(formData);
 
  var fileHTML = new File([jumbotronHTML], 'index.html', {type: "text/html", lastModified: new Date()});
 
  var fileJSON = new File([JSON.stringify(formData)], 'admin.json');
  
  var uploadHTML  = $.Deferred();
  var uploadJSON. = $.Deferred();
  var uploadImage = $.Deferred();
 
  upload({
    Key: 'index.html',
    Body: fileHTML,
    ACL: 'public-read',
    ContentDisposition: 'inline',
    ContentType: 'text/html'
  }, uploadHTML);

  upload({
    Key: 'admin/index.json',
    Body: fileJSON,
    ACL: 'public-read'
   }, uploadJSON);

  if ($('#calloutBackgroundImage').prop('files').length) {
    upload({
      Key: 'img/callout.jpg',
      Body: $('#calloutBackgroundImage').prop('files')[0],
      ACL: 'public-read'
    }, uploadImage);
  } else {
    uploadImage.resolve();
  } 
 
  $.when(uploadHTML, uploadImage, uploadJSON).then(function() {
    $('#form-admin').prepend('<p id="success">Update successful! View Website</p>');
  })
});

function upload(uploadData, deferred) {
  s3.upload(uploadData, function(err, data) {
    if (err) {
      return alert('There was an error: ', err.message);
      deferred.reject();
    } else {
      deferred.resolve();
    }
  });
}

Next, we update our jumbotron to display the callout background image.

.jumbotron {
  background-image: url(../img/callout.jpg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

Blog Posts

Let’s use rich text editing and image uploads together to create blog posts. Since we are doing a lot of templating, we can make life easier by writing a helper function to automatically register JSX templates.

$('script[type="text/x-jsrender"]').each(function() {
  $.templates($(this).attr('id'), '#'+$(this).attr('id'));
});

We can manage different areas of the site, in this case a blog, by adding navigation to our admin page with a nav bar template partial.

<script type="text/x-jsrender" id="adminNav">
  <nav class="navbar navbar-light rounded bg-faded my-4">
    <div class="navbar-collapse" id="navbarNav">
      <ul class="nav navbar-nav d-flex flex-row">
        <li class="nav-item pl-2 pr-3 mr-1 border-right">
          <a class="nav-link text-primary" href="#adminIndex">Admin</a>
        </li>
        <li class="nav-item px-2{{if active=='adminIndex'}} active{{/if}}">
          <a class="nav-link" href="#adminIndex">Home {{if active=='adminIndex'}}<span class="sr-only">(current)</span>{{/if}}</a>
        </li>
        <li class="nav-item px-2{{if active=='adminBlog'}} active{{/if}}">
          <a class="nav-link" href="#adminBlog">Blog {{if active=='adminBlog'}}<span class="sr-only">(current)</span>{{/if}}</a>
        ...

Next, update our existing admin page with the nav bar and a new ID.

<script type="text/x-jsrender" id="adminHome">
  {{include tmpl='adminNav' /}}
  <form class="py-2" id="form-admin">
    <h3 class="py-2">Site Info</h3>
    ...

To add navigation to our admin view, when the nav buttons are clicked we can add an event handler that will load the associated data and render the appropriate template.

We will be using the rich text editor as we edit different areas of the site, so creating another helper function will enable us to easily configure the editor with different settings.

$('body').on('click','.nav-link', function(e) {
  e.preventDefault();
  loadPage($(this).attr('href').slice(1));
});

function loadPage(pageId) {
  adminData = {};
$.getJSON(pageId+'.json', function( data ) {
    adminData = data;
  }).always(function() {
    $('.container').html($.render[pageId]($.extend(adminData,{active:pageId})));
    initRichTextEditor();
  });
}

function initRichTextEditor(settings) {
  tinymce.init($.extend({
    selector:'textarea',
    menubar: false,
    statusbar: false,
    toolbar: 'undo redo | styleselect | bold italic | link',
    plugins: 'autolink link',
    init_instance_callback : function(editor) {
      $('.mce-notification-warning').remove();
    }
  }, settings ? settings : {}));
}

Create a new admin section for managing the blog with a button to create a new post.

<script type="text/x-jsrender" id="adminBlog">
  {{include tmpl='adminNav' /}}
  <div id="blogPosts">
    <h3 class="py-2">Blog Posts</h3>
    <button id="newPostButton" class="btn btn-primary">+ New Post</button>
    ...

Also, we need a form to write these posts. Note we include a hidden file input which we’ll use to allow the rich text editor to upload images.

<script type="text/x-jsrender" id="editBlogPost">
  <form class="py-2" id="form-blog">
    {{if postTitle}}
      <h3 class="py-2">Edit Blog Post</h3>
    {{else}}
      <h3 class="py-2">New Blog Post</h3>
    {{/if}}
    <div class="form-group">
        <label for="postTitle">Title</label>
        <input type="text" value="{{>postTitle}}" class="form-control" id="postTitle" name="postTitle" />
    </div>
    <div class="form-group pb-2">
      <textarea class="form-control" id="postContent" name="postContent" rows="12">{{>postContent}}</textarea>
    </div>
    <div class="hidden-xs-up">
      <input type="file" id="imageUploadFile" />
    </div>
    <div class="text-xs-right">
      <button class="btn btn-link">Cancel</button>
      <button type="submit" class="btn btn-primary">Save</button>
    </div>  
  </form>
</script>

Enabling admin to edit multiple pages of the site will require us to structure our site generation differently. Every time a change is made to the site title and info, we need to propagate that to both the homepage and the blog.

First, we create template partials for our site nav that we can include in each of the page templates.

<script type="text/x-jsrender" id="siteNav">
  <nav class="navbar navbar-static-top navbar-dark bg-inverse">
    <a class="navbar-brand pr-2" href="#">{{>siteTitle}}</a>
    <ul class="nav navbar-nav">
      <li class="nav-item{{if active=='index'}} active{{/if}}">
        <a class="nav-link" href="{{>navPath}}index.html">Home {{if active=='index'}}<span class="sr-only">(current)</span>{{/if}}</a>
      </li>
      <li class="nav-item{{if active=='blog'}} active{{/if}}">
        <a class="nav-link" href="{{>navPath}}blog.html">Blog {{if active=='blog'}}<span class="sr-only">(current)</span>{{/if}}</a>
      ...
<body>
  {{include tmpl='siteNav' /}}
  ...

When our admin clicks the new post button, they should be presented with our edit form. We can create a function to do just that and attach it to a click event on the button.

Additionally, we want to be able to add images to our blog posts. In order to do that, we need to add a custom image upload window to our rich text editor with some configuration settings.

function editPost(postData) {
  $('.container').append($.render.editBlogPost(postData));
  initRichTextEditor({
    toolbar: 'undo redo | styleselect | bold italic | bullist numlist | link addImage',
    setup: function(editor) {
      editor.addButton('addImage', {
        text: 'Add Image',
        icon: false,
        onclick: function() {
          // Open window
          editor.windowManager.open({
            title: 'Add Image',
            body: [{
              type: 'button',
              name: 'uploadImage',
              label: 'Select an image to upload',
              text: 'Browse',
              onclick: function(e) {
                $('#imageUploadFile').click();
              },
              onPostRender: function() {
                addImageButton = this;
              }
            }, {
              type: 'textbox',
              name: 'imageDescription',
              label: 'Image Description'
            }],
            buttons: [{
              text: 'Cancel',
              onclick: 'close'
            }, {
              text: 'OK',
              classes: 'widget btn primary first abs-layout-item',
              disabled: true,
              onclick: 'close',
              id: 'addImageButton'
            }]
          });
        }
      });
    }
  });
}

$('body').on('click', '#addImageButton', function() {
  if ($(this).hasClass('mce-disabled')) {
    alert('Please select an image');
  } else {
    var fileUploadData,
      extension = 'jpg',
      mimeType = $('#imageUploadFile')[0].files[0].type; // You can get the mime type
    if (mimeType.indexOf('png') != -1) {
      extension = 'png';
    }
    if (mimeType.indexOf('gif') != -1) {
      extension = 'gif';
    }
    var filepath = 'img/blog/' + ((new Date().getMonth()) + 1) + '/' + Date.now() + '.' + extension;

    upload({
      Key: filepath,
      Body: $('#imageUploadFile').prop('files')[0],
      ACL: 'public-read'
    }).done(function() {
      var bucketUrl = 'http://serverless-cms.s3-website-us-east-1.amazonaws.com/';
      tinyMCE.activeEditor.execCommand('mceInsertRawHTML', false, '<p><img src="' + bucketUrl + filepath + '" alt="' + $('.mce-textbox').val() + '" /></p>');
      $('#imageUploadFile').val();
      tinyMCE.activeEditor.windowManager.close();
    });
  }
});

The above code will place an Add Image button into the rich text editor controls which will open a modal for admin to choose an image to upload. When admin clicks Browse, we have added a click trigger to the hidden file input in the edit form.

Once they have selected an image to add to the post, clicking OK to close the window will also upload the image to S3 then insert the image at the cursor location in the rich text editor.

Next, we need to save the blog post. To accomplish this, we will combine our form data with a template to render HTML and upload to S3. There is a template for the blog and the individual post itself. We also need to store the post data so that the admin can see a list of posts and make edits.

$('body').on('submit', '#form-blog', function(e) {
  e.preventDefault();
  var updateBlogPosts = $.Deferred();
  if ($(this).attr('data-post-id') === '') {
    postId = Date.now();
  } else {
    postId = $(this).attr('data-post-id');
  }
  if (!adminData.posts) {
    adminData.posts = [];
  }
  var postUrl = 'posts/' + ($('#title').val().toLowerCase().replace(/[^ws]/gi, '').replace(/s/g, '-')) + '.html';
  var postTitle = $('#title').val();
  var postContent = tinyMCE.activeEditor.getContent({
    format: 'raw'
  });
  adminData.posts.push({
    url: postUrl,
    title: postTitle,
    excerpt: $(postContent)[0].innerText
  });
  var uploads = generateHTMLUploads('blog');
  uploads.push(generateAdminDataUpload());

  var postHTML = '<!DOCTYPE html>' + $.render['blogPostTemplate']($.extend(adminData, {
    active: 'blog',
    title: postTitle,
    content: postContent,
    navPath: '../'
  }));

  var fileHTML = new File([postHTML], postUrl, {
    type: "text/html",
    lastModified: new Date()
  });
  uploads.push(upload({
    Key: postUrl,
    Body: postHTML,
    ACL: 'public-read',
    ContentDisposition: 'inline',
    ContentType: 'text/html'
  }))
  $.when.apply($, uploads).then(function() {
    loadPage('adminBlog');
  });
});

In our admin blog page, we will list our published posts.

<script type="text/x-jsrender" id="adminBlog">
  {{include tmpl='adminNav' /}}
  <div id="blogPosts">
    <h3 class="py-2">Blog Posts</h3>
    <button id="newPostButton" class="btn btn-primary my-1">+ New Post</button>
    {{if posts}}
      <div class="container p-0">
        <ul class="list-group d-inline-block">
          {{for posts}}
            <li class="list-group-item">
              <span class="pr-3">{{>title}}</span>
              <a href="../{{>url}}" target="_blank" class="pl-3 float-xs-right">view</a>
              <a href="#" data-id="{{:#getIndex()}}" data-url="{{>url}}" class="edit-post pl-3 float-xs-right">edit</a>
            </li>
          {{/for}}
        </ul>
      </div>
    {{/if}}
  </div>
</script>

Finally, we will expand our new post click handler to handle editing posts by loading the post data into the form template.

$('body').on('click', '#newPostButton, .edit-post', function(e) {
  e.preventDefault();
  $('#blogPosts').remove();
  if ($(this).is('#newPostButton')) {
    editPost({});
  } else {
    var postId = $(this).attr('data-id');
    var postUrl = $(this).attr('data-url');
    $('<div />').load('../' + postUrl, function() {
      editPost({
        id: postId,
        title: $(this).find('h1').text(),
        content: $(this).find('#content').html()
      });
    });
  }
});

Next Steps

Obviously, this is a basic example and is missing a lot of key functionality, like the ability to have draft posts, delete posts and pagination.

As the site grows in scope, generating batches of HTML files on the client side will become burdensome and unreliable. However, we can keep our architecture serverless by offloading the site generation to AWS Lambda and create microservices for updating site info and managing blog posts.

Managing our site data structure by updating flat JSON files stored on S3 is inexpensive and can lend itself to easily setting up backups and restoration. However, for projects that are more than a simple blog or marketing site, it is possible to use AWS Dynamo DB to store data, which is also supported by the AWS SDK for JavaScript in the Browser.

A blog is just one example of something that can be built in this way. The rise of Serverless Web Application Architectures (aka Backend as a Service) makes it possible for the front end to control both the user and authoring experience, and craft web products and content entirely from to start to finish.

It is an exciting time to be building things on the web.


Build a Custom Serverless CMS: Part 2 is a post from CSS-Tricks

Categories: Designing, Others Tags:

Web Design: How to Guide Your Visitors Through Long Pages

March 8th, 2017 No comments
Webdesign: How to Guide Your Visitors Through Long Pages

Websites are becoming longer and longer: the average site in Google’s top 10 of 2016 was about 3 A4 pages long. How can we navigate through these long pages?

The substance of a website URL is constantly increasing – regarding content and its length – and is always getting larger: according to the SEO tool provider Searchmetrics, a desktop site in Google’s top 10 of 2016 had an average of 1,500 words, with mobile sites sitting at about 1,000 words. With about 500 words per A4 page in standard font size (12) in Word, this results in two to three A4 format sites.

This content is coined by the aspiration for relevance: “holistic content,” like SEOs call it, is supposed to cover the topic for which we optimize a page (we don’t optimize for single search terms or keywords anymore) as extensively as possible. So, holistic optimization means addressing as many questions and possibilities within an URL, providing relevant content this way. However, this also means that we have to provide a new form of navigation for our users, making it easier for them to find their way, right?

Holistic Content Without Navigation

Of all things, the easiest reaction to extensive, holistic content is provided by THE design benchmark: Apple.

On the about 1,700 word long page on the iPad Pro, for example, there is no option to navigate faster between the sections and paragraphs, outside of scrolling. Certainly, this was done on purpose, keeping users on the page longer by making them surf more carefully, and making them find important content parts on their own. Apple can afford to do this because most of the customers are loyal fans, or at least willing to look through the page’s content.

Image Caption: Screenshot of Apple.com

With (a lot) less popular brands, however, this would cause the bounce rate to become rather high, as users won’t find the content they’re looking for within their attention span, which, by the way, is an average of 8 seconds on the web. They are very likely just to leave the page undone.

The Solution: The Anchor Link

Let’s take a look at how the web’s strongest site approaches the topic: Wikipedia. The encyclopedia is the pioneer when it comes to holistic optimization. For years now, it has been showing us how to rank perfectly with one’s content.

Today, it is entirely normal for their users to reach the individual sections using a table of contents. In the case of Wikipedia, this is generated automatically, and gets users to single subheadings (h2 and h3) via anchor links:

Webdesign: How to Guide Your Visitors Through Long Pages
Image Caption: Screenshot of Wikipedia.org

This anchor link navigation does not only make navigating between the single sections easier, but can also have a direct influence on the look of the so-called snippet – the website preview in the Google search results.

However, a table of contents is not always the optimal solution: it moves relevant information and (media) elements in the content area away from the viewing area of the users. Additionally, users that want to navigate between different topics always have to return to the beginning of the page.

Of course, we can say this again: brands or platforms like Wikipedia can afford to do this, but I also believe that the encyclopedia will have to change this with a redesign in the future, as otherwise, pages with better user reactions (so-called user signals), and more relevant information in the viewing area (“above the fold”) will contest the rank.

Navigation Transformation

In my opinion, due to the holistic contents and the demand for an optimal user experience, the menu of websites should not be limited to URLs anymore. Instead, it also has to offer a navigation within the respective URL via anchor links. Because I, as an SEO consultant, don’t have a design-related function, I often give three examples on how to solve that:

1. Separate Navigation

The easiest solution is the one above with the menu items aligned next to each other. I call this type of menu vertical array, as the arrangement also describes the so-called verticals. In marketing, verticals are application areas or branches. Each vertical represents an URL which is the optimized for the application or branch solution (the topic or the keyword).

Webdesign: How to Guide Your Visitors Through Long Pages

The left (marginalia) column gets the anchor navigation. This creates the connection in a style similar to the current menu item. The reading direction from top left (logo) to bottom right (URL, navigation, then anchor navigation) makes the orientation easy as well (thus, no right-sided alignment of the anchor navigation).

I place the anchor links below each other (horizontal alignment) to create the connection to the actual content. Ideally, the anchor link menu items get highlighted while scrolling, or are animated similarly to the active URL link in the main menu, underlining the connection between menu and content.

There’s still enough room to place the most important call to action button (for the conversion optimization), and the second most important one (sharing button) in the header. Breadcrumbs (navigation paths), language selection, and search, as well as an optional back or scroll-up button, can be implemented too.

This navigation is well-suited for conservative pages with users that are still used to controls via an upper, and left-sided menu. However, things get more difficult when the navigation is realized responsively: then, the anchor links have to be integrated into the URL navigation.

2. Combined Vertical Navigation

A different way to combine URL and anchor links is to align everything vertically in the header:

Webdesign: How to Guide Your Visitors Through Long Pages

The advantage is that it only takes up little space, leaving more room for the actual content. Whether a sidebar or the entire space is used for contents remains fully open, granting high flexibility.

This is mainly useful for the display on tablet PCs, and small browser widths. For my definition, this mainly affects blogs and consumer-oriented pages that serve the purpose of research and surfing. Here, couch surfers with tablets or users that have multiple browser windows open next to each other are more common.

The disadvantage of this navigation is, that not only a separate display is needed for smartphones, but also that the number of menu items and anchor links is usually limited.

Combined Horizontal Navigation

The last and, to me, most interesting solution is the combination of menu items and anchor links in the left column.

Webdesign: How to Guide Your Visitors Through Long Pages

While it does require the content to be displayed in an appealing way even with smaller browser width, this comes with a bunch of advantages:

For starters, we can pursue a “mobile first” approach due to menu items aligned above each other: the navigation can be displayed in the same way on both desktop and mobile resolutions (ideally hidden under a hamburger icon for mobile users).

Furthermore, there is no limit on the number of URL and anchor links. Marketers and editors get to develop content that’s as long as they desire with many subheadings. The navigation follows the content’s storytelling and then leads to a URL-specific call to action button.

Disadvantage: even here, at one point, we are restricted in the number of links. To fight this, we only let the anchor links lock while scrolling.

Conclusion

Navigation with anchor links is still in its early stages, and (thank god) there’s no generally applicable solution. Nonetheless, I strongly recommend paying attention to this during the next web design or relaunch (and also following a few basic rules of performance optimization).

Aside from the better user-friendliness, the URL anchor link menu combination also offers the chance to better push comments, and ratings on a page, as these can be implemented directly within the menu as a call to action and conversion. Especially the combination of comments with star ratings provides additional chances to turn the web design into measurable success. This sets your website apart from the competition, making you gain a lot more visitors than you would gain without structured information.

Do you have other ideas on how to combine URL, and anchor links for holistic contents in a simple navigation? Are you already using something like that in your projects? Tell us in the comments!

Categories: Others Tags:

Vancouver Rebels Over Generic Rebrand

March 7th, 2017 No comments

Many who don’t live in Vancouver at least know the western Canadian city for a few things: Sky-high housing prices, green sensibilities, and lots of rain. Now, thanks to local design and digital activists, they also know Vancouver for…producing a new city logo that has been blasted for being uninspiring.

In an open letter published on Medium, local Vancouver art director, Brock Ellis, lambasted Robertson’s and the City Council’s approval of the new logo as “disappointing” and something that doesn’t allow Vancouverites to express pride in their city. At the same time, the new design has been eviscerated on social media, creating a two-for-one punch that has forced the mayor into retreat.

Robertson has put the new logo on ice, directing city officials not to plaster it all over city assets, as was the original plan. Robertson, under fire for going the cheap route by only spending $8000 CAD to commission the redesign, is at least listening to designer and public backlash from this botched logo rollout.

When one compares the old city logo—a combination mark that included a wordmark with thinner fonts together with a flower—to the new one, it’s quite obvious to see what went so wrong.

Above: the original Vancouver logo. Below: the revised wordmark.

The new logo has been simplified, perhaps over-simplified, by moving exclusively to a workmark; the choice of Gotham block letter font has been the main target of the criticism.

The use of such a heavy, corporate font is viewed by the detractors as not in keeping with the city’s modern, more liberal sensibilities. In addition, Gotham is rather ubiquitous and so isn’t a sound choice for a city trying to position itself as unique. In other words, the font is simply too commonplace for it to be useful or meaningful in city branding.

While the redesigned logo sports blue and green—perhaps to symbolize rain and the city’s green sensibilities—it has prompted some to write it off as an alternate version of the Vancouver Canuck’s colors (blue and green feature prominently on the team’s uniforms).

The mayor has claimed that one of the reasons the unpopular logo was approved was to help those in Vancouver who don’t speak English as a first language to better understand the new logo. That begs the question, of course, as to why the city went ahead and still chose English words in the wordmark instead of going with a purely iconic or symbolic logo. Vancouver is, after all, home to many immigrants whose first language is something other than English.

Overall, this row over the botched redesign illustrates the pitfalls of going with the lowest bidder for something as important as a city’s logo, which ties into the even more important aspect of branding. Further, the failure of the mayor and the city council to also engage with and take feedback from the local design community during the logo redesign is another huge factor in this brouhaha.

302 Found

Found

The document has moved here.


Apache Server at www.mightydeals.com Port 80

Source

Categories: Designing, Others Tags:

Install NPM And Start Building Using NPM Scripts

March 7th, 2017 No comments
Building with NPM

While NPM is usually used for package installation with dependency management, we can also use it for building.

This might seem kind of odd, using a package management tool for building our JavaScript applications, but I think it has some great advantages:

  • Simplicity: there’s a lot less configuration.
  • Fewer dependencies: established build tools like grunt and gulp need wrappers for many popular libraries.
  • One less tool in your build process you need to worry about: chances are, you’re already using npm.

And it’s not like npm wasn’t designed for this: every default npm configuration has one build task by default:

    "test": "echo "Error: no test specified" && exit 1",

So we’re going to take full advantage of npm’s task-running abilities and learn:

  • How to install npm.
  • Where and how npm build tasks are configured.
  • How errors are handled in npm builds.
  • How you can set up a watch for tools that don’t support it; and,
  • When an npm build isn’t right for you

Let’s get started!

Building with NPMWhat you need to build with npm

You need npm, of course. If you’re doing JavaScript development, you probably have node and npm installed already. If you haven’t, you’re not going to get far without them.

To check, open a command prompt[1].

Enter:

> node -v

If you don’t have node installed this will cause an error. Read on to find out what to do about it (otherwise you can go straight to the next section).

The easiest way to install Node.js – and by extension npm – is to use one of the installers from the Node downloads page. This will make life a lot easier.

Linux users should use their system’s package installer. The Node.js website has excellent instructions for doing this.

As soon as you’re done with your installation, run node -v and npm –v to check everything’s working:

> node -v
v6.2.1
> npm -v
4.3.0
>

How to build with npm scripts

NPM build scripts

The scripts section of npm’s package.json is where all the action happens. This is where the test command is included in package.json by default.

The configuration of a scripts entry is pretty straight-forward:

"scripts": {
  "<command name>": "<command to execute>"
},

Where command to execute is anything that your command line can run.

Just to make the point – if we have the following in package.json:

"scripts": {
  "make-point": "echo "Making the point.""
},

And if we run that:

> npm run make-point

Then we get:

> npm-build@1.0.0 make-point /Users/luke/sync-default/npm-build
> echo "Making the point."
Making the point.
> 

Which is illustrative, but not very useful. A more useful example would be:

"scripts": {
  "build": "webpack"
},

Which I run like this:

> npm run build

To get:

> npm-build@1.0.0 build /Users/luke/sync-default/npm-build
> webpack

Hash: b6cf6e19a26c3c889f63
Version: webpack 2.2.1
Time: 57ms
    Asset     Size  Chunks             Chunk Names
bundle.js  2.57 kB       0  [emitted]  javascript
   [0] ./NpmBuilt.js 64 bytes {0} [built]

Because of the heavy lifting webpack can do for us, I think projects that use it (and browserify too!) are great candidates for npm builds.

Pre and Post hooks with npm

Chaining NPM commands

The neat thing about npm’s script commands is that we can automate tasks by prepending ‘pre’ or ‘post’ to them. So let’s make sure our tests always run before we build:

"scripts": {
  "test": "mocha",
  "prebuild": "npm test",
  "build": "webpack"
},

So that running:

> npm run build

Produces:

npm-build@1.0.0 prebuild /Users/luke/sync-default/npm-build
> npm test

> npm-build@1.0.0 test /Users/luke/sync-default/npm-build
> mocha

  nb
    ✓ should return 0
  1 passing (8ms)

> npm-build@1.0.0 build /Users/luke/sync-default/npm-build
> webpack

Hash: b6cf6e19a26c3c889f63
Version: webpack 2.2.1
Time: 57ms
    Asset     Size  Chunks             Chunk Names
bundle.js  2.57 kB       0  [emitted]  javascript
   [0] ./NpmBuilt.js 64 bytes {0} [built]

Ok, so that’s a bit more fun. Of course, we need to do more with our code than test it.

Here’s our next version of the scripts configuration in package.json:

  "scripts": {
    "lint": "jshint ./src",
    "test": "mocha",
    "pretest": "npm run lint",
    "prebuild": "npm ./test",
    "build": "webpack"
  },

So now we’ve added lint and pretest, so that running our test or build commands will automatically lint our code first.

But what about when things go wrong?

Dealing with errors in npm builds

NPM build errors

You want to know when things go wrong, right? What’s the use of deploying code that doesn’t pass your tests?

Npm helps us out here by making sure that any command from scripts that returns a non-zero value stops npm in its tracks.

For example, if I introduce a lint error and execute my build command, this is what I’ll see:

> npm run build

> npm-build@1.0.0 prebuild /Users/luke/sync-default/npm-build
> npm test

> npm-build@1.0.0 pretest /Users/luke/sync-default/npm-build
> npm run lint

> npm-build@1.0.0 lint /Users/luke/sync-default/npm-build
> jshint ./src

src/NpmBuilt.js: line 2, col 11, Missing semicolon.
1 error
npm ERR! Darwin 16.4.0

[... any many more errors after that.]

So the awesome part of this is that we can drop npm run into a CI build tool like Jenkins, Travis CI et al and have 100% awareness when a commit breaks your teams project.

The frustrating part of this for developers is that the error output from npm is verbose and 90% is not related to the actual error!

Here’s a taste:

npm ERR! Failed at the npm-build@1.0.0 prebuild script 'npm test'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the npm-build package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm test

That’s about a tenth of the error output I get when my build fails. Npm even suggests I talk to the package author about the problem!

However, I prefer this to the alternative of running npm in silent mode that still provides a sensible error, but doesn’t tell you where it came from, e.g.

> npm run build --silent
src/NpmBuilt.js: line 2, col 11, Missing semicolon.
1 error
>

Clearly, this is npm amidst an identity crisis – package manager or build tool?

As useful and valid as it is to use npm for builds, this is the one major compromise I’ve come across. I live with the crazy error output.

How to watch for changes with npm

A final gotcha for building with npm is that it doesn’t natively support watching for changes to code.

One of the big advantages of the established build tools like Grunt and Gulp is that they provide a universal interface for watching code changes.

This means that even if a particular tool doesn’t support watching for changes, grunt or gulp would take care of it for you.

Luckily for us, watch support in npm is a package install away:

> npm install --save-dev watch

Ok, now we can use our brand new watch like this:

"watch ": "watch 'npm run command' --ignoreDirectoryPattern=dist",

Where command is the command you want to run every time the filesystem changes.

Take note of –ignoreDirectoryPatternFlag=/dist/

This tells the watch command to ignore changes in the dist directory.

If we didn’t there’d be an infinite loop where our build command is triggered by watch, puts new assets in the dist directory, which triggers watch… and so on.

If you use the watch package, you should instruct it to ignore any directory that’s modified by your build process.

Happily, the vast majority of tools that compile or bundle web resources have watch functionality of their own, and are smart enough not to spurred into action by their own side-effects.

Finally, are npm builds for everyone?

Personally, I’m a big fan of using NPM for building.

I’ve been around long enough to have dealt with the giant, crufty Make and ant.xml files that programmers were afraid to touch, and the sight of a couple hundred lines of build configuration gives me the shivers.

So I appreciate the simplicity and ‘obviousness’ of npm builds.

But it’s not for everyone, and here’s why:

  1. You need to be comfortable using the command line and making bash work for you. Redirecting output and chaining commands is common in npm builds.
  2. Related to the first point – you’ll need to learn how to run your pre-compilers, linters and bundlers from the command line. I like this myself, but it’s not for everyone.
  3. Windows users will find precious few usage examples if they’re using cmd.exe.
  4. I’d only use it on new projects. Unless they’re causing real problems, I’ve found that re-writing big build configs for another tool is rarely worth the effort. Refactoring in the existing tool would be a better payoff.

Having said all that, I hope you’ll be able to benefit from using npm for your builds in the future!


Notes:

  1. The Terminal application on macOS; I haven’t had a chance to try bash on Windows 10, but everything discussed here will work in cmd.exe.

Read More at Install NPM And Start Building Using NPM Scripts

Categories: Designing, Others Tags:

How to get noticed by major brands

March 7th, 2017 No comments

We’ve all dreamt about working for big brands. Microsoft, Google, Apple, McDonalds, Coca-Cola…they all have one thing in common; they’re household names. But getting their attention can be tricky. Many of them hire thousands of employees and have offices all over the world. They probably hear the same pitch a hundred times from the same potential freelancer hoping to get that lucky break to create something millions of people will see, rather than just a few.

So how do you get their attention? What are the major brands looking for from a potential employee or freelancer? We’re going to look at some practical suggestions to get noticed by major brands and what to do once you have been noticed. Whilst these may not work for everyone, they are tried and tested methods that have been known to catch the attention of some of the biggest companies in the world.

Build a strong portfolio

Ultimately, the first thing that any major brand is going to want to look at is your work. Even if you have a CV brimming with accolades and testimonials, the major brands will want to see examples of work, not words on a page. They’ll read through hundreds of CVs boasting about how great a person is. Sure, having a masters degree in a particular subject is beneficial, but a picture paints a thousand words! Major brands are much more interested in you and your past work, than they are about how many good grades you got when you were a teenager.

Make sure that you build up a solid portfolio of examples that really showcase what you’re about and let your work do the talking.

If you are just starting out, offer your services to some of your local businesses at either a discounted rate or for free. Even if you’re creating something for Mrs Brown’s small cupcake shop down the road, go above and beyond the call of duty. By doing that, you’ll make something that you’d be proud to add to your portfolio. You never know, Mrs Brown may be married to the decision maker of a major brand, and her referral might just get your foot in the door.

Whilst we’re talking about portfolios, don’t feel like you need to show every single piece of work you’ve ever done. Six to eight great examples of your best work will help define you a lot better than forty average examples will. Big brands don’t have time to plough through heaps of portfolio examples, so just pick out a handful of work examples you think best show off your skills and elegantly display them either digitally or in print.

Give away freebies

Everyone loves free stuff. And you’ll be surprised at how much you’ll get noticed if you give out some freebies. If you’re a designer, simply offering some free icon sets, or a couple of template PSDs will get you noticed. If you offer marketing services, write up a free tips ebook. Whatever services you offer, you can usually think of something that won’t take too much of your time to create, but will be useful for others.

Take full advantage of sites like behance.net and dribble.com to be the platform for these free giveaways. You’ll be surprised at how many big brand employees look at these sites – especially if they’re looking for a freelancer!

Stand out from the crowd

Bear in mind that big brands speak to hundreds of prospective freelancers and they receive numerous emails from hopefuls on a daily basis. You need to make sure you stand out from the crowd. One way to do that is with your approach. If you notice that a big brand is looking for a freelancer, rather than simply emailing them a cut-and-paste cover letter and a link to your portfolio, go into their office dressed smart and give them a printed booklet of your portfolio of work. Print may be a dying art, but the fact that it’s now such a rarity will make you stand out from others.

If you really want to stand out from the crowd, use companies like Burgopak to create some unique packaging for your portfolio of work, and send it to them. You can guarantee that you’ll catch their attention and they’ll be calling you up to speak.

Freelance for agencies

In a lot of cases, big brands would rather work with an agency than an individual. That’s usually because they get the added benefit of a team of great minds, rather than just one. Most larger projects will be outsourced to an agency, so make sure you get into the books of as many agencies as you can.

You can use the same attention grabbing methods mentioned above. Get a suit on, create some sort of leave-behind that gets people looking at your work, and then go into their office directly. You’ll catch their attention a lot more than a generic email sitting in their inbox.

Alternatively, search for some decent design agencies in your country (yes country, not area; quite a few will be happy to work with you remotely as long as you’re in their timezone!) and write them an email. Don’t be tempted to write a generic email and spam it to fifty agencies – you’ll get zero replies.

Rather, pick out a few agencies that are already boasting about having worked with major brands and write them a bespoke email. Compliment them on their client list, and then blow your own trumpet. Make them feel as though they’re missing out by not having you on their freelance books. Mention how you can add value to their business with your own services and experience. If you have the time, and you’re really committed, maybe even show that service directly to them!

For example, if you’re a website designer, redesign a small part of their website and explain how your redesign will improve their site. If you’re a marketer, do some competitive intelligence and tell them what their rivals are doing and what they’re missing out on. After you’ve sent an email, if you don’t hear anything, don’t be scared to give them a follow-up call to make sure it didn’t fall into their spam folder or get lost in amongst others. Whilst it may take some of your time, with no guarantee of getting a return, if you can get even just one major brand project via an agency, you’ll start drawing the attention of others.

Don’t be scared to take the initiative

It can be a bit daunting trying to get the attention of major brands. But don’t be scared to take the initiative. If you offer a service that truly is unique, they may not know they need your services until you tell them about it! You’ll need to push your way into the view of the major brand. In some cases, the best method might be to bulldoze your way into their office and request a meeting with a decision maker; other times it may require a more subtle method.

If they’re reluctant to see you at first, keep pushing. You may need to vary your approach and try something more tactful. Find the name of a decision maker within their office, and send them a keepsake with your name and brand on it. For example: If you’re targeting major brands in the car industry, find a company that creates customised toys (they’re normally relatively cheap if you buy a few in bulk) and sent out some toy cars with your branding on and a little cover letter explaining who you are and how you can benefit their business. They might not have a need for your services immediately but it’s likely that the toy will sit on their desk with your branding on, and remind them every time they look at it about you. When they then do have a need for your services, you’ll be the first person they contact!

What if you manage to catch their attention and you’ve been invited for an interview or meeting with some of their team? Heres some tips on how to nail the conversation and continue to capture their attention…

Do your research

The advantage of speaking to a major brand is that they will have a very public history. Make sure you do your research. Even if it’s a brand that you think you know well, be sure to check up on what they’ve done in the past and their future plans. If you’re pitching a particular service to them, research statistics and figures that will back up your claim that they need you.

Don’t forget to do research on yourself too! That may sound stupid, but they definitely will be googling your name and checking your past work. If you do the same, you can anticipate questions that they might fire at you and work out how best to answer them before the meeting or interview. Make sure you’ve got a clear view of who you are, what you’ve done and what you can offer them.

Be confident and enthusiastic but humble

There’s a fine line between being confident and being cocky. You need to be able to walk into the room and instantly capture their attention with your demeanour and your understanding of your industry. Enthusiasm is infectious, so make sure you’re enthusiastic about working for them, but be careful not to come across like a hyper-active squirrel!

You equally need to make sure that you don’t come across as over-confident, as this can instantly detract from your presentation. It can be difficult to do a self-assessment of our approach, so get your partner or a trusted friend to ‘rehearse’ the meeting with you, and then ask them to feedback on how you come across. Rehearsing anticipated questions and responses will help you be confident without coming across as arrogant.

Don’t be scared to admit that you don’t know the answer to a question or that you have no experience working with something they need you to. Bear in mind that the person you’re talking to is likely to be your boss, or part of the team you work with. They’ll be much more likely to warm to someone who is humble enough to admit they still have things to learn than someone who claims to know everything. In a lot of cases, they’ll be quite impressed that you have the desire to learn more and that you have the drive and passion to push yourself – even if you are already very good.

Make them remember you

As mentioned earlier, major brands speak to hundreds of people a week. Particularly if they’re hiring a new employee or a freelancer, they’ll quickly forget you if you don’t do something to make them remember you. Of course, you want to keep it professional. Turning up in a chicken suit will get you remembered for all the wrong reasons!

Never underestimate the power of a leave behind. Even if you have a digital portfolio, make a simple printed copy in a smart folder and give it with them to look through once you leave. Tailor your approach to their brand and how you can improve it. Turn up with enthusiasm and confidence but be humble enough to admit if you don’t know an answer. Most importantly, don’t forget they’re human! Whoever you end up speaking to, they’ll have a personality and a sense of humour (sometimes not a very good one!). They’ll have families, homes, concerns and stresses just like you. In a lot of cases, they too will have had a lucky break somewhere along their career to get them to their position, so they’ll sympathise with you. And if you show potential and initiative, you’re very likely to get noticed by major brands.

302 Found

Found

The document has moved here.


Apache Server at www.mightydeals.com Port 80

Source

Categories: Designing, Others Tags: