 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Refulz.com: CakePHP evolves to 2.0
by Chris Cornutt February 08, 2012 @ 11:15:43
On the Refulz.com blog there's a new post looking at some of the new features in CakePHP 2.0 including its use of lazy loading, the CakeEmail library and the new class loader.
With CakePHP 2.0, they have dropped support for PHP 4 and have refactored the library code to make it strictly complaint with PHP 5.2+. Modeled on Ruby on Rails (RoR), CakePHP is a tough competition to Zend framework, Symfony and CodeIgniter.
Besides the topics mentioned above, he also goes into the details of the new CakeRequest and CakeResponse models (to access information about teh current request/response). Summaries of all of the new functionality are provided along with some sample code where needed to illustrate.
voice your opinion now!
cakephp version2 features lazyloading model email loader
Jamie Rumbelow's Blog: Wrap me up and put me in a box
by Chris Cornutt April 09, 2010 @ 08:09:41
Jamie Rumbelow, a member of the CodeIgniter community, has a new post about a feature of the upcoming CodeIgniter 2.0 version of the framework - code packages.
This opens so many doors to developers, because, finally, we can bundle repeated functionality inside a package and distribute it as open-source or free code. Even if you don't want to expose your own packages, you can re-use them internally, which makes for a veritable mix of both writing application specific code, and abstracting elements of those applications out (such as an authentication engine, for instance) to become re-usable and unspecific.
He uses the post to give more specifics (that are currently missing from the manual) on what these packages are, how to use them via the framework's loader to both add and remove. Then, classes inside the package can be loaded just like any other CodeIgniter resource.
voice your opinion now!
codeigniter package ci2 loader
DevShed: Working Out of the Object Context to Build Loader Apps in PHP
by Chris Cornutt June 26, 2009 @ 07:56:54
New on DevShed there's the latest part of a series of tutorials they've written up (fifth of eight) about building automatic loading functionality into your applications. This time they change up their class to make the their loading function accessible outside of a class object.
To avoid an eventual (and unnecessary) instantiation of the loader class, it would be helpful to declare the mentioned "load()" method static. Thus, bearing in mind this important concept, in this fifth part of the series I'm going to enhance the signature of the "Loader" class created previously by turning its loading method into a static one.
They change the definition of the function to be "public static" making it callable both through the "self" keyword and outside the class with the "::" operator.
voice your opinion now!
static tutorial application loader
DevShed: Including Files Recursively with Loader Applications in PHP
by Chris Cornutt June 11, 2009 @ 12:43:23
DevShed continues their "loaders in applications" series with this fourth part, a look at including files recursively.
This series uses a variety of code samples to teach you how to create modular programs. These programs are capable of recursively including files required by a given application, without having to explicitly call any "include()/include_once()" or "require()/require_once()" PHP function.
In their example they show how to use their loader class (built up from previous parts of the series) and modify it slightly to allow the script to set the file path, set the files to include and pull them in.
voice your opinion now!
loader recursive tutorial include
DevShed: Using Static Methods to Build Loader Apps in PHP
by Chris Cornutt June 04, 2009 @ 10:27:42
Continuing their look at static methods in PHP, DevShed has posted this new tutorial (the second in the series) focusing on using the methods to create a simple loader application.
As its name suggests, a file loading program (or a resource loading program, to express the concept more accurately), is simply a PHP module that takes care of including, usually via its set of "include()/require() native functions, files that are required by an application to make it work as expected. [...] It's worthwhile to mention, however, that it was necessary to create an instance of the aforementioned class to load a determined file. This is a process that can be completely avoided in terms of good coding habits. But how can this be achieved? Well, it's feasible to statically call the class's load()" method, preventing its unwanted instantiation.
The code examples of the simple loader class (a require_once wrapped in a try/catch) and a usage example.
voice your opinion now!
loader static tutorial
DevShed: Building Loader Apps in PHP
by Chris Cornutt May 28, 2009 @ 09:37:51
In this first part of a new series in application development, DevShed looks at building a loader for various resources inside your app.
Loading sources on the fly is one of the most common tasks that PHP programmers have to tackle during the development of web applications. This typical situation must be faced independently of the scale of the programs being created. This means a loader mechanism must be developed.
Their basic loader class uses a call to a load() method to do two things - check to ensure that a file exists and, if it does, include it (technically a require_once). They also put a bit of exception handling around it to help catch any errors thrown on the include.
voice your opinion now!
include loader tutorial
Stubbles Blog: My wishlist for PHP6, pt4 static initializers
by Chris Cornutt March 26, 2007 @ 09:16:00
In a continuation of their "wishlist" series of posts for PHP6, Stephan Schmidt has postted this new item today taking about something he wishes PHP could do - initialize a property when defining an object.
But how could this be solved, when you never create an instance of Foo but only use static method calls?
I propose a new feature, we implemented in the Stubbles class loader and has been shamelessly ripped from the XP framework. If you need to initialize some properties with objects and are developing with Stubbles, you only need to implement a method called __static() in your class. If your class is loaded by the Stubbles class loader, it will check, whether this method has been implemented and call it. As every class is only loaded once, this enables you to add code to your class, that is also only executed once, if the class is imported into your application.
His solution allows for the creation of such objects with little more than the use of a __static call that could get the object and change the property defined on it.
voice your opinion now!
static initializers php6 wishlist class loader static initializers php6 wishlist class loader
|
Community Events
Don't see your event here? Let us know!
|