Wednesday, October 25, 2017

#181: Modern Loading Best Practices

Mobile Dev Weekly October 25, 2017   #181
Chris Brandrick recommends
The Second Mobile Cycle “while many people, having pronounced the app store dead, shifted their attention to chat bots, AR/VR, voice devices, etc., something interesting took place: the second mobile cycle.”
Eric Benjamin Seufert
Holly Schinsky recommends
Stop Designing For Only 85% Of Users: Nailing Accessibility In Design — A discussion of the most common visual impairments and how you can make small changes to your visual interface and workflow to ensure the highest level of accessibility.
Tom Graham André Gonçalves
Sponsored
10 Ways to Get Your Boss to Buy You Something — Get your boss to buy you things... and look good in the process. A guide to advocating for products effectively.
VividCortex

Chris Brandrick recommends
Fast By Default: Modern Loading Best Practices — Addy Osmani runs through loading best practices for diagnosing and making real-world sites load ‘instantly’. Filmed at the Chrome Dev Summit 2017.
Google Chrome Developers
Brian Rinaldi recommends
Introducing the 'Mobile Excellence Award' to Celebrate Great Work on the Mobile Web
Google
Chris Brandrick recommends
Building a Modern Mobile Media Experience — Francois Beaufort and John Pallett review best practices for mobile web media, including playback controls, pre-loading, autoplay and offline.
Google Chrome Developers
Mobile Web
Holly Schinsky recommends
Build A Fast Offline-First PWA with StencilJs
Christian Nwamba
Peter Cooper recommends
How to Get 100/100 Google Page Speed Score with Middleman and Nginx “you can get a better user experience by just building websites that are fast, and you don’t need to use AMP.”
Michael Elliott
Brian Rinaldi recommends
Can You Afford It? Real-World Web Performance Budgets — Concepts, tools and resources for creating a performance budget for your progressive web app.
Alex Russell
Za'e Johnson recommends
Weex Ui: A High-Performance UI Library
Alibaba
Sponsored
$20 Free on a new Linode account — Linux cloud hosting starting at 1GB of RAM for $5/mo. Get $20 credit on a new account.
Linode Cloud Hosting

Chris Brandrick recommends
Two-Thirds of Adults Worldwide Will Own Smartphones Next Year
Rani Molla
Hybrid Apps
Holly Schinsky recommends
Announcing PhoneGap Push Plugin Version 2.1.0 — We’re happy to announce the release of the updated PhoneGap Push plugin which brings support for Android O and cordova-android 6.3.0.
Simon MacDonald
Holly Schinsky recommends
How to Make Progressive Web Apps with Ionic — Guidance on how to deploy your next Ionic app as a PWA.
Jorge Vergara
Holly Schinsky recommends
An Introduction to Ionic Development: Creating An Ionic App
Inviqa
Native Development
Peter Cooper recommends
11 Is The New 7: iOS Designers, Please Stop Making Us Motion Sick — A plea to use motion with caution.
Herb Sutter
Brian Rinaldi recommends
Code Your First Augmented Reality App With ARKit
Vardhan Agrawal
Chris Brandrick recommends
How To Design Notifications For Better UX “Notifications are anti UX. They are a distraction. So how to design your notification so that it becomes purposeful and useful?”
CanvasFlip
Holly Schinsky recommends
sketch-to-react-native: Convert Sketch Files Into React Native Components
NanoHop


by via Mobile Dev Weekly

Tools for React Native Development

Tools, libraries, and services are an important part of every developer’s life, no matter which environment you’re developing for. And React Native is no exception. In this article, I’ll walk you through some of the best UI frameworks, libraries, components, development tools, and web services which will make you a happier and more productive React Native developer. 

Text Editors and IDEs

Visual Studio Code is a text editor which has built-in IntelliSense, debugging, and Git integration capabilities. What makes it really good for React Native development is its React Native tools extension. This allows you to execute React Native commands from the command palette, add IntelliSense for React Native APIs, and debug code within the editor itself. 

For more information regarding how to set up Visual Studio Code for React Native, check out this blog post: VSCode for React Native.

If you’re using Atom, you can install the Nuclide plugin. This plugin was specifically created for working with React Native, Flow, and Hack projects. It has a built-in debugger and element inspector with all the features you’re used to in Chrome Developer Tools. Flow support means that you get autocomplete, type-hinting, and code diagnostics out of the box. 

If you want to explore more IDE and editor options, check out this blog post on the Top 10 Editors for React Native.

Development Tools

Development tools have a wide scope, so I’ll be grouping each tool based on its focus:

  • SDK
  • code quality
  • testing
  • debugging

SDK

When it comes to SDKs for React Native, nothing beats Expo. Expo allows you to easily prototype an app without the need for Android Studio or Xcode. It includes a set of components and libraries to help you speed up your development. 

The Expo workflow consists of the following:

  1. Create a new project using create-react-native-app.
  2. Write the code in your favorite text editor.
  3. Run the app using the Expo client app. 

There’s no need to connect your phone to your computer. Simply scan the QR code on your terminal using the Expo client app, and it will automatically run your app. If you’re using Genymotion, Expo supports that too

The only disadvantage when using Expo is that you cannot include any custom package which uses the device’s native functionality. Expo already includes a number of commonly used native packages such as the Camera, Facebook, and Map. But if you need to use a package that they don’t already support, then you’ll have to "eject" your app. At that point your app will be as if it was created with react-native init, and you’ll also lose the ability to run it using the Expo client app.

Code Quality

Checking the quality of your code is important, and that is why tools like ESLint exist. In a nutshell, a linting tool allows you to be more consistent with your code by checking it against a style guide. An example of such a style guide is Airbnb’s JavaScript Style Guide which specifies rules on how JavaScript code should be written. The linting tool then checks your code against those rules to ensure that they've been followed. There’s also a style guide for React projects.

If you’re using Sublime Text, here’s a good tutorial on how you can configure it so that you can have real-time feedback on the quality of your code while you’re coding: Sublime Linting for React and ES6. If you’re using another editor or IDE, be sure to look for a corresponding plugin which uses ESLint.

If you want to add static typing to your project, you can use Flow. Flow adds static-typing on top of JavaScript without you having to make any changes to your existing codebase. This is because Flow tries to infer the type whenever possible. For new projects, though, it's recommended that you explicitly specify the type to reap the full benefits of using Flow.

To get started using Flow, here’s a tutorial on how you can set up Flow for your React Native projects.

Testing

Enzyme is a testing utility for React which allows you to assert, manipulate, and traverse your component’s output. It provides methods such as shallow() to "shallowly" render your components, find() to traverse the rendered component, and expect() to assert the props or the content rendered within the component.

You can follow this guide to Using enzyme to Test Components in React Native to make your React Native app testable with enzyme. If you’re new to enzyme, you can read this tutorial on Testing React Components with Enzyme and Mocha.

Debugging

Reactotron is a desktop app that allows you to debug React and React Native apps. Some of its key features include inspecting, modifying, and subscribing to the app state, tracking HTTP requests made through the app, benchmarking the app performance, and tracking errors. If you’re using Redux, you can even dispatch actions and track sagas from within Reactotron.

Boilerplates and UI Frameworks

Snowflake is a boilerplate for full-stack React Native development. It includes everything from the front-end to the back-end of the app. So if you just want a tool that can help you quickly get started then you might find Snowflake useful. You can read the notes for more information on what packages and tools are used to put it up.

Alternatively, you can use Ignite. It's a command-line tool which also includes a boilerplate, generators, style guide for UI components, API Testing Tool, and more. 

React Native already comes with UI components which you can use for user interaction. The problem is that they only have the most basic styling in order for each component to be distinguished for what it is (e.g. button, checkbox). If you want to add custom styles, you have to write your own CSS code. 

This is where NativeBase comes in. It allows your app to have a truly native look and feel by implementing the same design used in native Android (Material Design) and iOS (Human Interface Guidelines) apps. Out of the box, you get custom components such as Floating Action Buttons, Spinners, and best of all, form components.

Libraries and Components

React Native has a huge community behind it, so there are lots of libraries and components that you can use. We could spend all day talking about these, so to keep things brief, I’ll focus on the following areas:

  • navigation
  • state management
  • animations
  • commonly used components and libraries

Navigation

React Navigation allows you to easily implement navigation in your React Native apps through the use of its built-in navigators such as the Stack Navigator, Tab Navigator, and Drawer Navigator. That's not all, though: in addition to in-app navigation, it also includes deep linking, Redux integration, and web integration. This makes it a really robust library for implementing navigation.

State Management

MobX provides the functionality to update and manage the app state used by React. What makes it a good candidate for state management in React is its simplicity and testability. It also has a short learning curve, so things like async functions and computed values are already handled behind the scenes. 

For bigger and more complex applications, Redux is still recommended. This is because MobX is very liberal, not unlike Redux, which provides strict guidelines on how the state should be managed. So it's a wiser choice for bigger projects with more people working on them.

Animations

React Native already has an animation API built into it. In fact, there’s not just one, but two APIs for working with animation: Animated API and LayoutAnimation. Those two are very powerful but can be cumbersome, especially if all you want to do is apply basic animations such as moving an object up and down or making it bounce. In such cases, components like Animatable come in handy.

Commonly Used Components and Libraries

Here’s a list of components and libraries that are commonly used in React Native projects. These are compatible with both Android and iOS devices:

Web Services

You can build serverless apps and ease the deployment of your React Native apps by using web services. There are a plethora of web services out there, but I’ll focus on the following areas:

  • database
  • analytics
  • push notifications
  • code updates
  • continuous integration

Database

Realm is a real-time database with a focus on mobile apps. It includes features such as two-way data sync, offline-first capabilities, and data push. The Realm Mobile Database is open-source and cross-platform, which means that you can host the Realm Object Server on your own server and then use the Realm JavaScript library for free. 

Not all features are available in the developer edition, but in most use cases you should be fine with just the developer edition because it includes the core features such as the Object Database, Realtime Synchronization, and Authentication. Here's a comparison of what you get for each edition: Realm Products and Pricing.

If Realm is too much for your needs, you can always stick with the AsyncStorage API that comes with React Native.

Analytics

Fabric is an all-in-one service that allows you, among other things, to add analytics in your app. There’s Answers, which gives you real-time statistics on how your app is being used. This includes the number of active users, the session length, and retention rate. There’s also Crashlytics, which gives you powerful crash reporting capabilities. All of it happens in real time, and you can view it in Fabric’s real-time dashboard. You can use the Fabric library to easily set up Fabric for your React Native app.

If you’d rather stick with a tried and tested solution like Google Analytics, there’s also a library that allows you to do that.

Push Notifications

There’s really no competition when it comes to implementing push notifications in apps. Firebase Cloud Messaging (previously known as Google Cloud Messaging) allows you to send push notifications to both Android and iOS apps. You can use the react-native-fcm package to communicate with FCM from your app.

Code Updates

CodePush allows you to deploy code updates to mobile apps directly to the users’ devices. CodePush acts as a central repository where you can deploy changes to HTML, CSS, JavaScript, and assets such as images. The corresponding CodePush code in the app would then pull these changes. This is great for pushing bug fixes to the app without the need for uploading it in the app store and waiting for users to update the app. You can use this package to pull updates from CodePush within your React Native app.

Continuous Integration

Bitrise is a Continuous Delivery Service for mobile app development. It allows you to run your tests, build the app, and automatically push it to your users’ devices every time you deploy your code. 

Bitrise integrates with a bunch of services in every step of your development workflow. For example, when you push to your release branches on GitHub, Bitrise is notified of that push through webhooks. It will then begin running the tests. Once the tests pass, the build process begins. If it’s just a "soft release" (e.g. changes to the JavaScript code) then the changes can be deployed to the users through CodePush. But if there are changes to the native code (e.g. you added a Camera plugin), then Bitrise can also build an APK or IPA file and deploy it to Google Play or iTunes Connect.

Fastlane is a collection of tools that automate the build and release process for Android and iOS apps. For iOS, it handles tasks such as running your tests, generating screenshots, code signing, and releasing the app to the app store. It also includes beta testing tools such as Pilot and Boarding. Pilot allows you to upload your app to iTunes Connect and manage your TestFlight beta testers right from the command line. Boarding creates a signup page for TestFlight beta testers.

The tools are more geared towards iOS deployment, but you can also benefit if you’re deploying Android apps. Currently, there are only two tools available for Android deployment: Supply and Screengrab. 

Supply allows you to automate the uploading of assets such as the app icon, promo graphics, and screenshots of your app. It also allows you to update your existing apps on the Google Play Store. 

Screengrab, on the other hand, automates the generation of screenshots for multiple devices. Each screenshot can also be localized if your app supports multiple languages.

Conclusion

That’s it! In this article, you’ve learned about some of the tools, libraries, and services that you can use when developing React Native apps. What about you? What are your go-to tools when it comes to developing apps in React Native?

And while you're here, check out some of our other posts on React Native app development!

  • Mobile App
    10 Best React Native App Templates of 2017
    Nona Blackman
  • React Native
    Practical Animation Examples in React Native
    Wernher-Bel Ancheta
  • React
    10 React Native Applications for You to Use, Study, and Apply
    Eric Dye
  • React Native
    Get Started With React Native Layouts
    Wernher-Bel Ancheta

by Wernher-Bel Ancheta via Envato Tuts+ Code

How One Page Love Monetizes

Cake

Over on my personal blog I wrote 4000 words dissecting current income channels, future plans and failed experiments on One Page Love.

Each point I try add behind-the-scene thoughts and reflect on why I launched the income channel. I’m confident you will find value in the article if you are trying to monetize your side project.


by Rob Hope @robhope via One Page Love

127 Facts You Probably Didn’t Know About Video Marketing - #infographic

When the first video was launched back in 1994, little did we know that it would become one of the most powerful marketing tools. The significant digital growth in the last two decades brought about the changes of the marketing perspective. Today, the video is a cutting-edge marketing form and a...

[ 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 Killing of a Sacred Deer

The doctor is in. This eerie WebGL experience uses an interactive body diagram + quiz to get at something much deeper than your physical ailments. Don’t worry, you won’t feel a thing.
by via Awwwards - Sites of the day

Tuesday, October 24, 2017

8 B2B Marketing Myths Debunked - #infographic

Marketers have to spend equal parts of their time trend-watching and judging behavior via human psychology, with a little bit of storytelling mixed in. Because we have a less-than-perfect understanding of these elements, marketers often fall into the trap of believing superstitions that disguise...

[ 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

iziToast – Elegant, Responsive, Flexible Notification Plugin

iziToast is an elegant, responsive, flexible and lightweight notification plugin with no dependencies. All modern browsers are supported (Tested in Chrome, Firefox, Opera, Safari, IE10+ and Edge)


by via jQuery-Plugins.net RSS Feed