• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Writing Admin/User/Public controllers to insure authentication

#18
(01-02-2015, 06:44 PM)includebeer Wrote: That is why constants were invented! Wink
Not exactly. Constants were invented to contain constant values. Like pi (3.14159265358979323846) or e (2.71828182845904523536). If your directory location changes then it's not exactly constant, is it? I think what ivantcholakov and mwhitney (and I) are saying deserves consideration. Maintaining a project in many cases means moving from one server to another or bringing on more developers, each with their own workstation. It also means putting the code into a repository without one person's constant values over-writing another person's different constant values. If you don't use namespaces (which CI doesn't), every constant risks having a name collision with some other library you want to use. Every constant that might differ between machines or developers must be put into a configuration file that is somehow included in the project but excluded from the repository (so that users' differing values are not in conflict). All of this takes time, which costs money, which adds up in a complex project.

Constants were not invented to solve the problem of annoying thickets of include and require statements. Autoloaders were.
Reply


Messages In This Thread
RE: Writing Admin/User/Public controllers to insure authentication - by sneakyimp - 01-05-2015, 01:50 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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