• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I replace front-end views with JSONs in Codeigniter 3?

Something to consider if you end up using Vue - another alternative is to create the basic template of the page using a Codeigniter view - and then in Vue use Axios to call the resources that you need from the database for that page. Depending on your situation this can be best of both worlds because..
1) your initial View page loads very quickly for the user.
2) if there are any errors with Vue or it calling the db, etc etc - your page has already loaded so the errors are confined to the Vue id etc. Much more elegant for displaying errors, especially for multi step processes like forms. Also contains any slow responses from 3rd party apis.
3) you can create the basic template for the page with whatever you are already using (versus having to recreate every single element all over again in Vue)
4) you can still create awesome dynamic content with Vue. like you can do a search -> find -> list results in the Vue code. but because its inside the codeigniter view file - there is no browser refresh - so then it feels very fast for the user.

Messages In This Thread
RE: How do I replace front-end views with JSONs in Codeigniter 3? - by cartalot - 08-23-2019, 01:42 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.