Git Product home page Git Product logo

vue-distributed's Introduction

vue-distributed

Demonstrates how different Vue teams can work independently while building on the same app.

Problem Statement

Most webpack tutorials describe how to bundle web apps into smaller 'chunks', lazy-loaded. In a complex ('Agile') organization multiple teams may be involved, building various parts of the app. Coming together for a unified build-and-chunk may not be efficient.

Solution

The assumption is that the engineering setup consists of the following (or a mix of):

  • 1 Core team maintaining shared library build. Framework and Page teams consume this library.
  • 1 Framework team designing the overall app UI layout and high-level framework. Loads code from Page teams on-demand.
  • 1 or more Page teams owning various parts of the app (eg. Management, Reporting, Preferences).

Demo Scope

This code uses Vue and Webpack to demonstrate how code can be written by above teams.

Installation

  1. Download code: git clone https://github.com/jhfoo/vue-distributed.git
  2. Open ./app-main/dist/index.html on a browser (tested in Chrome)

Expectation: code from various bundles are rendered on the browser.

TODO

  • Simplify/ dumbify index.html
  • Dynamic route registration
  • Integration with Vuetify
  • Hot loading

Notes

  • HMR works only on the codes Webpack is actively monitoring and rebuilding. How can HMR work for teams working on page bundles?
  • index.html explicitly loads core-bundle.js because webpack-dev-server auto-injects the 'active' bundle (whichever Webpack is monitoring) at the end of the tag. Room for more simplification here.
  • Dynamic route registration works through a 'proxy' page which exists only to pass the $router object to the registration function in the external bundle. There may be a better way to do this. Question: how will the app handle bookmarked pages pointing to the subapp?

References

vue-distributed's People

Contributors

jhfoo avatar

Watchers

James Cloos avatar  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.