REST API Best Practice on Java, .Net & PHP
Contents


Target Audience: CAST Administrators


Summary: This documentation is aimed at CAST Administrators who would need to configure REST based applications using CAST AIP. It provides a guide based on field experience of how best to configure REST based applications using CAST AIP so that similar configurations can be reused. The typical examples given below have been applied on different versions of CAST AIP based on various requirements.

These configurations are used over and above CAST AIP 8.2.x EJB Specification offering (see Reference Materials below for links) to overcome limitations. The applicability of this guide should have assessed for newer versions of CAST AIP and Extension.


Standard flow: CAST View with REST Layers

Where ever we find REST implementation, irrespective of any technology/implementation below are the thumb rule needs to be followed for....
1. REST Intermediary – REST Service PROVIDER + CONSUMER
2. REST Entry point    – REST Service PROVIDER
3. REST End point      – REST CONSUMER

REST as Intermediate - Service PROVIDER + CONSUMER

This is the most common scenario, of REST implementation. (i.e.,) There are cases, REST Services are exposed, and these REST services will be consumed with in application boundary source code.

REST Entry point: REST Service PROVIDER

As in enterprise application REST Endpoints will be we exposed for the consumption of external application / up-stream request. In this kind of scenario those exposed Endpoints need to be treated as the Entry point.

                         

REST End point: REST CONSUMER

Considering application boundary our application may need to consume, External application's REST Endpoint.
In these cases those REST End point services which are being consumed by us will be treated as the Endpoint in the transaction.
For an example there could be external REST service(Payment gateway) exposed by outside to the boundary of an application. Our application need to consume those service then we may have REST client as END point.


This section highlights all the file types that can be expected to be delivered if the application has implemented this framework.

Java

.js
.java
.HTM
.HTML
.jsp


This section highlights all the file types that can be expected to be delivered if the application has implemented this framework.

C#

.cs
Web.config


This section highlights all the file types that can be expected to be delivered if the application has implemented this framework.

PHP

.php
.htaccess