Plugins Update For Blojsom 3
Update: all plugins are now available for download from Source Forge.
I’ve finished updating most of my plugins to work with Blojsom 3, they’re currently in testing on both this blog and Melbourne Photoblog.
If you want to try the SNAPSHOT versions on your Blojsom 3 installation, you can download them temporarily from my server (I’ll add the released versions to SourceForge later on): blogtimesplugin-0.2-SNAPSHOT.jar, galleryrplugin-0.2-SNAPSHOT.jar, gravatarplugin-0.2-SNAPSHOT.jar, param2ctxplugin-0.2-SNAPSHOT.jar, scodeplugin-0.4-SNAPSHOT.jar, trackbackkeywordplugin-0.2-SNAPSHOT.jar.
I’ve also updated the wiki pages for Blojsom 3 plugins: BlogTimes Plugin, Galleryr Plugin, Gravatar Plugin, Param2Ctx Plugin, SCode Plugin, TrackbackKeyword Plugin. The source code is available at Google Code SVN, use Maven 2 to build the packages.
Overall, there isn’t much impact to my plugins with the change of Blojsom plugin API in version 3 compared to Blojsom 2 apart from method signature changes and some new events. Most of my effort was spent on adding unit tests which paid off when I started testing the plugins on a real Blojsom 3.0 installation and needed to 1) modify the configurations implementation, 2) add event broadcaster, and 3) change the event handling.
There were several minor improvements, code cleanup, and library dependencies upgrade (Flickrj for Galleryr Plugin and JCaptcha for SCode Plugin), but with only few hours per week spent on these plugins, I had to leave many of them out for later (most notably, I want to add more image engines and introduce audio engine capability to SCode Plugin).
Next on the list would be IpToCountry Plugin. This time we have database storage in Blojsom 3, whereas IpToCountry Plugin for Blojsom 2 was a memory hog where data is stored in a flat file and country search is done in-memory.
Pager Plugin is almost certainly discontinued with the existence of Skip Filter Helper Plugin in Blojsom 3.1, though I can still see the use of pager.vm file integrated with the data from Skip Filter Helper Plugin to generate the page navigation, maybe this can be done via a macro.
MySQL Dump Export/Import And Table Name Case Sensitivity
Before Blojsom 3, I could get away with moving my blog content from my web host to my home environment (and vice versa) simply by moving the text files. Now that I’m using MySQL for Blojsom 3, I figured that the easiest way is to use MySQL dump.
Export to the dump file:
mysqldump -p -u [username] [dbname] > [dumpfile].sql
Import from the dump file:
mysql -p -u [username] [dbname] < [dumpfile].sql
This might not be a good solution if you have a large amount of records, but that will do for me for now. It’s also easy enough to delete the irrelevant bits from the dump file and only move the content you want.
All went well, until I started deploying Blojsom 3 to my web host which is running Linux (I use Windows at home).
Dec 09 06:38:13 ERROR [Thread-1] util.JDBCExceptionReporter - Table 'dbname.Blog' doesn't exist
Blojsom’s .hbm.xml files specify all table names to be MixedCase, and strangely when I set up the tables using blojsom-full-initial-data-mysql.sql (which specifies MixedCase table names as well) on my Windows environment, the table names are created as all lower case, which then ended up in my web hosting environment as all lower case again and then Hibernate complained about case sensitivity.
Not wanting to rebuild the tables again, I changed the .hbm.xml files to have lower case table names. It was quick, but thinking of it now, it’s definitely going to cause me grief in the future when I need to replace those .hbm.xml files if someday a Blojsom upgrade requires them to be replaced.