22
Dec
2007
Just in time for the Christmas holidays, I give you ActiveObjects version 0.7! This release sports a whole slew of minor performance tweaks and bugfixes, providing better reliability. Also, we’ve greatly increased the number and scope of the unit tests running against the core. This gives us more confidence that the code is indeed as stable as we hope.
Actually, the big ticket item for 0.7 is the introduction of polymorphic relations. This feature is fully tested and stable, so I don’t anticipate it introducing any issues in the coming days as we narrow our focus to 1.0. However, no feature is so well tested as to be certainly bug free under all circumstances. I look forward to fixing any problems you may encounter with the library!
A few minor feature additions:
- Support for persisting enum values
- One-to-one relations
- EntityManager#flush(…) now also flushes the relations cache
Looking toward the road ahead, things are really starting to settle down a bit. The main feature I’m looking to implement for 0.8 is extensible value caching, which should allow you to determine how and where the cached field values are stored. The main use-case behind this is support for memcached, which has been requested a few times and has actually been on the agenda since 0.3. With memcached driving the value cache, ActiveObjects should be almost perfectly scalable.
To that end, it’s also worth mentioning that I did some profiling (using the NetBeans Profiler) using a Wicket-based web application I’m developing on the side. I’m happy to report that the overhead imposed by ActiveObjects is extremely minimal. In each test, the bottleneck was in the PreparedStatement#execute method (in JDBC). Since ActiveObjects generates very streamlined and natural queries, it seems that this is really the minimal execution time possible for such database access. Extrapolating further from this data, and given that the JDBC exec time was avg 40ms, while the execution time in the ActiveObjects API was on the order of 1ms-5ms, we can safely say that ActiveObjects is less than 10% slower than using JDBC directly (compare that to the 50% overhead claimed by ActiveRecord). This “estimate” doesn’t even take into account the many performance advantages offered by ORMs over hand-coded database access (such as relations caching, optimal query construction, etc).
Anyway, enough shameless boasting. As Hibernate has often pointed out, ORM benchmarks are usually worse than useless. The only benchmark which really matters is how well the ORM performs in your application. Try it out, see what you think.
17
Nov
2007
Steve Northover (father of SWT) posted today on his blog news that the SWT team was looking for help with the SWT Cocoa port. As far as I know, they’ve been working on this for about two weeks, and they’ve already managed to get Eclipse to start - but only through the use of not-so-subtle hackery.
Unfortunately for us (the unwary users), Steve says that they’ve run out of time to work on the Cocoa port, given the pace of the 3.4 stream and its rapidly approaching feature freeze (only a few months away). A Cocoa port of SWT is something that would benefit everyone, but most especially those who use Eclipse on Mac. At the risk of sounding melodramatic, it’s probably the most important SWT effort currently in progress. Apple’s been pretty clear that Cocoa is the future of UI on the Mac. Most pundits agree that if Carbon isn’t gone in the next MacOS X release, it certainly will be in the one after that. It is absolutely vital to the future of Eclipse that this port is carried through at the highest caliber.
So, if you’re an Objective-C maven, or just want to help out on a very interesting project, ring up the developers on the platform-swt-dev mailing-list. I’d help out myself, but I know nothing about Objective-C. SWT’s a great project to contribute to, even if you don’t completely agree with its purpose. May the hacking begin!
8
Nov
2007
So I sat down this week with the intention of writing a post about Fuse, the resource injection framework I worked on with Romain Guy. I wanted to get into some of the best-practices of the framework, touching on how it can be applied to a real-world application. To that end, I started out writing a simple demo application with a few custom controls and a UI delegate. The app itself was pretty simple and quite enjoyable, especially as I’ve been doing so much low-level backend work lately.
The problems really started when I tried writing the post itself. I’ve never been able to write a short article, as evidenced by the fact that all of my “brief” explanations on things are thousands of words long. This particular article though seemed to be taking things to the next level. It wasn’t that Fuse is overly complicated or I was just being way too verbose. Rather, I just get so excited about some of the benefits of using Fuse and how it can be best utilized that I got a bit carried away. Somewhere around the 2000 words mark, I decided that maybe it was a shade too long for a proper blog post.
So I finished the article in Live Writer, then used it to generate the HTML I needed and sent the whole kit-and-kaboodle off to my old employer. It took a bit to get everything sorted out, but as of this morning the article is live and featured on the front page at Javalobby.
I won’t waste your time by attempting to summarize the article here. But if you’re looking for some more info on Fuse, or just want a decent read on techniques for creating custom components in Swing, this article should give you some pointers. Enjoy!
Easier Custom Components with Swing Fuse
7
Nov
2007
Well, I did it again. I pushed out 0.6 with a critical (and fairly obvious) bug. Basically, it involved the way I was handling column names and MySQL in result sets. Thus, 0.6 probably won’t work with the 5.1 version of the MySQL JDBC connector. :-S My bad.
Anyway I’ve fixed the bug (thanks to Zach Cox) and included the fix in a minor release on the site. So if you’re interested in trying ActiveObjects, you really should use the (now available) 0.6.1 release rather than 0.6. Enjoy!
30
Oct
2007
As a minor side-bar in this (hopefully) noise-less blog, I’d like to announce the release of ActiveObjects 0.6. If you could care less about ActiveObjects and/or random announcements about it, please feel free to completely ignore this post.
ActiveObjects 0.6 is the most stable release yet (hopefully). With this release, we see the rise of RawEntity, a superinterface to Entity which allows for greater customization, particularly in the area of primary keys. Most developers will never need to even be aware of this interface, but for those that have such requirements, it should be very helpful. Likewise, this release also allows for arbitrary types to be persisted into the database, through the use of custom classes which manage the mapping between Java type and database type. (hint: this even allows for database-specific types such as PostgreSQL’s MATRIX if you really want them)
Most importantly, 0.6 is the release where I actually buckled down and started writing some documentation. What’s available on the project page right now is still a little sparse, but rest assured this will be rectified soon (not sure when, but soon). The main focus for the moment has been javadocing the public API. This is far from complete at the moment, but all the important (and lengthy) classes are done (specifically, everything in the net.java.ao package). With this documentation, it should hopefully be somewhat easier to use ActiveObjects in a project without resorting to desperate Google searches at the wee hours of the morning.
Most of the interesting stuff in this release I’ve already covered in other posts on this blog, so I won’t bore you by repeating all of it. Suffice it to say, if you’ve been waiting for a more stable release to start playing with ActiveObjects, this is it. I won’t guarantee that the API won’t change at all leading up to version 1.0, but I can say that most of the earth-shattering stuff is behind us. Documentation is in place, and we’ve got a large (and growing) number of tests which are run to ensure quality and stability in the core functionality. Download it, try it out, break it, file bugs, you know the drill. I welcome all suggestions, comments, questions and pro-Hibernate rants.
Download activeobjects-0.6 from java.net