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. [BZOJ5317][JSOI2018]部落战争(闵可夫斯基和)

    对于点集$A$,$B$,闵可夫斯基和$C=\{(x1+x2,y1+y2)|(x1,x2)\in A,(y1,y2)\in B\}$.由此可知,对于两个凸包$A$,$B$的闵可夫斯基和$C$满足,$C$ ...

  2. 【assembly】用汇编写的一个BMP图片读取器

    ;----------------------------- ;文件满足256色调的 ;----------------------------- Stack    Segment           ...

  3. Windows下修改Git bash的HOME路径

    Windows中使用http://git-scm.com/安装Git bash工具,默认的HOME和~路径一般都是C:\Users\用户名,每次得用命令切换到常用的Repository下,此操作重复而 ...

  4. CF980E The Number Games【树链剖分/线段树】

    CF980E The Number Games 题意翻译 Panel 国将举办名为数字游戏的年度表演.每个省派出一名选手. 国家有 n 个编号从 1 到 n 的省,每个省刚好有一条路径将其与其他省相连 ...

  5. poj 2623 Sequence Median 堆的灵活运用

    I - Sequence Median Time Limit:1000MS     Memory Limit:1024KB     64bit IO Format:%I64d & %I64u ...

  6. PWM DAC vs. Standalone

    http://analogtalk.com/?p=534 http://analogtalk.com/?p=551 Posted by AnalogAdvocate on April 09, 2010 ...

  7. window api 监控

    http://pnig0s1992.blog.51cto.com/393390/704189

  8. redis java操作

    Redis Java连接操作 连接到Redis服务器 import redis.clients.jedis.Jedis; public class RedisJava { public static ...

  9. pytest文档21-pytest-html报告优化(nodeid中文显示[\u6350\u52a9\u6211\u4eec]问题解决)

    前言 pytest-html报告中当用到参数化时候,获取用例的nodeid里面有中文时候,会显示[\u6350\u52a9\u6211\u4eec]这种编码(再次声明,这个不叫乱码,这是unicode ...

  10. Java 中的 int 与 Integer 用于 List<Integer> 时,以及通过打印变量检測程序执行和函数调用次数计数

    总结一下近期做的东西中遇到的问题 1. Java 中的 int 与 Integer 用于 List<Integer>  时 两者之间的关系都是非常清楚的.int 是基本数据类型,存储的是值 ...