RESTful API Applications

REST (Representation State Transfer) is a software architecture style consisting of guidelines and best practices for creating scalable web services. A uniform interface separates clients (consumers) from servers (providers). This separation of concerns means that, for example, consumers are not concerned with data storage, which remains internal to each provider, so that the portability of consumer code is improved. Providers are not concerned with the user interface or user state, so that providers can be simpler and more scalable. Providers and consumers may also be replaced and developed independently, as long as the interface between them is not altered.

Web service APIs that adhere to the REST architectural constraints are called RESTful. The API should use standard HTTP methods (e.g., GET, PUT, POST, or DELETE) and an Internet media type for the data such as JSON.

Iron Speed Designer generates an application which consists of both the parts, Consumer and Provider. During development the application calls itself using the REST protocol. This design is chosen to allow you to test end to end functionality without the hassle of maintaining multiple applications.

The Deployment Wizard separates the application into two packages – Consumer and Provider – which have to be deployed independently to their respective servers. This allows you to deploy the Provider to an application server close to the database server, and the Consumer to any application server. One Provider can serve multiple Consumers.

Provider versus Consumer

The Provider application handles an incoming request, authenticates it and performs database operations. It includes APIKeys, AppStart, Data Access Layer, Business Layer including Controlers, ManageAdmin.sdf and a Winform application. The rest of the code such as the Presentation layer is removed. The Provider has to run in Full trust with Anonymous Authentication and impersonation set to false.

The Consumer application is a standard application generated by Iron Speed Designer with certain specific keys in the web.config (see Web.config settings). It uses a special class in BaseClasses library to translate requests to the Provider.

Technology used

The application uses ASP.NET Web API 2 and JSON payloads that are constructed using the Newtonsoft.JSON library.

System requirements

.NET Framework 4.5 or later is required.

See Also

Creating RESTful Applications



Third Party Application

Implementation Details