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. PHP获取目录和文件的方法

    PHP获取当前目录和相对目录的方法<?php //获取当前文件所在目录,如果 A.php include B.php 则无论写在哪个文件里,都是表示 A.php 文件所在的目录 echo rea ...

  2. SQL SERVER 扩展属性的操作方法

    将数据库迁移到 Azure SQL 数据库时出现错误,不支持扩展属性“MS_Description”,因此就如何操作扩展属性进行在此记录. 查询扩展属性 SELECT *,OBJECT_NAME(ma ...

  3. hdu 1514 记忆化搜索

    题意是给4堆(堆的高度小于等于40)有颜色(颜色的种类小于等于20)的物品,你有一个篮子最多能装5件物品,每次从这4堆物品里面任取一件物品放进篮子里,但是取每堆物品时,必须先取上面的物品,才能取下面的 ...

  4. bzoj 4017 子序列和的异或以及异或的和

    位运算很好的一个性质是可以单独每一位考虑..... 题解请看:http://blog.csdn.net/skywalkert/article/details/45401245 对于异或的和,先枚举位, ...

  5. Elasticsearch快速入门案例

    写在前面的话:读书破万卷,编码如有神-------------------------------------------------------------------- 参考内容: <Ela ...

  6. 探秘GO语言《比较C#与GO的性能》

    这段时间也来学学GO语言,听说它的性能相当的棒棒,我就拿C#来和它做比对一下. 这里只是单纯了做了for循环的比对,看看谁的循环快 C# 代码: static void Main(string[] a ...

  7. PPT文化

    PPT文化,yes or no? 知识是有体系的,有的时候刚接触的时候可以 推导技术 ,汇报.吹牛都可以应用上,并且可以让别人想想. 但是实际应用技术,就需要涉及很多详细的技术细节,如果少掉一个看似极 ...

  8. SPOJ 1811. Longest Common Substring (LCS,两个字符串的最长公共子串, 后缀自动机SAM)

    1811. Longest Common Substring Problem code: LCS A string is finite sequence of characters over a no ...

  9. CSS之BFC、IFC、FFC and GFC

    CSS之BFC.IFC.FFC and GFC 什么是FC? BFC(Block Formatting Contexts) BFC的布局规则: 如何生成BFC: IFC(Inline Formatti ...

  10. Android Binder分析二:Natvie Service的注冊

    这一章我们通过MediaPlayerService的注冊来说明怎样在Native层通过binder向ServiceManager注冊一个service,以及client怎样通过binder向Servi ...