Wednesday, March 21, 2018

YouTube Is Currently Testing Picture-In-Picture Feature On The Web

According to a latest report by 9to5Google, YouTube is currently testing a feature of picture-in-picture on the web. Subsequently, the users will get to see precisely the same feature of YouTube which is also available on Android and iOS i.e. empowering the users to minimize and watch a specific...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Zubair Ahmed via Digital Information World

Why Content Is Important for SEO - #infographic

Search engine optimization has grown up. It's gotten off the couch, found a good job and is living like a bonafide high roller. Businesses spent an estimated $65 billion on SEO in 2016, and will spend closer to $80 billion by 2020. but that only tells half the story. The other half is about the...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

The Greatest Stories Retold

Explore the long and short of modern storytelling with The Greatest Stories Retold
by via Awwwards - Sites of the day

Tuesday, March 20, 2018

Desiphering the Mystery of the Successful Blog Post - #infographic

When it comes to content, getting started is often the hardest part. In the coming weeks, we’ll discuss many of the challenges that come with getting a content marketing campaign off the ground—building an editorial calendar, finding a narrative, and refining your brand voice. While those elements...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

JS developers who stream, npm 5.8, and TypeScript 2.8 RC

#377 — March 16, 2018

Read on the Web

JavaScript Weekly

Pell 1.0: A Tiny, Simple WYSIWYG Web Text Editor — No dependencies, ES6, and only 1.38KB minned and gzipped. Play with a demo here.

Jared Reich

A Comprehensive Guide to Learning React in 2018 — A classic, interactive ‘from scratch’ tutorial that’s just been upgraded to React 16.3 standards.

Tyler McGinnis

Angular, React or Vue? — How do you choose one JavaScript framework over another for your next web application? Our new whitepaper gives insight into the current state of Angular, React and Vue and how they compare against a comprehensive set of criteria. Download now.

Progress Kendo UI sponsor

TOAST UI Chart: Attractive Charts to Visualize Data — Cross-browser (even supports IE8) and you get bar/column, line, area, bubble, pie, heatmap, bullet, and boxplot charts out of the box as well as combinations of them. Lots of demos here.

NHN Entertainment

Cloudflare Workers: Run JavaScript on Cloudflare — CDNs typically make static assets available at many edge locations, but this next step takes running code to the edge as well, all powered by V8.

Kenton Varda

Take the TC39 Developer Engagement Survey — The ECMAScript standards committee wants to understand how you engage with the official specs and are keen to reach developers not on Twitter. 10 simple questions.

Yulia Startsev (Mozilla) and TC39

Driver.js: 'Drive' Users' Focus Across a Web Page — A no-dependency library for creating ‘tour’-style mechanisms and highlights on a page.

Kamran Ahmed

Awesome Developer Streams: Developers Who Code Live — It’s surprising how much you can learn by watching someone else code and here are 57 to check out - mostly JavaScript developers too.

Tierney Cyren

TypeScript 2.8 RC Released — Conditional types are the headline feature.

Microsoft

npm 5.8.0(-next.0) Released

The npm Blog

Jobs

JavaScript Developer at X-Team (Remote) — We help our developers keep learning and growing every day. Unleash your potential. Work from anywhere. Join X-Team.

X-Team

Frontend Engineer for Leading Open Source Company — Love coding web apps & building reusable high-performance UI components? Help define open source web app UI for large-scale enterprises.

Liferay, Inc.

Find a Job You're Passionate About — Vettery connects you directly to hiring managers at over 4,000 top companies. Make a profile today and land your dream job.

Vettery

Tutorials and Articles

4 Awesome Things You Can Do with the Vue.js CLI — Working with Vue? The CLI will make your life better.

Brandon Satrom

Things to Consider When Choosing a Database for Your JavaScript App — Not all JSON support is created equal.

MONGODB sponsor

The 4 Layers of SPAs You Need to Know — An attempt to explain modern single page apps (SPAs) by slicing them into views, services, storage, and the domain/model.

Daniel Dughila

Building a Basic Neural Network with Brain.js — A very elementary ‘getting started’ tutorial.

Daniel Simmons

Animating Elements Along SVG Paths with JavaScript

Luis Manuel

How to Develop an Effective Indexing Strategy — Grab your free MongoDB tutorial on optimising indexing strategies from Studio 3T.

Studio 3T sponsor

JavaScript Promises for Dummies — A golden oldie recommended by Chris Heilmann today.

Jecelyn Yeen old-but-gold

Videos, Screencasts and Talks

▶  Structuring JavaScript Projects for Testability

Fun Fun Function

▶  A Gentle 1hr Intro to Express.js and RESTful APIs — Excellent for beginners.

Programming with Mosh

Code and Tools 🔧

Emma: A CLI Tool to Find and Install npm Packages

Matic Zavadlal

Rough.js: Create Graphics with a Hand-Drawn Appearance

Preet Shihn

The Filepond File Upload Library Relicenses to MIT — We linked to this attractive looking file upload control recently when it was GPLv3 licensed. Demo.

Rik Schennik

MobX 4 Released: A Simple State Management Library

Michel Weststrate

There’s a Bug in Your JavaScript Code. Fix It

Sentry sponsor

Mark Text: A Cross-Platform Markdown Editor App — Built with Electron and Vue.

Jocs


by via JavaScript Weekly

Adding Animations for Effective Blog Posts with WordPress and Tumult Hype

This article was sponsored by Tumult. Thank you for supporting the partners who make SitePoint possible.

In this post, I’d like to introduce a new WordPress plugin for embedding interactive and animated content in WordPress: Tumult Hype Animations for WordPress.

Tumult Hype is a powerful tool for building advanced interactive and animated content that works on any device. When you open Tumult Hype for the first time, you’re greeted by a blank canvas with a timeline below. Content you add to your scene can easily be animated using the record button and manipulating the timeline. As you explore the program you’ll find powerful features for a range of interactive production: motion curves, custom easing transitions, touch gestures, web font support, audio actions, a powerful physics engine, and responsive layout features.

The Hype Animations plugin for WordPress makes integrating your HTML5 animations in your blog a painless drag & drop process. The plugin can be installed and activated in a minute from the Wordpress Plugin repository by searching for “Tumult Hype Animations.” Installing the plugin allows you to add exported Tumult Hype animations to posts and pages using simple textual shortcodes. You can update previously-uploaded animations from the plugin’s adminstration page and copy the full embed code to place your animation elsewhere (outside of WordPress, even). This allows you optionally leverage your WordPress site as a simple hosting platform for your Hype animations.

Let’s say you’re building an interactive map you want to keep updated on a regular WordPress page. Instead of just re-uploading a static PDF, you can quickly create an interactive map in Tumult Hype. To start, create a Tumult Hype document with a width as the maximum size of your blog’s width. If you have a responsive theme, you can even have your animation expand and contact with your theme. If you’d like to test this process out, download an unrestricted (14 day trial here). In the example below, our maximum blog post width is 463 pixels wide, so our scene size is set to that number:

wp plugin map

Next, you can build out interactivte features in your document: setup your document to respond to mouse hovers, update any road closures, and create any type of interactivity to make the map more interesting and useful. Once you’re happy with your document and you’ve previewed it using the built-in browser preview and the free mobile preview app Hype Reflect, the next step is to prepare it for the WordPress plugin.

Packing up a Hype animation for the plugin is simple. The plugin requires animations are first exported in the OAM format, which creates a zipped package containing all JavaScript, media, and code required to display your animation. This is the same format for embedding in applications like Adobe Muse. To export in this format, select File > Export as HTML5 > Export as OAM file. Switching over to your WordPress site, start a new Page or Post. With the plugin installed, click the new ’Hype Animations’ button to the right of the Add Media button:

Hype Animations Button

Drag and drop your OAM file on the resulting overlay, and your animation will upload, and the plugin will generate a shortcode and automatically add it your post or page:

Hype Animations Button

Leveraging CSS Styles and Responsive Layouts

When embedding your animation, the plugin uploads the Hype JavaScript runtime, resources, and animation data and creates a reference to it with JavaScript on the page as a standard DIV element. Since the embed is on the same page as your WordPress theme, you can access any CSS styles or fonts you currently use in your WordPress theme to seamlessly incorporate design elements in your animations. This allows you to leverage any web fonts or CSS components you’ve already setup in your site. You may need to uncheck Protect from External Styles in the document inspector to leverage external CSS styles.

For your responsive WordPress theme, you can also mirror your theme’s breakpoints in Tumult Hype so your animation adapts to all device sizes you wish to support:

Setting Breakpoints in Tumult Hype

In the Scene Inspector, you can easily set the desired breakpoint for your individual layouts. For more informatiomn about setting up responsive layouts in Hype, visit the documentation.

Continue reading %Adding Animations for Effective Blog Posts with WordPress and Tumult Hype%


by Jonathan Deutsch via SitePoint

An Introduction to Component Routing with Angular Router

This is part 4 of the SitePoint Angular 2+ Tutorial on how to create a CRUD App with the Angular CLI. In this article, we’ll introduce Angular router and learn how it can update our application when the browser URL changes and vice versa. We’ll also learn how we can update our application to resolve data from our back-end API using the router.

In part one we learned how to get our Todo application up and running and deploy it to GitHub pages. This worked just fine but, unfortunately, the whole app was crammed into a single component.

In part two we examined a more modular component architecture and learned how to break this single component into a structured tree of smaller components that are easier to understand, reuse and maintain.

In part three we updated our application to communicate with a REST API back end using RxJS and Angular's HTTP service.

  1. Part 0 — The Ultimate Angular CLI Reference Guide
  2. Part 1 — Getting our first version of the Todo application up and running
  3. Part 2 — Creating separate components to display a list of todos and a single todo
  4. Part 3 — Update the Todo service to communicate with a REST API
  5. Part 4 — Use Angular router to resolve data
  6. Part 5 — Add authentication to protect private content

Don't worry! You don't need to have followed part one, two or three of this tutorial, for four to make sense. You can simply grab a copy of our repo, checkout the code from part three, and use that as a starting point. This is explained in more detail below.

Up and Running

Make sure you have the latest version of the Angular CLI installed. If you don't, you can install it with the following command:

npm install -g @angular/cli@latest

If you need to remove a previous version of the Angular CLI, you can do this:

npm uninstall -g @angular/cli angular-cli
npm cache clean
npm install -g @angular/cli@latest

After that, you'll need a copy of the code from part three. This is available at GitHub. Each article in this series has a corresponding tag in the repository so you can switch back and forth between the different states of the application.

The code that we ended with in part three and that we start with in this article is tagged as part-3. The code that we end this article with is tagged as part-4.

You can think of tags like an alias to a specific commit id. You can switch between them using git checkout. You can read more on that here.

So, to get up and running (the latest version of the Angular CLI installed) we would do this:

git clone git@github.com:sitepoint-editors/angular-todo-app.git
cd angular-todo-app
git checkout part-3
npm install
ng serve

Then visit http://localhost:4200/. If all’s well, you should see the working Todo app.

A quick recap

Here’s what our application architecture looked like at the end of part 3:

Angular router: Application Architecture

In this article we will:

  • learn why an application may need routing
  • learn what a JavaScript router is
  • learn what Angular router is, how it works and what it can do for you
  • set up Angular router and configure the routes for our application
  • create a resolver to fetch the todos from our REST API
  • update our application to fetch the todos using our new resolver.

By the end of this article, you’ll understand:

  • when and why your application may need routing
  • the difference between routing on the server and routing in the browser
  • what Angular router is and what it can do for your application
  • how to set up Angular router
  • how to configure routes for your application
  • how to tell Angular router where to place components in the DOM
  • how to gracefully handle unknown URLs
  • what a resolver is and what it can be used for
  • how to use a resolver to resolve data using Angular router.

So, let's get started!

Why routing?

In its current state, our web application does not take the browser URL into account.

We access our application through one URL such as http://localhost:4200 and our application is not aware of any other URLs such as http://localhost:4200/todos.

Most web applications need to support different URLs to navigate users to different pages in the application. That’s where a router comes in.

In traditional websites, routing is handled by a router on the server:

  1. a user clicks a link in the browser, causing the URL to change
  2. the browser sends an HTTP request to server
  3. the server reads the URL from the HTTP request and generates an appropriate HTTP response
  4. the server sends the HTTP response to the browser.

In modern JavaScript web applications, routing is often handled by a JavaScript router in the browser.

What is a JavaScript router?

In essence, a JavaScript router does two things:

  1. update the web application state when the browser URL changes
  2. update the browser URL when the web application state changes.

JavaScript routers make it possible for us to develop single-page applications (SPAs).

An SPA is a web application that provides a user experience similar to a desktop application. In an SPA, all communication with a back end occurs behind the scenes.

When a user navigates from one page to another, the page is updated dynamically without reload, even if the URL changes.

There are many different JavaScript router implementations available.

Some of them are specifically written for a certain JavaScript framework such as Angular, Ember, React, Vue.js and Aurelia, etc. Other implementations are built for generic purposes and aren’t tied to a specific framework.

What is Angular router?

Angular router is an official Angular routing library, written and maintained by the Angular Core Team.

It’s a JavaScript router implementation that’s designed to work with Angular and is packaged as @angular/router.

First of all, Angular router takes care of the duties of a JavaScript router:

  • it activates all required Angular components to compose a page when a user navigates to a certain URL
  • it lets users navigate from one page to another without page reload
  • it updates the browser's history so the user can use the back and forward buttons when navigating back and forth between pages.

In addition, Angular router allows us to:

  • redirect a URL to another URL
  • resolve data before a page is displayed
  • run scripts when a page is activated or deactivated
  • lazy load parts of our application.

In this article, we’ll learn how to set up and configure Angular router, how to redirect a URL and how to use Angular router to resolve todos from our back-end API.

In the next article, we’ll add authentication to our application and use the router to make sure some of the pages can only be accessed when the user is signed in.

How Angular Router Works

Before we dive into the code, it’s important to understand how Angular router operates and the terminology it introduces.

When a user navigates to a page, Angular router performs the following steps in order:

  1. it reads the browser URL the user wants to navigate to
  2. it applies a URL redirect (if one is defined)
  3. it figures out which router state corresponds to the URL
  4. it runs the guards that are defined in the router state
  5. it resolves the required data for the router state
  6. it activates the Angular components to display the page
  7. it manages navigation and repeats the steps above when a new page is requested.

To accomplish its tasks, Angular router introduces the following terms and concepts:

  • router service: the global Angular router service in our application
  • router configuration: definition of all possible router states our application can be in
  • router state: the state of the router at some point in time, expressed as a tree of activated route snapshots
  • activated route snapshot: provides access to the URL, parameters, and data for a router state node
  • guard: script that runs when a route is loaded, activated or deactivated
  • resolver: script that fetches data before the requested page is activated
  • router outlet: location in the DOM where Angular router can place activated components.

Don't worry if the terminology sounds overwhelming. You’ll get used to the terms as we tackle them gradually in this series and as you gain more experience with Angular router.

An Angular application that uses Angular router only has one router service instance: It’s a singleton. Whenever and wherever you inject the Router service in your application, you’ll get access to the same Angular router service instance.

For a more in-depth look at Angular routing process, make sure to check out the 7-step routing process of Angular router navigation.

Continue reading %An Introduction to Component Routing with Angular Router%


by Jurgen Van de Moere via SitePoint