Posts Tagged Programming
Data Weaving
Posted by PhazeonPhoenix in Programming on June 13th, 2009
Today I am working diligently on a new project. I was busily moving textual data from various applications I use in my development and into an excel spreadsheet for quick reference later. From three different files opened in two different (and both very large) applications and Excel 2007 all at the same time. If computers were ever revolt mine’s going to go straight for the jugular.
Then after I finished building the table in Excel I realized I had to create multiple (24 to be exact) template files for all the pages this new project required. I didn’t feel like typing the command out (I used touch on my Linux devel box) so I copied the text I needed for the base of the file name, tacked on the remainder of the file name and removed the carriage returns with a quick recorded macro in UltraEdit 32, and pasted it into my shell window. BAM!
OK for most of you that will probably be complete gibberish. And that’s OK. It just suddenly dawned on me what exactly I was doing to accomplish my goal. Such a contrived, inefficient but effective way of doing it. Also as suddenly, the phrase “Data Weaving” popped into mind.
Setting up Subversion and Trac on CentOS 5
Posted by PhazeonPhoenix in Programming on June 12th, 2009
I stumbled upon this article and I must say it’s a great guide for getting both of these applications up and running correctly. I now use a slightly modified process to create new projects on my dev server. This in conjunction with a quick and dirty WordPress blog installed on my dev server’s root for posting links to the various parts of my new project and it’s an impromptu development environment!
Also on a side note, I switched away from Gentoo to CentOS for my dev server. Not that I do not enjoy Gentoo (I’m a geek, give it a break) but I needed a turn-key enviroment for development. So far I’ve been satisfied with CentOS. Since it’s based on Red Hat Enterprise Linux it’s solid as a rock and help is easy to find.
actAs: Accountable Doctrine Behaviour
Posted by PhazeonPhoenix in Symfony on June 8th, 2009
It was fairly easy to create a Signable behaviour and it was done within a couple days. I soon realized though that the behavior of the SoftDelete behaviour wasn’t quite what I wanted. It only adds a “deleted” boolean field to the DB. I also wanted to know who deleted it and what time it was deleted. I decided to expand SoftDelete and make it use a timestamp instead of a boolean. That part worked too.
The problem I soon ran into was with when I combined SoftDelete and Signable with it’s new preDelete hook. Seems since SoftDelete stops the preDelete event it doesn’t let the Signable code execute properly. I decided that the correct answer to the problem was to create a whole new behaviour which would combine not only SoftDelete and Signable but also Timestampable. I called it Accountable since it’s primary function is to keep record of who touched an object.
I did a manual test and so far it’s worked as planned. I’m not yet sure of the SoftDelete filters… I made a change to preDqlDelete and preDqlSelect and I’m not quite sure if it still works. Time will tell I’m sure. Once I’m more certain this code is solid I’ll give more information on it.
Database Schema and Doctrine Model planning
Posted by PhazeonPhoenix in Symfony on June 3rd, 2009
Today I did some major database planning for a major project I’m working on and it’s quite an interesting process. You have to take such a large concept as every bit of information your application might need to store and slicing that into smaller pieces to create the tables and models needed to access and process them.
I’m finding the best way to plan them out is to grab a piece of paper and something to write with and start scribbling. Maybe it is low tech but whatever works you know. I found myself creating what could have easily have been a flow chart spanning several pages. I started in one small area and quickly expanded to other less obvious and obscure tables I’d need. All while relaxing on my bed.
I started writing my schema file. This being my first real application of the Doctrine ORM it was a bit slow going. The syntax for the schema.yml is a bit new to me. It took me a couple tries to get the correct relationships to form exactly the way I wanted. But so far so good.
