• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anyone using CI with React,Vue,Svelte or Marko?

#1
I am just wondering if there are any people out there who's using CI with JS frameworks rather than traditional web apps?

Is it easy to integrate?
Reply

#2
you can just use api from CI and build your js framework seperately
Reply

#3
I did a couple of tries with VueJs -> nothing spectacular, it just works.

Here is good advice on Ajax calls setup for reactive frontend frameworks:
https://codeigniter4.github.io/userguide.../ajax.html

And when you will be building your backend, you should ensure that you follow some basic architectural principles and constrains. For example, you should split all communication between FE and BE into small requests, serve each piece as JSON from dedicated controller/method, and gracefully process errors. Those pages in user guide will help you to start:
https://codeigniter4.github.io/userguide...ponse.html
https://codeigniter4.github.io/userguide...onses.html

Then basically all what you have to do if you are building VueJs SPA is to serve your layout that initializes VueJs, and let javascript do the rest. CI4 will not be envolved more then responding to Ajax requests coming to API methods you defined.
Reply

#4
I use Vue with codeigniter 3.

My codeigniter app is just a json backend at this point. Having a json backend that's not coupled with the front end makes it easier to port applications too (I'm currently converting my CI app to Laravel).
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Reply

#5
Actually if i would use a fullstack or almost fullstack framework/toolkit like CI, ~especially in PHP where we can easly integrate into front end code at server-side(they're trying to advert JS as only logical thing to use in front end and lastly asp.net's blazor)~, i would not want to waste my time trying to handle JWT to auth user instead of using server-side sessions. I am not familiar with SPA user auth. Is there any recommendations?

I am thinking to use JWT in SPA and keep user token with cookie-js to persist it.
pro novice
Reply

#6
We use CI with ReactJS for an application that is a SaaS for 1700 locations with thousands of concurrent users (all day long too) - we handle a boat load of POS transactions, appointments, services, etc all through the app, largely using ReactJS front end.

So, yes, it can do it very well.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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