Thursday, April 18

Tag: Web

Web Tricks

Build a Phone System for Your Company With Twilio, Okta, and JavaScript

If you've ever worked for a company with more than a few employees, you've probably seen some interesting phone systems. When I used to work at Cisco, everyone was given a dedicated Cisco desk phone that hooked up to a server somewhere in the company and each employee was assigned a unique phone number and extension. I never really liked that setup. It annoyed me that I had this big, clunky desk phone taking up space, collecting dust, and generally not being useful. The one time I did actually want to use my desk phone I couldn't figure out how to dial a number to the outside world and spent a frustrating half-hour accidentally calling other departments before I gave up and used my cell. Not too long after my Cisco experience I joined a smaller company. They didn't have desk ph...
Smart Bundling: How To Serve Legacy Code Only To Legacy Browsers
Web Tricks

Smart Bundling: How To Serve Legacy Code Only To Legacy Browsers

A website today receives a large chunk of its traffic from evergreen browsers — most of which have good support for ES6+, new JavaScript standards, new web platform APIs and CSS attributes. However, legacy browsers still need to be supported for the near future — their usage share is large enough not to be ignored, depending on your user base. A quick look at caniuse.com’s usage table reveals that evergreen browsers occupy a lion’s share of the browser market — more than 75%. In spite of this, the norm is to prefix CSS, transpile all of our JavaScript to ES5, and include polyfills to support every user we care about. While this is understandable from a historical context — the web has always been about progressive enhancement — the question remains: Are we slowing down the web for th...
What’s New for Designers, October 2018
Web Tricks

What’s New for Designers, October 2018

You might notice a theme this month in our collection of new tools for designers: color. There are lots of color resources sprinkled throughout this collection. But there are plenty of other goodies as well, including a beta tool from Google and some new ways to think about layouts.   Logo Lab Logo Lab is a new tool that helps you figure out if a logo is sound. Simply upload a logo, and you’ll be presented with visual experiments that test key factors like scalability, silhouette and balance. The visual tool shows where a logo succeeds and where it could use some improvement. This can be a great resource for individual testing or client presentations. It includes 10 tests (including a color blindness simulator and scalability test) and all you have to do to use it is upload a PNG...
Designing Experiences To Improve Mental Health
Web Tricks

Designing Experiences To Improve Mental Health

Did you know that a simple search for “depression” on the iPhone App Store brings up 198 results? In the Android Play Store, it brings up 239. The categories range from “Medical” to “Health & Fitness” to “Lifestyle.” The apps themselves offer everything from “depressing wallpaper” to “mood tracker” to “life coach.” We are approaching a golden age of digital therapeutics and design for mental health — if we as UX practitioners do our jobs well. Given the plethora of apps available, you might assume that there are already dozens of wonderful digital therapies available for people struggling with mental health disorders. But — according to initial studies by clinical psychologists — you would be wrong. Most apps are useless at best, and harmful at worst, due primarily to a disconnect b...
5 Secrets of Image-Rich Websites
Web Tricks

5 Secrets of Image-Rich Websites

When was the last time you visited a website with no images? As web designers, we love adding images to our designs because images are memorable and give us a direct channel of communication to the audience’s brain. Also, images are universal and processed by our brains faster than text. That’s partly why the “story” medium (short-form videos with effects and overlays) and emojis attract engagement. But something else has also been happening since “web 2.0” came along. The high usage of images all over the web, some fueled by user-generated content, is creating a problem for web designers who now must deliver rich experiences in the face of an ever-increasing number of images. In the following sections, we’ll discuss in detail five things to keep in mind when designing smart, imag...
Authenticate a Node ES6 API with JSON Web Tokens
Web Tricks

Authenticate a Node ES6 API with JSON Web Tokens

In this guide, we'll be implementing token based authentication in our own node.js A.P.I. using JSON web tokens. Plan of attack We'll begin by: Setting up our development environment and initializing our express server. Creating our first basic route and controller. Fleshing out our routes and controllers to add users and login users. Creating a route and controller that will handle getting all users. Finally, we'll Add middleware to protect our get users route by requiring a user to be an admin and to have a valid token. Validate that only an admin with a token can access the protected route. Sounds exciting? Let's get to it then. Setup Before we get started in earnest, we'll need to have a few things taken care of. Folder structure Here's what our folder...
Web Tricks

Saving Grandma’s Recipes With Xamarin.Forms

My grandma makes the best, most fluffiest, go weak-in-your-knees buns that anybody has ever tasted. The problem is, there’s a ton of secret ingredients (and I’m not just talking love) that go into those buns, and those ingredients and directions are all stored in my grandma’s head.We all have family recipes like that, and instead of possibly forgetting them, in this article we’re going to create a mobile app for iOS and Android using Xamarin.Forms that will save them for myself and future generations of my family! So if you’re interested in writing mobile applications, but don’t have the time to write the same app over and over again for each platform, this article is for you! Don’t worry if you don’t know C# from a Strawberry Pretzel Salad; I’ve been writing Xamarin apps for over 8 y...
Create Sites Easily with WP Page Builder
Web Tricks

Create Sites Easily with WP Page Builder

There’s little doubt that WordPress is one of the biggest web technologies in the world, powering around a third of the web, and growing all the time. Until recently WordPress was only for the initiated, those developers who’d spent years learning how to dig into the source code and tinker, without breaking their whole site. In the last few years WordPress has been revolutionized by the introduction of page builders, applications that allow anyone—even someone with no design or coding knowledge—to create a professional standard WordPress site on the fly. Today, we’re talking about one of the most lightweight options on the market, with performance that outstrips many rival tools: WP Page Builder. WP Page Builder is the perfect tool for web professionals who want to branch into WordPr...
Web Tricks

Laravel Eloquent: API Resources

Introduction When creating API's, we sometimes specifying the data they want back in the various controller actions: public function show(Book $book) { return response()->json([ 'data' => [ 'title' => $book->title, 'description' => $book->description, 'author' => $book->author->name ] ]); } Notice we omitted the attributes created_at and updated_at when formatting the response? Take another scenario where we want to update a book and expect a response back. public function update(Request $request, Book $book) { $book = $book->update($response->all()); return response()->json([ 'data' => [ 'title' => $book->title, 'description...
How to Create Magnetic Content
Web Tricks

How to Create Magnetic Content

I know I know: Content is king! You’re already sick to the back-teeth of hearing it.
 You’ve made your content, you know your target audience—you just want to build some links and get some darn traffic to that content, am I right? Not to rain on your parade, but what if your content really is trash?
 Will anyone actually link to it? If it is subpar, then probably not, and trying to build links to it will be a colossal waste of time. I’m borrowing this saying from a giant in the SEO field, Ryan Stewart: If you don’t have anything of value to say, don’t say anything at all Only create content which will be of real value to people. If you provide, true, honest value in your content the audience will love you. Don’t hold back! Don’t worry about things like “does providing free stuff de...
Form Design Patterns Book Excerpt: A Registration Form
Web Tricks

Form Design Patterns Book Excerpt: A Registration Form

Let’s start with a registration form. Most companies want long-term relationships with their users. To do that they need users to sign up. And to do that, they need to give users value in return. Nobody wants to sign up to your service — they just want to access whatever it is you offer, or the promise of a faster experience next time they visit. Despite the registration form’s basic appearance, there are many things to consider: the primitive elements that make up a form (labels, buttons, and inputs), ways to reduce effort (even on small forms like this), all the way through to form validation. In choosing such a simple form, we can zoom in on the foundational qualities found in well-designed forms. How It Might Look The form is made up of four fields and a submit button. Each fie...
Web Tricks

React Apps with the Google Maps API and google-maps-react

This tutorial aims at integrating the google maps API to your React components and enabling you to display maps on your website. Introduction to Google Maps API. At some point of our lives, we've all gotten a chance to use and interact with the google maps, either through finding directions, viewing our current location, ordering cabs or estimating distance and time from one point to another. Including the Google maps API in a React App is actually far much easier than expected due to its rich documentation which I highly suggest that you look into, and the npm package by Fullstack React. Prerequisite: React Knowledge (at least intermediate level) A Google Maps API Key Go on ahead and grab your API key here. Simply click on the Get Started button Tick on the maps...
Web Tricks

Creating Multistep Forms With React and Semantic UI

Forms are the standard method used to collect user inputs on web applications. However, sometimes we may be collecting large amounts that may result in a very large form with several fields. This can be a pain not just for the user but for the developer as well since they will have to fit these fields into the form in a way that still looks appealing to the user. The solution? Break the form into several sections collecting a certain type of information at each point. undefined Fortunately for us, react makes this very simple to implement. We can do this by breaking down the sections(steps) into individual react components that collect certain inputs. We can then choose which components are rendered at each step by manipulating state. In this tutorial we shall walk through how we can ...
Build a Custom Toggle Switch with React
Web Tricks

Build a Custom Toggle Switch with React

Building web applications usually involves making provisions for user interactions. One of the major ways of making provision for user interactions is through forms. Different form components exist for taking different kinds of input from the user. For example, a password component takes sensitive information from a user and masks the information so that it is not visible. Most times, the information you need to get from a user is boolean-like - for example: yes or no, true or false, enable or disable, on or off, etc. Traditionally, the checkbox form component is used for getting these kinds of input. However, in modern interface designs, toggle switches are commonly used as checkbox replacements, although there are some accessibility concerns. In this tutorial, we will see how to build a...
Building Intelligent Apps with MongoDB and Google Cloud – Part 1
Web Tricks

Building Intelligent Apps with MongoDB and Google Cloud – Part 1

Data analytics is a perpetual underachiever. Every generation of tools promises us better insight and never quite delivers. So we get stuck re-platforming and re-designing, hoping the next iteration will finally get us to the intelligence utopia. Yet modern applications must provide rich experiences, offer decision support, and continuously learn and adapt to win their users. Analytics and AI are at the heart of these Intelligent Apps. We decided to build an Intelligent App to demonstrate how easy it is to take advantage of ML and AI cloud services without hiring a team of data scientists. First, we built a simple e-commerce application - MongoDB SwagStore - using React and MongoDB Stitch with MongoDB Atlas on GCP. Stitch saved us hundreds of lines of code and our app was ready in days. Bu...