Last post Oct 26, 2016 04:28 PM by Argg
Oct 12, 2016 09:09 AM|stephan.steiner|LINK
I have the following app architecture
Separated MVC Gui and Web API Backend that talks to the database. The communication between GUI and backend is standard REST, but the backend does not expose the database model objects directly (the backend can be used by third parties.. hence the additional
This all works fine.. but a crucial bit of information was never shared between the GUI and backend team when this all was designed: The GUI uses a framework that does the searching, paging and sorting which is based on IQueryable. And what was done so far
was simply fetch all data with some default filters, and then everything else (searching, sorting) was done with data already loaded from the backend.
Needless to say that once you start dealing with large data sets, you run into performance issues.
And that's where I'm at now.. the backend can't simply expose IQueryable because the communication between backend and GUI does not use database models.. so I'm wondering if there's any other approach that would work here. What other way are there to do
all the things you get from IQueryable without having to expose your database models?
Oct 26, 2016 04:28 PM|Argg|LINK
Why not have your REST API accept parameters for search criteria, page index, and page size? Do your query fill a model and return that to the GUI?