zoukankan      html  css  js  c++  java
  • Let's write a framework.

    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

  • 相关阅读:
    关于silverlight打印模糊的问题
    Microsoft Office Excel 不能访问文件及COM无法访问
    IE8 下 select option 内容过长 , 展开时信息显示不全解决办法
    如何用css做一个细虚线边框表格
    DIV 垂直 垂直水平 居中
    Ul li 横排 菜单
    对原生js的一些小尝试
    Nodejs学习笔记——Assert(断言)
    Octopress创建GitHub Pages——基于代码托管的静态博客
    JS倒计时器一只,顺便复习javascript时间相关函数
  • 原文地址:https://www.cnblogs.com/hualiu0/p/11089498.html
Copyright © 2011-2022 走看看