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

  • 相关阅读:
    book pile SGU
    Inversions SGU
    蒟蒻LQL的博客
    控制台注入DLL代码
    Windows消息类型
    windows编程中的数据类型
    单链表的创建与遍历
    定义函数指针
    启动外部程序
    dll共享段中一些需要注意的问题
  • 原文地址:https://www.cnblogs.com/Answer1215/p/4071843.html
Copyright © 2011-2022 走看看