GithubHelp home page GithubHelp logo

angry.im's Introduction

angular2-webpack

A complete, yet simple, starter for Angular 2 using Webpack.

Is Angular 2 Ready Yet?

Quick start

Clone/Download the repo then edit app.ts inside /src/app/app.ts

how to install

PHANTOMJS_CDNURL=https://npm.taobao.org/dist/phantomjs npm install

Dirty Fix

After installing node_modules dependencies, You may need to manually remove require related statements in BigInt/src/BigInt.js so that webpack does not complain.

design

Using rxjs is intended. It provide a way to centralize logic. Here I present several alternatives' pros and cons.

redux style:

Flux arch's state of art

approach: view dipatches action, reducer processes action and change store, store updates view

pros:

  • dead simple data flow
  • reducer can be as synchronous as possible
  • easier to debug

cons:

CPS style:

aka callback based observer pattern.

approach: Every event is handled manually.

pros:

  • No stroke win a trick. A chinese proverb like 'silence makes big money'
  • intuitive

cos:

  • state must be explicitly shared between components
  • no high order composition, not even logic reuse
  • concrete command couples with concrete events

To sum up, observer pattern is not scalable. Code soonly becomes unnamable chaos

reactive style:

rxjs, rxjava, rxscala, rxandroid, rxswift, rxpy, rxgo, rxwhateveryounameit

approach: event and logic is encapsulated in asynchronous stream. (yes, logic is in stream too, in the form of closure)

pros:

  • very expressive and concise
  • observer without inversion of control
  • fine tuned scheduler control with one line of code

cons:

  • unintuitive
  • all operators take a hidden parameter, namely, time.
  • too many operators to learn

Choose Crypto

It seems web cryptography is the ideal library, but it lacks AES256-IGE. https://medium.com/@encryb/comparing-performance-of-javascript-cryptography-libraries-42fb138116f3#.5jwcjgmem

http://www.slideshare.net/kevinhakanson/developers-guide-to-javascript-and-web-cryptography

angry.im's People

Contributors

herringtondarkholme avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.