Fix section "Routing with Beego" in 13.2.md

This commit is contained in:
Anchor
2015-01-18 20:58:36 -08:00
committed by James Miranda
parent 729ae5df0f
commit 66041d132f

View File

@@ -44,15 +44,15 @@ When the application is running, the Go server listens to a port. When it receiv
}
}
## Beego routing framework to achieve
## Routing with Beego
Almost all Web applications are based routing to achieve http default router, but the router comes Go has several limitations:
At present, most Go web applications base their routing on `http`'s default router, however this has several limitations:
- Does not support parameter setting, such as/user/: uid This pan type matching
- Not very good support for REST mode, you can not restrict access methods, such as the above example, user access/foo, you can use GET, POST, DELETE, HEAD, etc. Access
- General site routing rules too much, write cumbersome. I'm in front of an API to develop their own applications, routing rules have thirty several, in fact, this route after more than can be further simplified by a simplified method of the struct
-Does not support dynamic routes with parameters, such as `the/user/:UID`
-Does not have good support for REST. The access methods cannot be restricted; for instance in the above example, when users access `/foo`, they can use the GET, POST, DELETE, and HEAD HTTP methods, among others.
- In large apps, routing rules can become repetitive and cumbersome. Personally, I've developed simple web APIs composed of nearly thirty routing rules when in fact, these rules could have been further simplified using method structs.
beego framework routers based on the above few limitations to consider the design of a REST approach to achieve routing, routing design is based on two points above the default design Go to consider: store -and-forward routing routing
The Beego framework's router is designed to overcome these limitations, taking the REST paradigm into consideration and simplifying the storing and forwarding of routes and requests.
### Storing a routing