Grails application groovy controller issue

P

pks_310

Guest
I'm building a grails application and loading my backend by converting my csv tables into json files and rendering them to index.gsp for reading.

Most of the functionality of the dashboard is done, but there is a major flaw in my code as in, i'm loading JSON files of size 55 mb onto the browser everytime a selection is made. This is absolutely not recommended and there should be a middletier(or socket etc) or something, which takes the main json file and gives the browser exactly what is needed to show the data visualization, the size of which should be in kB for best performance

I am very new to this and was trying to resolve this via the javascript part of my code, but the problem lies with my groovy controller part and I must have a placeholder to store the json file and pull only relevant data on my browser to prevent a crash.

So, after consultation with a javascript guy, I have realized that we have to use AJAX calls in both index.gsp and controller groovy part such that I pick only the relevant data in the browser and the remaining data lies in the controller such that every time a filer is changed, only the relevant data comes to the browser

I'm a beginner in AJAX, groovy and grails. After searching for a while, it seems I can use AJAX driven selects in GSP and also the remotefunction() Also, using filters plugin or some kind of "params" have to be used to solve this issue

Any suggestions/approached will be appreciated as to how to proceed in the same.
 

dave

Administrator
Staff member
Be wary of using remoteFunction as that's now deprecated.

Is there no reason your data is not being brought into a database?
 
A

asad

Guest
I am very new to this and was trying to resolve this via the javascript part of my code, but the problem lies with my groov


______
shafiq
 
Top