views:

55

answers:

1

i have looked into design patterns and mvc and understand the basics of it.

but i don't understand if these classes that these patterns are constituted of are library classes or model classes.

i'm using codeigniter and don't know if i should put the classes in models folder or libraries folder.

the classes could be:

  • observers and observable
  • abstract factory class and all its concrete classes
  • decorator, its core-component and the decorators
  • adapter classes
  • proxy classes

could someone shed a light on this.

i still don't understand how to "glue" these design pattern classes with the mvc framework.

btw, im using Doctrine ORM so my models folder have all data models for my database.

thanks.

+3  A: 

Models are classes.

Classes are not models.

Then, your models classes should be in Models/ folder, and your library in library/

If your library is a common, generic library, give it a name, and place it in folder like

library/LibraryIOftenUseInMyProjects

If your library is application specific, put it in

library/My/

Boris Guéry