本文内容基本来自于Evan You在FrontendMaster上的《Advanced Vue.js Features form the Ground Up》课程中第二节Reactivity中的内容。课程为英文授课,根据我自己的理解总结了这篇文章,课程其余内容可见我的另一篇博客
最后一部分内容为我个人的一些总结,及官方文档的一些内容。

什么是数据响应式

说道数据响应式,首先要说一下响应式编程。目前响应式编程中比较流行的一个框架就是Rx.js,但响应式编程不仅仅指Rx.js这一个库。

响应式编程指当改变一个状态之后,整个系统应该随状态的更新而一同更新,在Vue中,也可以特指当数据状态改变时数据所绑定的DOM应该一同改变。

阅读全文 »

Plugin System

Tapable Plugin System

webpack本身可以看做一个custom plugin,由许多其他plugin组成。

  • What is Tapable?
    • 200 line plugin library
    • the backbone of the plugin system
    • Tapbale instance
      • A class/object that extends Tapable(a.k.a something you can plug into)
        阅读全文 »

Web Performance

Top Performance Issues

  • Top three causes of web performance issues
    1. Amount of JavaScript for initial download
    2. Amount of CSS for initial download
    3. Amount of network request on initial download

Performance Goals

  • Goals
    • <=200kb(uncompressed) initial JavaScript [total].
    • <=100kb(uncompressed) initial CSS [total].
      • HTTP: <=6 initial network calls
      • HTTP/2: <=20 initial network calls
    • 90% code coverage(only 10% code unused)
      阅读全文 »

Vue是目前前端所流行的三大框架之一(其余为React和Angular),Vue的主页中声明Vue是一个渐进式JavaScript框架,拥有易用、灵活以及高效的特点。

Vue成为渐进式框架的原因是既可以将Vue作为应用的一部分替换原有的服务端应用,也可以结合Vue的核心库和其他生态系统来构建前端为主的应用程序。

作为使用Vue的第一步,首先就是安装Vue。

一下我将结合Vue官方中文文档以及我自己的总结来说明如何安装Vue。

阅读全文 »

开篇

近期在学习设计模式,了解到了几个术语,分别为

  1. MVC
  2. EventBus
  3. 表驱动编程(数据驱动编程)
  4. 模块化

在这里,我将总结一下目前我对这几个术语的理解,相信随着对这几个术语更加深入的接触与了解,在今后也会有不同的理解。

阅读全文 »

为什么学习jQuery

在三大框架(Vue, React, Angular)日益盛行的今天,jQuery的热度似乎已经逐渐消减。但违反直觉的是,根据Built width的统计,jQuery的使用数量仍在逐年上涨。仔细想想,作为前端开发者,难免要与DOM操作打交道,而因为历史原因,原生DOM的API既不好用,兼容性问题又多,如果把《JavaScript高级程序设计》中讲浏览器兼容问题的部分删掉,可能看起来也就没有那么厚,那么让人望而却步了。jQuery作为一个封装良好的DOM库,jQuery能够如此流行还要归功于其良好的设计模式,使用起来相当便利,虽然也及其容易写出一些意大利面条似的代码,但作为前端新人,通过学习jQuery,了解一些jQuery的设计思想,无论是对于今后学习其他框架,还是打牢js基础,都是很有必要的。

阅读全文 »

Introduction

API

  • What is an API

    • tldr; a server that creates an HTTP interface for interacting with some data
    • Applicaction programming interface
    • The name is used EVERYTHERE
    • Usually a server on some remote machine that dictates how another application can interact with some data
    • Basic data operations like, Create, Read, Update, Destory(CRUD)
  • What about REST?

    • tldr; most popular API design pattern, but is not the silver bullet. Very blurry
    • An API design that combines DB resources, route paths, and HTTP verbs to allow application describe what action they are trying to perform
    • Popularized when SaaS products starting offering APIs for integrations
    • Works with basic data models
    • Hard to scale with complex data models and client requirements
      阅读全文 »

Introduction

  • slides

  • Workshop Goal

    • Use D3 to calculate data
    • React to render visualizations
  • WHY?

    • D3’s learning curve
    • enter - update - exit == React virtual DOM(let React do the hard work!)
  • Agenda

    • Basic chart types and when to use them
    • The making of a chart with SVG
    • Going from data to SVG shapes
    • Using React to render SVG and Canvas
    • Exceptions and finishing touches
      阅读全文 »
0%