1
bumciach
XoopsObject and design patterns?
  • 2009/6/8 9:00

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


My next stupid question. ;)
Do XoopsObject and XoopsObjectHandler (XoopsPersistableObjectHandler) is part of the implementation of a specific design pattern?
I begin to learn about OOP and the patterns in practice, so any information would be helpful.

2
ghia
Re: XoopsObject and design patterns?
  • 2009/6/8 10:21

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I don't think design patterns were already invented at the time that XoopsObject was implemented.
AFAIK XOOPS is also not designed or programmed with very puristic views in mind. Of course the developers try to use the best programming practices and so you may discover a lot of patterns in the core software. They came in there on a natural, obvious way, because saying this or that function is programmed on the base of that pattern would be exagerated.

3
trabis
Re: XoopsObject and design patterns?
  • 2009/6/11 22:54

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hi,
I'm also starting the patterns reading!
I found several good articles about patterns and I think the Factory Method is the one that applies for the xoopsObject/xoopsObjectHandler relationship.

Here is also some reading about front controllers, just scroll down the page and you will find resemblances with XOOPS.

I'm loving it!

4
hervet
Re: XoopsObject and design patterns?
  • 2009/6/12 7:38

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


It's a little bit of the "active record" design pattern.

5
ghia
Re: XoopsObject and design patterns?
  • 2009/6/12 7:53

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


One of the exciting passtimes of Design patterns:
discovering patterns in existing code and then arguing why this piece of code is more pattern x then pattern y.

6
Mamba
Re: XoopsObject and design patterns?
  • 2009/6/12 14:58

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
discovering patterns in existing code and then arguing why this piece of code is more pattern x then pattern y

Very funny!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

7
bumciach
Re: XoopsObject and design patterns?
  • 2009/6/14 11:03

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Let's be serious
Thanks for the replies and links.
I know that XOOPS was established in little other purpose than an extensive framework like Zend or CakePHP. So naturally there is no such comprehensive solutions.
Design Patterns can help you better understand XOOPS ... or XOOPS can help get a better understanding of design patterns. I learn both. I would like to more fully and more consciously use the XOOPS API in my projects.

8
trabis
Re: XoopsObject and design patterns?
  • 2009/7/10 18:59

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Maybe is more like the template pattern! Maybe facade? Hum, decorators, iterators and composites are breathtaking patterns. Criteria class is my second favorite one :) But why is object.php in kernel folder? Why is xoopsblock.php on class? Am I supposed to use commentrenderer.php on my modules? What belongs to XOOPS and where is my API? Why core have special attention over modules? Why can't I extend other modules preferences like core/comments and core/notifications do?

Login

Who's Online

181 user(s) are online (90 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits