all repos — h3rald @ 85abf5c629c64f65112928c2737db6a27e82129e

The sources of https://h3rald.com

content/articles/akelos-interview.textile

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
----- 
permalink: akelos-interview
filters_pre: 
- redcloth
title: An Interview with the creator of the Akelos Framework
comments: []

date: 2007-07-19 05:02:00 +02:00
tags: 
- php
- rails
- cakephp
- frameworks
type: article
toc: true
-----
I "already":http://www.h3rald.com/blog/34 "covered":http://www.h3rald.com/blog/38 the Akelos PHP framework in the past, but for those who don't know it, Akelos seems to be one of the few "Rails-inspired PHP frameworks":http://www.h3rald.com/articles/rails-inspired-php-frameworks still worth mentioning, besides CakePHP and Symphony of course.

I recently has a look at their recently-relaunched <a href="http://www.akelos.org/">community website</a> and I noticed this phrase:

bq. "Being port of Ruby on Rails to PHP Akelos is also optimized for programmer happiness and sustainable productivity"

Bermi Ferrer, Akelos creator, openly admits the framework is a port of Ruby on Rails to PHP, an attempt to help _"Ruby on Rails developers who need to code in PHP"_, among others. Of course Akelos is not Rails, simply because Ruby is (thank God for that!) not PHP, however I decided to find out more, and I asked Bermi a few questions, which he promptly answered.<h4><em>There are a lot of frameworks for PHP, perhaps too many: why did you decide to create Akelos rather than using one of the existing ones?</em></h4>

<p>I started coding <a href="http://www.akelos.org/">Akelos</a> back in 2004 for our internal developments.  At that time I only found very few frameworks out there like <a href="http://www.mojavi.org/">Mojavi</a> and <a href="http://ez.no/">eZ Publish</a>. These frameworks were not my ideal of an <a href="http://en.wikipedia.org/wiki/Agile_software_development">Agile development</a> environment, so I decided to brew my own solution.</p>

<p>After reading <a href="http://www.martinfowler.com/books.html">Patterns of Enterprise Application Architecture</a> it was clear to me the kind of framework I wanted <a href="http://www.akelos.org/">Akelos</a> to become,  so I started to implement some of the design patterns from the book into Akelos.</p>

<p>During the summer of 2005 I had a look into other PHP frameworks like <a href="http://www.cakephp.org/">CakePHP</a>, <a href="http://phpontrax.com/">PHP on Trax</a>, and <a href="http://www.bennolan.com/biscuit/">Biscuit</a> but none of them was more complete or easier to use than what Akelos was already at that time.</p>

<p>Then I used <a href="http://www.rubyonrails.org/">Rails</a> for one small personal project and immediately found that <a href="http://www.akelos.org/">Akelos</a> interfaces, conventions and philosophy were close to the Rails approach. <a href="http://api.rubyonrails.org/files/vendor/rails/activerecord/README.html">Rails ActiveRecord</a> implementation was impressive, better than mine and much much better than other existing PHP implementations, so I first ported the ActiveRecord code using <a href="http://adodb.sourceforge.net/">PHP AdoDB</a> as the database abstraction layer.</p>

<p>After that point, whenever I had a problem to solve while coding my customers applications I turned to Rails and they usually had the most elegant solution available. So I did like the idea of digging into Rails code to learn more Ruby and bringing Rails magic to the PHP world. It also helped the fact that Rails inline documentation is excellent so it could be easily adapted for Akelos.</p>


<h4><em>What&#8217;s new since last time I posted about Akelos?</em></h4>

<p>The biggest change is the direction that the project has taken. Until now we have not dedicated time to promote Akelos, we just used it for our internal projects and we have been adding features as needed without a fixed roadmap or advocacy.</p>

<p>Now this has changed. More and more developers are using Akelos and contributing functionalities they miss from Rails. After some serious contribution proposals and many developers telling us how much they like Akelos, we decided to take the time to build a nice community site which includes <a href="http://forum.akelos.org/">forums</a>, a <a href="http://wiki.akelos.org/">wiki</a>, a new <a href="http://www.akelos.org/docs/tutorials/booklink">tutorial</a> and <a href="http://www.akelos.org/screencasts">a screen-cast</a>.</p>

<p>There are also some improvements like:</p>

<ul>
<li>Sintags, now accepts ruby-like calls to helper methods from the views.</li>
<li>Action Webservice, a component for creating and consuming Web Services easily.</li>
<li>Action Mailer, which allows you to receive and send (directly or in delayed mode) emails from within your application. (this is almost ready to ship)</li>
<li>Acts as tree behavior for Models.</li>
<li>Many performance improvements.</li>
<li>Many small contributions and bug fixes.</li>
<li>Code base reduced from 16MB to 9MB.</li>
</ul>

<h4><em>From the new site, it seems that Akelos is - or aims to be - a port of Rails for PHP. Is that true? Do you aim to target Rails developers as possible users of the framework in situations in which &#8220;they have no choice&#8221; but to use PHP instead of Ruby?</em></h4>

<p>Akelos has ported many Ruby on Rails components keeping their interfaces and functionality whenever it was feasible to port the Ruby code to PHP. It might be considered a port in the sense of functionality, but there are some Rails strengths that rely on the Ruby language and that are impossible to port to PHP. However, Ruby developers will find that Akelos is the PHP framework with is the closest to Rails.</p>

<p>On the other hand, many PHP developers have moved to Ruby because PHP lacked a hyper-productive and fun-to-use framework like Rails for building complex applications. That is no longer the case, and those who excel at PHP can start being productive from day one by using Akelos. In this way, Akelos target users are those who already know PHP and need to build complex applications that can run on almost any cheap shared hosting using a solid foundation based on good coding practices and widely accepted conventions.</p>

<h4><em>What Rails features are missing in Akelos?</em></h4>

<p>A standalone webserver like WebBrick, RJS, has and belongs to many through associations, string/number/date extensions and Active Resource.</p>

<p>Ruby-powered features like modules, runtime class overriding and blocks will never be available in Akelos.</p>

<p>Scaffolds in Akelos work by generating code, I found quite useless to enable $scaffold = true; and have magic functionality that you can&#8217;t modify, so I decided not to invest my time on that one.</p>

<h4><em>I noticed quite a few generators available for Akelos, do they work as a Rails developer may expect them to work?</em></h4>

<p>The ones that are available do pretty much the same as in RoR.</p>

<h4><em>How does Akelos compare to other similar PHP frameworks like, say, CakePHP? What features does Akelos offer which Cake doesn&#8217;t offer and vice-versa?</em></h4>

<p>I&#8217;m not aware of Cake&#8217;s functionalities. At the time I started porting Rails my feelings about CakePHP were that they missed the simplicity point in favor of architectural discussions that lead to confusing code, but that was long ago.</p>

<p>Akelos (and Rails) do not implement ACL like Cake does, as that is a business logic component that varies too much from one case to other, it has no place inside the framework.</p>

<p>Akelos is built with internationalization in its core. You can even internationalize your Models by prefixing the column name with the locale.</p>

<p>I think that Cake only has an act_as_tree behavior on models while Akelos has Tree, Nested Set, and List. Akelos also implements handy features from Rails like <a href="http://en.wikipedia.org/wiki/Optimistic_concurrency_control">optimistic locking</a>, <a href="http://www.martinfowler.com/eaaCatalog/lazyLoad.html">lazy loading</a>, <a href="http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html">table inheritance</a>, counters, automatic transactions, really powerful validations, calculations&#8230;, and I think most of these advanced features are still missing on Cake, but maybe I'm wrong.</p>

<h4><em>Did you include unit tests for all the framework classes?</em></h4>

<p>The main components are fully unit tested, and no new code or patch gets into the trunk without unit tests.</p>

<h4><em>Did you or someone do any performance test or benchmarks on Akelos already?</em></h4>

<p>During the last month a lot of code was refactored to improve performance with the help of <a href="http://xdebug.org/">Xdebug</a>, <a href="http://kcachegrind.sourceforge.net/">Kcachegrind</a> and <a href="http://httpd.apache.org/docs/2.0/programs/ab.html">ab</a>. We significantly improved the performance in one of our most complex intranet applications, a <a href="http://www.basecamphq.com/">basecamp</a>-like system.</p>

<p>Akelos also implements caching at many levels, so it&#8217;s very easy to increase performance as we did with a new CMS that can handle +200 requests per second using <a href="http://www.apache.org/">Apache</a> in a cheap shared server environment.</p>

<h4><em>Why should a PHP developer choose Akelos over another PHP framework?</em></h4>

<p><a href="http://www.akelos.org/docs/tutorials/booklink#mvc">Akelos MVC implementation</a> and <a href="http://www.akelos.org/docs/tutorials/booklink#workflow">workflow</a> are really easy to understand.</p>

<p>In Akelos all the methods and interfaces are thoroughly selected, so whenever you need to do something you just need to type what you think. Default options are selected with care so you don&#8217;t need to set any  configuration unless you want to modify the default behavior.</p>

<p>Coding multilingual applications, building complex relationships within models, distributing databases changes within your development team, building Ajax interfaces, unit testing your code and many other common tasks for PHP developers are really simple to accomplish when using Akelos.</p>

<p>Akelos is designed to work on PHP4 and PHP5 and it comes with an easy web installer you can adapt for your application. It has functions for working with files and directories in common situations when the web server runs as a different user.</p>

<p>And one of the main reasons for choosing Akelos is that it makes coding fun and lets you focus on solving user problems rather than wasting your time in repetitive technical annoyances. When coding with other developers the <em>convention over configuration philosophy</em> helps everybody to understand  exactly how everything works and where to find things.</p>

<h4><em>Is there any website using Akelos already?</em></h4>

<p>The <a href="http://www.thechemicalbrothers.com/">Chemical Brothers</a> new website which has been developed by <a href="http://www.3ev.com/">3rd Eye Vision (3ev)</a> is using Akelos. </p>

<p>The <a href="http://www.akelos.org/">Akelos.org</a> site is running a CMS named Editam which we will release as Open Source in a near future.</p>

<p>Some small websites like <a href="http://www.fundaciocaixacarlet.com/">Fundacio Caixa Carlet</a> and many intranet/extranet sites that we&#8217;ve been coding during the last 2 years.</p>

<h4><em>What are your future plans for Akelos? Anything new on the way?</em></h4>

<p>A new manual, and a better API interface are the main priorities right now.</p>

<p>Continuing bringing Rails functionality as needed.</p>

<p>Releasing our sister project Editam CMS which will help developers who need to add functionality on the top of a CMS using a solid MVC framework like Akelos.</p>