AnsweredAssumed Answered

PI Web API Architectural Question

Question asked by neilg on Nov 2, 2015
Latest reply on Nov 4, 2015 by neilg

Hi All,


I am hoping to get some thoughts on which may be the better approach to take on the below for an ASP.Net website/application talking to PI Web API.


Approach 1:

We could have JavaScript code talking directly from a client's browser and rendering the page (graphs, dials, static tables, etc) based on the results returned from the PI Web API call. This is purely on the client side. To me this makes it a thick client as the business logic is all driven through JavaScript on the client side.


Approach 2:

The other approach is to follow the MVC pattern and have the Model (server side) make calls to the PI Web API and return a visual object of some sort to the View. to me this approach makes it a thin client as the business logic is done at the server side and the View/JavaScript is only doing the client side rendering.

Note that the application has the potential to become complex over time.


My Questions (to all experienced web developers/developers out there):


  1. Which do you think is a better approach to take? What are the reasons?

  2. Are there any potential issues that you see with taking approach 1 versus approach 2? Putting a thick client does not appeal to me architecturally, but I am after any additional insights you can provide?


All suggestions and knowledge is greatly appreciated.