Welcome Guest, Not a member yet? Register   Sign In
Best practice with Routes
#1

Hi everybody,

I'm new in development with CI4 and I have a little question...

I have made a Web site and for the gestion of it I have developed a Windows application and I'm working with a large REST WebServices.

For that, I have for now at least 30 routes.

I would like to know if that can be performance issue or not ?
Maybe that would be more interesting to separate the two applications ?

For now I haven't noticed any slowness on the website but that's a question I have looping in my head Smile

Thanks a lot for the answers.


Have a nice day,
Reply
#2

I'm not black belt on this, but one of my CI4-based web apps still under development has already more than 100 routes by now, and the app is still as fast as a website consisting of plain HTML files.

Grouping Routes is a best practice:
https://codeigniter.com/user_guide/incom...ing-routes

CodeIgniter Wizard (CRUD code generator for Mac) instantly scaffolds Bootstrap-based web applications with an administrative interface (admin templates include Bootstrap5)

Reply
#3

(12-31-2020, 04:01 PM)gosocial2 Wrote: I'm not black belt on this, but one of my CI4-based web apps still under development has already more than 100 routes by now, and the app is still as fast as a website consisting of plain HTML files.

Grouping Routes is a best practice:
https://codeigniter.com/user_guide/incom...ing-routes

Hello,

Thank you for the feedback and the tip with grouping routes Smile


Have a nice day,
Reply
#4

I am also pushing 100+ routes in my project and I cannot see any issues in production. Running in Docker and with OPcache.
Reply
#5

(01-01-2021, 03:02 AM)tgix Wrote: I am also pushing 100+ routes in my project and I cannot see any issues in production. Running in Docker and with OPcache.

Hello,

Thanks to for the answer too  Smile

Then I haven't a large WebService for now  Big Grin


Have a nice day,
Reply
#6

Agreed. When it comes to routes, you will encounter issues with general maintainability long before you encounter any performance issues. After you get a couple hundred routes in there, the real issue becomes keeping track of them somehow. My advice would be to optimize as best as possible to keep that number as low as possible, simply so you don't go insane.
Reply
#7

(01-05-2021, 05:53 PM)schertt Wrote: Agreed. When it comes to routes, you will encounter issues with general maintainability long before you encounter any performance issues. After you get a couple hundred routes in there, the real issue becomes keeping track of them somehow. My advice would be to optimize as best as possible to keep that number as low as possible, simply so you don't go insane.

Ok, then that's not a problem excepted for my brain if I have a lot of route  Big Grin Big Grin Big Grin


Thanks all
Reply




Theme © iAndrew 2016 - Forum software by © MyBB