Archive for the 'Dragonfly R&D' Category

Saying No

Posted April 22, 2008, 9:11am In: VC/Funding Related, Dragonfly R&D, Personal

I have to admit my favorite blog to read lately has been trumped by TechCrunch and is now Rick Segal. Onlookers would say that that’s because I have a personal investment on keeping tabs on Rick because I want to go after money for Karmba eventually… In fact, it’s much more simple. I find that Rick’s posts convey a lot of wisdom (not to mention common sense) that could be applied not only to the pursuit of venture capital, but everyday business and personal life as well.

Take, for instance, Rick’s post about The No Email Thread. One line in particular stood out.

your time is just as valuable (or more) than mine

Doesn’t sound like a there is lot of ego there. Despite Rick’s history - not to mention the fact that he and his team of mad scientists control the flow of millions of dollars - he still recognizes that time is valuable and tries to conduct his business affairs in such a manner.

I think that most people in this industry could learn a thing or two by checking their ego when they open an email or go to a meeting. Programmers especially are guilty of this. We build applications, engineer specifications and somehow it gets in our brain that we’re god’s gift to [insert your demographic here].

Your time is valuable, but so is the time of the people you’re working with. If you’re not interested in an RFP, a potential client, or a partnership, take a lesson from Rick and tie it off in a respectable manner so they can move on.

Kudos Rick. Keep it up.

Building an audit engine with Zend Framework

Posted April 3, 2008, 7:53am In: Dragonfly R&D, Zend Framework

Part of what I love with ZF is the ease at which I can extend it to do what I need.

For instance, recently I was developing my app (codenamed Karmba) - something I needed to do is to be able to log every transaction, and at any time restore a version of information.

Let’s say for instance, that I have a blog - I know, I know, everyone uses that as an example, but let’s stick with something familiar, okay - and within my admin, I want to edit an entry. I start with my controller.

Disclaimer: This post is based on a real application, but isn’t all of the actual code. It is not plug and play; expecting this code to work out of the gate does not reflect what I’m trying to do.

For reference, DomainObject is just a convenience class - you can easily replace it with Zend_Db_Table

Now, let’s take a look at the Factory itself. A majority of this should be familiar to you.

Now, to illustrate my point, we create an object, Blog_Post - within Blog_Post there’s as much or as little as we need to alter the data.

Now this is where we start to see a little bit of the magic happen. Db_Table_Row (or another suitably named object) accesses functions that are called by Zend based on certain events. The event that I want to illustrate here is _postUpdate - an event that fires AFTER the object is updated. Now, a bit of hacking is required to get this to work. If you don’t know what _cleanData, _data or _modifiedFields are and how they’re used, a lot of this won’t make sense to you.

Now, inside AuditFactory is where we log all our transactions. We can revert entire objects or alternatively pick and choose what we update. That’s why every field gets a new object.

And that’s it!

This example proves how powerful the Zend_Db component of the Zend Framework is - and how contrary to popular belief - easy it is to extend existing functionality in a real world environment.

Audit factory doesn’t need to log to a database either. You could easily alter the class to the log entries to disk, or send an email, et cetera.

Feel free to comment, or expand on what I’ve said.

[Warning: Nerd alert]

Posted March 30, 2008, 9:03pm In: Dragonfly R&D, Personal

This probably won’t mean much to anyone but me.

Did a lot this weekend regarding Karmba. 76 files added to the repository since my last commit (Wednesday). This was the first major revision since I scrapped the project and started over in February.

Here’s the commit message I just posted:

Major revision.

-Updated sql schema.
-Finished implementing and verifying BootstrapFrontController & BootstrapController
-Major updates to the Row object including postUpdate postInsert & postDelete hooks
-New template updates
-Various template additions - @TODO: cleanup templates
-Domain objects for Accounts, AccountsRelatedRecords, Audit
-Start of UserPrefFactory
-Form builder stage one - @TODO: cleanup, modularize
-Added view helpers, relocated to app/views/helpers
-Completed Audit Engine application wide
-Added sidebars for certain modules, just cause I didn’t want to lose the data.

The rest is module work in accounts. Big weekend.

I’m trying to keep a log of everything I do - yay subversion!

I’m really excited about this version. I feel like I’m actually putting a foot forward again, and this version especially is close to being able to do everything I want. I spent two days just allowing the addition of custom fields within the application, but it certainly lays the groundwork for faster development.

Ignoring the fact that I’ve smoked far too much this weekend, if I keep up the pace I’m going I should have a fully working demo within the next month or so. Of course, I’ve said stuff like that before, but this time I’m not making any promises. Just going to keep plugging away.

Of course, now that I look at my commit logs, I notice some things need to be cleaned up and moved around. Bleck. Now I’m tired.