The includes of the system map out the dependencies of the system, which files depend on which, which subsystem depends on which. When working with a system, it’s always useful to map out the dependencies before hand.
Here are some examples:
WordPress 2.2.1
http://wordpress.org
MediaWiki 1.12
http://www.mediawiki.org/
phpBB 3.0
http://www.phpbb.com/
phpMyAdmin 2.9.1.1
http://www.phpmyadmin.net/
Symfony 1.1
http://www.symfony-project.org/
Zend Framework 1.5.2
http://framework.zend.com/
CakePHP
http://www.cakephp.org/
CodeIgniter
http://codeigniter.com/
Seagull Framework
http://seagullproject.org/
(Demian Turner)
68 responses to “Where is the include coming from?”
[…] Alguém imaginou e postou aqui. […]
Thanks for you blog – always very interesting!
I was working on include graphs to show my team
the mess they created. Wrote a Java program for this.
What tool are you using for the analysis and creation
of the graphs shown here?
Regards – Martin
I’m using Inclued and Graphviz.
Thanks a lot!
Very interesting blog though.
Could you post a CodeIgniter map too ?
Nice post. Trying to follow all the includes and requires is not an easy task. This is a good resource for understanding how the apps work. Thanks for the post.
Thanks for the comments :)
@Mihai: Yes, I’ll add it tonight.
Nice blog post. Useful. Can you be troubled to do drupal? ;)
@Lei: Added to my list.
Drupal and CodeIgniter would be great! ++++
Excellent work.
Are the applications you’re running the frameworks against equivalent in functionality? I see some files included on the ZF app that may or may not be included in standard applications. It’d be good to run these graphs such that similar functionality is compared.
Is there a chance for you to associate the execution time of each file? (using the profiling of XDebug)
[…] no blog do Cairo, um cara fez um mapa de todos os arquivos importados pelos métodos include e require do PHP. Ele fez um teste com várias aplicações, confira abaixo o do CakePHP. Gráfico de dependências […]
@Matthew
You are right, ZF includes more functionality. That’s because I’m using the graph from this post. The idea was to show the workflow of the framework. But yes, I guess I can add more functionality to CakePHP and Symfony, and while I’m at it, upgrade Symfony to version 1.2.
I second the Drupal (6.x?) map :)
Great article!
Great! Very usefull
But I’m confusing about: phpMyAdmin 5.0.45
Latest stable version: phpMyAdmin 2.11.8.1
Great work!
does anybody know if there is a windows version for the Inclued library ?
Not that I know of.
@handyblogger: Well spotted, thanks :)
@Federico Thank you for adding CodeIgniter ;) Looks great.
[…] that could ease a bit the decision is this comparison made here. It;s based on the number of include calls made by the boot-up of the framework. Some examples can […]
[…] Includes of the system map out of the dependencies of the system. [ Here […]
I think every framework and CMS should hire to you make one of these for people new to the systems.
This makes it so easy to trace.
Awesome work!
Its interesting to consider if there can be any valuable info gleaned just by comparing the thumbnails.
WordPress & Cake have very flat, slim organizations.
Zend Framework has a very deep and wide org.
Codeigniter, Symfony & phpBB organiztions are slim and shallow.
[…] Блог PHP::Impact опубликовал очень интересную подборку диаграмм. […]
Seems like Zend Framework is the most decoupled of the lot?
[…] PHP::Impact ( [str Blog] ) map for all the includes in CodeIgniter from the time the framework […]
please make a graph for kohanaphp!
@Kenny Lee: That’s right.
@Dude: If I’m not wrong, Kohana is a fork of CI, right? I’m guessing the designs are similar.
[…] a tightly-coupled framework (you can get a feel for this by viewing Federico Cargnelutti’s dependency graphs for some common PHP […]
kohana is no longer a fork of ci. it has been completely rewritten in 2.0
[…] Where is the include coming from? […]
@Dude: I’ve just finished browsing Kohana’s source code and you are right, I didn’t find any traces of CI.
[…] Where is the include coming from? Shows the module dependencies for different open-source projects – very eye-opening. […]
wow good job!
Link to Image for symfony 1.1 doesn´t work.
Can you write a little tutorial how to use Inclued and Graphviz ?
good job!
Very interesting. Would it be possible to generate graphs for CMS like Joomla, Drupal and Typo3?
[…] Interessante questo post […]
Thanks for the mention of Inclued, what a great way to get a snapshot of the development style of a PHP project. Here’s the depgraph for Seagull, http://seagullfiles.phpkitchen.com/seagull_depgraph.png, the shape seems closest to symfony at first glance.
I think another really important metric, on the subject of framework file structures, is number of included files. This Seagull project has 63, which is mostly dependent on the number of blocks loaded, and caching being disabled. A much simpler project I have in zpf 1.5 loads 89 files but feels much slower. Totally agreed that Zend’s “use at will” approach with minimal coupling is the way to go.
Very interesting, thanks Demian :)
could you post joomla 1.5 map as well .. thanks :D
[…] diese ihre Dateien, wie sind sie aufgebaut. Es gibt einige nette Grafiken, auch zum Zend Framework. -> Where the Include coming From […]
The Magento (ecommerce) includes diagram should be added to the list. They’re fairly hideous. I didn’t create the view, but you can grab it from here:
(Image size: 5.5MB. Right click and select Save As…)
Thanks Scott. There’s a lot going on there. I’m sure Magento users are going to find it useful.
Thanks you for your article!
I just wonder how did you build these include scheme?
Did you use any special tools for that?
Yes, Inclued:
http://pecl.php.net/package/inclued
http://t3.dotgnu.info/blog/tags/inclued/
And Graphviz:
http://www.graphviz.org/
Hi Frederico, thanks for the article – very insightfull.
I’d like to have a closer look at the diagrams for ZF and Symphony but the links doesn’t seem to work. Is that something there might be a solution to because I’d really like to investigate them further :)
Kind regards
Christian Aarø Rasmussen
It seems to be working fine now. WordPress stores all the images in Amazon’s S3, so there’s not much I can do about it.
This is awesome! :P
[…] questi grafici che mostrano tutti gli “include” e i “require” della versione 2.2.1 di WordPress e di altri […]
[…] Dependencies maps for popular PHP-based software – if you ever wanted to see how a certain file is used in WordPress, that’s a great way to finally find out […]
CodeIgniter looks “light”.
As there wasn’t any graph for Joomla yet, I decided to generated one: http://www.joomlavue.com/blog/14-joomla-files-includes
It is based on Joomla 1.5.7
Thanks eddy, I’ll add it to the post.
[…] of PHP::Impact ( [str Blog] ), here’s a detailed “map” of the CodeIgniter system’s file structure when […]
Cool! but I really need the OSCommerce’s graph!!
Can someone help?
Thanks
[…] Where is the include coming from? […]
[…] arquitectura y funcionamiento son muy simples y es muy liviano para el servidor. Les invito a que comparen su flujo de código contra los de otros frameworks. 12 de February de 2009 a las 07:07 pm — Enlace permanente a esta entrada […]
[…] Dépendance graphique d’un “Hello World” sur Zend Framework (gif). À comparer avec d’autres frameworks php […]
@Johnny A little late but I just blogged about the Inclued extension and put a graph of osCommerce.
Then I noticed this lovely article thanks to @tychay :)
Heres the link: http://short.ie/pecl-inclued
Excellent! Handy info which will give better understanding of Frameworks.. This is missing even in Framework docs.. I wonder how u get all these..?
dont you have troubles when compiling the image with your RAM? my cmd always breaks -> “out of memory” when i want to compile the picture
very, very nice… tank you! good job ;-)
great work.. CodeIgniter map worked for me too
[…] to do our common tasks and make our own ‘NoFramework’. I totally agree with this. Also, an analysis of all frameworks and models is here. CI […]
do you have inclued for windows???
[…] any case, compare with other frameworks (note not all these are graphs of hello world, some seem to be graphs of the default page or a […]
could you also do a Magento map too. :)
[…] any case, compare with other frameworks (note not all these are graphs of hello world, some seem to be graphs of the default page or a […]