Calgary VC Roundtable Location Confirmed

Posted April 8, 2008, 10:22am In: VC/Funding Related, Personal

When I first heard about the VC Roundtable that Rick Segal is putting on, I jumped to sign up with nary a thought.

Just got an email via eventbrite.com. Looks like we’ve got a confirmation on the location.

Now, if I could just figure out what the devil I’m going to wear.

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.

TheFunded re: VCs

Posted April 3, 2008, 6:51am In: VC/Funding Related

I read an article on TechCrunch that summarized Adeo Ressi speaking at Next Web.

Now, there’s a dozen ways to skin a cat - a morbid metaphor if ever there was one - and it seems that everyone has something to say based on their experiences. Of course, some are more credible than others, but let’s try not to forget that these are opinions, not writ or law. I can point out a couple statements that would have some VC folk grabbing their pitchforks and going on a witch hunt.

It’s easy to forget that people that give advice, however good their intentions, might have their own agenda; surely the reason that thefunded.com was started is enough reason to take anything that Adeo says with a grain of salt. Don’t take what anyone says about receiving large sums of money as doctrine.

That said, I’m not saying that the multitude of things people say are wrong or right. Simply that it’s up to us, the founders, funded and those (like me) in between, to make up our own minds.

theunfunded.com vs thefunded.com

Posted March 31, 2008, 3:42pm In: Personal

http://www.theunfunded.com/

Okay, I know it’s an April fools joke (er, at least I think it is) but this is still really amusing. I even emailed one of the gentlemen in my blogroll about it.

I’d love to get your thoughts on this.

/me is still chuckling

View Zend_Db_Select query

Posted March 31, 2008, 11:26am In: Zend Framework

Saw something in #zftalk that could be considered a no-brainer, but since the question was posed I’ll reproduce the answer here.

Rather than turning on the profiler to see what kind of query is being generated, use the __toString() magic method.

This should produce something like:

[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.

My Amazon Order Came Today

Posted March 28, 2008, 10:54am In: Personal

My Amazon.com order came today. I’m finally a proud owner of:

Crossing the Chasm - Geoffrey A. Moore
The Art of the Start - Guy Kawasaki This is my second copy
Bootstrap - Kenneth L Hess
Founders at Work - Jessica Livingston
The Elements of Style - Strunk/White/Kalman as recommended by Stephen Fleming

Amazon EC2 gets static IPs

Posted March 27, 2008, 3:13pm In: Web Related

Announcement: Amazon EC2 Release: Introducing Elastic IP Addresses, Availability Zones, and new public AMIs/Kernels

Elastic IP Addresses are static IP addresses designed for dynamic cloud computing, and now make it easy to host web sites, web services and other online applications in Amazon EC2. Elastic IP addresses are associated with your AWS account, not with your instances, and can be programmatically mapped to any of your instances. This allows you to easily recover from instance and other failures while presenting your users with a static IP address.

http://developer.amazonwebservices.com/connect/ann.jspa?annID=295

This is really good news for servware app vendors - it is becoming easier and easier to design an entire infrastructure around Amazon services.

@twitter

Posted March 27, 2008, 2:10pm In: Personal

After hearing about it enough, I finally caved…

I can be found, easily enough, at http://twitter.com/zed23

Should a developer design the UI?

Posted March 26, 2008, 12:46pm In: Web Related, Development, Personal

Short answer: Yes.

K-Leads-Beta Recently, I had the displeasure of having to design wireframes for my application. Now, it was a very hard lesson for me to learn several years ago that I just wasn’t a designer, and the notion of even trying to dive into photoshop again made me somewhat sick to my stomach. So rather than getting into layers and gradients, I instead busted out my trusty code editor and mocked up the wireframes as how I envisioned the application being used, to the point where they were no longer wireframes at all, but a mashup of logic, aesthetics and mockups.

I kicked, screamed, dragged my feet, but eventually I did finished them. Dashboard, login, views, listings, I did it all. Actually, it was a much better exercise than I anticipated and something I’ll have to encourage other developers to do.

It’s a good exercise because it helped me think out some features I wanted to do. All of a sudden I’m staring at a blank page going “Well, that won’t work” and it’s incredibly important that I make it do so. If I hadn’t made a mockup, I would not have addressed that fact till I actually started development, or worse - built an architecture around a theory.

Some of these challenges with logic and engineering can easily be thought out. Others will creep up on you. So what if you’re not a designer. Don’t focus on the actual interface itself, focus on the presentation of the data. All the data flow diagrams and specification documents aren’t going to help if you can’t figure out how to present two objects with different metadata in the same table - which was, incidentally, my problem.

After you’ve designed a wireframe or - if you’re a little more bold - a mockup, hand it off to a designer; have them take it to the next level, get all mad scientist on it and give it some better colors than #FF0000 and #EEE. Now they have an even better idea of what kind of interface your user will need.

So in closing, don’t treat spec docs, data flow diagrams or mockups as the be all end all to your application. All of these should be used, complimenting one another; it’ll save you considerable headache in some scenarios where you scratch your head and go:

Uh, I didn’t think of that.

Inspired by: How do I write my UI specs?