Posts

Showing posts from April, 2018

ReactJS

Image
WHAT IS REACT: React is a Facebook creation which simply labels itself as being “a JavaScript library for building user interfaces”. It's an open-source project which, to date, has raked in over 74,000 stars on GitHub. Why React? Flexibility: It is a library not a framework like Ember or Angular. Hence this makes react flexible. React is: Declarative : you only need to design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Component-based: you create your React-powered apps by assembling a number of encapsulated components, each managing its own state. Learn Once, Write Anywhere: React is not a full-blown framework; it's just a library for rendering views  Getting Started with Environment: Prerequisites are Node and NPM installed on system History: Invented in 2011 In 2012 used by Instagram. 2013, open sourced 2015 - React Native released 2016 - React...

A quick intro to Asynchronous JS

Do you know how code executes in JS? Have you come up with the following things in JS? 1. Multithreading 2. Race Conditions 3. Parallel requests 4. Lock up browsers 5. Single threaded 6. Callbacks 7. Cooperative Concurrency 8. Event Loop 9. Non-blocking I/O Asynchronous programming is one of those programming paradigms that’s extremely difficult to fully understand, until you’ve done enough of it in practice Examples : Weather  http://plnkr.co/edit/ZOAaSdtnfvR6WwiuVZ6s Avoid Blocking – Red Background  http://plnkr.co/edit/z29VyH5BPvC4oc40EyOu setTimeout Pyramid Challenge  http://plnkr.co/edit/DGiHFQOQfnipCcpex2RH Drag and Drop Red Box  http://plnkr.co/edit/SmSpPS5ZgPvkgn8RE6y1 Timer onReady  http://plnkr.co/edit/gafgKCrxnDIJ6YaG9Jpx Timer measure  http://plnkr.co/edit/kPOgzEuIvUmN4o6Jenem Progress Number Crunching - Web Worker  https://plnkr.co/edit/Yy7BOZU9sIa8EyrxJwGH Event Listeners Are Synchronous  http://...

Javascript Development Environment

Package managers available: 1. CPAN 2. GoDoc 3. Maven Central 4. npm (node) 5. nuget (.NET) 6. Packagist (PHP) 7. PyPI 8. Rubygems.org Electron or  Nw.js Electron enables you to create desktop applications with pure JavaScript by providing a runtime with rich native (operating system) APIs. You could see it as a variant of the Node.js runtime that is focused on desktop applications instead of web servers. This doesn't mean Electron is a JavaScript binding to graphical user interface (GUI) libraries. Instead, Electron uses web pages as its GUI, so you could also see it as a minimal Chromium browser, controlled by JavaScript. EmberJs Ember .js is an open-source JavaScript web framework, based on the Model–view–viewmodel (MVVM) pattern. It allows developers to create scalable single-page web applications by incorporating common idioms and best practices into the framework. Starter kit of JS: 1. Package Management 2. Bundling 3. Minification 4. Sourcemaps ...

Unit Testing in Javascript

There are basically 3 decisions for a dev implementing Unit Testing in JS. 1. Chosing a Framework 2. Chosing an assertion Library 3. Chosing a Helper Library 1.For Testing 2. Assertion Libraries:   1. Should   2. Chai   3. CoffeeScript   4. YUI Port   5. expect.js   6. assert.js   7. jsShould Underscore: MomentJS: Mocha: It is open source framework. started in Node Supports both BDD and TDD. Supports both Client and Server side testing. Supports Asynch testing