Micheal  Block

Micheal Block


Canvas vs SVG: Choosing the Right Tool for the Job

Should you use Canvas or SVG? It depends! Let’s walk through all the scenarios where Canvas and SVG are an option and work out which is the best choice.

HTML5 Canvas and SVG are both standards-based HTML5 technologies that you can use to create amazing graphics and visual experiences. The question I’m asking in this article is the following: Should it matter which one you use in your project? In other words, are there any use cases for preferring HTML5 Canvas over SVG?

First, let’s spend a few words introducing HTML5 Canvas and SVG.

What Is HTML5 Canvas?

Here’s how the WHATWG specification introduces the canvas element:

The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual images on the fly.

In other words, the <canvas> tag exposes a surface where you can create and manipulate rasterized images pixel by pixel using a JavaScript programmable interface.

What Is SVG?

SVG stands for Scalable Vector Graphics. According to the specification:

SVG is a language for describing two-dimensional graphics. As a standalone format or when mixed with other XML, it uses the XML syntax. When mixed with HTML5, it uses the HTML5 syntax. …

SVG drawings can be interactive and dynamic. Animations can be defined and triggered either declaratively (i.e., by embedding SVG animation elements in SVG content) or via scripting.

SVG is an XML file format designed to create vector graphics. Being scalable has the advantage of letting you increase or decrease a vector image while maintaining its crispness and high quality. (This can’t be done with HTML5 Canvas-generated images.)

#html #web-development #programming #developer

What is GEEK

Buddha Community

Canvas vs SVG: Choosing the Right Tool for the Job
Autumn  Blick

Autumn Blick


How native is React Native? | React Native vs Native App Development

If you are undertaking a mobile app development for your start-up or enterprise, you are likely wondering whether to use React Native. As a popular development framework, React Native helps you to develop near-native mobile apps. However, you are probably also wondering how close you can get to a native app by using React Native. How native is React Native?

In the article, we discuss the similarities between native mobile development and development using React Native. We also touch upon where they differ and how to bridge the gaps. Read on.

A brief introduction to React Native

Let’s briefly set the context first. We will briefly touch upon what React Native is and how it differs from earlier hybrid frameworks.

React Native is a popular JavaScript framework that Facebook has created. You can use this open-source framework to code natively rendering Android and iOS mobile apps. You can use it to develop web apps too.

Facebook has developed React Native based on React, its JavaScript library. The first release of React Native came in March 2015. At the time of writing this article, the latest stable release of React Native is 0.62.0, and it was released in March 2020.

Although relatively new, React Native has acquired a high degree of popularity. The “Stack Overflow Developer Survey 2019” report identifies it as the 8th most loved framework. Facebook, Walmart, and Bloomberg are some of the top companies that use React Native.

The popularity of React Native comes from its advantages. Some of its advantages are as follows:

  • Performance: It delivers optimal performance.
  • Cross-platform development: You can develop both Android and iOS apps with it. The reuse of code expedites development and reduces costs.
  • UI design: React Native enables you to design simple and responsive UI for your mobile app.
  • 3rd party plugins: This framework supports 3rd party plugins.
  • Developer community: A vibrant community of developers support React Native.

Why React Native is fundamentally different from earlier hybrid frameworks

Are you wondering whether React Native is just another of those hybrid frameworks like Ionic or Cordova? It’s not! React Native is fundamentally different from these earlier hybrid frameworks.

React Native is very close to native. Consider the following aspects as described on the React Native website:

  • Access to many native platforms features: The primitives of React Native render to native platform UI. This means that your React Native app will use many native platform APIs as native apps would do.
  • Near-native user experience: React Native provides several native components, and these are platform agnostic.
  • The ease of accessing native APIs: React Native uses a declarative UI paradigm. This enables React Native to interact easily with native platform APIs since React Native wraps existing native code.

Due to these factors, React Native offers many more advantages compared to those earlier hybrid frameworks. We now review them.

#android app #frontend #ios app #mobile app development #benefits of react native #is react native good for mobile app development #native vs #pros and cons of react native #react mobile development #react native development #react native experience #react native framework #react native ios vs android #react native pros and cons #react native vs android #react native vs native #react native vs native performance #react vs native #why react native #why use react native

Gerhard  Brink

Gerhard Brink


10 Latest Big Data Engineer Openings At Top Firms In India


1| Senior Technical Architect at Thoucentric

Location: Bangalore

**Responsibilities: **

  • Design and implement data architecture and ETL for a niche data platform.
  • Bring in-depth understanding on Relational, Big Data and Cloud technologies.
  • Build client relationships and participate in business development and proposal work to grow a strong data engineering sub-practice.

Apply here.

2| Data Engineer at Thoucentric

Location: Bangalore

**Responsibilities: **

  • Build data crawlers to extract data from customers’ data sources using available ETL platforms, and troubleshoot the issues faced during data loading & processing.
  • Design and build data warehouse models in columnar databases.
  • Develop data processing scripts using SQL and optimise complex sequences of SQL Queries.

Apply here.

3| Big Data Engineer at Thoucentric

Location: Bangalore


  • Take ownership of end-to-end data-pipeline including system design and integrating required Big Data tools & frameworks.
  • Implementing ETL processes and constructing data warehouse (HDFS, S3, Azure etc.) at scale.
  • Analyse the source and target system data. Map the transformation that meets the requirements.

Apply here.

Find below the data engineer job openings:

#careers #aim weekly job alerts #aimrecruits #big data engineer jobs at top firms #big data engineers job #big data jobs #data science jobs #top firm data science jobs #weekly job openings list

Choosing the Right SRE Tools

In this blog, we’ll talk about what to look for in an SRE tool, and how they’ll help you on your journey to reliability excellence.

Implementing SRE practices and culture can be challenging. Fortunately, there are a variety of tools for each aspect of SRE: monitoring, SLOs and error budgeting, incident management, incident retrospectives, alerting, chaos engineering, and more. In this blog, we’ll talk about what to look for in an SRE tool, and how they’ll help you on your journey to reliability excellence.

Monitoring Tools

At the heart of all SRE decision-making is data. Without logging latency, availability, and other reliability metrics throughout your system, you’ll have no way of knowing where to invest your development efforts. Several monitoring tools such as AppDynamics, Datadog, Grafana, and Prometheus are available to help collect this data and display it in efficient ways.

Monitoring can be broken down into four main categories:

  • Resource monitoring: reports on how servers are running with metrics such as RAM usage, CPU load, and remaining disk space.
  • Network monitoring: reports on incoming and outgoing traffic which can be broken down into the frequency and size of specific requests.
  • Application performance monitoring: reports on the performance of services by sending internal requests to them and monitoring metrics such as response time, completeness of response, and data freshness.
  • Third-party component monitoring: reports on the health and availability of third-party services integrated into your system.

To get a full picture of your service, you’ll want to incorporate elements of all four of these categories. Most monitoring tools will provide options for multiple categories. Look for ones that integrate well with your existing tool stack, as you’ll need the monitoring tool to be able to gather and interpret data directly from your existing sources.

Try to find tools that can generate visualizations and reports that your team will find useful. For example, if you’re trying to see which services generate the most network traffic, look for a tool that can create pie charts of overall network usage.

#tools #devops #sre #tools and methods #tools 2020

JavaScript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser


Fabric.js is a framework that makes it easy to work with HTML5 canvas element. It is an interactive object model on top of canvas element. It is also an SVG-to-canvas parser.

Using Fabric.js, you can create and populate objects on canvas; objects like simple geometrical shapes — rectangles, circles, ellipses, polygons, or more complex shapes consisting of hundreds or thousands of simple paths. You can then scale, move, and rotate these objects with the mouse; modify their properties — color, transparency, z-index, etc. You can also manipulate these objects altogether — grouping them with a simple mouse selection.

Non-Technical Introduction to Fabric

Fabric.js allows you to easily create simple shapes like rectangles, circles, triangles and other polygons or more complex shapes made up of many paths, onto the HTML <canvas> element on a webpage using JavaScript. Fabric.js will then allow you to manipulate the size, position and rotation of these objects with a mouse. It’s also possible to change some of the attributes of these objects such as their color, transparency, depth position on the webpage or selecting groups of these objects using the Fabric.js library. Fabric.js will also allow you to convert an SVG image into JavaScript data that can be used for putting it onto the <canvas> element.

Contributions are very much welcome!


Supported browsers

  • Firefox 4+
  • Safari 5+
  • Opera 9.64+
  • Chrome (all versions)
  • Edge (chromium based, all versions)
  • IE11 and Edge legacy, supported but deprecated.

You can run automated unit tests right in the browser.


Fabric.js started as a foundation for design editor on printio.ru — interactive online store with ability to create your own designs. The idea was to create Javascript-based editor, which would make it easy to manipulate vector shapes and images on T-Shirts. Since performance was one of the most critical requirements, we chose canvas over SVG. While SVG is excellent with static shapes, it's not as performant as canvas when it comes to dynamic manipulation of objects (movement, scaling, rotation, etc.). Fabric.js was heavily inspired by Ernest Delgado's canvas experiment. In fact, code from Ernest's experiment was the foundation of an entire framework. Later, Fabric.js grew into a collection of distinct object types and got an SVG-to-canvas parser.

Installation Instructions

Install with bower

$ bower install fabric

Install with npm

Note: If you are using Fabric.js in a Node.js script, you will depend from node-canvas.node-canvas is an html canvas replacement that works on top of native libraries. Please follow the instructions located here in order to get it up and running.

$ npm install fabric --save

After this, you can import fabric like so:

const fabric = require("fabric").fabric;

Or you can use this instead if your build pipeline supports ES6 imports:

import { fabric } from "fabric";

NOTE: es6 imports won't work in browser or with bundlers which expect es6 module like vite. Use commonjs syntax instead.

See the example section for usage examples.


Install Node.js

Build distribution file [~77K minified, ~20K gzipped]

 $ node build.js

2.1 Or build a custom distribution file, by passing (comma separated) module names to be included.

   $ node build.js modules=text,serialization,parser
   // or
   $ node build.js modules=text
   // or
   $ node build.js modules=parser,text
   // etc.

By default (when none of the modules are specified) only basic functionality is included. See the list of modules below for more information on each one of them. Note that default distribution has support for static canvases only.

To get minimal distribution with interactivity, make sure to include corresponding module:

   $ node build.js modules=interaction

2.2 You can also include all modules like so:

   $ node build.js modules=ALL

2.3 You can exclude a few modules like so:

   $ node build.js modules=ALL exclude=gestures,image_filters

Create a minified distribution file

 # Using YUICompressor (default option)
 $ node build.js modules=... minifier=yui

 # or Google Closure Compiler
 $ node build.js modules=... minifier=closure

Enable AMD support via require.js (requires uglify)

 $ node build.js requirejs modules=...

Create source map file for better productive debugging (requires uglify or google closure compiler).
More information about source maps.

 $ node build.js sourcemap modules=...

If you use google closure compiler you have to add sourceMappingURL manually at the end of the minified file all.min.js (see issue https://code.google.com/p/closure-compiler/issues/detail?id=941).

 //# sourceMappingURL=fabric.min.js.map

Ensure code guidelines are met (prerequisite: npm -g install eslint)

 $ npm run lint && npm run lint_tests


Install Node.js

Install NPM, if necessary

Install NPM packages

 $ npm install

Run test suite

Make sure testem is installed

    $ npm install -g testem

Run tests Chrome and Node (by default):

    $ testem

See testem docs for more info: https://github.com/testem/testem


Who's using Fabric?


Documentation is always available at http://fabricjs.com/docs/.

Also see official 4-part intro series, presentation from BK.js and presentation from Falsy Values for an overview of fabric.js, how it works, and its features.

Optional modules

These are the optional modules that could be specified for inclusion, when building custom version of fabric:

  • text — Adds support for static text (fabric.Text)
  • itext — Adds support for interactive text (fabric.IText, fabric.Textbox)
  • serialization — Adds support for loadFromJSON, loadFromDatalessJSON, and clone methods on fabric.Canvas
  • interaction — Adds support for interactive features of fabric — selecting/transforming objects/groups via mouse/touch devices.
  • parser — Adds support for fabric.parseSVGDocument, fabric.loadSVGFromURL, and fabric.loadSVGFromString
  • image_filters — Adds support for image filters, such as grayscale of white removal.
  • easing — Adds support for animation easing functions
  • node — Adds support for running fabric under node.js, with help of jsdom and node-canvas libraries.
  • freedrawing — Adds support for free drawing
  • erasing — Adds support for object erasing using an eraser brush
  • gestures — Adds support for multitouch gestures with help of Event.js
  • object_straightening — Adds support for rotating an object to one of 0, 90, 180, 270, etc. depending on which is angle is closer.
  • animation — Adds support for animation (fabric.util.animate, fabric.util.requestAnimFrame, fabric.Object#animate, fabric.Canvas#fxCenterObjectH/#fxCenterObjectV/#fxRemove)

Additional flags for build script are:

  • requirejs — Makes fabric requirejs AMD-compatible in dist/fabric.js. Note: an unminified, requirejs-compatible version is always created in dist/fabric.require.js
  • no-strict — Strips "use strict" directives from source
  • no-svg-export — Removes svg exporting functionality
  • sourcemap - Generates a sourceMap file and adds the sourceMappingURL (only if uglifyjs is used) to dist/fabric.min.js

For example:

node build.js modules=ALL exclude=json no-strict no-svg-export

Examples of use

Adding red rectangle to canvas

<!DOCTYPE html>
    <canvas id="canvas" width="300" height="300"></canvas>

    <script src="lib/fabric.js"></script>
        var canvas = new fabric.Canvas('canvas');

        var rect = new fabric.Rect({
            top : 100,
            left : 100,
            width : 60,
            height : 70,
            fill : 'red'


Helping Fabric

Staying in touch

Follow @fabric.js, @kangax or @AndreaBogazzi on twitter.

Questions, suggestions — fabric.js on Google Groups.

See Fabric questions on Stackoverflow, Fabric snippets on jsfiddle or codepen.io.

Fabric on LibKnot.

Get help in Fabric's IRC channel — irc://irc.freenode.net/#fabric.js


Author: fabricjs
Source Code: https://github.com/fabricjs/fabric.js 
License: View license

#javascript #canva #svg 

15 Latest Data Science And Analyst Jobs To Apply For

For this week’s latest data science job openings, we have come up with a curated list of job openings for data scientists and analysts from last week.

Data Scientists Openings

Data Science Lead at Paytm Money

Location: Bangalore


#data science job search #data science jobs #data science jobs in india #latest data science job openings #latest data science jobs #onboarding data science jobs