Series Navigation Address http://www.cnblogs.com/fzrain/p/3490137.html
Digress: This technical point is newly learned and does not belong to the original series. However, with the help of the Project Background of the original series, the external series is named, some new technologies may be added to this series in the future.
In Web Api 2.0, A New Route configuration method is proposed-Attribute-based Routing ), the configuration Routing method
Recently, I found that web APIs are very popular, and there are various great gods in the park who are already studying them. I saw a series of tutorials on the official asp.net website /. So I plan to keep learning and record the learning process in the blog and share it with you.
After each article, I share the code.
As I was just getting started, I have limited technical capabilities. If you have any questions, let's discuss them.
I. Using Entity Framework Code First to build a database mode
design principles, an architectural style (or pattern), not a specific standard or architecture. Rest has a lot of successful use cases, the famous delicious and Flickr provide rest-style API usage, client invocation is extremely convenient, here is a very simple rest examp
chooses the best way to build their API in response to different forms, guided by existing industry experience.
Choose a form to start
When discussing APIs, you may hear the word "soap" and "Rest," and wonder if the developer is working or planning a vacation. The fact is that these are the names of the two common architectures for Web-based APIs. SOAP (acronym abbreviation) is an XML-based
to be Web design, implementation and maintenance API not just a challenge; for many companies, this is an imperative task. This series will lead readers through a journey, from Identifying business use cases to designing methodologies for the API, addressing implementation challenges, and looking at Maintaining public on the Web over the long term
presented by Roy Felding (fifth chapter in his "Web-based Software Architecture" paper). The core principle of rest is to split your API into logical resources. These resources are manipulated via HTTP (GET, post,put,delete).So how do I split these resources?Obviously from an API user's point of view, "resources" should be a noun. Even if your internal data mode
). The core principle of rest is to split your API into logical resources. These resources are manipulated via HTTP (GET, post,put,delete).
So how do I split these resources?
Obviously from an API user's point of view, "resources" should be a noun. Even if your internal data model and resources already have a good correspondence,
design, a few of the principles must be adhered to:
Comply with standards when the standards are reasonable.
The API should be programmer-friendly and easy to enter in the browser's address bar.
The API should be simple, intuitive, easy to use and elegant at the same time.
The API should be flexib
course, as the basis of design, a few of the principles must be adhered to:
Comply with standards when the standards are reasonable.
The API should be programmer-friendly and easy to enter in the browser's address bar.
The API should be simple, intuitive, easy to use and elegant at the same time.
The API
Original address: http://blog.csdn.net/ywk253100/article/details/25654021Guide: Designing restful APIs is critical to the scalability, scalability, and consumer experience of software architectures. The theme of this virtual workshop is how to design restful APIs.Keywords: restful API REST OAuth protocolThe REST archit
the complexity of the app backend, greatly improving the development efficiency of the app front-end.2.8 Points of API design(1) RESTful design principlesRESTful style: restfu design principle, which was put forward by Roy Felding (in his "web-based software Architecture" thesis in the fifth chapter). The core princip
current URL (collection relationship, and gives the collection URL), the href represents the path to the API, title represents the API's caption, and type represents the return type.The design of the Hypermedia API is known as Hateoas. The GitHub API is the design that acce
current URL (collection relationship, and gives the collection URL), the href represents the path to the API, title represents the API's caption, and type represents the return type.The design of the Hypermedia API is known as Hateoas. The GitHub API is the design that acce
have no side effects? It is hard to say no. Due to the lack of cohesion, this API can actually do something else.
Is it reliable?The famous design principle "design to interfaces" helps enforce testability on an object. this API is inherently testable, but the number of test cases to verify may be huge due to its lac
. Most of the time the client just needs some of the information, but the interface still transmits all the information, this situation increases the network transmission, especially for mobile applications are particularly unfriendly, but also require the client to extract the required data. Instead of building two APIs that are roughly the same as the return field, it increases the complexity of the backend implementation, either by adding business logic or by increasing the difficulty of main
RESTful is the design idea used in both the front-end and back-end interfaces.The website is the software, we also often say webapp, this kind of Internet software uses "the client/server" mode, builds on the distributed system.Web site development, can also fully adopt the model of software development , but the traditional software and networks are different areas, because: software development is mainly for the single-machine environment, and the n
difference and other architectural style
For the resource-oriented architectural style of rest, a new architectural concept is proposed, namely: resource-oriented architecture (Roa:resource oriented Architecture)
Second, RESTful API design
1. Agreement
The API communicates
architecture style, rest is the abbreviation for representational state transfer, and Chinese translates as "representational states transfer"
Rest looks at the entire network from the resource's perspective, which identifies the resources distributed across a node in the network through URLs, and the client application uses URLs to obtain representations of the resources, resulting in these applicatio
Restful api security design guide
The full name of REST is REpresentational State Transfer, which indicates stateless transmission without session. Therefore, each request must carry authentication information. Rest is based on http and stateless. It is only an architectural method, so its security features must be imp
application state) rule in the URI. There is no direct relationship between the version number and the resource.
URL parameter controlThat is, after each request, add a version parameter that indicates which edition is requested. As follows:http://server:port/api/customer/123?version=2 This approach is actually a variant of the URI pattern, the good and bad are the same.Mdedia Type ControlThat is, using media type in the header of the HTTP requ
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.