开发者

library classes or model classes?

开发者 https://www.devze.com 2022-12-28 15:16 出处:网络
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 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

精彩评论

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