zoukankan      html  css  js  c++  java
  • [Angular-Scaled web] 1. Architecture and file structure

    We build a project according to its features or based on simple MVC structure. Put all controller into one folder and factory into another folder is hard to maintain and testing.

    For this project, we have two main features

    1. Category
    2. Bookmark

    And one Category contains serveal bookmarks. 

    For bookmarks, we can do 'edit', 'create' options.

    We should also isolate one common model, in which we place something can be used for all other modules.

    The stucture should be:

    app

    • category
      • bookmarks
        • create
          • bookmarks-create.js
          • bookmarks-create.tmpl.html
        • edit
          • bookmarks-edit.js
          • bookmarks-edit.tmpl.html
        • bookmarks.js
        • bookmarks.tmpl.html
      • category.js
      • category.tmpl.html
    • common
      • models
        • category-model.js
        • bookmarks-model.js
    • app.complete.js
    • app.start.js
    • app.finish.js

    assets  //where to put css and image files

    • css
    • images

    data // where to store the json files

    • bookmarks.json
    • categories.json

    vendor //where to store extension js files

    • angular-ui-router.min.js

    app.complete.html

    app.start.html

    app.finish.html

  • 相关阅读:
    Unit Vector Compression
    PT, BPT, VCM
    Major Performance Impacts

    SAH Benchmarks Of Natural History Museum Scene
    图标变换图片---轮播切换
    弹出层--弹框
    Git for windows 中文乱码解决方案
    在CentOS上安装Git
    Git 的基本配置
  • 原文地址:https://www.cnblogs.com/Answer1215/p/4071843.html
Copyright © 2011-2022 走看看