Wednesday, December 24, 2008

Happy Holidays

See Happy Holidays at its new home on

I want to wish everyone a happy holidays and a great new year! I don't know about you, but this has been a very busy month for me. Hopefully you will have some time to relax and enjoy the holidays and prepare for a great 2009!

On a side note, Found Line is looking to hire a designer here in Burlington, Vermont. Please pass this along if you happen to know anyone who might be a fit for the job.

Thursday, December 4, 2008

PHP Users Group Meeting Tonight

See PHP Users Group Meeting Tonight at its new home on

Tonight the Burlington, VT PHP Users Group is meeting at the Vermont Center for Emerging Technologies (VCET) from 6pm to 8pm. Josh Sled of MySQL/Sun Microsystems will be presenting on database optimization and tuning. As Matthew Weier O'Phinney pointed out, this meeting will be our one year anniversary of regular meetings. There will be pizza so I hope to see you there!

Tuesday, November 4, 2008

VPR Reports Campaign 2008

See VPR Reports Campaign 2008 at its new home on

For coverage of local Vermont and national election news, check out the VPR Reports Campaign 2008 page that we (well, Jason really) put together. The 2008 Election Map is a Flash widget provided by NPR but other than that the page is all XHTML, CSS, and JavaScript (via jQuery and jQuery UI). Check back throughout the evening for updated information and listen to live coverage on VPR starting at 7pm tonight!

Tuesday, October 28, 2008

GTalk Profile on ReadWriteWeb and

See GTalk Profile on ReadWriteWeb and at its new home on

GTalk Profile is a website we originally launched three years ago right after Google Talk itself was launched. The website was recently featured on ReadWriteWeb and syndicated to the technology section. From the article:

Google Talk is probably one of the few messaging clients that doesn't have a way for you to interact with other Google Talk users unless you know their email address. GTalk Profile provides the perfect solution to this problem. Using Google Maps, GTalk Profile allows users to plot where they are on a map and also find other users around the world. Simply type your city and state into the search box and GTalk Profile will provide you with a list of users near you along with a description of each user. Clicking on a name takes you to a profile page where you'll find a longer description, photos, interests, location, and the option to request a user's Google Talk information.
It's unfortunate that we haven't been able to spend any real time working on the website for quite a while and that it's not an example of our best work. However, we're thrilled to have the attention and very glad that people like the service.

Monday, October 27, 2008

Vermont 3.0 Thoughts

See Vermont 3.0 Thoughts at its new home on

On Saturday Jason and I attended Vermont 3.0. We were interested in seeing what it was all about and see if it's something we'd exhibit at in the future if we're looking to hire. We walked the floor and had a chance to to talk with several people we know.

First of all, I think it's great that there is a concerted effort to promote Vermont as a technology center. However, the name "Vermont 3.0" is an immediate turn-off to me. It's an obvious reference to "Web 2.0" — a loaded term that is often misused. Most so-called "Web 2.0" practitioners haven't even gotten Web 1.0 right yet. Sure, we've got technology here in Vermont but I'm not sure how anyone could imply that Vermont has somehow moved on from "Web 2.0" to "Web 3.0". Or maybe I'm wrong and the name is not a reference to "Web 2.0" at all.

Speaking of "Web 2.0" — I didn't see a folksonomy section on the Vermont 3.0 website. A handful of people used the #vt3 hashtag on Twitter but there were several more people talking about it that simply used "Vermont 3.0" in their tweets. Some guidance from the event organizers on suggested tags would have helped to make this content easier to find and encouraged online conversation amongst participants. The event organizers should have suggested tags to use on Twitter, Flickr, Technorati, and any other social media site that a conversation may occur at. I didn't have the Eee PC with me so I'm not sure if wireless internet was available. In my opinion, free wireless internet is a prerequisite for a tech conference.

We dropped in on two of the panel discussions. First the "So you wanna build websites?" panel and then the "So you wanna develop software?" panel. The discussions were definitely geared towards people interested in switching careers (or choosing what career to go into). We've generally been disappointed about the topics on which schools are focusing. It seems that schools are more interested in teaching what's "hot" and will boost enrollment numbers rather than teaching a fundamental base that will serve students throughout their careers. I was pleased to hear Mike Battig, a computer science professor at St. Michael’s College, talk about how a good computer science education will teach students things that will be relevant regardless of changing technologies.

In conclusion, I'm not yet sure if we'd exhibit at Vermont 3.0. I think a career fair might be too narrow a focus. I think it would be much more interesting to have Vermont organizations showing how they are using technology to create value in the world. This would give people a chance to gain much more insight into these organizations and the true state of technology in Vermont.

Friday, October 24, 2008

Vermont 3.0

See Vermont 3.0 at its new home on

Jason and I (from Found Line) will probably be stopping by Vermont 3.0 on Saturday. We're not exhibiting but I'm curious to see what it's all about. If you're planning on being there then let me know. You can either comment on this blog entry or, if you're own Twitter, send an @ reply (I see all replies even if I'm not following you) to BradleyHolt. If you already have my contact info then feel free to send me an email or instant message instead. See you there!

PHP In Google App Engine?

See PHP In Google App Engine? at its new home on

According to the newly posted App Engine Product Roadmap, there are plans to add "support for a new runtime language." In an email to the Google Apps Small Business Solution Providers mailing list Google had this to say:

"Of particular interest, may be payment for additional resource usage and a new runtime language - I can't say what this language is, but you can probably guess if you've been following along with community demand."

Looking at the issue list, support for Java is the most requested item followed by support for PHP, Ruby, then Perl. If you haven't already, please go star the "support for PHP" issue (please don't comment on it as it will email everyone who has already starred it - just star it!). Of course, I'm hoping Zend Framework is the framework of choice for all the App Engine specific APIs as well.

Thursday, October 23, 2008

Zend_Container Thoughts

See Zend_Container Thoughts at its new home on

It seems that there's some interest in my Zend_Container proposal including possibly using it as part of Zend_Application. I still need to move Zend_Container from "New" to "Ready for Review" but first I need to add some more details to the proposal. I want to talk about some thoughts on Zend_Container that may be helpful in understanding how it could be useful. For those who aren't familiar with it, Zend_Container is a proposal for a simple dependency injection container in Zend Framework.

I have been asked to show some more use cases for Zend_Container. I think the main thing that people want to see (correct me if I'm wrong) is how Zend_Container would be used as part of a larger web application. In order for Zend_Container to work, it needs to "contain" all of the components that it will be responsible for managing. This means that every component that will either a) be a dependency for other components or b) have a dependency on other components (or both) needs to get added to the container.

In the proposal I show an example of the getComponent method as a way to get instances out of the container. However, use of this method is discouraged. You should instead use setter injection (I'm not sure yet if the proposal will support constructor injection) and let the container provide the instance for you. Dependency injection is sometimes referred to as "inversion of control (IoC)" because it requires you to invert your thinking. In your individual components you are giving control over to the container and letting it provide your dependencies for you rather than reaching out and fulfilling these dependencies yourself (as is done currently with Zend_Registry). This is why every component needs to be added to the container — how else would the container know what to inject or even be able to perform this injection?

This inevitably leads to the question, how do we bootstrap all of this? In other words, how do we get all of these components into the container in the first place so all of this "magic" can happen? In the proposal, I showed examples of manually adding components using the addComponent method. This is a great way to add components and there is nothing wrong with doing this. However, this could start to become impractical if you have a lot of components to add to the container. Another option is to use configuration to add all of the components. I don't have an example of this yet in the proposal, but the basic idea is to list a bunch of components in your configuration and let Zend_Container add all of the components based on this information. This is more practical when you have a lot of components to add to the container.

Another option, which is not yet in the proposal, is to use a combination of directory/file scanning and reflection to add components. This could be hugely beneficial to modular applications - simply drop in your module directory and Zend_Container could automatically load components from your module. This is the sort of thing that I think the people working on Zend_Application thought might be helpful (let me know if I'm way off-base here). Of course, this opens up a host of potential efficiency issues that would need to be thought through (i.e. components should probably be "lazily" loaded and implementation/interface mappings maybe should be cached).

While I haven't yet provided any more use cases, I hope this information is helpful in understanding the role Zend_Container could play within Zend Framework. As always, I'm open to feedback even though the proposal isn't officially "Ready for Review." So far I've mainly focused on the "pure" dependency injection parts of the proposal so any other ideas on how Zend_Container could be used as part of a larger application would be great.

Wednesday, October 22, 2008

BTV PHP UG Meeting

See BTV PHP UG Meeting at its new home on

The Burlington, VT PHP Users Group will be meeting tomorrow night at Bluehouse Group in Richmond. David Walsh of Standards Technology Group (STG) will be giving a demo of STG's web application. STG will also be providing massive amounts of pizza. Matthew Weier O'Phinney, Software Architect for Zend Framework, will be giving a presentation on using Dojo, a JavaScript framework, within Zend Framework. More details are available here.

Monday, October 20, 2008

Found Line Software License

See Found Line Software License at its new home on

We recently made the strategic decision to license all software developed by Found Line under the New BSD License. This is a free/open source software license meaning that our clients will have the four freedoms as outlined by the Free Software Foundation. Basically, this means that clients are free "to run, copy, distribute, study, change and improve the software" that we develop for them. The New BSD License also gives our clients another, more controversial, "freedom": the "freedom" to turn the free/open source software we have licensed to them into proprietary, non-free/non-open source software. This is a "freedom" we hope is not exercised but is something we understand may be important to our clients.

We made this decision for several reasons. We are strong believers in the free/open source software movement. To us, this means not just using free/open source software but also contributing to free/open source software. While this software is currently only licensed to individual clients, we plan on licensing specific components publicly in the future (and, of course, individual clients currently have the right to do this as well). For now, this decision makes it really easy for us to publicly release specific components to the community as it makes sense.

Many of our web applications are built using existing libraries, Zend Framework being the most common. Zend Framework is also licensed under the New BSD License so this provides consistent licensing for our clients. Also, I would like our business to contribute back to Zend Framework and this license parity helps make this simpler.

This licensing allows us to give our clients the most freedom while still protecting our right to reuse individual components (which helps keep costs down). We are in the business of creating value for our clients and are not interested in locking them into proprietary software contracts. This licensing gives our clients many options such as switching to another vendor in the future or even bringing web development work in-house. If clients are going to pay us to develop, maintain, or extend their web applications we want this to be because we're the best team for the job — not because they don't have a choice due to vendor lock-in.

VSA Arts of Vermont Website

See VSA Arts of Vermont Website at its new home on

We recently launched the updated VSA Arts of Vermont website. Since VSA Arts of Vermont's mission is to make "the world of the arts accessible to Vermonters of all abilities" it was critical that their new website be accessible. This was a challenge we readily accepted as web accessibility is something we take very seriously.

Web accessibility is fairly straightforward if you take a content-first approach and focus on web standards. The real challenge is doing this and making a great looking website that doesn't have to compromise on functionality. We accomplished this by using semantic XHTML that contains enough structure to stand on its own without any visual representation. Then, this content was stylized using CSS. Finally, some behavior was added using unobtrusive JavaScript (using jQuery). This concept is called progressive enhancement. The final result is a great looking and very functional website that is accessible to all users.

Monday, October 13, 2008

Proprietary Skype

See Proprietary Skype at its new home on

Peter Saint-Andre (Executive Director of the XMPP Standards Foundation) has pointed out the Free Software Foundation's recent addition of a "Free software replacement for Skype" to its list of High Priority Free Software Projects:
Skype is a proprietary Voice-over-IP program that uses a proprietary protocol. Skype is seducing free software users into using proprietary software, often two users at a time. We do not want to encourage the creation of a Skype compatible client, but instead, we want to encourage you to create, contribute to, or promote the use of free software alternatives to Skype, such as Ekiga, and to encourage to adoption and use of free VoIP, video, and chat protocols such as SIP and XMPP/Jingle.
I have long been annoyed by Skype's closed platform and have refused to use it despite its popularity. Skype users can only communicate with other Skype users (or PSTN users through SkypeOut) because they do not use an open standard and do not federate with other VoIP providers. This destroys much of the value proposition of using VoIP and ultimately reduces VoIP (in people's minds) to simply "free/cheap phone calls." In other words, Skype is helping to hold back an entire industry from innovating.

At Found Line, we use two open VoIP standards: XMPP and SIP. Google Talk provides our XMPP service (through Google Apps) and is used mainly for internal communications. However, Google Talk is connected to the public XMPP network so, just like with email, we can communicate with anyone else using the same standards. Junction Networks provides us with very reliable SIP hosting and allows us to communicate (at no cost) with anyone on any public SIP network. They also provide us with a PSTN gateway (so that we can make "normal" phone calls) and a hosted PBX (auto attendant, unlimited extensions, etc.) all at a very reasonable price.

Tuesday, October 7, 2008

ZendCon Summary

See ZendCon Summary at its new home on

Rafael Dohms has posted a good summary of ZendCon '08. He touches on several topics including performance, testing and code analysis, PHP's integration with other technologies, Zend Framework, and some interesting things to look forward to in 2009 including Ibuildings' PHP Center of Expertise.

Monday, October 6, 2008

Orange Mountain/True Soap Website Launched

See Orange Mountain/True Soap Website Launched at its new home on

We just launched the Orange Mountain/True Soap website. Jason and Dave did a great job on the design and Liz did a fabulous job getting all of the content organized! Although there's no real functionality at the moment, it's built using Zend Framework so that we can add features later. There's an article in the Burlington Free Press today about the company and product if you're interested.

Thursday, October 2, 2008

Don't Vote

See Don't Vote at its new home on

Monday, September 29, 2008

Google Customer Service?

See Google Customer Service? at its new home on

My customer service experience with Google rivals my experience with Verizon Wireless for winner of the "worst customer support possible" award. Verizon Wireless would not let me pay them more money for a service with more minutes without forcing me into a contract. After many phone calls I finally got the privilege of spending more money with them. I was able to wrangle some choice quotes from the Verizon Wireless customer service representative such as "marketing doesn't talk to customers." Apparently at Google, customer service doesn't talk to customers.

Let me start at the beginning (since that's usually a good place to start). We decided to use Google Checkout and Google Checkout Shopping cart for one of our client's projects. The reason was that they needed it done quickly, they were only selling a handful of products, and a full shopping cart seemed like overkill. One of the products they were offering was a donation on behalf of a non-profit.

Three days ago our client got an email from Google Checkout support indicating that soliciting donations is against their policies unless you are a non-profit. Google indicated that they had removed the Checkout badges from our client's AdWords ads but did not say anything about suspending their account. We immediately removed the donation item so as to reinstate the Checkout badges and not risk having the client's account suspended. At this time we verified that the the Google Checkout account was still working and had not been suspended.

Yesterday I sent an email to Google Checkout support asking if there was any way our client could collect these donations on behalf of a non-profit. I clearly indicated that we had already removed the offending item from the website. This morning I received a response that did not answer my questions, but instead said "We were unable to verify your organization's tax exempt status. As a result, your Google Checkout account has been suspended."

Our client never claimed to be a non-profit. We immediately removed the donation item in order to comply with Google Checkout policies once this issue was brought to our attention. Only after we had removed the donation item was our client's account suspended.

I immediately emailed back to support explaining everything above and asking them to reinstate the account. This is a micro-site for a nationally known brand and is part of a larger campaign. Not being able to accept orders is a big problem. In the last eight hours I have sent seventeen emails to support and have yet to receive a response. I have also posted a message to the Google Group with no official response yet. If the lack of response is because the support department is closed, then why did they suspend the account of a nationally known brand while support was closed without first double-checking that that policy violation was still in place?

We went so far as to try and call the corporate number. The absurdity of that phone call was beyond imaginable. We explained the problem and the Google representative said we needed to know the first and last name of the person we wanted to talk to. Of course, the email we had received from support about the account suspension only had a first name. They would not forward us to a department either. When we asked for the Google representative's name we were told, "I'm not authorized to give you that information." When we asked to speak to their supervisor we were told, "I'm not authorized to transfer you to a supervisor. You need to have their first name and last name." This was after we had said, "Don't you know your supervisor's name?" We were told to wait for an email reply. I'm still waiting.

Google Checkout is a service that Google offers to businesses. This is not a consumer-oriented service. It is completely ridiculous to expect businesses to use your service if this is the type of support that is offered. Google, fix your customer service - it is completely broken!

One last message for Google: I didn't take "no" for an answer from Verizon Wireless, in my opinion one of the most evil companies around. I called them again and again until they bent the rules on their asinine policy. Do you think I'm going to stop hounding the company that claims, "Don't be evil?" Wake up call: your lack of customer service for business customers is downright evil. I have been a Google evangelist for many years and this experience has been a huge slap in the face from a company that I thought was different.

Saturday, September 27, 2008

Testing Requirements with Unit Tests

See Testing Requirements with Unit Tests at its new home on

I'm currently working on a project where the client is running their own web server that I will not have direct access to. This is actually a good thing in that it is a nice way to enforce the separation of the development and integration environments from the staging and production environments. However, how do I be sure that all of the system requirements will be met so that I can address any potential problems early on in the project? Sure, I could just give them a file with phpinfo() in it and have them send me the results. However, I plan on also shipping them unit tests for the application so why not have the requirements tested through unit tests as well?

My first thought was, since the application is being built in Zend Framework, just ship them the Zend Framework unit tests. It turns out there are a lot of unit tests and they have some heavy memory requirements. So, I decided on a simpler approach. I would run unit tests that simply tested for the requirements outlined in the Zend Framework documentation. Here are the tests:

* The Requirements test case.
* @category Requirements
* @package Requirements
* @copyright Copyright (c) 2005-2008 Found Line, Inc. (
* @license New BSD License
class Requirements extends PHPUnit_Framework_TestCase

public function testVersionOfPhpIs5Dot1Dot4OrLater()
$this->assertTrue(version_compare(PHP_VERSION, '5.1.4', '>='));

public function testVersionOfPhpIs5Dot2Dot3OrLater()
$this->assertTrue(version_compare(PHP_VERSION, '5.2.3', '>='));

* @dataProvider requiredExtensions
* @param string $extensionName the name of the extension for which to test
public function testExtensionLoaded($extensionName)

public static function requiredExtensions()
return array(
'apc' => array('apc'),
'bcmath' => array('bcmath'),
'bitset' => array('bitset'),
'ctype' => array('ctype'),
'curl' => array('curl'),
'dom' => array('dom'),
'gd' => array('gd'),
'hash' => array('hash'),
'ibm_db2' => array('ibm_db2'),
'iconv' => array('iconv'),
'interbase' => array('interbase'),
'json' => array('json'),
'libxml' => array('libxml'),
'mbstring' => array('mbstring'),
'memcache' => array('memcache'),
'mime_magic' => array('mime_magic'),
'mysqli' => array('mysqli'),
'oci8' => array('oci8'),
'pcre' => array('pcre'),
'pdo' => array('pdo'),
'pdo_mssql' => array('pdo_mssql'),
'pdo_mysql' => array('pdo_mysql'),
'pdo_oci' => array('pdo_oci'),
'pdo_pgsql' => array('pdo_pgsql'),
'pdo_sqlite' => array('pdo_sqlite'),
'posix' => array('posix'),
'reflection' => array('Reflection'),
'session' => array('session'),
'simpleXml' => array('SimpleXML'),
'soap' => array('soap'),
'spl' => array('SPL'),
'sqlite' => array('SQLite'),
'standard' => array('standard'),
'xml' => array('xml'),
'zlib' => array('zlib'),


Note that I've checked for both the recommended PHP version 5.2.3 and the required PHP version 5.1.4. Also, I've tested for both hard and soft dependencies for all components. This means that many of these tests could fail and my application could still be OK. I wanted as much information as possible so that I can detect any potential problems before I write too much code. As the specific requirements for this application become clearer, I will update the test to add or remove requirements. Of course, once there is real code and unit tests these requirements tests will become irrelevant. The point is to test for the presence of these requirements before I write the code.

Running these tests with the command phpunit --testdox Requirements.php (I've actually wrapped this into a bigger test suite, but that's outside the scope of this blog post) gives me the following output on one of my development machines:

PHPUnit 3.3.1 by Sebastian Bergmann.

[x] Version of php is 5 dot 1 dot 4 or later
[x] Version of php is 5 dot 2 dot 3 or later
[x] Extension loaded with data set "apc"
[x] Extension loaded with data set "bcmath"
[x] Extension loaded with data set "bitset"
[x] Extension loaded with data set "ctype"
[x] Extension loaded with data set "curl"
[x] Extension loaded with data set "dom"
[x] Extension loaded with data set "gd"
[x] Extension loaded with data set "hash"
[ ] Extension loaded with data set "ibm_db 2"
[x] Extension loaded with data set "iconv"
[x] Extension loaded with data set "interbase"
[x] Extension loaded with data set "json"
[x] Extension loaded with data set "libxml"
[x] Extension loaded with data set "mbstring"
[x] Extension loaded with data set "memcache"
[x] Extension loaded with data set "mime_magic"
[x] Extension loaded with data set "mysqli"
[ ] Extension loaded with data set "oci 8"
[x] Extension loaded with data set "pcre"
[x] Extension loaded with data set "pdo"
[ ] Extension loaded with data set "pdo_mssql"
[x] Extension loaded with data set "pdo_mysql"
[ ] Extension loaded with data set "pdo_oci"
[ ] Extension loaded with data set "pdo_pgsql"
[x] Extension loaded with data set "pdo_sqlite"
[x] Extension loaded with data set "posix"
[x] Extension loaded with data set "reflection"
[x] Extension loaded with data set "session"
[x] Extension loaded with data set "simple xml"
[x] Extension loaded with data set "soap"
[x] Extension loaded with data set "spl"
[x] Extension loaded with data set "sqlite"
[x] Extension loaded with data set "standard"
[x] Extension loaded with data set "xml"
[x] Extension loaded with data set "zlib"

There are a couple of potential problems to be aware of. First, PHPUnit will have to be installed on the machine that this will be tested on. This should probably only be done on the staging machine, not the production machine. Second, the CLI version of PHP often uses a different php.ini file then the CGI or ISAPI version. This means that some requirements may actually be available to your web application but they will fail the test when run at the command line.

Friday, September 26, 2008

ZendCon Highlights Presentation

See ZendCon Highlights Presentation at its new home on

I presented highlights from ZendCon at last night's Burlington, VT PHP Users Group meeting. I've uploaded my slides for anyone who wants to take a look. The presentation uses the S5 slide show format in case you are curious.

Monday, September 22, 2008

ZendCon Highlights at PHP UG Meeting

See ZendCon Highlights at PHP UG Meeting at its new home on

I'll be presenting some highlights from ZendCon at this Thursday's Burlington, VT PHP Users Group meeting. We'll be meeting at Draker Laboratories from 6:00 pm to 8:00 pm. Hope to see you there!

ZendCon 2008

See ZendCon 2008 at its new home on

ZendCon 2008 wrapped up last week. This was my first time going to ZendCon and it was definitely worth it. There were over 650 people and over 60 sessions at the Santa Clara conference. I'll try to post summaries and highlights from the sessions I attended. It was a great opportunity to attended presentations from some of the most well respected people in the PHP community including Vermont's own Matthew Weier O'Phinney (Zend Technologies), Mike Naberezny (Maintainable Software), Sebastian Bergmann (eZ Systems), Derick Rethans (eZ Systems), Ben Galbraith ( , Marcus Boerger (Google), and Ben Ramsey (Schematic).

Zend Certified Engineer (ZCE) in Zend FrameworkLast Tuesday during the opening keynote Zend announced the new Zend Framework certification. I was fortunate enough to get a testing slot on Thursday morning. After reading the 214 page study guide on Wednesday I passed the test, so am now a Zend Certified Engineer (ZCE) in Zend Framework! If you plan on taking the test, I definitely recommend reading the study guide. I've been using Zend Framework since 1.0 and I'm not sure I would have passed if I hadn't read the study guide.

Friday, August 29, 2008

Last Night's PHP UG Meeting

See Last Night's PHP UG Meeting at its new home on

Thanks everyone who came out to last night's PHP Users Group meeting - we had the best turnout so far! Lee Brimelow, Platform Evangelist with Adobe, gave a great presentation on Flash, Flex, AMFPHP, and the upcoming Zend_Amf. I thought his presentation was refreshingly straightforward and honest. I have several reservations with using Flash myself and he addressed those issues early on in his presentation. Those issues are primarily search engine issues, accessibility, and "breaking the web model." However, Adobe has not fully answered those questions so I still won't be using Flash except for very specific situations such as video and audio. Regardless, it was an informative presentation and interesting discussion.

Saturday, August 23, 2008

Northeast Pools & Spas Website Launch

See Northeast Pools & Spas Website Launch at its new home on

We just launched the new Northeast Pools & Spas website. I think Dave and Jason did a great job on the visual design and Liz did a fabulous job on organizing and helping to write the content! I worked primarily on the functionality for the construction and portfolio pages. The site is implemented using semantic XHTML, CSS, jQuery, and Zend Framework.

The cool thing about the construction and portfolio pages is that they use progressive enhancement. What this means is that users without JavaScript (i.e. search engine robots & screen readers) can navigate the content by fully reloading the page on each click. You can try this out yourself by disabling JavaScript in your browser. For users with JavaScript, each click on "next" or "previous" (on the construction page) or each portfolio feature (on the portfolio page) will cause their browsers to load the appropriate content dynamically into the right spot on the page without needing a full page reload.

One of the common problems with this type of JavaScript navigation is that you often break the browser's back and forward navigation capabilities. Another common problem is that you can't bookmark the page or send the link to a friend and have the same content loaded. Because these pages update the browser's "hash" we get the browser's back and forward capabilities as well as bookmarkability. The "hash" is the part of the URL that starts with the "#" character. For example, assuming you have JavaScript enabled you should be able to navigate right to the waterfall photo using the following link:

Critiques are welcome!

Friday, August 22, 2008

PHP Users Group Meeting

See PHP Users Group Meeting at its new home on

The next meeting of the Burlington, VT PHP Users Group will be Thursday, August 28th, 2008 at 6pm. Special guest Lee Brimelow, a Platform Evangelist with Adobe and an award-winning interactive designer, will discuss the various ways in which you can integrate PHP with Flash and Flex to create Rich Internet Applications. We will start by covering simple XML exchange and then move on to more high-performance options like AMFPHP. The new proposed support for Adobe's AMF in the Zend Framework will also be discussed. Free software will also be raffled off.

Tuesday, August 12, 2008

Social Media Manifesto

See Social Media Manifesto at its new home on

At Found Line, we often have people ask us about using social media as a marketing tool. Unfortunately many try to approach social media as just another marketing avenue or, even worse, as a form of advertising. Here are a few key rules you must follow or you will fail miserably.

It's not about you. It's about your users/ customers/ readers/ viewers. What are you providing that's valuable? Where is the overlap between your users' needs and wants and what you have to say?

You are not the center of your network. You are just part of a larger network. Be a good citizen. Provide something of value. Connect with other networks; grow your network.

Whatever you do, do not try to control how or what is communicated. For employees, set clear boundaries as to what is OK to publish and what isn't and don't punish employees if they say something you don't like within those boundaries. Encourage everyone (inside and out) to speak their minds. If they have something bad to say, it's an opportunity to improve your product/service. If they have something good to say then great!

Social media is not one-way. It is a conversation, not a broadcast. Don't start a conversation if you're not willing to listen. No one will listen to you if you don't listen to them.

For some interesting reading on how companies are using social media, see The New Robert Scobles: Seven Leading Corporate Social Media Evangelists Today and Zappos Shows How Social Media Is Done.

Sunday, August 3, 2008

Draft Zend_Container Proposal

See Draft Zend_Container Proposal at its new home on

Wow, my draft Zend_Container proposal got a lot more interest than I expected. I want to clarify a few things about this proposal. First, this proposal is still very much a draft. I've made a few updates this weekend, so I'd love to hear any feedback you have but keep in mind the proposal is certainly not complete. Second, this proposal is in no way endorsed by anyone at Zend although I've gotten a small amount of feedback from some Zenders in public blog comments. Third, I'm not entirely convinced that a dependency injection component fits in with Zend Framework's balance of simplicity and power. However, I believe that if Zend Framework is to have a dependency injection component that this component should be as simple as possible and designed to solve a limited set of use cases. This is why I'm working on this proposal, to provide the option of a dead-simple dependency injection component in Zend Framework.

Thanks again for all the feedback I've gotten so far!

Thursday, July 31, 2008


See Development/Integration/Staging/Production at its new home on

I am surprised by how many developers think it's OK to do work directly in a production environment or to deploy to production directly from their development environment. I found a good article today that explains the traditional Development/Integration/Staging/Production practice. The specific setup may be different depending on your environment, but the basic ideas are the same.

Wednesday, July 30, 2008

Social Capital in Free/Open Source Software Projects

See Social Capital in Free/Open Source Software Projects at its new home on

A colleague of mine recently introduced me to the concept of social capital. Many organizations these days value human capital but I'm not sure how many value the social contacts between people involved in the organization. This raised the following question for me: I wonder how much of the success around free/open source software projects can be attributed to the generation of social capital? There are all sorts of technical reasons people will give as to why free/open source software is "better" than proprietary software but has anyone looked at it from a social perspective? I wonder if this is the real importance of Stallman's four freedoms - that they provide the opportunity for the creation of social capital?

I did some Googling and discovered an academic paper called The Influence of Structural Social Capital on Open Source Project Success. It was very interesting but I must admit I didn't read all of it as it gets rather technical towards the end. Here is a summary of the results:

Our main results are (1) teams with greater internal cohesion are more successful, (2) external cohesion (cohesion among the external contacts of a team) has an inverse U-shaped relationship with the project's success; moderate levels of external cohesion are the best for a project's success, rather than very low or very high levels of this variable, (3) the technological diversity of a contact also has the greatest benefit when it is neither too low nor too high, and (4) the number of direct and indirect external contacts are positively correlated with a project's success with the effect of the number of direct contacts being moderated by the number of indirect contacts.

Monday, July 28, 2008

Dependency Injection in Zend Framework

See Dependency Injection in Zend Framework at its new home on

Ibuildings has an article on Dependency Injection and Zend Framework Controllers. In the comments, the Zend_Di proposal is mentioned. I had posted several comments when the Zend_Di component was proposed. Most of my comments were ideas on how to make a dead-simple dependency injection container for Zend Framework. Zend Framework prides itself on simplicity and, in my humble opinion, if Zend Framework is going to have a dependency injection component this component needs to be as simple as possible - something along the lines of PicoContainer. So, I'd like to summarize my thoughts here. I should probably just write a proposal, but I'd like to start here and see what kind of feedback I get.

For the purposes of this blog entry, I'll call this component Zend_Container (I apologize if this name has been proposed for any other components). First, some basic assumptions:

  • The component's primary purpose is to replace the use of class-managed singletons and Zend_Registry.
  • The component will only manage singleton items within a container, it will not act as a factory (except for creating the single instance).
  • A container can have zero or one parent container and have access to items in its parent, but a parent cannot have access to items in its children.
  • The component uses reflection to determine dependencies.
Below is an example of a class that will have its dependent items injected:
class Zoo {

* @var Feline
protected $_feline;

* @var Canine
protected $_canine;

* Sets the Feline for the Zoo to have.
* @param Feline $feline
* @return void
public function setFeline(Feline $feline) {
$this->_feline = $feline;

* Sets the Canine for the Zoo to have.
* @param Canine $canine
* @return void
public function setCanine(Canine $canine) {
$this->_canine = $canine;

Here is an example of wiring up dependencies:
$container = new Zend_Container();
//note the ability to specify class or interface and class
->addComponent('Feline', 'Tiger')
->addComponent('Canine', 'Wolf');
$zoo = $container->getComponent('Zoo');

//the above is equivalent to (assuming setter injection)
$feline = new Tiger();
$canine = new Wolf();
$zoo = new Zoo();
An example of parent/child relationships:
$rootContainer = new Zend_Container();
//passing in the root container so the child is aware of its parent
$childContainer = new Zend_Container($rootContainer);
//note again that we can add either class or class and interface
$instanceA = $rootContainer->getComponent('SomeClass');
Child containers should have access to their parent's components (but not the other
way round) so if we hadn't added the component specifically to the child container
this next line would have given us instanceA.
$instanceB = $childContainer->getComponent('SomeClass');
echo (int) ($instanceA === $instanceB); // echoes "0" (false)
There is one major problem that I have not figured out. Reflection is used to determine potential dependencies. The container then would look to see if it (or its parent) contains the dependency and if it does, wire it up, otherwise ignore it. In other words, there's no way to assert that a component is a required dependency. Perhaps this could be solved through the use of an @required DocBlock tag if this can be read using PHP's reflection mechanism. There could also be a configuration option that would simply make your addComponent calls for you.

Friday, July 25, 2008

Easy Way to Run Web Applications Locally

See Easy Way to Run Web Applications Locally at its new home on

I've been trying out a new way to run web applications on my local machine. Since I work on many different websites I like to be able to run these sites on my local machine. This lets me try out changes locally before committing them to Subversion and rolling them out to a staging or production environment. In the past I've simply created a new virtual host in Apache listening on its own port. The problem with this is that not only do I need to manually setup each new site, I also need to remember which site goes with which port number.

So, I've started using Apache's dynamically configured mass virtual hosting. This gets me two things. First, I don't need to make any changes in Apache's configuration file when I want to setup a new local web application. Second, I now have an easy-to-remember naming convention for sites that are running locally. This works really well for me, but your mileage may vary depending on your specific needs. There are also other tools that can help you accomplish similar results, but I like the simplicity of this in that it doesn't require anything other than Apache and some DNS settings.

Let me explain the end result first, and then I'll explain how I got there. For each website I work on I use the subdomain to indicate the environment it's running in. Using the domain we may have the following environments setup:

  • - the local copy
  • - a semi-publicly available beta
  • - the live site
The beta and www versions aren't anything special, just normal websites. For I need to have a DNS entry that points to the loopback address, This can either be a publicly available DNS entry (which could be a little awkward) or simply set in your hosts file. I've simply made the entry in my hosts file:

The downside of this is that you would need to update the host file on each machine that you wanted to run the site on. A comprimise would be to run your own recursive DNS service that only your computers used and make the DNS entries there.

This next step only needs to be done once. The dynamically configured mass virtual hosting article explains in detail how to set this up. My Apache configuration looks something like this:

VirtualDocumentRoot /path/to/workspace/%2+/public

Again, your specific configuration may be different. When making a request to the document root would expand to /path/to/workspace/ This assumes that you have placed all of your projects in the same location and they all have a similar directory layout (I'm using Zend Framework's directory layout). I think there's a way to do this in a way that's more flexible, but I haven't had the need. Let me know if you have any questions!

PHP Users Group at VCET

See PHP Users Group at VCET at its new home on

Last night's PHP Users Group was at the Vermont Center for Emerging Technologies (VCET) in Burlington. Adam Bouchard gave us a demo of Springloops - a service that helps you deploy web applications (among other things). Rob Riggen and Aaron Carlino gave us a presentation on the Symfony web framework. We had a smaller turn-out than usual, but that's not suprising for a summer meeting. Next month we're going to have a presentation on Flex by someone from Adobe - more details to come.

Friday, June 27, 2008

Burlington, VT PHP Users Group Meeting Last Night

See Burlington, VT PHP Users Group Meeting Last Night at its new home on

A big thanks to Bluehouse Group for hosting Last nights Burlington, VT PHP Users Group meeting! Both Matthew Weier O'Phinney and Rob Riggen provided some great presentations. Matthew's presentation was a continuation of his best practices series. This one was on documenation. Rob presented the latest installment of his framework series, this one on Zend Framework. I think we had a decent turnout for a summer users group meeting. Any other web developers out there, put next month's meeting on your calendar! We meet the fourth Thursday of every month.

Thursday, May 22, 2008

Burlington, VT PHP Users Group Subversion Presentation

See Burlington, VT PHP Users Group Subversion Presentation at its new home on

Here is the Subversion presentation I just gave at the Burlington, VT PHP Users Group:

Monday, May 19, 2008

Subversion Presentation at PHP Users Group

See Subversion Presentation at PHP Users Group at its new home on

I'll be doing a presentation on Subversion, an open-source revision control system, at this month's PHP Users Group meeting. The meeting is scheduled for this Thursday, May 22nd from 5:30 pm to 7:30 pm at Brown & Jenkins Coffee Roasters. I'll be talking about reasons to use revision control, the benefits of using Subversion specifically, basic revision control concepts, typical workflow, branching, merging, and tagging. Hope to see you there!

Tuesday, May 13, 2008

GTalk Profile Hits 10,000 Profiles

See GTalk Profile Hits 10,000 Profiles at its new home on

Back in August of 2005 Google launched its instant messaging platform called Google Talk. One feature that Google did not provide was a way for Google Talk users to connect with other Google Talk users who they didn't already know. Within a week of the Google Talk launch Jason and I had rolled out the first version of GTalk Profile, a website with the purpose of helping Google Talk users connect with other Google Talk users from around the world. Users can search by location and interests and their contact information is kept private unless they choose to share it with another user. Today the 10,000 profiles mark was hit!

Unfortunately Jason and I have been too busy to maintain GTalk Profile the way we would like. We plan to streamline the core experience and there are many new features we'd like to add. The 10,000 profiles mark, while not representative of a huge number of users, is a significant milestone because it shows a real interest in what GTalk Profile has to offer. Our goal is to dedicate more resources to the website and treat it like any other project that a client may come to us with.

One of the great things about Google Talk is that it's built on the open Jabber/XMPP standards (GTalk Profile is actually a website for any Jabber/XMPP user, not just Google Talk users). This means that other organizations using these standards can choose to federate with Google Talk (and amongst themselves). Imagine if you could only send email to people using the same email provider as yourself. This is the current state of instant messaging and the Jabber/XMPP standards, with Google's help, are slowly opening the world of instant messaging. Now if only some of the other major instant messaging players like AOL Instant Messenger, Windows Live Messenger and Yahoo! Messenger were to start using these standards and federating with others like good citizens of the Internet.

Saturday, May 10, 2008

Website Launches

See Website Launches at its new home on

Recently I talked about the updated Found Line website but we've also been busy with a few other websites!

Microcosm Aquarium Explorer was launched with thousands of pages of content for aquarium enthusiasts. It was built using MediaWiki and the content is written by Microcosm Books and various authors. Information architecture and data entry were greatly enhanced using the Semantic MediaWiki and Semantic Forms extensions. The newsletters are powered by VerticalResponse (we're a VerticalResponse partner) and are integrated with the website using the VerticalResponse API.

NEHP is a Vermont-based company providing "process piping solutions and modularization for the semiconductor, solar and life sciences industries." We've worked with them on several marketing initiatives and recently updated their website. It's fairly basic at the moment, but we're big believers of iterative improvement! One item on the list is integration with the third-party APIs.

CCTV's Center for Media and Democracy had been hard at work getting their new website into the Drupal content management system (CMS). They had some ideas about what they wanted the website to look like but needed someone who was skilled in CSS-based web design to bring this vision to reality. We worked closely with their technology integrator to design the recently updated website.

Sunday, April 27, 2008

New Found Line Website Launched

See New Found Line Website Launched at its new home on

I am happy to report that the new Found Line website has launched! This new version includes some much needed content and visual updates and is now running in Zend Framework (although there is very little functionality beyond static content). All of the visual effects use jQuery, there is no Flash to be found on the site, and all behavior should degrade gracefully if JavaScript is not enabled. The site is almost entirely valid XHTML and CSS - the only exceptions are a couple of visual effects that required a bit of hacking (but we're hoping to find a valid XHTML alternative). The site has been checked for cross-browser compatibility in 25+ browser/OS combinations. It has also been tested in a text only browser and should be accessible to screen readers. Please take a look and let me know your thoughts - good, bad, or indifferent!

Saturday, April 19, 2008

RMS in Vermont

See RMS in Vermont at its new home on

Richard M. Stallman (RMS), founder of the free software movement and the Free Software Foundation (FSF), gave a speech on Copyright vs. Community at Saint Michael's College on Thursday evening, and then a speech on The Free Software Movement at Champlain College on Friday morning. While I don't agree with all of his ideas, here are a few interesting pieces from his talks.

He equates software freedom with human rights and says that we should have the following four freedoms when it comes to software:
  • "The freedom to run the program, for any purpose (freedom 0).
  • The freedom to study how the program works, and adapt it to your needs (freedom 1). Access to the source code is a precondition for this.
  • The freedom to redistribute copies so you can help your neighbor (freedom 2).
  • The freedom to improve the program, and release your improvements to the public, so that the whole community benefits (freedom 3). Access to the source code is a precondition for this."
RMS seemed more comfortable during his Free Software Movement speech and bit out of his depth in the Copyright vs. Community speech. While I believe he has done a lot of research and thinking about the issue, his attempts to apply these four freedoms to works other than software seemed a bit strained. Having said that, I completely agree that the current copyright system is broken and needs to be fixed to give people more freedom. I am just not sure that the fix is as simple as what he proposes (at least for non-software works).

I completely agree that it is an educational institutions moral duty to only use free software (free as in speech, not free as in beer). I would be interested in hearing from people who have had success in convincing education institutions to switch to free software. I would extend this argument to say that it is the moral duty of our government to only use free software. If it's payed for with taxpayer money then we should have the four freedoms on that software.

Wednesday, April 16, 2008

Asus Eee PC 900 Review

See Asus Eee PC 900 Review at its new home on

The first full review of the Asus Eee PC 900 is available. The Eee PC is an ultra-portable computer and this newest version sports the following features:
  • 8.9 inch 1024x600 LCD
  • 1 GB of RAM
  • Linux or Windows XP
  • 20 GB SSD (Linux version) or 12 GB SSD (Windows XP version)
  • 900 MHz Intel Celeron CPU
  • 1.3 megapixel webcam
  • measures 225 x 165 x 35 mm (8.86 x 6.50 x 1.4 in) (WxDxH)
  • weighs about 1 kg (2.2 pounds)
Unfortunately the PC 900 isn't available in the US yet. Rumor is that it will have a $499 price tag when it's available here.

I find it interesting that the Eee PC is helping to push Linux on the desktop (well, on the ultra-portable) through the installed Xandros distribution. However, I would probably install eeeXubuntu if I were to get an Eee PC. I would have no interest in running Windows XP on the Eee PC.

Tuesday, April 15, 2008

A Compassionate Look at Doing Business

The Seattle Post-Intelligencer has an article about the Dalai Lama's comments during a panel discussion at the recent Seeds of Compassion conference. The audience was a group of business and policy leaders. The article takes a compassionate look at doing business. One interesting quote when asked about competition in business:
"If your colleague (is a) little bit lazy, or something like that, you try to be more competitive. So that is the positive side," he said. "Negative side -- to be causing one trouble."
I find this interesting because what he is saying parallels the theory of capitalism in which competition is healthy as it creates better products and services. But, he is also addressing the reality of capitalism where individual businesses may see competition as something to be crushed. If you take the world view that we are all interconnected (whether this is through religious or secular belief) then harm caused to another causes suffering for all:
"If you do good, you get positive result. Something that creates harm is bad because we do not want to create suffering."
Apparently there is quantitative research that shows that compassionate companies tend to outperform the market. I'm not sure, exactly, how compassion is measured or how statistically accurate this research is. However, I'm inclined to believe in the concept.

Tuesday, April 8, 2008

Google App Engine

See Google App Engine at its new home on

Google has just launched a preview release of the Google App Engine. Developers can now create web applications and run them on Google's infrastructure. This gives developers access to a lot of the same tools that Google uses to build its own web applications including GFS and Bigtable. Unfortunately, it's only available for Python and the Django web application framework at the moment but "other programming languages and runtime environment configurations are being considered for future releases." I'm hoping Google is considering support for PHP and Zend Framework in the Google App Engine.

Wednesday, April 2, 2008

POSH In Action

See POSH In Action at its new home on

In a previous post I talked about Plain Old Semantic HTML (POSH). The POSH concept saved us a lot of time and frustration on a recent project. Our task was to create a cold water wash calculator for Seventh Generation's Get Out of Hot Water for Earth Day promotion. The calculator takes four inputs: water temperature, type of hot water heater, type of clothes washer, and loads per week. It then tells you the savings if you switch to (or are already using) cold water, an Energy Star washer, and/or 2X Concentrate Natural Laundry Detergent.

They wanted a smooth user experience. This sort of thing would normally be created in Flash but we decided to use XHTML + CSS + jQuery instead. The first step was to create functional and technical specifications. The specifications (and looking through all of the calculations to make sure we understand everything correctly) were actually a big part of the project. After that we moved into production.

We had two people working on this project - I implemented the functionality in jQuery and Jason implemented the design in CSS. We spent the first two hours working together on getting the semantic XHTML correct. Once we had the semantic XHTML we essentially had an API that we both could use to do our work. It was worth the time upfront getting this part right.

Next we went to our respective corners. I created the jQuery functionality selecting and manipulating the DOM using CSS selectors. Jason used the XHTML structure we had come up with to add CSS and make it all look pretty. The great part was that, since we had come up with the the XHTML structure as the one touch point, we were each able to do our jobs without hardly bothering the other person to ask questions or make changes.

Of course, there were a few changes needed to the XHTML once we started working on our individual pieces - we're not perfect after all. This is were Subversion came in handy. I could change my local copy and when I was sure I wanted to I could commit that change and Jason could update his local copy merging any of his own changes (or vice-versa). The whole process went quite smoothly and we're very happy with the results (the "Switch to Cold Water and Save" calculator on the right).

It's a RESTful World

See It's a RESTful World at its new home on

Web developers have many options to choose from when it comes to web services. These options include SOAP, XML-RPC, and REST. It is my opinion that REST will emerge as the primary web services "protocol." The advantages and disadvantages of each protocol is a topic that has been discussed to great length online. Here are the primary reasons why I think REST has the advantage:
  • REST is simple. Time and time again, simple has won on the web. The web itself is successful because of its simplicity. People are really good at making things more complicated than they need to be (which is why we have SOAP).
  • REST builds on the simple concepts that make the web work. URLs are resources/nouns that can have HTTP methods/verbs such as GET, POST, PUT, and DELETE applied to them.
  • It does not dictate what the actual data will look like. This is seen as a weakness by many but why should this be the domain of the web service protocol? Here you can pick what works best for the data you are communicating. Perhaps XML defined through XML Schema, DTD, or RELAX NG is best for a particular use case. Maybe you'd prefer to use JSON instead. Maybe you simply want to use (X)HTML and microformats. Maybe you're dealing with binary data that isn't machine-readable such as images or PDFs. If it can be represented by a URL and can be gotten (GET), posted (POST), put (PUT), and/or deleted (DELETE) it's RESTful.
Here is some interesting reading on REST:

Monday, March 31, 2008

Magento 1.0

See Magento 1.0 at its new home on

Magento 1.0 has just been announced. Magento is an open source eCommerce platform based on Zend Framework. I've used several shopping cart applications in the past and have been very disappointed with all of them. Magento looks promising and I hope to demo it soon.

API Design

See API Design at its new home on

Artima has an older (but still relevant and interesting) interview with Josh Bloch, a Sun Microsystems Architect. While the interview focuses on Java, Josh Bloch has some interesting things to say about software design in general. The main topic is thinking about design in terms of APIs instead of monolithic software construction.
Reuse is extremely important but difficult to achieve. You don't get it for free, but it is achievable.
The lure of object-oriented programming is the ability to reuse code. However, creating reusable code is not as simple as switching from procedural to object-oriented programming. One may make the switch from procedural to object-oriented programming and then be disappointed that object-oriented programming didn't deliver on the promise of reuse. Josh Bloch has a potential solution to this problem but it requires one to think about software in terms of public APIs.

Being disappointed with object-oriented programming, one may then decide to try agile programming, perhaps even extreme programming. One tenant of extreme programming is to "do the simplest thing that could possible work." Josh Bloch points out that this is easy to misconstrue:

The extreme programming proponents don't advocate writing something that will barely work as fast as you can. They don't advise you to forgo any design. They do advocate leaving out the bells, whistles, and features you don't need and add them later, if a real need is demonstrated. And that's incredibly important, because you can always add a feature, but you can never take it out. Once a feature is there, you can't say, sorry, we screwed up, we want to take it out because other code now depends on it. People will scream. So, when in doubt, leave it out.
He goes on to talk about other topics such as minimizing mutability, protected vs. private members, when to make a class final, and the copy constructor as a cloning mechanism. It is interesting reading if you are striving for the goal of reusable object-oriented code.

Saturday, March 29, 2008

Open Source Business

See Open Source Business at its new home on

Cal Evans has a post talking about his experience at the Open Source Business Conference (OSBC). Just like many small businesses, especially web development shops, open source software is a critical tool for us at Found Line. However, I'd like us to be more then just consumers of open source software. It seems like most discussions about open source business focus on the large companies that sponsor open source projects. Where's the business model for small businesses in open source? Small businesses like ours typically don't start open open source projects but we can be a part of an existing project.

Sure, there doesn't need to be a "business model" for companies like ours to contribute back to open source. I certainly see the value in contributing back to open source and would like to do so even without any clear picture of how it's good for our bottom-line. But, in order for it to be part of a small companies business plan there needs to at least some basic understanding of how it contributes to the business' overall success. Here are few arguments I can make for why a small business should contribute back to open source software:
  • It helps to ensure that the open source software your business relies on survives and thrives.
  • It can help attract talent. With proprietary software there is a bigger risk that everything an employee learns and creates is left behind if they switch jobs. A job may look more attractive to a potential employee if they know that their efforts will not stay within a "walled garden." In other words, open source software and open standards are transferable skills.
  • Your business can have more of a "vote" when it comes to the direction and features of the open source software that you use. Those who contribute the most to open source projects get the most say in what direction the project goes in and what features are added. Features that are important to your business can be added to the software that you use.
  • You can claim that you are an open source contributor, not just a consumer. This can also communicate legitimacy and experience to potential clients.
These are just a few that I came up with. I would love to hear if anyone has additional benefits to add to this list.

Thursday, March 27, 2008


See Standards at its new home on

I'm sure everyone has heard the phrase, "The great thing about standards is that there are so many to choose from." I think we finally have a coding standard for everything we do at Found Line - from PHP to CSS to web file names. We've gone through a couple of iterations and various options but here's what we've come up with.

For application code we've decided to simply follow the Zend Framework PHP Coding Standard. It gives us guidance on PHP file formatting, naming conventions, coding style, and inline documentation. If it works for a project like Zend Framework with a large number of developers it should work for us. Plus, I wouldn't be surprise if many applications start standardizing on Zend Framework conventions so following their standards should put us in a good position when doing integration work.

For id and class names in XHTML and CSS we've decided to adopt the microformats naming principle of dash-separated-lowercase-words. This is the only CSS naming convention I've seen that has a real purpose behind it. We will try to use names from existing microformat standards before coming up with our own. However, when we have to come up with our own names at least they will be consistent with the microformat names.

For files that will be web-accessible we've decided to use the dash-separated-lowercase-words standard as well. This is for a couple of reasons. First, it's consistent with what Zend Framework expects. Second, Matt Cutts recommends dashes instead of underscores as word separators.

PHP Users Group Meeting Last Night

See PHP Users Group Meeting Last Night at its new home on

The Burlington, VT PHP Users Group met last night. Thank you Bluehouse Group for hosting and providing pizza and soda! Rob Riggen gave a talk on PHP Frameworks: 3 different ones and we went around the room talking about a PHP function or tip that helped us in the past. I decided to talk about the following very simple tip.

How many times have you done something like this:

if ($foo = 1) { }

when you meant to do this:

if ($foo == 1) { }

This is a common mistake to see. A developer accidentally uses the single equal assignment operator instead of the double equals comparison operator. Since PHP will successfully assign the value it will always return true which was not the intended result. A simple way to catch this mistake is to reverse the variable and the literal value:

if (1 == $foo) { }

This still has the intended effect of comparing the two values but if you accidentally use a single equal sign:

if (1 = $foo) { }

then you will get a parse error. Here we've introduced the concept of fail-fast into our code. We'd rather get a fatal error letting us know we made a typo then a potentially insidious and hard-to-find logic error.

Wednesday, March 26, 2008

PHP Users Group Meeting Tonight

The Burlington, VT PHP Users Group will be meeting tonight at 6:00 pm in Richmond, VT. The theme for this meeting is, "My Favorite Function." Come prepared to talk briefly about a PHP function (or tip) that has helped you out during your PHP development. I still haven't decided what my function or tip will be. Maybe it will be something really simple like the list() function which can save you a bit of typing or something more complicated like the Iterator interface.

Tuesday, March 25, 2008

Zend_Layout and Zend_View Enhancements Webinar

See Zend_Layout and Zend_View Enhancements Webinar at its new home on

I missed the Zend_Layout and Zend_View Enhancements Webinar but the recorded Webinar and slides are now available. The Webinar covers a few of the cool new features that became available in the Zend Framework 1.5 release last week. These new features give web developers who are using Zend Framework a way to solve the problem of maintaining a consistent look-and-feel across multiple web pages. Solutions to this problem I've used in the past include:
  • Dreamweaver templates
  • PHP or Smarty includes
The problem with Dreamweaver templates is that a template change requires you to "burn" the change into all of the web pages that use the template. If you have lots of pages this process can get cumbersome or you may forget to upload all of the modified pages. Also, the developer in me cringes at the fact that we repeat the same (X)HTML code across multiple pages - even if Dreamweaver is handling this repetition for me. This just doesn't feel very DRY (Don't Repeat Yourself) to me.

PHP or Smarty includes help a lot with the DRY problem. However, you are now leaving it up to each script to decide where the page elements get included. You may accidentally include the header, for example, in the wrong place in one or more pages. Also, if you need to re-arrange the overall page structure you're stuck changing every single page.

Enter Zend_Layout and the Zend_View enhancements. Zend_View is an implementation of the two-step-vew design pattern and the Zend_View enhancements are a collection of view helpers that are useful alongside Zend_Layout. Check out the Webinar and read Matthew Weier O'Phinney's article on Using Zend_View Placeholders to Your Advantage.

Monday, March 24, 2008

Plain Old Semantic HTML (POSH)

See Plain Old Semantic HTML (POSH) at its new home on

I didn't realize someone had coined a clever phrase for this concept. The basic concept of POSH is creating (X)HTML that is semantic, or structural, rather than presentational. Most people experience the web as a visual medium and thus assume that it is a visual medium. Many web development tools (such as Dreamweaver's WYSIWYG editor) reinforce this misconception. The web is in fact a structured medium and one facade to that structure is its visual side that most of us experience every day. People without the gift of sight, search engine robots, and other web crawlers don't experience the web visually. In order to make the web available to the widest audience possible we need to build websites with proper structure first. Then we can add presentation via CSS and behavior through a JavaScript library such as jQuery.

Here are the basic steps to make your next website POSH:
  • validate your (X)HTML - invalid markup is not very POSH at all;
  • use tables only for tabular data, never for layout;
  • use existing elements and attributes if they fit the semantics of what you're creating (e.g. ul, li, dl, dt, dd) instead of generic div or span elements;
  • use class and id names that are semantic, not presentational (e.g. MainNav is semantic but LeftNav implies presentation and is not so POSH);
  • use as little (X)HTML as possible to markup your content.
For those who claim that this is too limiting when it comes to design I suggest you check out css Zen Garden. Very POSH, very cool. Every single design you can pick from uses the same structured XHTML page - the only thing that changes is the CSS style sheet.

Earlier I mentioned something about adding behavior with JavaScript. My favorite JavaScript library is jQuery. jQuery lets you unobtrusively add JavaScript behavior to your (X)HTML pages using simple CSS selectors. This means no inline JavaScript code in your (X)HTML - no onclick or onmouseover event handlers cluttering things up.

POSH + CSS + jQuery (or another unobtrusive JavaScript library) is very cool indeed. But it's more than just cool. It makes your websites easier to maintain and it opens the door to concepts such as microformats - data that is both human and machine-readable. Are you ready to get POSH?