Welcome Guest, Not a member yet? Register   Sign In
where should I write a re usable code ?
#2

[eluser]tomcode[/eluser]
For simple, universal stuff I create helpers. They have the advantage to be usable anywhere, no need to respect the context I am in.

In Your case I'd create a library and probably also some config entries (paths, filetypes and so on) :

1. file uploads are probably only done inside a controller
2. configurations can be nicely commented / easily maintained
3. functionality can be split into single task methods for better control and readablity.


Messages In This Thread
where should I write a re usable code ? - by El Forum - 03-11-2010, 08:10 PM
where should I write a re usable code ? - by El Forum - 03-11-2010, 09:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB