Code conventions

Most code conventions in CI aren't mandatory, they are just recommendations that will keep code organized. This is very useful, as we are able to decide whether we want to use them or continue to use our own. These include class names, spaces, closing tags, and so on. Though I recommend you to adhere to these conventions, as they will make your code more consistent and easier to read, you can keep your own code conventions or even mix them.

Note

Benefits are:

Though we are able to use these conventions, CI doesn't force us to do so, unlike other frameworks. This way you can use CI out of the box without the need to learn the conventions. It makes your code more consistent, better organized, and cleaner, even between projects.

Get CodeIgniter 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.