Best Pratice

Hello Peeps.

Just looking for some advice.

Using the MVC pattern when would you want to use the libraries folder.

Im trying to get my head around the need for this folder.

Can you explain a good reason to use it.

Hope you can advise.

[eluser]Pascal Kriete[/eluser]
It's most commonly used for actions that you need more than once, so that you don't have any duplicate code in various controllers.

CI already has most of the libraries a normal application requires, but for more complex situtations you'll find yourself in need of some extra functionality. Take a look through the ignited code section, a lot of the stuff that gets posted there are libraries.

Hope that answered your question.

Great thanks.

Just thinking about what you said about it being able to share actions makes sense as you would not share a component.

Thats great thank you.

a good example to follow for you is /system/librairies, those are some of the core libs, don't be surprise to see that your own could be pretty much similar.

see ya around.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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