Saturday, November 23

Author: phpInfo

Flutter: Google’s take on cross platform
CSS Tricks

Flutter: Google’s take on cross platform

Flutter is a mobile SDK that, at its core, is about empowering everyone to build beautiful mobile apps. Whether you come from the world of web development or native mobile development, Flutter makes it easier to create mobile apps in a familiar, simplified way, without ever giving up control to the framework. As of this writing, Google AdWords and Alibaba are both using Flutter in production. You can see more examples of who’s using Flutter (including the app I’ve worked on) on Flutter’s website on the showcase page. Right now, there’s a lot of buzz about Flutter. The question I see most often is, "Flutter or React Native...which one should I use?" Like all things in programming, its all about the tradeoffs you’re willing to make. I’m going to try to convince you that Flutter is the best ...
Web Tricks

Preparing Your App For iOS 12 Notifications

Preparing Your App For iOS 12 NotificationsPreparing Your App For iOS 12 Notifications Kaya Thomas 2018-09-05T13:30:35+02:00 2018-09-06T11:42:22+00:00 In 2016, Apple announced a new extension that will allow developers to better customize their push and local notifications called the UNNotificationContentExtension. The extension gets triggered when a user long presses or 3D touches on a notification whenever it is delivered to the phone or from the lock/home screen. In the content extension, developers can use a view controller to structure the UI of their notification, but there was no user interaction enabled within the view controller — until now. With the r...
Web Tricks

Integrating MongoDB and Amazon Kinesis for Intelligent, Durable Streams

You can build your online, operational workloads atop MongoDB and still respond to events in real time by kicking off Amazon Kinesis stream processing actions, using MongoDB Stitch Triggers. Let’s look at an example scenario in which a stream of data is being generated as a result of actions users take on a website. We’ll durably store the data and simultaneously feed a Kinesis process to do streaming analytics on something like cart abandonment, product recommendations, or even credit card fraud detection. We’ll do this by setting up a Stitch Trigger. When relevant data updates are made in MongoDB, the trigger will use a Stitch Function to call out to AWS Kinesis, as you can see in this architecture diagram: What you’ll need to follow along: An Atlas instance If you don’t already have a...
Web Tricks

Code Challenge #13: Going From ES5 to ES6

Previously on the Scotch Code Challenge, we have solved challenges involving String, Object and Array Manipulation with functional programming patterns. How about we touch up the script in ES6! This week on the Code Challenge we will convert ES5 code to even better and shorter code using ES6 Syntax. ES6 is an update of JavaScrpt which shipped with tons of amazing features to make write JavaScript painless and bug-free! Previously we all used ES5, pretty decent but more prone to leaks and more arduous to write. The Challenge In this challenge, we are required to re-write simple ES5 code to ES6. This challenge focuses on the most common ES6 features utilized. Including: Arrow Functions Enhanced Object Literals Template Literals Destructuring Spread Operation. Five challenges are listed in th...
Web Tricks

Debugging Create React App Applications in Visual Studio Code

In this post, we are going to create an Create React App application, then add configuration to debug it in Visual Studio Code. Watch on YouTube TLDR - For an Create React App application, install the Debugger for Chrome extension, create a debug configuration in VS Code, and then run in debug mode. Learn VS Code If you're interested in learning more about VS Code, you definitely want to check out the upcoming Learn VS Code course. Creating a Starter Project To be able to test an Create React App application, you need an Create React App application :) I'll provide the basic steps, but for more reference on how to get started look at the Create React App page. First, you'll need to install the Create React App. npm install -g create-react-app After that finishes, you'll need to actu...
Render Caching for React
CSS Tricks

Render Caching for React

Server Side Rendering (SSR) is a very useful technique that makes web apps appear faster. The initial HTML is displayed before the JavaScript is parsed and, while the user is deciding what to tap on, our handlers are ready. Server side rendering in React requires additional work to setup and has server costs. Furthermore, if your server team cannot have JavaScript running on your servers, you are stuck. It significantly complicates the CDN setup especially if you have pages that require login and where the user’s information is managed. I want to walk through a new concept called Render Caching. This is a cool trick that can give users an instant performance boost just like that of SSR without having to resort to writing code on the server. What is Render Caching? The migration from stati...
Web Tricks

Take A New Look At CSS Shapes

Take A New Look At CSS ShapesTake A New Look At CSS Shapes Rachel Andrew 2018-09-04T13:30:57+02:00 2018-09-04T11:38:45+00:00 CSS Shapes Level 1 has been available in Chrome and Safari for a number of years, however, this week it ships in a production version of Firefox with the release of Firefox 62 — along with a very nice addition to the Firefox DevTools to help us work with Shapes. In this article, I’ll take a look at some of the things you can do with CSS Shapes. Perhaps it’s time to consider adding some curves to your designs? What Are CSS Shapes? The CSS Shapes specification Level 1 defines three new properties: shape-outside shape-image-threshold shap...
Streamlining UX with Anticipatory Design
Web Tricks

Streamlining UX with Anticipatory Design

Creating great UX is a primary goal for all product designers. It’s up to the designer to make a process of interaction with a product as simple as possible. Modern products try to achieve simplicity by following a fundamentally different approach called Anticipatory Design. This article is intended to make you familiar with the concept of anticipatory design, as well as share a few excellent examples of how anticipatory design can be used in practice. What is Anticipatory Design? Anticipatory design is a design that delivers what users want before they want it. It can be said that anticipatory design is one step ahead of users. How Does Anticipatory Design Work? Since making a decision requires some cognitive resources, it’s possible to save resources by removing the need to make a decis...
20 Best New Portfolios, September 2018
Web Tricks

20 Best New Portfolios, September 2018

Hello Readers. It’s September, so as soon as your kids are off to school, maybe you can finally have a five-minute power nap. Take that power nap with equal parts gusto and relief, dear Reader. You’ve earned it. Last month, one of you asked for less “ultra-modern” designs, and the design gods have seen fit to provide. We still have some of that ultra-modern goodness — because apparently now that it’s been started, we can’t make it stop — but I managed to find and sprinkle in a few more classic-feeling designs. Enjoy. Note: I’m judging these sites by how good they look to me. If they’re creative and original, or classic but really well-done, it’s all good to me. Sometimes, UX and accessibility suffer. For example, many of these sites depend on JavaScript to display their content at al...
Popular Design News of the Week: August 27, 2018 – September 2, 2018
Web Tricks

Popular Design News of the Week: August 27, 2018 – September 2, 2018

Every week users submit a lot of interesting stuff on our sister site Webdesigner News, highlighting great content from around the web that can be of interest to web designers. The best way to keep track of all the great stories and news being posted is simply to check out the Webdesigner News site, however, in case you missed some here’s a quick and useful compilation of the most popular designer news that we curated from the past week. Note that this is only a very small selection of the links that were posted, so don’t miss out and subscribe to our newsletter and follow the site daily for all the news.   21 CSS Animation Examples   Google is Rolling Out a New Chrome Design Across all OSs Next Month   7 CSS Dividers   Why your Static Websit...
CSS Tricks

New mobile Chrome feature would disable scripts on slow connections

This is a possible upcoming feature for mobile Chrome: If a Data Saver user is on a 2G-speed or slower network according to the NetInfo API, Chrome disables scripts and sends an intervention header on every resource request. Users are shown a UI at the bottom of the screen indicating the page has been modified to save data. Users can enable scripts on the page by tapping “Show original” in the UI.   And the people shout: progressive enhancement! Jeremy Keith: An excellent idea for people in low-bandwidth situations: automatically disable JavaScript. As long as the site is built with progressive enhancement, there’s no problem (and if not, the user is presented with the choice to enable scripts). Power to the people! This reminds me of the importance of a very useful bui...
Web Tricks

Build Your First App with React's Context API

One of React's latest features is the Context API. Up until now, Context within React has been somewhat experimental, but still used in quite a few popular libraries, like Redux and React Router. There are plenty of ways to avoid using Context, but sometimes it can be really useful. One really good use case for Context is keeping track of authentication. In fact, React's official documentation for the Context API mentions it can be used for authentication. Context is designed to share data that can be considered "global" for a tree of React components, such as the current authenticated user, theme, or preferred language. The examples in their documentation are helpful, but they don't actually include an example of sharing the authenticated user. I'll show you here how one way to use the ...
Props and PropTypes in React
CSS Tricks, Web Tricks

Props and PropTypes in React

React encourages developers to build by breaking a UI up into components. This means there will always be a need to pass data from one component to another — more specifically, from parent to child component — since we’re stitching them together and they rely on one another. React calls the data passed between components props and we’re going to look into those in great detail. And, since we’re talking about props, any post on the topic would be incomplete without looking at PropTypes because they ensure that components are passing the right data needed for the job. With that, let’s unpack these essential but loaded terms together.   Props: The data being passed around Basically, props are what make React the tool that it is. React was designed to break things down into pie...
CSS Shape Editors
CSS Tricks

CSS Shape Editors

Firefox 62 is shipping out of beta on September 5th. The big notable thing for CSS developers is that it will now support the shape-outside property with polygon(), circle(), and ellipse(), joining Chrome and Safari.   What will be nice about the Firefox release (well, it's kinda already nice if you use something like Firefox Developer Edition which is already on 62), is that it has a shape editor built right into DevTools. Chrome supports shape-outside as well, but there is no native DevTools helper for working with them. Thankfully, Razvan Caliman has a Chrome Plugin that does a great job. (Razvan contributed to the Firefox version as well, I hear.)   I enjoy using shape-outside as it can add real visual interest to a page that isn't nearly overdone or trendy just ...
The Ecological Impact of Browser Diversity
CSS Tricks

The Ecological Impact of Browser Diversity

Early in my career when I worked at agencies and later at Microsoft on Edge, I heard the same lament over and over: "Argh, why doesn’t Edge just run on Blink? Then I would have access to ALL THE APIs I want to use and would only have to test in one browser!" Let me be clear: an Internet that runs only on Chrome’s engine, Blink, and its offspring, is not the paradise we like to imagine it to be. As a Google Developer Expert who has worked on Microsoft Edge, with Firefox, and with the W3C as an Invited Expert, I have some opinions (and a number of facts) to drop on this topic. Let’s get to it.   What is a browser, even? Let’s clear up some terminology. Popular browsers you know today include Google Chrome, Apple Safari, Mozilla Firefox, and Microsoft Edge, but in the past ...