KanaYeh's web dev corner

Not a beauty pageant ;)

How to run svnadmin on Windows

In order for me to upload my existing repository with Codesion I need a dump-file. Trouble is I never dumped my repo before on a Windows machine and TortoiseSVN doesn’t seem to have a click-able function for this.

To be able to use the command svnadmin on Windows XP you’ll need to install Subversion first, which I hadn’t till now.

Nothing too difficult; can be easily done in 3 simple steps.

Lets get on with it, shall we?
[Read the rest of this entry...]

Regular Expressions: Splitting on commas and ignoring commas in quotes

Regular Expressions is a thing I tend to avoid. But every developer comes to a point where all others solutions just isn’t suffice, is it not?

Well today was my day. I had to fix something at work but my lack of regex knowledge made me frustrate.

I needed a solution for the following problem:

  1. I have a comma serperated list assigned to 2 variables. I want to split the values on commas BUT it has to ignore the commas in quotes, if there are any
  2. I want to create an array with the headings of the list as keys and the values as values of the keys

Inspired by this I found a solution* on the internet but had to tailor it and decided to log it here.

[Read the rest of this entry...]

The CakePHP Framework: Your 2nd Bite (for CakePHP 1.2.x.x)

This is an addition to the original updated article The CakePHP Framework: Your First Bite (updated for CakePHP 1.2.x.x)

In this post we will be adding the following features into the little notes script:

  • add rules to the notes input form fields for fields that are mandatory
  • use an other than a default layout for your notes application
  • clean the input of your notes form to prevent XSS

Happy coding!

[Read the rest of this entry...]

The CakePHP Framework: Your First Bite (updated for CakePHP 1.2.x.x)

As a newbie to CakePHP I need tutorials to guide me and teach me how to use it. I stumbled upon Fabio Cevasco’s CakePHP tutorial on SitePoint. This tutorial dates back to 2006. The post doesn’t mention the used CakePHP version. It was not hard to guess that it is outdated for the year of 2009. But that is ok…

Gladly I made it working for 1.2.x.x, so here it is:

An updated version of Fabio’s article “The CakePHP Framework: Your First Bite” on SitePoint. His version was written when CakePHP 1.1.x.x was the real deal. In this article I have modified the code and made it work with CakePHP 1.2.x.x

In this tutorial you will create a straight forward and simple notes application. You will be able to list, add, edit and delete notes using CakePHP 2.1.x.x and MySQL. Furthermore, you’ll validate the form entries of the notes and you’ll be using a different layout for this application.

This post requires basic knowledge of PHP, MySQL. You also need to have a basic understanding of the MVC structure as I won’t go into detail like Fabio does. Here you’ll find the modified code and little bits of extras. You can take a look at the original post for slightly more theory and nifty details of the code used in this application.

Happy coding!

[Read the rest of this entry...]

Coding Standards: using camelCase, PascalCase or under_scores?

I used to have difficulties making up my mind in sticking to certain naming conventions, between:

  • camelCase
  • PascalCase
  • under_score_usage
  • Did I miss something else?
    • yOUngSTerSsPeAk_PerHAps ? (whatever it is called)

[Read the rest of this entry...]

phpGG Frontend event 2009 report

This year (2009) phpGG started with a frontend special covering 4 front end technologies related to PHP development. The main subjects covered by these 4 men:

Photo’s provided by Localjoost

  1. User experience on the web (Dutch spoken)
  2. Flex and AIR for PHP programmers (English spoken with a Romanian accent)
  3. Javascript: 8 Reasons every PHP developer should love it (Dutch spoken)
  4. The frontend is your best friend (Dutch spoken)

The slides showed during this event are included in this post (soon).

This is my report of that day!

[Read the rest of this entry...]

Review Ivo Jansch’s Guide to Enterprise PHP development

I consider myself to be a newbie when it comes to professional PHP web development. Sure I know how to CRUD, procedural-, object oriented development on a limited level, frameworks, functional designs, database designs, technical designs (all on a limited level). So yes, I know something but is my knowledge enough to be able to stand in the world of the real professionals? Therefore I might think and mention some stuff that is not related to enterprise. Please correct me whenever you come across such err.

Essential book information

Title: php|architect’s Guide to Enterprise PHP Development

[Read the rest of this entry...]