Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

PHPMaster.com: Explore Aspect Oriented Programming with CodeIgniter, Part 3

PHPMaster.com: Explore Aspect Oriented Programming with CodeIgniter, Part 3

PHPMaster.com is back with the third part of their series looking at Aspect Oriented Programming with the CodeIgniter framework. (Part 1, Part 2)

In the previous parts of the series we learned about AOP concepts and the need for using AOP in large scale projects and I introduced CodeIgniter’s hooks as a convenient mechanism for creating AOP functionality from scratch. In this part I’ll show you how to use both XML and comment-based techniques to create custom AOP functionality when a dedicated AOP framework is not available.

They start with the XML configuration that defines a few aspects and pointcuts for the application. This is then read in via the “applyBeforeAspects” and the aspects that should be executed first are extracted, loaded and run. Following this, they take the other approach – based on docblock comments – and pull in the comments (the @before and @after tags) and load/execute the aspects that way instead.

Source: http://www.phpdeveloper.org/news/18402

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Posted Sierpień 27th, 2012 in WEB and PHP Development.

Leave a response: