Archive for the ‘PHP Programming’ category

Just when I needed it the most, my weapon of rapid web development goes nuts!

June 18th, 2010

Today was an absolute sh*t fight. Starting from an entire morning where after I experienced several crashes with Visual Studio Express, that I thought I’d try the full version.

To do this though, I had to expand my VMWare virtual disk. So a quick:

vmware-vdiskmanager -x 45GB windevxp.vmdk

… and my virtual disk is now 45GBs! – I then had to resize the windows partition. I’ll post more on this straight after this post.

So with that done, I’m set to install Visual Studio, I thought yeah it should take about 5 – 10 miuntes…

BOY WAS I WRONG!

The installation took like 2 – 3 hours at least, so there’s a large chunk of my day gone. (Great… F*CK!) At this point though, I didn’t care anymore, I was bitter about the amount of work I’ve lost and the disruption caused by stupid Visual Studio Express randomly crashing! I just wanted the whole thing to be installed and start coding again.

» Read more: Just when I needed it the most, my weapon of rapid web development goes nuts!

Subversion Tip: Managing SVN Properties with text files

May 21st, 2010

Here’s a quick SVN trick I use for managing my svn:ignore and svn:externals properties for my projects.

One of the first things I do for newly checked out projects is to add a externals.txt and ignore.txt files. Then I just populate these with the property values I require for the project.

I know, it’s a no brainer when you think about it right?

The thing is, I didn’t think of doing it until the past few projects and actually had to rely on ide integrated / gui tools to do it prior to this year. I came across a couple of examples and did it a couple of times in a rush without noting it down, but thought I’d make a post about it on my blog so that I have somehwere easy to find.

» Read more: Subversion Tip: Managing SVN Properties with text files

Project Chronus: a Zend Framework/Dojo/Doctrine Project Quietly Launched

May 10th, 2010

It’s been a while since my last entry and this is due the dedication of my free time, when not working on client’s projects, to a certain in-house project.

Last week, I’ve quietly launched project chronus. A project which provides multi site administration system geared for collaboration. Project Chronus makes it easy for our website content admin people at DevProducts to keep track of numerous website projects placed under their control.

Project Chronus is the first project I’ve built with Zend Framework 1.8 and above (as in utilising bootstrapping with Zend_Application) that felt natural. I’ve built several projects with Zend framework 1.5+, but not as comfortably as I did with my recent project.

While Project Chronus is a project to be used for our own internal purposes, it served as a live project with enough real requirements to be effectively used as a sandbox for future projects we choose to undertake and in addition, set (and put to the test) standards for how we do things.

» Read more: Project Chronus: a Zend Framework/Dojo/Doctrine Project Quietly Launched

Is it important that Views pull data from Models on their own?

January 22nd, 2010

In my recent post regarding the Model Service layer, there was one query about me mentioning that the View is configured by the Controller which goes against the grain of traditional MVC idea of “Views Should handle their own Models / data”.

There is nothing wrong with Views being able to handle their own models, I’m not suggesting that this shouldn’t be the case. You can also do it this way. That is the “traditional MVC” way of doing things and it works fine which is why I’m questioning why I’ve moved away from it. I’m just typing as I go so hopefully by the end of it, we’ll have something that makes a point.

I used to Really love this sh*t!

I used to trumpet the sh*t out of this because I had it figured out and it made me feel smart ;) . I thought hey, I can adhere to the traditional MVC way of things and make the View select it’s own Model (or models) and gather information on it’s own – all I need is a View Helper. Further along came the question “What about the times when the Model needs to be used by the Controller?” well I got a plan for this too, then there’s the “What about when the Controller and View need access to the same model?” case. I needed to create a strategy to make sure that the Model isn’t instantiated twice in these cases.

» Read more: Is it important that Views pull data from Models on their own?

My Zend Framework Model Layer: Part Service, Part ORM

January 20th, 2010

The Model Layer of the MVC triad: I’ve been thinking this over for the past few months since using the Doctrine ORM and I think I’ve finally made some progress to get this issue licked. In the past, I’ve agonised over this issue and blogged about my progress. Some weeks or days later I tried to probe the community on what they would do, Now I think I’d have an idea on what I would do.

After some more thought and lots of research on the subject, I’ve come to a solid point where I actually have something to try out which seems semantic aside from the naming of the class (Service Class) – but this is derived from what some people are talking about in ZF circles starting from Matthew Weier O’Phinney who was coining it as the “Gateway to the Domain” from early on, then later changing it to “Service Class”.

» Read more: My Zend Framework Model Layer: Part Service, Part ORM