Welcome Guest, Not a member yet? Register   Sign In
How do I replace front-end views with JSONs in Codeigniter 3?
#10

(This post was last modified: 08-23-2019, 01:48 PM by cartalot.)

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.
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB