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

  • 相关阅读:
    Android布局与事件
    android 开发中共享全局数据Application的类
    从Android界面开发谈起【转】
    HttpClient java
    关于整合S&K框架的一些个小注意
    批处理执行多条语句
    Atitit. 软件设计 模式 变量 方法 命名最佳实践 vp820 attilax总结命名表大全
    atitit.软件设计模式大的总结attialx总结
    Atitit.软件开发的最终的设计 dsl化,ast化(建立ast, 解析执行ast)
    atitit。流程图的设计与制作 attilax 总结
  • 原文地址:https://www.cnblogs.com/hualiu0/p/11089498.html
Copyright © 2011-2022 走看看