CodeIgniter Forums
Avoid using helpers - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: Avoid using helpers (/showthread.php?tid=79001)



Avoid using helpers - MrWhite - 04-06-2021

I don't get why pretty much every PHP framework comes with this shit. I wish CI4 helpers were libraries instead of helpers. global methods are the worst thing. hard to test and bad for readability.

Now it's too late. ci4 helpers will be a thing forever. but if you are gonna create custom helpers, please don't! create and use libraries instead.


RE: Avoid using helpers - nurmyrat - 12-27-2021

(04-06-2021, 10:23 AM)MrWhite Wrote: I don't get why pretty much every PHP framework comes with this shit. I wish CI4 helpers were libraries instead of helpers. global methods are the worst thing. hard to test and bad for readability.

Now it's too late. ci4 helpers will be a thing forever. but if you are gonna create custom helpers, please don't! create and use libraries instead.

Please be my guest. Write your own PHP framework without that "sh*t" and show that "sh*t" to this community (or some others too) for RFC. By the way AFAIK CI lets to do change/remove something under the hood as far as you know the domain of that framework and call that new framework "Sh*tIgniter". No problem MrWhite you can go to the Moon and Beyond as far as it fits your needs. Me not being rude, just want to get your point and give a thorough explanation what you mean by that, suggest something like that and maybe in the future you will be the one of the core developers of CI.


RE: Avoid using helpers - kenjis - 12-27-2021

What do you mean by helpers?
This? https://codeigniter.com/user_guide/helpers/index.html

> bad for readability

What's bad?


RE: Avoid using helpers - includebeer - 12-28-2021

(12-27-2021, 05:18 PM)kenjis Wrote: >  bad for readability

What's bad?

Nothing is bad with helpers. He's either a troll or he doesn't have much experience in programming. If I only need a 5 line function, why would I create a library for that? Some people just like to over engineer everything when there's a more simple solution.


RE: Avoid using helpers - InsiteFX - 12-29-2021

Someone needs to learn DRY & KISS.