CodeIgniter Forums
Give your old self advice - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: General (https://forum.codeigniter.com/forum-1.html)
+--- Forum: Lounge (https://forum.codeigniter.com/forum-3.html)
+--- Thread: Give your old self advice (/thread-67393.html)



Give your old self advice - ignitedcms - 02-17-2017

If you could go back in time what advice would you give your old self when coding CI apps.

Mine would be to make sure all your coding is consistent and view files are properly formatted as and when you write them.
Also calling my model files appropriate names and not prefixed with Stuff_model.php. Also to avoid using JS validation and opt for server side validation where ever possible as sometimes you tend to forget it.

To call my view file input boxes the same name as the db column name it is going to be save to.


What are your tips?


RE: Give your old self advice - JustBoo - 02-17-2017

Quote:Also calling my model files appropriate names and not prefixed with Stuff_model.php.

Curious. What do you think are 'appropriate names' for models?

My only tip right now is wishing I'd picked up CodeIgniter sooner. (But I've been off in C++ land for years. So...) Smile

Thanks.


RE: Give your old self advice - albertleao - 02-17-2017

Honestly, if I could go back in time and tell myself how to code CI, I'd simply tell myself that CI is only a tool, albeit a very good one. Make sure you understand it's place and understand that there are certain things that are better done in other packages/languages.


RE: Give your old self advice - Diederik - 02-18-2017

I would advise myself to have given more time at learning all the usefull helpers CI has onboard.
I found out later on i had created my own helpers which overlapped some if the default helpers. That was a waste of time Smile


RE: Give your old self advice - ignitedcms - 02-19-2017

I've definitely got to check out the helper section again, I must admit I did read through all the codeigniter functions in the manual when I first started.

The other thing I wish I had done was written my own crud builder many moons ago. It has save so much time.