GithubHelp home page GithubHelp logo

rrroman / todomvc-knockout-spa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onlyurei/todomvc-knockout-spa

0.0 0.0 0.0 520 KB

knockout-spa implementation of TodoMVC

Home Page: https://onlyurei.github.io/todomvc-knockout-spa/

JavaScript 82.90% CSS 0.23% HTML 16.87%

todomvc-knockout-spa's Introduction

Knockout SPA • [TodoMVC] Code Climate

knockout-spa

A mini but full-fledged SPA framework and boilerplate to build SPAs fast and scalable.

Resources

Support

Let us know if you discover anything worth sharing.

Implementation

  • Object-oriented design that's highly composable and reusable; small footprint of framework flavored opinionated code.
  • Provide Knockout ES5 POJO style viewModel/binding option to help you write cleaner code and make it easier to replace Knockout with other MVVM libraries in the future.
  • Using Knockout 3.4.0+ so ready for Knockout's flavor of web component and custom tags.
  • Use require-css and require-text AMD plugins to load CSS and HTML templates dynamically on-demand along with the JS modules requiring them; these CSS and HTML template files will be inlined and minified into the corresponding JS modules for production build. This allows the app to scale to very large - not doing a lump-sum load of giant bundled files for the entire app on first page load - only the needed parts of the page, and common dependencies of all modules will be loaded. As user navigates to other parts of the app, the needed files (js, css, html) are lazy loaded. This is important for the app to be performant especially on mobile devices, since the lump-sum bundle files are not only slower to download due to size, but also slower to parse.
  • No any grunt/gulp/watcher/transpiler/build tasks required during development - you debug directly the exact same JS/CSS/HTML/Any file you edit in the IDE. Changes made to a file will be immediately reflected upon refreshing the browser (or use Chrome devtools workspace or similar tool to have the changes live-rerendered without having to refresh the page). Nowadays it seems that the frontend world is depending too much on tooling especially build tools. Ironically almost all frontend file types (js, css, html) don't need to be compiled during development. Before ES6 modules loader implementations are mature, AMD/RequireJS is still the de facto best self-sufficient module definition and loader available today.
    • The only build task required for production is the RequireJS r.js optimizer task that's already predefined in build.js. Just run npm run build and figure out a config-based way to serve the assets from /build folder for production.
  • Organized folder structure to help you stay sane for organizing and reusing modules/files. Not using the file type folder structure such as /js, /css, /html, /template, etc, as files belonging to the same module/component are easier to navigate when grouped together under the same folder. If a part of the app should be removed, in theory you just need to delete the corresponding module/component folder, and touch very few other places.
  • All documentation are in the major dependencies' own homepages, so that you don't need to completely learn a new framework (learn and practice general and reusable frontend development skills, not specific giant framework and tooling skills):

Credit

Created by Cheng Fan

todomvc-knockout-spa's People

Contributors

onlyurei 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.