DerekAllard.com

BambooInvoice 0.8.1

Well, considerable bug squashing effort has gone in here, and things seem to be running smoothly!  Bamboo is now available in English, French, German, Spanish and Dutch.  As well, the code is leaner, cleaner and ready to keep growing.

This release is mostly a maintenance release.  Next version will have new features, including the commonly asked for line-based items (price, quantity, description, etc).

Don’t forget to run the update script if you’re… um… upgrading ;)

BambooInvoice 0.8.0… its ALIVE!

I’m very proud to say that BambooInvoice 0.8.0 is completed and live.  The changelog covers it off pretty well.  I’d like to very, very gratefully acknowledge Marc Arbour, Micha Schlieper, and Alex Williams.  Each helped with energy, ideas, and translation efforts.

The big thing about this version of Bamboo, aside from squashing every known bug, was the inclusion of Internationalization.  It once again highlighted the flexibility of a good PHP framework.  Now that the work has been done, dropping in new languages is a snap.  Currently Bamboo runs in English, French and German.  Additional languages are always welcome.

Also of note is the new reports feature I wrote about earlier.  It seems to be giving me some grief in Safari.  If you’re a javascript guru familiar with Safari’s parser, I’d love if you could take a quick look and see if you can’t nail that down.  And don’t even get me started about Internet Explorer… for what its worth, Bamboo does run in IE flawlessly.

0.8.1 will focus on any bug fixes that are found on release (there’s bound to be 1 or 2), and then 0.8.2 will focus on code cleanup.  Bamboo was written before CodeIgniter even had models, and there are lots of inconsistencies, loose code and other items I want to address.  0.8.3 will start adding in new features again, as we work towards a completed 1.0 release.

One thing on my radar is to drop DOMPDF as the PDF library.  I’ve been happy-ish with it, but development seems to have stagnated, and it seems to be a bit of a memory pig, often causing the “Allowed memory size of xxxxxxx bytes exhausted” error (which I’ve added a specific note about in the installation guide).  The Zend PDF library seems nice.  Jonathan Snook had an interesting article on implementing Zend components into CakePHP.  He talks about a vendor() helper, but it looks to me like CodeIgniter could do the same thing with relative ease.

include(APPPATH '/zend/pdf.php'); 

In fact, the prolific Dan Freak has already written about Using Zend Framework components in CodeIgniter, so its not like I have any excuses here.

BambooInvoice, “the little project that could”, has taken on a life of its own.  If you use it please drop me a line or leave a comment here.  I’d love to hear how you think it helps you, or what it would need to be able to do that.

Changing MySQL default character sets to UTF-8

With BambooInvoice 0.8 about to be released, and the big new feature being internationalization, this has brought to light a few issues with character sets, particularly as they apply to the database.  It seems that MySQL, in its default configuration, and especially with popular installers such as XAMPP, MAMP and WinLamp, usually sets the default character set as “latin-1”.  For English, this is a complete non-issue, and things work as they should, however if you try to set other languages, characters such as ö, ä, and ï (as well as dozens of others) tend to load to the screen as garbage.  This is often compounded by the fact that the webpage itself might be in a character set such as UTF-8, which is very “international friendly”, and so things appear to work on the “front end” but as soon as data goes into a database and back out… its borked.

The solution of course is to simply use UTF-8 as the character set for your database.  The problem though, is that many of us have legacy data in MySQL, and as mentioned above, the data started its life as latin-1.  This is particularly true of BambooInvoice, as the installer I set up did not specificy any character set, so nearly everyone’s databases (my own included) is in latin-1.

I’ve found 2 good ways of converting an existing database from latin-1 to UTF-8.  Here’s how you can convert your data…

Internationalized BambooInvoice revisited

Internationalizing BambooInvoice?  Yup.
Again? Yup!

Seems I’ve had quite a love/hate relationship with internationalizing my application, but today I’m proud to say, that despite rumours to the contrary, an internationalized, and localized BambooInvoice is going to happen.  Actually, it’s happening as you read this (here’s my local installation)...

BambooInvoice version 0.8.0

BambooInvoice 0.8.0 will be added to the online demo shortly, and the code released a matter of days after that.

I’m finished implementing new features, and what is left is the major job of finishing off the language variables for internationalization (I’m about 40% through right now). I’m proud of the improvements that Bamboo has seen over the last few days.  As a small sampling, there has been a significant overhaul to the way languages are handled, and this will actually have a trickle down directly into the CodeIgniter codebase (the ability to autoload language files).  The symbol of curreny ($ vs £ vs ¥) is now customizable.  Long standing bugs and half-implemented features (I’m looking at you password-reset) are fixed up or added in.

A full new update path is now built in.  Inspired by how smoothly ExpressionEngine handles updates, I’ve decided to follow a similar path.  In essence, each Bamboo version is now identified via a version number, and when a new release is out, just hit the “update” page, and Bamboo will intelligently and silently make changes to the underlying database structure. 

BambooInvoice reporting graphs This is on top of the reports I mentioned in an earlier post of course.  I’ve implemented an SVG/Canvas charting library that dynamically draws your yearly invoice totals and taxes for you.  I absolutely love the end result, but it took a hundred thousand hours to get working right in IE.  Does anyone still use IE?  Anyhow, check out the new reports feature. Yeah, May was a good month for me ;)

It was fun to dig into the guts of prototype and javascript again.  To anyone who still thinks of javascript as a toy language…think again.  It is often the right tool for the job - and with libraries like prototype and scriptaculous to build on, it is very much a mature tool.  Of course its buggy, but all environments are.  Have you tried testing for readable files on various server setups lately?  At EllisLab we have… and it’s a monumental pain; and PHP is largely considered among the most stable environments available.

There’s also been significant compatibility improvements, and an installation routine that checks for most requirements before the installation takes place.  Also, more of the usual code cleanup - getting rid of un-needed files, and a few cosmetic changes here and there.

Also of note, CodeIgniter itself has also undergone some pretty significant changes recently in the subversion repository, and should see at least a few more in the next few days and Derek and I go on a bug hunt.

New BambooInvoice Reports

In case you’re wondering, I haven’t forsaken BambooInvoice, just had lots of other neat stuff “on my plate”.  Anyhow, my taxes are due for the quarter, and I needed to figure out how GST I’ve collected, so that I know how much blood the government wants to squeeze from me.  Seems as good a time as any to add that functionality into Bamboo.  So under the reports section I’ve added a new quarterly report tool.

reporting tool in BambooInvoice

The 4 quarters are hard-coded dates (that might be configurable in a future version), but notice the “Custom Date Reports” option?  Yeah, I think that’s ugly and unelegant also.  So I’ve been trying to think of a way to allow the end user to gracefully select their date range besides a clunky text input.  Pop up calendars seem like an obvious candidate, but they seem so obtrusive for what I want. 

measuremap interfaceThe measure map slider seemed absolutely perfect, but after I implemented it I realized how limited it is in an application like Bamboo. Firstly, how do I set the bar?  Only for this year?  What if I want to run a query starting from 3 years ago?  Secondly, it’s hard-coded at 120 data points.  Who knew?  And currently it is powered by an XML file.  It wouldn’t be too hard to convert that to a database call, (heck, they even provide the .fla source files), but now I’m trying to change the tool fundamentally, and it isn’t even really appropriate to start with. Too bad, since the guys at Adaptive Path did some great work on that one.

So then I set about to find a Scriptaculous equivalent… but I’ve not yet turned up anything notable.  There are about a billion examples of using javascript sliders, but nothing that I found that worked nicely for dates.  I’m debating building my own, but that seems like an awful lot of work, and you know, good programmers are lazy and dumb.

So my question is - what is the most elegant way to build that interface?  If you have any suggestions or pointers or links, please leave them in the comments!

BambooInvoice 0.76 released

BambooInvoice

Tonight I quietly released BambooInvoice 0.76.  On the front, it isn’t much to get excited about, but it does feature an upgrade to CodeIgniter 1.5.3.  What is noteworthy about that is that 1.5.3 isn’t out yet - readers of this blog and Bamboo users are front of the line on this one ;)

It is mostly a series of bug squashes, but I did enhance the reporting functionality (pretty minor). 
BambooInvoice reporting window
What will be neat if I can find the time to build it is the graphing and charting functions that I’ve started.  There are a couple of new model functions in invoices_model to allow for those now.

If you are a Bamboo user, then take it for a test drive and let me know what you think!

Internationalizing your application cannot be an afterthought

BambooInvoice has been released for almost a year now, and I have to say that its picked up much more momentum then I ever thought it would.  The lowly “proof of concept” application has grown so much.  I have no idea how many people use Bamboo to keep their invoicing straight, but I do know that those who choose to use it are a very diverse group.  We seem to run the gamut from hard-core developer to freelance writers.  I’ve been contacted by artists and programmers, designers and architects (well ok, only 1 architect).  There are “Bamboo-ers” in at least 7 countries, and at least 5 languages.  And if my “request for translators” post showed me anything, its that there is interest there for many more.

But now I’m up against a hard decision.  I desperately want to enable users to use Bamboo in their native languages - and not force English on them.  But I’ve learned a huge lesson here about software development.  Namely, internationalizing cannot be an afterthought as it’s just too difficult.

I couldn’t get BambooInvoice installed on my Macbook

I only wish this story was an April Fools joke.

I’m still in the process of moving everything over to my Macbook.  I’m nearly there, but one of the lingering tasks has been getting my invoicing system (BambooInvoice*) up and running properly.  I’ve been putting it off, mostly because I’ve got so many other “more important” things to do.  What could be more important then collecting money you ask?  Um… well… actually I got nothing - I guess its just a case of putting off my own stuff while I get other obligations out of the way.

Today, I had a chance to start migrating that stuff, and so at 4 o’clock I turned on the Dallas/Phoenix game (go Steve Nash!) and started tinkering.  As it turns out, I wouldn’t finish until nearly 7 o’clock.  As the author of Bamboo, I’ve installed it literally dozens of times on many, many different environments.  I figured this would be a 30 second process, then another 30 seconds to migrate over my data and I’d be done.  Unfortunately, things never go that smoothly do they?  The opening page loaded up, but no stylesheets would render, no images were visible, and darn it… the links didn’t work. This is the first CodeIgniter site I’ve set up on my Macbook, so I figured it was probably just a little setting somewhere.  No problem, let’s go down the list.

International BambooInvoice

Since BambooInvoice started its life as a “scratch my own itch” project, it seems to have picked up a life of its own.  Let me first of all say that I’m grateful for everyone who is using it, and especially those of you who have offered feedback and suggestions.  (But not those of you who have pointed out bugs :))

In the last little while, there have been several requests for languages other then English, so right here, right now, I hereby promise that the next release of BambooInvoice will be fully internationalized.  If you use Bamboo, and would like to contribute to the improvement of it, I’d be honoured if you’d help me out with translations.  So I’m hereby opening the first official BambooInvoice translation drive.  If you speak a second language (strongly) and would like to help out, please leave a note in the comments of this entry and I’ll contact you.  I’m hoping to start the move early next week (March 12-15) and hope to have a first beta version available by the end of March.

So, Parlez-vous francais? Hablas espasol? Parlate italiano?

BambooInvoice 0.75

There''s a new version of BambooInvoice up and live at http://www.bambooinvoice.org.  Its the humble 0.75.

I think its a big step forward in user friendliness.  Since I originally released Bamboo as a proof of concept code for Code Igniter, it has been gaining a lot of popularity even amoung non-coders.  For this I'm incredibly impressed, and eternally grateful.  Its so gratifying to know that other people find your work useful.  But due to its humble beginnings, Bamboo suffered from a few "bugs" mostly due to perception differences between how it "should" work, and how it did work.  So this release is a combination of bug fixes, user interface enhancements, and installation improvements.

screenshot of BambooInvoice 0.75