Merging other languages

This commit is contained in:
James Miranda
2016-09-23 18:01:10 -03:00
parent 380a8ee74c
commit de3c5bdaa4
490 changed files with 24539 additions and 24588 deletions

View File

@@ -1,12 +1,11 @@
# 13 如何设计一个Web框架
前面十二章介绍了如何通过Go来开发Web应用介绍了很多基础知识、开发工具和开发技巧那么我们这一章通过这些知识来实现一个简易的Web框架。通过Go语言来实现一个完整的框架设计这框架中主要内容有第一小节介绍的Web框架的结构规划例如采用MVC模式来进行开发程序的执行流程设计等内容第二小节介绍框架的第一个功能路由如何让访问的URL映射到相应的处理逻辑第三小节介绍处理逻辑如何设计一个公共的controller对象继承之后处理函数中如何处理response和request第四小节介绍框架的一些辅助功能例如日志处理、配置信息等第五小节介绍如何基于Web框架实现一个博客包括博文的发表、修改、删除、显示列表等操作。
通过这么一个完整的项目例子我期望能够让读者了解如何开发Web应用如何搭建自己的目录结构如何实现路由如何实现MVC模式等各方面的开发内容。在框架盛行的今天MVC也不再是神话。经常听到很多程序员讨论哪个框架好哪个框架不好 其实框架只是工具,没有好与不好,只有适合与不适合,适合自己的就是最好的,所以教会大家自己动手写框架,那么不同的需求都可以用自己的思路去实现。
## 目录
![](images/navi13.png?raw=true)
## links
* [目录](<preface.md>)
* 上一章: [第十二章总结](<12.5.md>)
* 下一节: [项目规划](<13.1.md>)
# 13 Build a web framework
Preceding twelve chapter describes how to develop Web applications through Go, introduced a lot of basic knowledge, development tools and techniques, then we pass this knowledge in this chapter to implement a simple Web framework. Go language to achieve through a complete frame design, the main contents of this framework, the first section describes the structure of a Web framework planning, such as using the MVC pattern to develop, program execution process design, etc.; second section describes the framework the first feature: Routing, how to get access to the URL mapped to the corresponding processing logic; third section describes the processing logic, how to design a common controller, object inheritance after the handler how to handle response and request; fourth section describes how to framework some auxiliary functions, such as log processing, configuration information, etc.; fifth section describes how to implement a blog-based Web framework, including Bowen published, modify, delete, display a list of other operations.
Through such a complete project example, I expect to be able to allow readers to understand how to develop Web applications, how to build your own directory structure, how to achieve routing, how to achieve the MVC pattern and other aspects of developing content. In the framework prevalent today, MVC is no longer a myth. Many programmers often heard discussions which frame is good, which frame is not good, in fact, the framework is only a tool, there is no good or bad, only suitable or unsuitable, for his is the best, so we write their own framework for the church, then different needs can use their own ideas to be realized.
## Links
- [Directory](preface.md)
- Previous chapter: [Chapter 12 summary](12.5.md)
- Next section: [Project program](13.1.md)