Posts Tagged ‘Zend Framework’

ContentPane in dojo not loading scripts? This is how you fix it.

December 16th, 2010

I was planning on writing my first enquiry on how to do something in dojo, but just before I pressed the submit button, I thought I’d look into one more thing and as the saying goes – “it’s always in the last place you look” (probably because you stop looking after you find whatever it is you’re looking for).

So the problem I had was that I wanted to load a datagrid inside a contentPane in a pet project my newbie friends and I are using to sharpen our Zend Framework skillz.

I’ve been idle (and will continue to be for the rest of the year) so all my tickets are pretty much at a stand still. This included a ticket which reports that a remote datagrid does not load properly in chromium / google chrome, but loads fine in Firefox. But seeing as I have a few hours to kill from being idle (development wise, but actively looking after family) , I thought I’d do an idle search into why this was happening. Dojo could not possibly have a bug, there must be some magic attribute that needed to be set which would make it all better.

So I started my search. Looking for things like “ContentPane not loading datagrid in tabContainer dojo” through to “javascript events not firing in contentPane dojo dijit” for those of you who look for answers to advanced questions when it comes to the dojo toolkit, you know how teeth-gnashingly frustratting it is to look for answers.

A couple of them mentioned “executeScript” attribute, but that was from ages ago, so I tried it a couple of times to no avail in dojo 1.5 then gave up looking for answers that use executeScript attribute.

» Read more: ContentPane in dojo not loading scripts? This is how you fix it.

Analysis Paralysis: In a quest for perfection, I manage to achieve nothing

December 4th, 2010

This was supposed to be a live coding note, but it just turned into something else. No ground breaking news, no new concept which will make you go “hmmm”, just a guy kicking himself – you can safely ignore this frustrated post if you aren’t in the mood to read about how much an idiot I think I am :P

It’s been a mixture of Tunnel Vision, NIH Syndrom and Analysis paralysis that had me living in a haze of trying to implement DataMappers ala Zend Quickstart Guide on and off, for the past 4 weeks.

I even wrote the Unit Tests and everything for this project I’ve taken part in called “customember”: a sample project to help a few newbies I know (and to a certain extent myself) skill up through practical experience rather than going into a real world project and doing the floundering around when the gun is really loaded.

» Read more: Analysis Paralysis: In a quest for perfection, I manage to achieve nothing

Two Dojo JavaScript Gotchas that got me

November 19th, 2010

I was just about ready to tear my own head off when I’ve finished unit testing my Service and Model classes and had damn near close to 100% code coverage, and ran into some really fiddly issues with dojo. I’m doing this retrospectively, so off the top of my head these are the two issues that had me scratching my head due to their obscurity.

First issue: got a ”dojo.data.ItemFileWriteStore” is not a constructor” message.

I use ItemFileWriteStore as my data store for a combo box intended to list fields in a search. Users could then have the ability to filter through the list by typing a letter in the combobox and auto complete suggestions will be displayed in a list below ala a select list. Problem is when I was running it, I get this error message.

I decided to verify that nothing’s wrong with the way I built the dojo JS library. Then headed to google. First few results were garbage, then came an exact match. It was one of two cases:

  1. dojo.require() is missing
  2. The constructor statement occurs before dojo has completed loading.

» Read more: Two Dojo JavaScript Gotchas that got me

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