Dewald Botha

open source web thoughts

RSS FeedsFollow me on Twitter!

  • Home
  • about me

MySQL data dumps done right.

Apr 8th

Posted by dewaldbotha in linux

To dump data in MySQL command line is one of the easiest things to do.  All you have to do is follow these 3 easy steps in your linux command line:

1.  Dump the schema only.  This will  not contain any data, procedures or triggers, but only create info.  This will allow you to easily import your original schema later on.

mysqldump -uroot -proot -d --skip-triggers myDatabase > myDatabase_schema.sql

The -u specifies your username, and must be followed by your username e.g. -uroot. This is the same with your password, -proot.

The -d tells mysqldump to not dump any data in the schema and the More >

data only, linux, mysql, mysqldump, procedures, sql, triggers

Test drive your PHP code

Mar 30th

Posted by dewaldbotha in agile

Lately I’ve ventured fully submerged into the world of Test driven development (TDD).

This might start out a bit scary, especially if you have only heard about it, but never done it yourself. There is a couple of good reads on the net, so you might want to start out by familiarising yourself with this exciting way of doing things.

Have a look at http://en.wikipedia.org/wiki/Test-driven_development or Google it.

What is test driven development?

Test driven development (TDD) is more a change in coding philosophy than anything else. Some of us might say: “…yip, I’ve written a couple of unit tests when I had some spare More >

agile, martin fowler, php, phpunit, test driven development, uml, unit testing

the down-low on mobile device detection

Feb 19th

Posted by dewaldbotha in apache

1 comment

so – you say you want to detect which mobile devices hit your site? – in the past, this has been a bit of an issue, but lately – with really nice projects available out there such as WURFL or DeviceAtlas, you are able to concentrate harder on other issues, instead of having to write a complete library of your own.

so for this, i’ve decided on DeviceAtlas.  just head on over to DeviceAtlas and open a developers account – you will get a one year developer’s license to play around to see how cool it is.

after registering – click on the downloads link More >

apache, devicealtas, linux, memcached, mobile device detection, php, php alternative cache, php apc, wurfl

game theory pattern code example

Feb 17th

Posted by dewaldbotha in design patterns

so i finally took the time to write some code to better articulate my thoughts on ‘game theory pattern’.

/*
* Abstract Unifier class to select objects from different sources.
*/

abstract class childObjectUnifier
{
    protected $currentObjectLocation;

    public function __construct()
    {
        $this->currentObjectLocation = get_class($this);
    }

    public function getData()
    {
        switch ($this->currentObjectLocation)
        {
             case 'currentServerLoginObject':
                    return $this->currentServerLoginFunction();
                    break;

             case 'remoteServerLoginObject':
                    return $this->remoteServerLoginFunction();
                    break;

             default:
                    die('Current user load not available');
        }
    }
}

/*
* Login Object which exists on the current server.
* This object could still be hit on the current server if the current user load is not high.
* More >
design patterns, game theory, mvc, php

applying game theory patterns to development

Feb 11th

Posted by dewaldbotha in architecture

4 comments

mobile – that damned device that makes our life so easy, yet sometimes so inheritely difficult.

as a developer, we kind of try and convince ourselves that developing for mobile and developing for a desktop browser is kind of the same thing.  but we all know that this is a stalling technique for the inevitable, since invariably it becomes a whole different field of play.

every little feature you add, every little flow created and every branch of navigational hierarchy is a challenge on its own.

enter the game theory pattern

(more…)

design patterns, game theory pattern, mvc, software architecture

coolest guy on the internet

Jan 30th

Posted by dewaldbotha in random

so – in our office we have a little competition to see who can come up 1st for the term “coolest guy on the internet” in google.  the seo gurus in our midst have taken to this, like a bear to honey.  so hopefully someone will coin the term “coolest guy on the internet“.

who know maybe even me?

-  coolest guy on the internet

cool, coolest guy on the internet, guy, internet

centering mobile web

Jan 26th

Posted by dewaldbotha in mobile

with all the focus being on the mobile web these days, one must have a basic understanding of how the pieces fit together before even writing a line of code.

there is a great online community which supports mobile development called mobiforge which could be utilised to answer all of your mobile related questions.

but as a start i will point out some important steps/considerations to take/make:

(more…)

mobile, mobile standards, prototyping, user experience, wurfl, xhtml-mp

crossing the mvc divide, kohana and zend style

Jan 23rd

Posted by dewaldbotha in framework

7 comments

so, i’ve been pretty much a zend framework addict, ever since i coded my first bootstrap.  thinking back to that countless hours trying to understand the beast that is zf, ahhh, what fond memories…  and lately i’ve also been playing around a bit with kohana, which is another web based mvc framework, but definitely a bit more lightweight and easier to use than others.

there is however a bit of an issue with web based mvc frameworks, and in my opinion a large freaking elephant that no one seems to talk about.  how can i call a controller from within a view More >

framework, kohana, kohanaphp, model view controller, php, zend framework

we be having web 2.0

Jan 20th

Posted by dewaldbotha in random

1 comment

so – at our office there has been huge focus on breaking into the lucrative web 2.0 market.

as a short term solution to this i will show you how to make your own web 2.0 social network in no time.

(more…)

we will build it and they will come, web 2.0

the great search balancing act

Jan 14th

Posted by dewaldbotha in architecture

it’s been a while since my last post – and as interests fade with time, others jump up faster than a beach ball at a nickelback concert.

so i’ve been looking into solr the last couple of days.  solr is relatively new in the arena and probably outshined a bit in popularity by other search engines such as lucene and nutch.  “but why solr?”, you may find yourself asking.

Well solr has a couple of tricks up the sleave – which is likely due to the fact that its a fresher version of the old, dare i call it legacy, search engines.

(more…)

More >
apache, haproxy, java, keepalived, load balancing, replication, search engine, solr, tomcat
12»
    • Popular posts
    • Archives
    • Tags
    • Categories
    • agile (1)
    • apache (1)
    • architecture (3)
    • caching (1)
    • design patterns (2)
    • erlang (2)
    • framework (1)
    • geolocation & spatial (2)
    • java (1)
    • linux (1)
    • mobile (2)
    • mvc (3)
    • mysql (2)
    • php (4)
    • postgres (1)
    • random (3)
    • solr (1)
    • test driven development (1)
    • tomcat (1)
    • Uncategorized (1)
    • unit testing (1)
    • user experience (1)
    • yaws (2)
    agile apache cool coolest guy on the internet data only design patterns devicealtas erlang framework game theory game theory pattern geoserver guy haproxy internet java keepalived kohana kohanaphp linux load balancing location based searches lyme map client map server mapserver martin fowler memcached mobile mobile device detection mobile standards model view controller mvc mysql mysqldump open source maps pgrouting php php alternative cache php apc phpunit postgis postgres wurfl yaws
    • April 2009 (1)
    • March 2009 (1)
    • February 2009 (3)
    • January 2009 (5)
    • December 2008 (2)
    • November 2008 (3)
    • crossing the mvc divide, kohana and zend style (7)
    • applying game theory patterns to development (4)
    • we be having web 2.0 (1)
    • the down-low on mobile device detection (1)
    • hello (0)
    • ip’s, geolocations and whatnot (demo) (0)
    • lyme, a stack of scalability (0)
    • putting the ‘errrrrrr’ in erlang (0)
    • serve maps, DIY style (0)
    • the great search balancing act (0)
  • My latest tweets

    Loading tweets...
    Follow me on Twitter!
RSS Feeds XHTML 1.1 Top