-1

I am building a feed like application with infinite scroll inside my native Android application using webview. I first tried Ionic framework but really disappointed with performance.

I am now thinking of developing it in pure JQuery and responsive HTML/CSS to achieve superior performance. One thing I am considering is weather to emit HTML or JSON from the server side APIs.

Emitting JSON means client side DOM manipulation which can again hurt performance. I am looking for maximum performance.

Whereas, I am not very sure emitting HTML is a very good idea for better maintainability of this application.

What do you guys recommend?

Madhur Ahuja
  • 22,211
  • 14
  • 71
  • 124
  • Please read [What types of questions should I avoid asking?](http://stackoverflow.com/help/dont-ask) You have been asking some quite off-topic questions lately. – Dalija Prasnikar Apr 21 '16 at 18:39

1 Answers1

1

Injecting JSON should be a better solution.

  1. In case some manipulation or operation on data is required in a later phase of development.
  2. Possible security issue.You are mixing control(tags) and data. By preventing inline script execution you can protect against attacks to the most extend.

This said if properly implemented and for the right reasons HTML might not be a total bad choice. But, the performance over-head might not be the right reason. But then again I haven't tested to confirm this.

You can also have a look at this SO question.

Community
  • 1
  • 1
JoviaArk
  • 111
  • 2