Jorge Albaladejo

Hard & Soft design…

Archive for the ‘Code Igniter’ tag

Choosing a PHP MVC Framework: Yii Vs. Kohana Vs. Home made MVC

with 5 comments

Choosing a framework is never an easy task, there are many aspects to consider, the three most important ones are, from my point of view:

  • Available features and community extensions.
  • A good documentation with examples.
  • A low footprint.

The balance between these three values and the impact of each one on your project will determine the good candidate. Since having a wide range of included features and an active community who provides with extensions, we are sure that the wheel won’t be reinvented. Thus, we can become productive much faster.

Read the rest of this entry »

Written by Jorge Albaladejo

October 31st, 2010 at 9:45 am

Access Control List (ACL) with Code Igniter

with 5 comments

In the last project I’ve worked on, I needed to install any kind of ACL to allow certain methods to be accessed only by some user roles, like website administration, etc. I’m building this website on Code Igniter, so I missed some related features that are available in other PHP frameworks like CakePHP or Zend.

After googling a bit, I found our several methods to get an ACL. Zend framework can be integrated into Code Igniter to use its library, but doesn’t seem really natural to me. I prefer having an previously constructed list, than building it ‘on the fly’ inside my code.

Then I fell into phpGACL, a free software project which allows to solve this problem on an easy way. It uses an API to connect to a database, where tuples of ‘controller’ – ‘method’ – ‘user’ can be stored (actually, AXO – ACO – ARO, acronyms of Access eXtended Object, Access Control Object, Access Request Object). And I developed my first version over this tool, on the most transparent way I was able to find:

Read the rest of this entry »

Written by Jorge Albaladejo

April 24th, 2009 at 2:24 pm

This site is protected with Urban Giraffe's plugin 'HTML Purified' and Edward Z. Yang's Powered by HTML Purifier. 6020 items have been purified.