We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

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 :-)



2.1k

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?



1.5k

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.



1.5k

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.



2.1k
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.

https://en.wikipedia.org/wiki/Software_design_pattern

can i has my bach cert now? lol



1.5k

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?