前端工程要素梳理
2017-03-22 13:35:00
0
举报
一个前端应用工程应该具备的要素,以及 web前端里面文件目录创建推荐和实现方式。
辅助工具
储存机制
按持久化
内存储存
sessionStorage
固定储存
localStorage
cookie
indexDb
时间长短
1天内
1天
1周
1个月
1年
永久储存(不被应用外操作的话)
其他功能
序列化与反序列化
过期回调
cache化函数
cookie操作
远程链接
websocket
接口协议
防重复提交
配置系统
全局环境
自定义环境
全局变量
shim或polyfill环境
工程结构
server
build
dist
/
src
enviroment
config.js
router
store
resource(API)
util
ajax
memery_cache
localStorage_cache
session_storage
cookie
entry
main.js
another_main.js
index.html