by Kevin Schroeder | 12:00 am

Subnet validation with Zend Framework

(Note – I accidentally gave conflicting instructions to the person who runs our newsletter. If you are actually interested in the article I wrote about people being silly about dynamicly typed languages you can go here)

I saw on a StackOverflow posting, someone was asking to see how you could use a Zend Framework validator to tell if an IP address was between two addresses. The individual was trying to use Zend_Validate_Between to do the checking. However, IP addresses generally are not checked between two arbitrary addresses such as between 192.168.0.45 and 192.168.0.60. Instead, the check is usually done to validate an IP address against a subnet.

  READ ARTICLE
553 words ()
by Kevin Schroeder | 12:00 am

ZendCon 2010 Podcast – A New Approach To Object Persistence In PHP

Speaker

Stefan Priebsch

Abstract

The object-relational impedance mismatch makes persisting PHP objects in a relational database a daunting task. How about these new schemaless NoSQL databases? We will have a look at the problems involved with persisting PHP objects, and introduce design patterns that help solving these problems. Putting the patterns to good use, we will build a working PHP object persistence solution for MongoDB.

Licensing:

  READ ARTICLE
195 words ()
by Kevin Schroeder | 12:00 am

Pre-caching FTW

I just had an epiphany. I’ve talked about pre-caching content before and the benefits thereof before. But this is the first time I realized not only that there are benefits, but that doing it is BETTER than caching inline. Let me sum up… no, there is to much. Let me explain.

Typically caching is done like this (stolen from the ZF caching docs):

  READ ARTICLE
299 words ()
by Kevin Schroeder | 12:00 am

Podcasts are a-coming

Just a real quick note. I received the podcasts from ZendCon 2010 back in December and opened up a contest to let people choose which order they wanted to hear the sessions in. The order is in and I have already started posting them, starting with Dependency Injection. I would have done the Unit Testing after ZF 1.8 but Michelangelo is doing a webinar with us on the 19th, so I will post the recording of his ZendCon session afterwards.

  READ ARTICLE
922 words ()
by Kevin Schroeder | 12:00 am

ZendCon 2010 Podcast – Dependency Injection

Speaker

Fabien Potencier

Abstract

This session introduced one of the less-known design patterns in the PHP world, but also one that can greatly improve the decoupling and the testability of your code: Dependency Injection. I will demonstrate how to use Dependency Injection in your projects, and I will take advantage of the PHP 5.3 new features to create a fully-featured DI container live.

Licensing:

  READ ARTICLE
178 words ()
by Kevin Schroeder | 12:00 am

Free Music Sample from Coronal Loop Safari

In case you didn’t know, I also write music. 🙂 I probably talk about it more than some of the readers of this blog wish. But, you know what? I just really enjoy writing music. I may not be particularly good at it, but it’s enjoyable… at least when it’s done.

Last year ( it is now 2011 ) I released an album called Coronal Loop Safari right prior to Zendcon and Zend was kind enough to let me play the songs from the album prior to each keynote. But, that’s really not enough to hear what the album is like. In fact, I really don’t know what the album sounds like. But here’s what I wrote about it on my CD Baby album page.

  READ ARTICLE
454 words ()
by Kevin Schroeder | 12:00 am

SimpleCloud Part 1 – Setting the stage

Earlier in December I did a webinar on the Zend PHP Cloud Application Platform. It’s not some new product or anything like that, but rather a view of how our software is going to fit together. It’s not something that will be “released” in the typical software fashion. Instead it is the mindset of our product development teams when they look at building new features. Cloud-based pricing for Zend Server, AWS/Cloud integration in Zend Studio, and, of course, SimpleCloud.

  READ ARTICLE
671 words ()
by Kevin Schroeder | 12:00 am

SimpleCloud Part 2 – The Job Manager

In the previous installment I talked a little about the cloud, what Zend is doing in the cloud and what the example application for my ZPCAP webinar did. One of the primary characteristics of scalability is the ability to process data as resources are available. To do that I implemented the Zend Server Job Queue with an abstraction layer that I’ve written about three different versions for. I think the fourth will be the charm :-).

  READ ARTICLE
1208 words ()
by Kevin Schroeder | 12:00 am

SimpleCloud Part 3 – The Abstract Job

We have so far looked at setting the stage and managing the job. How about executing the job itself? The job we will look at here will be relatively generic. I will get into more detail after I have talked about the SimpleCloud elements. This, here, is simply to show you the theory behind how jobs are executed.

The abstract class is pretty simple.

  READ ARTICLE
445 words ()
by Kevin Schroeder | 12:00 am

SimpleCloud Part 4 – Storage

Now that we’ve gotten some job processing code done, let’s get into the good stuff. The first thing we’re going to look at is the storage mechanism in SimpleCloud. The example we used was uploading an image to the server so it could be resized for viewing at multiple resolutions or junk. Now, you could simply attach the file contents to the job class, serialize it and unserialize it on the other side. But the Job Queue server is really not designed for that (nor are most other queueing applications). So what we’re going to do is use the Storage mechanism in SimpleCloud (in this case, S3) to store the files temporarily and then for the resized versions.

  READ ARTICLE
796 words ()