Welcome Guest, Not a member yet? Register   Sign In
how to use decorators to dry my views with CI3
#1

Hi all , thanks for reading

I  want to  implement  decorator pattern to dry my views with CI3.  

after reading this  tutorials and brain storming i came up with this ideas

1) decorate should be able to decorate single record as well as result set
2) make use of composer and/or psr autoloading 
3) can be used with HMVC  ( i use wiredesign extension)
4) use it with  or without template system( template library , partial view , view fragment etc)
5) where to place decorators
     -- In decorators folder. And create a library to load decoraters from it.
     -- create each decorators as individual  library and load it in controllers
     -- If using HMVC putting  decorators in each modules
     -- in vendor folder (in case of composer)

If you have use decorators  please suggest me some code examples.
(English is my third language.forgive me for mistake )
          Heart  love codeigniter Heart
          Learning  best  practices
     Rate my post if you found it helpfull
Reply




Theme © iAndrew 2016 - Forum software by © MyBB