Let's write a framework.

  1. create a model var model={a:1,b:'b'}
  2. let's create a router, router maps url to concrete object and returns response, router is a collection
  3. let's create a manager for managing all our clients, to per request there is a client, or shared
  4. let's organize our request params, and apply request pipeline filters, read identity from cookie
  5. let's interact with database
  6. let's create a configuration manager which handles configuration loaders from different sources
  7. let's create a language manager
  8. let's create a base facade for our service base class
  9. let's create a type manager and apply di
  10. let's find from our ioc container the type that matches our router
  11. let's instantiate an object by the type
  12. let's execute the method router requires
  13. write the execution result to response
  14. apply result filters
  15. send to client.

  16. for model binding type, mvvm requires to audit property changes and recalculates the whole view model, mvc just binds the value to ui, mvp abstracts the view into an interface and handles all view relevant logic in presenter, old store pattern first gets all data, and keeps a state which is bad for interaction type apps.

  17. Further more, let's create a socket as server binded to a port and accepts data by tcp/ip protocol.

  18. Whenever our server socket receives a socket connection as client, store the client to static memory by a manager class.
  19. Write response by the client socket in store.
  20. Writing our ORM, we need to implement a pool which holds a certain number of connections to be performant
  21. Deassemble our models into k-vs, and create table oriented sql clauses by model type name
  22. For different operations, build different sql sentence
  23. Use sql driver and execute the sentence, so the data is finally hibernating in database;
  24. For relation type db, read index, foreign keys, keys, and instantiate different objects with data.
  25. Using a Serialization tool, create a serialization protocol, and reorganize the data into the form k-v by k-v
  26. Create

Let's write a framework.的更多相关文章

  1. windows类书的学习心得

    原文网址:http://www.blogjava.net/sound/archive/2008/08/21/40499.html 现在的计算机图书发展的可真快,很久没去书店,昨日去了一下,真是感叹万千 ...

  2. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第二章:利用模型类创建视图、控制器和数据库

    在这一章中,我们将直接进入项目,并且为产品和分类添加一些基本的模型类.我们将在Entity Framework的代码优先模式下,利用这些模型类创建一个数据库.我们还将学习如何在代码中创建数据库上下文类 ...

  3. Entity Framework Core 1.1 升级通告

    原文地址:https://blogs.msdn.microsoft.com/dotnet/2016/11/16/announcing-entity-framework-core-1-1/ 翻译:杨晓东 ...

  4. Entity Framework Core 实现MySQL 的TimeStamp/RowVersion 并发控制

    将通用的序列号生成器库 从SQL Server迁移到Mysql 遇到的一个问题,就是TimeStamp/RowVersion并发控制类型在非Microsoft SQL Server数据库中的实现.SQ ...

  5. 在传统.NET Framework 上运行ASP.NET Core项目

    新的项目我们想用ASP.NET Core来开发,但是苦于我们历史的遗产很多,比如<使用 JavaScriptService 在.NET Core 里实现DES加密算法>,我们要估计等到.N ...

  6. 采用MiniProfiler监控EF与.NET MVC项目(Entity Framework 延伸系列1)

    前言 Entity Framework 延伸系列目录 今天来说说EF与MVC项目的性能检测和监控 首先,先介绍一下今天我们使用的工具吧. MiniProfiler~ 这个东西的介绍如下: MVC Mi ...

  7. 来,给Entity Framework热热身

    先来看一下Entity Framework缓慢的初始化速度给我们更新程序带来的一种痛苦. 我们手动更新程序时通常的操作步骤如下: 1)把Web服务器从负载均衡中摘下来 2)更新程序 3)预热(发出一个 ...

  8. 采用EntityFramework.Extended 对EF进行扩展(Entity Framework 延伸系列2)

    前言 Entity Framework 延伸系列目录 今天我们来讲讲EntityFramework.Extended 首先科普一下这个EntityFramework.Extended是什么,如下: 这 ...

  9. Entity Framework教程(第二版)

    源起 很多年前刚毕业那阵写过一篇关于Entity Framework的文章,没发首页却得到100+的推荐.可能是当时Entity Framework刚刚发布介绍EF的文章比较少.一晃这么多年过去了,E ...

  10. Entity Framework 6 Recipes 2nd Edition 译 -> 目录 -持续更新

    因为看了<Entity Framework 6 Recipes 2nd Edition>这本书前面8章的翻译,感谢china_fucan. 从第九章开始,我是边看边译的,没有通读,加之英语 ...

随机推荐

  1. JMeter自带工具录制配置方法

    打开Jmeter,看到左边显示一个空的测试计划,把该测试计划改名为TestPlan1.右键单击该测试计划,选择“添加”-“线程组”,添加一个线程组,改名为TestGroup1.为了录制浏览器的操作,需 ...

  2. .NetCore 使用VSCode多项目调试

    使用VSCode可以调试.Net Core,但是调多个项目就需要进行一番设置. 首先创建一个总文件夹,以NetProjects文件夹为例,并创建一个解决方案.然后创建俩个.NetCore项目,并添加到 ...

  3. Debian系统设置terminal快捷键

    我安装的是debian gnome桌面版.安装完成之后,没有快捷键可以方便的打开terminal,需要自己设置这个快捷键 方法是: 桌面上点击右键==>设置==>键盘 ==>快捷键= ...

  4. golang(11) 反射用法详解

    原文链接:http://www.limerence2017.com/2019/10/14/golang16/ 反射是什么 反射其实就是通过变量动态获取其值和类型的一种技术,有些语言是支持反射的比如py ...

  5. html to pdf 把HTML转换为PDF

    http://www.evopdf.com/userguide/userguide.htm

  6. python3.4 + pycharm安装与使用

    因个人是windows的环境,所以本文只讲windows环境下的python安装. 作为初用python的盆友,强烈建议只在电脑上装一个python版本就好了,不然就进了各种坑里了. Python安装 ...

  7. java追加文件

    public class AppendToFile { /** * A方法追加文件:使用RandomAccessFile */ public static void appendMethodA(Str ...

  8. [ZJOI2007]捉迷藏(动态点分治/(括号序列)(线段树))

    题目描述 Jiajia和Wind是一对恩爱的夫妻,并且他们有很多孩子.某天,Jiajia.Wind和孩子们决定在家里玩捉迷藏游戏.他们的家很大且构造很奇特,由N个屋子和N-1条双向走廊组成,这N-1条 ...

  9. [转帖]Java 8新特性探究 前言

    Java 8新特性探究 前言 https://my.oschina.net/benhaile/blog/174136 讲下java的历史 感觉挺好的. 评论 17 jdk8java8javase新特性 ...

  10. splite与join

    Python split() 通过指定分隔符对字符串进行切片 切片之后为list数据类型. sentence = 'I can because I think I can ' s_1 = senten ...