<?xml version="1.0"?>
<!-- $Id: index.xml 1867 2009-03-05 15:49:54Z lastcraft $ -->
<page title="The Last Craft?" here="Last Craft">
    <long_title>
        The Last Craft? Web developer tutorials on PHP, Extreme programming
        and Object Oriented development
    </long_title>
    <content>
        <introduction>
            <p>
                This site focuses mostly on developing with lightweight web technologies such as
                <a href="http://www.php.net/">PHP</a>,
                especially when applied with agile methodologies such as
                <a href="http://www.extremeprogramming.org/">XP</a>.
                No guarantee of quality is given or even intended.
                It is hoped only that what you find gives you ideas and enthusiasm
                from a fellow computer programmer.
            </p>
            <p>
                I've been a little busy of late with children, concurrently
                maintaining version 1.0 and version 2.0.
                They take quite a chunk of your professional life and 100% of
                what's left.
                Hopefully the projects below should start to get back on track
                now that they are reaching school age.
            </p>
        </introduction>
        <section name="what" title="Ongoing projects">
            <p>
                A recently revived project is
                <a href="http://sourceforge.net/projects/phemto/">Phemto</a>,
                <a href="">a dependency injection container</a>
                for <a href="">PHP</a>.
                Similar to <a href="">Pico</a> in concept, it uses a fluent interface and
                plenty of automagic to cut down the amount of configuration
                you have to write.
                This was originally written as a 50 line demo for a
                <a>PHP Architect</a> column on creating objects.
            </p>
            <p>
                My newest project is <a href="cgreen.html">Cgreen</a>.
                It's a C unit tester.
                There are a couple of C unit testing tools out there already of course.
                What makes <em>Cgreen</em> different is that it is pure C99, includes
                a tutorial right here and has facilities for creating mock functions.
                Mock functions should lead to more decoupled C code if Mock objects are
                anything to go by.
                It's alpha status right now until I get feedback from other users.
                So if you want to be influential, try it out right now.
                The project has been partly funded by <a href="http://www.wordtracker.com/">Wordtracker</a>,
                for which I am very grateful.
            </p>
            <p>
                Along with Jon Ramsey, I am a founder of
                <a href="http://www.phplondon.org/wiki/">PHP London</a>, a PHP user
                group not surprisingly based in London.
                It's going well.
                We run a yearly conference called
                <a href="http://www.phpconference.co.uk/">PHP UK</a>, this year at
                Olympia that attracted 300 delegates.
                The networking meetings take place on the first Thursday of every month
                at a pub, and typically attract about 60 people.
            </p>
            <p>
                The <a local="simple_test">SimpleTest PHP unit tester</a>
                is available for download from your nearest
                <a href="http://sourceforge.net/projects/simpletest/">SourceForge</a>.
                It is a PHP web test and unit test framework, with mock objects.
                A <a href="">native PHP web browser</a> is included, so that functional tests
                of web pages can be carried out.
                The idea is that common but fiddly PHP tasks, such as logging into a site,
                can be tested easily.
                The browser is pretty complete, but does not support Javascript.
                It does not yet support CSS selectors, but these will be added later.
            </p>
            <p>
                Also on the subject of open source, <a href="http://www.wordtracker.com/">Wordtracker</a>
                have kindly agreed to publish some of their in house tools.
                A Wordtracker spin off is <a local="fakemail">fakemail</a>.
                Testing applications that send e-mails can be a right royal pain because
                of all of the infrastructure involved.
                You will likely need an SMPT gateway that talks to a POP client that
                you can read the queue from.
                That's a lot of set up.
                <a local="fakemail">Fakemail acts as an SMTP gateway</a> on any port
                you define.
                When you send it a mail it simply copies that mail to the local file
                system in whatever directory you want.
                You then just have to look at the local file.
                Perl and Python versions are available.
            </p>
        </section>
        <section name="why" title="Why the Last Craft?">
            <p>
                A craft is defined as...
                <div class="quotation">
                    Art or skill; dexterity in particular manual employment;
                    hence, the occupation or employment itself; manual art; a
                    trade.
                </div>
            </p>
            <p>
                If you lose a screw or clasp from a hand made jewellery box it is hopeless to
                try to find a replacement. Nothing else is quite the same and the mechanism will
                fail to work. It may even cause more damage when applied. You need to find the original maker
                or someone of the same skill to make you another.
                Sound like software?
                Yet mechanical parts today are interchangeable.
            </p>
            <p>
                Writing software has resisted mass production.
                As soon as a part of it becomes
                routine it can be automated.
                Once it is you don&apos;t need a programmer any more.
                Routine programming jobs no longer exist.
                All that is left is the unsolved problems that require
                a higher level of skill in constructing their solutions.
            </p>
            <p>
                This dependency on the ability of the artisan, combined with nothing quite fitting
                together properly, is what gives software the pre-industrial feel.
            </p>
        </section>
        <section name="crc" title="The cards?">
            <p>
                The panel at the top is supposed to resemble a standard office index card.
                The way it is marked out is called a
                <a href="http://www.c2.com/doc/crc/draw.html">CRC card</a>.
                It stands for Classes, Responsibilities and
                Collaborations and is the cheapest software development tool you
                can find.
                You really do buy a pack of cards.
            <p>
            </p>
                The role is written at the top and would often be just a class
                name.
                The left side is the object&apos;s responsibilities and on the
                right collaborations (within the page I have treated these as
                internal links and external links repectively).
                A group of developers can point at, discuss and discard cards
                in the heat of design session.
                It makes it especially difficult for only one person to take charge
                of a discussion in the way you can with a UML tool or notepad.
                Try scribbling out five cards before someone gets a look in.
            </p>
            <p>
                Now nothing beats a whiteboard for collaboration, but if the level
                of detail is getting too high, and you want a temporary record,
                give the CRC cards a try.
            </p>
        </section>
    </content>
    <internal>
        <link>
            <a href="#what">Projects</a> under development.
            All free and open source software.
        </link>
        <link>
            <a href="#why">Why Last Craft?</a>
            Odd name isn&apos;t it?
        </link>
        <link>
            <a href="#crc">Why the funny index card</a> at the top?
        </link>
    </internal>
    <external>
        <link>
            <a local="simple_test">SimpleTest</a> is a PHP unit test framework.
        </link>
        <link>
            My article on <a href="http://www.developerspot.com/tutorials/php/test-driven-development/page1.html">TDD</a>
        </link>
        <link>
            My article on the
            <a href="http://www.phppatterns.com/index.php/article/articleview/75/1/1/">Registry Pattern</a>.
        </link>
        <link>
            Site E-mail is
            <a href="http://spamcop.net">SpamCop</a>
            filtered which I cannot recommend enough.
        </link>
    </external>
    <meta>
        <keywords>
            software development,
            computer programmer,
            php programming,
            programming php,
            software development tools,
            software development company,
            php tutorial,
            free php scripts,
            bespoke software development uk,
            corporate web development,
            architecture,
            php resources,
            wordtracker,
            xslt,
            java,
            bug tracker,
            bug reporting,
            unit test,
            php testing,
            test cases tutorial,
            explain unit test case,
            unit test example,
            xml
        </keywords>
        <description>
            A web site of software development tutorials and examples with an
            emphasis on web programming, testing, agile methodology and PHP
            development
        </description>
    </meta>
</page>