November Happy Hour will be moved to Thursday December 5th.

How to load data from an API, for display in episerver pages

Jk
Jk
Vote:
 

I've been reading on Episerver, but still have some questions. For instance, if I want to primarily load data from a separate Oracle database (through an API), how would I do that? I mean, the data will not be present in Episerver's local database. Think of this as setting up a website where the data to be displayed is mainly reports, tables of numbers from the Oracle base. 

Any advice or tips on what to read up on?

#157897
Sep 25, 2016 14:09
Vote:
 

Use standard .NET. 

Normally you will build a repository type of class that handles the external communication. Use that repository class from page controller. Extend the view model with the type of data you want to display. Modify view to display it etc.. 

If you have a lot of business rules, add a service layer. Sounds like you don't need one if you are mainly displaying data. 

So standard .NET and MVC basically. Cache what can be cached...

#157898
Sep 25, 2016 14:22
Jk
Vote:
 

Thanks for the reply! Yes, mainly, I will simply request and present data. The plan is to refactor most, or all, coding complexity down into Oracle/PLSQL, so that the API will serve nearly ready-to-present reports. This way, it's mostly a matter of just "decorating" the data as HTML. Initially, I thought if I am to use a Javascript front-end framework (eg Angular), I might just have access the API directly in Javascript, but maybe this is not the best way to go about this (in an Episerver context)? 

#157900
Sep 25, 2016 16:46
Vote:
 

For just showing it's normally fine with a js solution. I normally go server side though. More options for caching, combining from multiple sources, logging, export to excel etc. 

#157901
Edited, Sep 25, 2016 17:52
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.