开发者

library classes or model classes?

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.


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜