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

[Angular-Scaled web] 1. Architecture and file structure的更多相关文章

  1. JDK and JRE File Structure JAVA_HOME HotSpot优化技术

    https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jdkfiles.html Java Platform, Standard ...

  2. 混合开发 Hybird Ionic Angular Cordova web 跨平台 MD

    Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...

  3. 【Android Studio 小技巧】一键查看文件方法结构目录File Structure

    看源代码的时候,如果可以查看class中的所有方法,可以提高效率.Android Studio 中可以使用快捷键一键显示所有方法的目录. Mac: command + fn + F12 (在mac中的 ...

  4. What is Web Application Architecture? How It Works, Trends, Best Practices and More

    At Stackify, we understand the amount of effort that goes into creating great applications. That’s w ...

  5. Web for pentester_writeup之File Upload篇

    Web for pentester_writeup之File Upload篇 File Upload(文件上传) Example 1 直接上传一句话木马,使用蚁剑连接 成功连接,获取网站根目录 Exa ...

  6. Web for pentester_writeup之File Include篇

    Web for pentester_writeup之File Include篇 File Include(文件包涵) Example 1 加一个单引号 从报错中我们可以获取如下信息: 当前文件执行的代 ...

  7. Understanding Spring Web Application Architecture: The Classic Way--转载

    原文地址:http://www.petrikainulainen.net/software-development/design/understanding-spring-web-applicatio ...

  8. BUILDING ANGULAR APPS USING FLUX ARCHITECTURE

    Flux is an architectural pattern based on unidirectional data flow. Although it is originated in the ...

  9. 【DVWA】Web漏洞实战之File Upload

    File Upload File Upload,即文件上传漏洞,一般的上传漏洞可能是未验证上传后缀 或者是验证上传后缀被bypass 或者是上传的文件验证了上传后缀但是文件名不重命名. LOW 直接上 ...

随机推荐

  1. gzez某蒟蒻lyy的博客

    在gz,想去sn幻想乡也行,现在高一并且是已经高二但仍然是机房最弱,没救了 愿诸位身体健康 水平不行,写出来的东西很sb,但还是会偶尔记录一下... 数学公式测试:$\binom n{n_1\cdot ...

  2. [Cocos2dx] CCCamera照相机 详解

    前言 在3D游戏当中,我们经常会使用到照相机这个东西,无论你使用的是哪一款引擎,都会用到,同时,照相机这个东西涉及到的东西比较多,基础知识需要扎实一些才可以. 如何使用 很久之前做项目的时候用到过一次 ...

  3. codevs 1052 地鼠游戏 优先队列

    1052 地鼠游戏 Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://www.codevs.cn/problem/1052/ Descriptio ...

  4. hdoj 5119 Happy Matt Friends 背包DP

    Happy Matt Friends Time Limit: 6000/6000 MS (Java/Others) Memory Limit: 510000/510000 K (Java/Others ...

  5. 监听当点击微信等app的返回按钮或者浏览器的上一页或后退按钮的事件

    在实际的应用中,我们常常需要实现在移动app和浏览器中点击返回.后退.上一页等按钮实现自己的关闭页面.调整到指定页面或执行一些其它操作的 需求,那在代码中怎样监听当点击微信.支付宝.百度糯米.百度钱包 ...

  6. String s="hello";s+="world";s变化了吗?原始的String对象的内容变了吗?

    分析: String s="hello";s+="world"; 引用变量s 一开始指向String对象("hello" :0x001); ...

  7. PostgreSQL教程收集(中文文档/命令行工具/常用命令)

    http://www.postgres.cn/docs/9.6/index.html(中文文档) https://www.postgresql.org/docs/10/static/auth-meth ...

  8. [JAVA] JAVA 文档注释

    Java 程序设计环境 文档注释 javadoc JDK中包含的javadoc工具可以由源文件生成一个HTML文档. javadoc从以下几个特性中抽取信息 包 公有类与接口 公有的和受保护的构造器及 ...

  9. BitTorrent Sync 老版本

    Sync version 1.4.111 Installer for Windows: BTSync.exe BTSync_x64.exe Installer for OSX: BTSync.dmgG ...

  10. c#开发地磅称重软件

    2012年时即做过一个地磅称重软件,最近公司又接了一个地磅过磅软件的项目,把遇到的问题总结一下以备后用. 1.接线问题 因为客户方原来单独使用仪表,仪表未有接线和电脑连接,为此颇费周折才做好了接线.接 ...