Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Design Patterns in the Phalcon PHP Framework

Hi everyone :-)

I'm currently writing my bachelor thesis with the topic of "Performance Benchmark of PHP Frameworks".

One of the included Frameworks is the Phalcon Framework and I have to write a section about what Design Patterns are used by the Phalcon PHP Framework for solving different problems.

Unfortunately I couldn't find anything regarding that matter through a Google Search so I wanted to ask if anybody can help me out on that and provide me with some Information on what Patterns are used by the Phalcon PHP Framework :-)

Thanks in advance for your help :-)



1.4k

i am pretty sure phalcon uses factory and singleton =d

Are you referring to patterns used by the code that makes up the C executable, or the patterns the framework provides to PHP developers when they write their PHP code, using the Phalcon framework?



780

Thanks for the quick replies.

@quasipickle I would need the Design Patterns that make up the C executables. If there is no way to find that out, the patterns provided to PHP Developers would be fine too as a workaround. :-)

Phalcon is open source, so you can peruse it on Github. v2 is written in Zephir which might be easier to read.



780

Thanks a lot for the reply.

The problem is, that I have never done anything with The Language C nor Zephir so I probably won't be able to figure out the patterns or anything else on my own.

Therefore I wondered if anyone took a look into that already.



1.4k
Accepted
answer
edited Feb '15

As above mention.

  • DI is a factory, singleton/Multiton.
  • Query is a builder.
  • Prototype is used for all models.
  • Module is used.
  • Decorator is used.
  • Adapter is used.
  • Iterator is used in result set.
  • Null object, duh?
  • Servant, injectable is all that.
  • Strategy, database, orm, odm, etc etc, cache too.
  • Messaging design pattern, validations, get messages and such.

http://en.wikipedia.org/wiki/Software%5design%5pattern

can i has my bach cert now? lol



780

Thanks a lot @7thcubic that's what I needed :-)

Haha the thesis is not just about that it will be a performance benchmark between phalcon, zend2 and symfony2 so I don't know if you can get your bach cert just for that :-P

edited Sep '15

Hi @Velixir, could you share your thesis?