Welcome Guest, Not a member yet? Register   Sign In
Best Pratice
#1

[eluser]OES[/eluser]
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.
#2

[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.
#3

[eluser]OES[/eluser]
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.
#4

[eluser]sikkle[/eluser]
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.




Theme © iAndrew 2016 - Forum software by © MyBB