Git Workflow
Posted on 23. Aug, 2011 by todd.
One of the fellows at work asked me to jot down how I use git on our projects. It seems there are as many different ways to use git as there are git users. This is how I’m using git at the moment, your mileage will vary.
Master Branch
I don’t do any work in the master branch. I do keep this branch quite current with the state of trunk in our svn repository. When I’m in the office I’ll do a
1 | git svn rebase |
to get the latest bits and to keep current with what other folks on the team have been working on.
Feature Branches
This is probably my favourite feature of git and something I knew I was missing in svn that I tried to make work with changesets but it always felt clunky. I usually have at least one fairly substantial feature that I’m working on at any given time. These feature branches tend to be fairly long lived at least a week, possibly more. I create a feature branch using a
1 | git checkout -b feature-name |
I don’t keep my feature branches up to date with the trunk. The reason I do this is to keep my development work totally separate from what other folks are doing. I only want the commits on this branch to be related to the feature I’m working on. This gives me much more flexibility when I finally want to integrate this back into the trunk. It may be a bit more work to do the merges, but I tend to be in very specific areas of the system that other folks don’t tend to be in so the merges are generally pretty painless.
When I actually want to merge a feature branch these are the steps I go through.
1 2 3 4 | git checkout master git svn rebase git checkout -b feature-merge git merge feature-branch |
At this point I have a standalone branch that is at the trunk with my feature branch merged in. If there were any conflicts, I would fix them in this integration branch. Once any conflicts are resolved I’ll fire the completed feature into subversion with a
1 | git svn dcommit |
And if the feature is “done” both the feature branch and the integration branch get deleted with a
1 2 | git branch -D feature-branch git branch -D feature-merge |
Why the extra branch? If the merge gets really messy then I can just throw away the feature-merge branch. I’m sure I could accomplish the same thing by using git reflog and a reset but this approach just feels safer to me. This is purely a mental thing and nothing to do with git. In my head I’m thinking “ok, I’ve got this branch here and the trunk there and I want to merge them together over here”. If the wheels falls off I simply git branch -d my feature-merge branch and I’m back to where I started.
Bugfix branches
My workflow for doing bug fixes is similar to the feature branches except these branches tend to be very short lived and I don’t go through the extra integration merge step.
1 2 3 | git checkout master git svn rebase git checkout -b bugfix |
hack, hack hack
1 2 3 4 5 | git commit -m "fixed some bugs. created some other ones" git checkout master git merge bugfix git svn dcommit git branch -d bugfix |
These branches are very short lived, maybe an hour or two maybe as long as a day so the chances of conflicts are low.
Patching back into release branches
It’s pretty common for a bugfix to be patched back into at least one release branch in subversion. Sometimes, this may be more than one. Again, this is something that is really easy with git.
Typically I’ll fix the bug in a bugfix branch created from master. I’ll go through the steps outlined above to commit, merge and fire it back into svn.
The biggest difference with this one is that I need to keep track of the commit hash so I can cherry-pick the commit.
I keep meaning to write a bit of bash/groovy/something to automate this a bit but I haven’t taken the time to do that yet.
After committing from master:
1 | git log --pretty=format:"%h was %an, %ar, message: %s" |
I’ll then copy the hash(es) I need to the clipboard
Next, checkout a release branch
1 | git checkout 7.00.42 |
Then cherry-pick the commit(s)
1 2 | git cherry-pick <hash> git svn dcommit |
Repeat the checkout, cherry-pick, dcommit for each release branch this fix needs to be applied to.
Other useful bits
1 | git reflog |
Git reflog keeps track of the goings on across branches. It’s saved my bacon a couple of times. This stack exchange post was very useful.
Continue Reading
Late to the git party
Posted on 01. May, 2011 by todd.
Introduction
I’ve been playing with git for a couple of weeks now. I must admit that I’m pretty late to the git party and haven’t really seen much need to use a DCVS for our projects at Entero. We’ve used source control since we started 15 years ago. Initially we started with RCS, yes RCS when all the cool kids were using CVS. From RCS we used PVCS. We don’t speak of the dark days of PVCS.
When we started rewriting our products, I knew we weren’t going to be using PVCS and the choice of a version control system was really important. I hadn’t used CVS much but to be honest, it wasn’t getting rave reviews at the time. There was this new upstart VCS called Subversion that was supposed to fix all the issues with CVS. We’ve been using Subversion since November 2003. Subversion has been one of the technologies that has just worked. We have a number of repositories hosting our projects. Our two main products are large. EnteroOne has 38,362 versions as of this writing. Within this set of versions, we have 786 tags and 81 branches. In any given sprint, we have have about 20 people committing content to repository.
It is from this context that I’m coming to git.
git
My first exposure to git was at Java Posse Roundup 2009. There was a fascinating discussion around managing technical debt.It was within this discussion that a number of folks were talking about git and mercurial and how revolutionary they were. As is normally the case when developers are excited about a new technology, they typically talk about the most ‘advanced’ features. The features that advance the state of the art. In the case of DCVSs these concepts were discussed
I remember thinking at the time (and to a certain extent still), that while these features are certainly powerful, what chaos would they introduce into our development process. The notion of developers trying to co-ordinate changes without a central server quite frankly scared the bejuzus out of me. Why would I want to mess with a process and a technology that has served (and continues to serve) us very well?
I think I’ve come to the conclusion that there is room for both git and subversion in our process. There are a number of great features in git that certain developers on the team would find very useful. However, keeping a central repository that is the one true source of our system still makes sense to me. I know it’s possible to use a model of git as the central repository but I’m not yet convinced that the amount of work to transition the team, build processes and hudson configurations are worth it. Quite likely this will happen over time, but I think the git-svn integration will serve us very well.
Process
It’s probably worth a few words about our process. We develop in one month sprints. We release about once a week to QA. Hudson takes care of our incremental builds where a full set of regression including UI tests are done on each commit. At the end of a sprint, the trunk is branched into a release branch. The release branch undergoes two weeks of stabilization where mostly just bug fixes are applied. The release is then shipped to clients. Not every release goes to every client. Some clients take a bunch of releases in a row. Some will take one or two a year. Release branches live as long as we have a client live on that release. New development is rarely “patched-back” into release branches, but it’s been known to happen.
The team develops on the trunk. We rarely have feature/experimental branches. And of those, they tend to be very short lived, rarely merged back into the trunk in their entirety.
I know other teams can’t work with this model for some reason. I’m not sure why to be honest with you. We have a large code base (well over 1M lines) and have upwards of 20 people per sprint adding code. Things are generally fairly stable (backed by thousands of tests;though we could use with thousands more I’m sure).
It’s not perfect but we consistently deliver releases to multiple clients month after month so we must be doing a few things right.
How I see myself using git
Given the above process, what would using a DCVS like git buy us?
Local History
The first thing is that there are a few of us that work remotely. Some all the time, some occasionally. Having a working copy of the code with history is very helpful. Particularly if that history contains release branches.
Local Branches
Coupled with local history is the ability to have local branches. While historically we haven’t felt the need for feature branches, it is common that I’m working on a few different things at the same time. While not ideal it’s common to have a few issues/stories on the go for any number of reasons. In Subversion/Idea I use changesets to keep the development items separate as possible. This works pretty well but it’s still very easy to inadvertently commit changes from one change with another one. With true local branches this is not an issue. Git’s ability to switch between branches seamlessly is awesome. Related to this local branch concept is the freedom to commit frequently. I tend to commit a fair amount in subversion but even then, those commits tend to be complete pieces of work as I don’t want to break the incremental dev builds. With git, it’s nice to commit more frequently as I’m developing, perhaps an idea isn’t fully baked but is good enough to want to keep around. Having a clean working copy is a very liberating feeling and something that I wouldn’t have thought would make a difference but it does. There is something about not having to think about a bunch of in progress changes in a working copy that may or may not be related. It’s changing the way that I code and I like it a lot.
git svn
For the time being, perhaps a long time into the future, I see the svn repository being the master and any local git repositories as just that, local. As features are developed, bugs fixed etc, they will be committed to the main repository using git svn dcommit. I haven’t been able to figure out if there is an equivilant concept in git to subversion properties. We use bugtraq properties to relate svn change sets to bugs/requests in our bug tracking system.
Git Features that intrigue me
I’m really curious to delve into Cherry Picking and Bisection. As far as I can tell, these concept are unique to dcvs and look very interesting.
I’ve signed up for a day of training with git hub. I’m hoping that a few more aha moments will happen between now and then but a full day of git goodness should help my understanding along.
Reference
Primarily for my own reference, I include the commands to create a local git repository from our svn repo.
- git init (into empty dir)
- git svn init http://[url to root of svn repos] -s
- git svn fetch -r [revno]
- git rebase
- git repack -adf -window 5000 –window-memory=5000
- git gc
I couldn’t run a git gc without first doing the git repack. git would return an out of memory after processing < 5% of the working copy. The values for window and window-memory were derived using trial and error. This was run on a windows/7 x64 box with 6GB of ram.
My local git repository doesn’t have any remote branches or tags in it for some reason. I’ve tried creating the local repo with a -s as well as explicitly specifying the trunk, tag and branch options but in both cases I only get one master branch and no tags.
Update:
It turns out that the reason I wasn’t getting remote branches and tags was that I populated my git repository with a git fetch instead of a git svn fetch. Now I have tags in my local git repository that line up with svn branch/tag points.
Summary
This post has turned into more of a ramble than I would have thought. It’s still early days but like I mentioned, I’m starting to see the git light. I have no doubt that there are going to be lots of bumps along the way but so far I really like what I see.
Continue Reading
Network Configuration – Home
Posted on 26. Dec, 2010 by todd.
The Challenge
Connect my office and our house to the network. No problem right? Small problem, my office is about 95m (300 ft) in a separate building from the house. I briefly thought about running some Cat 5 or fibre between the buildings but figured a wireless solution would be easier. Well, less digging anyway
The Gear
My Internet service is provided by Rogers over their 3G network. It’s a decent service, definitely not as speedy as a Cable solution from someone like Shaw, but decent enough for typical browsing, Skype conversations and VPN to the office. Rogers provides an Ericsson W35 Mobile Broadband Router they’ve branded as the “Rocket Hub”. It’s a combination 3G modem, 4 port ethernet and Wifi (802.11g) device.
If my office was in the house, this wouldn’t be a very interesting post as at this point I would be done. Plug in rocket hub, connect notebook to wifi network and put feet up. But no, office is in a separate building over 300′ away. Much too far for a wireless signal.
The W35 doesn’t have an external antenna so that’s the first problem to solve. I need to be able to extend the range of the network to the house and typically the way to do this is with an external antenna of some sort. As it turns out a neighbour of ours had an extra antenna that they weren’t using and gave it to me a while ago.
In my tickle trunk of hardware bits, I also have a Linksys WRT54G. This is a wireless router that’s been around for a bit and has the added bonus of having a few different firmware options available for it (more about that later). This router does support an external antenna.
Those components will take care of the office side of things, and even with boosting the signal with the antenna, it won’t be enough to provide a decent signal to the entire house. For that, I have an Apple Airport Extreme Base Station. It can provide Wifi (802.11n) services.
I figured with these four devices, I should be able to get decent coverage for both my office and the house.
The Setup
The first thing I did was disable the Wifi feature of the W35. It’s only role in this configuration would be to send and receive packets from my internal network to the internet.
The Linksys router was connected to the W35 via ethernet. The Linksys router will provide the wireless signal to my office as well as send the wireless signal over the external antenna to the house. After searching around and talking to a few folks that know a lot more about this sort of thing than I do, I opted to upgrade the firmware on the Linksys router to one that exposes more features of the device. There are a couple of them out there, but I opted to use the dd-wrt firmware found at dd-wrt. The primary reason for doing this was to enable WDS.
Once I verified that the wireless network was working fine in the office, I ventured outside and mounted the antenna. It’s a directional antenna and so it was oriented towards the house.
At this point I was able to get a strong working signal on the back deck. As I suspected, the signal wasn’t strong enough in the house.
In the house, I connected up the Airport Extreme and reconfigured it to use WDS.
This article was a huge help.
Once that was setup, everything worked great.
Summary
W35 used to connect to Internet. Wifi turned off.
Linksys WRT54G updated with dd-wrt firmware. Connected to W35 via ethernet (port 1 on both devices) and WDS enabled and configured.
External Directional Antenna connected to WRT54G and oriented towards house.
Apple Airport Extreme configured to use WDS.

Thanks
I wanted to add a special thanks to the folks that chimed in on this thread on the Rogers forum. Both “Chris” and “skinorth” had some great suggestions that helped me piece together this solution.
Continue Reading
GriffonCast
Posted on 16. Sep, 2009 by todd.
I’ve started a new project with the purpose of promoting the Griffon framework and helping build the community around the project. The GriffonCast is a screencast that I hope to produce at least once a month.
Griffon is a framework for building rich desktop applications. It leverages the Groovy programming language and a number of the key features of Groovy including builders. It’s a fantastic effort and while it’s still fairly early days, the team is making great headway with the roadmap. The first episode of the GriffonCast is available for viewing and/or downloading. If you have any comments or would like to see specific topics covered drop me a note or post your thoughts on the Griffon mailing list.
Continue Reading
Java One 2009 – Online Resources
Posted on 09. Jun, 2009 by todd.
The slides for all the technical sessions have been posted at JavaOne Online Technical Sessions and Labs. You’ll need to be a SDN member but it’s free to sign up.
The Keynote videos are also available at General Session Details and Video Replays
There are also a number of audio interviews available at Java One Radio Podcast
Continue Reading
Java One 2009 – Summary
Posted on 07. Jun, 2009 by todd.
Summary
In the blink of an eye the 2009 edition of Java One is over. It was a good conference. Not the best Java One I’ve been to but still very much worth the trip down to San Francisco. The biggest unknown is what impact Oracle’s purchasing of Sun will have on Sun’s direction of Java. There is a ton of momentum in Sun and in the community that Oracle would do well to respect initially. Seeing Larry Ellision on stage speaking with Scott McNealy about investing in the platform is a very good thing. On this, only time will tell. As expected Java/FX featured prominently in many of the sessions. I think this technology has some potential if Sun (and Oracle) stick with it. Sun has a habit of taking things to almost complete and then letting it languish. In many cases the community picks up the loose ends and tries to add libraries, frameworks etc. but that is getting old. There is a lot of engineering resources being placed on Java/FX right now and it looks like it’s tracking pretty well. I’m cautiously optimistic that they can pull this off.
I continue to be very excited about the momentum behind Groovy and related projects (Grails and Griffon). If nothing else, I came away from this year’s Java One with a renewed sense of optimism about the direction of this language and the community behind it. I got to meet a few people that I’ve only ‘met’ through twitter from the Groovy and Griffon community and that’s great.
Areas I’ll be digging into further in the coming days/weeks/months
Teracotta’s Hibernate caching
JIRA
Hudson
Google Collections
Ribbon Component and the Substance Look and Feel
Griffon
Areas that I’ll be keeping my eye on
Java/FX, specifically components and layout managers.
Language Workbench from JetBrains
Here are a few stats:
3 Keynote presentations attended
15 Technical Sessions
7 Birds of a Feather Sessions
Visited with a ‘bunch’ of vendors including a great hour with the guys at Atlassian talking about Jira, Clover and Bamboo
Met up and visited with a number of aquaintences and friends that I’ve me over the years at Java One, Java Posse Roundup and now on Twitter.
Ken, Joe, Carl, Dick, Brendan, Pete, Stefan, Andres, Dave and Fred.
Java One for me is more about the community and the conversation than it is about the technical content.
Continue Reading
Java One 2009 – Day 4
Posted on 07. Jun, 2009 by todd.
Friday Keynote – The "Toy Show"
In what has become an anual tradition, James Gosling hosted a two hour session in which he highlights some of his favorite things by the Java community. It’s a good show and well worth a watch. I was pretty happy to see Brendan Humpries of Atlassian get a Dukie award from James for his fine Clover product. Well deserved indeed. Other highlights for me included seeing a sneak preview of the Java/FX designer tool that Tor (and no doubt a cast of tens) have been working on for a while. The FIRST robotic competition was also very interesting as well. Nice to see an organization working to give kids access to building cool things and learning about engineering and programming disciplines in a fun environment. As well the work being done by Mifos in the realm of Micro Financing (like kiva.org) is very inspiring.
Getting Started with WidgetFX: Open-Source Widget Desktop Platform
WidgetFX is the widget desktop platform developed by Stephen Chin. I’m not 100 percent sure but I think Joshua Marinacci is involved with the project a bit. This widget platform was at least inspired from Josh’s AB5K/Glassitope swing based widget framework. It sounds like the Java/FX implementation makes this sort of thing easier to do than the Swing equivilant. Looks like an interesting project but to be honest I’m not a big user of Google gadgets/Apple’s Dashboard etc. I suppose if there was a bunch of cool widgets that would make my life easier then maybe I would be a bigger fan but it’s not one of those things that I’m that interested in. I do need to have a closer look at the Nabaztag rabbit he had wired up to a widget. Would make a great build monitor.
Defective Java Code: Mistakes That Matter
Bill Pugh, the creator of the findbugs project has presented at a number of Java Ones in previous years. He’s always entertaining and has a ton of great content. He’s currently on sabatical at Google and had a few observations about some patterns that he found. Find Bugs is one of those tools that I’ve looked at a few times but haven’t really done much with. It’s something I want to integrate into our incremental build process but there is the potential of sending the team off into bug fixing mode without any direction.
Bill had some good advice that would make this process easier I think.
- Start with new code. Changes will be fresh in the developers mind and the chance of introducing a side effect into working code is zero.
- As a team, identify the types of bugs you want to concentrate on. We wouldn’t be worried about SQL injection bugs for example but might be very interested in threading issues.
- One approach that worked at Google was after identifying the bugs you want to concentrate on, have a bug fixing day or two or three. Make it a fun experiment with the goal of keeping unit tests running and squishing as many bugs as the team can in a short period of time.
Continue Reading
Java One 2009 – Day 3
Posted on 07. Jun, 2009 by todd.
The New World: JavaFX™ Technology-Based UI Controls
Just prior to Java One the Java/FX team released version 1.2 which includes some of the basic UI components that applications use. (Buttons, textfields, radio buttons, sliders etc.) This session went over the list of implemented components and introduced project Caspian which is the intial look and feel/theme/skin that these components can use out of the box. The session also went into a bit of detail of how some of the new layout managers are implemented. It’s still very early days and the team knows full well that the components they released just before Java One is not a comprehensive list (there is no table, combo boxes etc) and the layout managers implemented are pretty simplistic. There is so much work to do to round this implementation out it’s not funny but there appears to be a huge engineering effort behind this implementation so I echo that I’m cautiously optimistic about this. Sun appears to have their A-Team working on all aspects of this implementation including the designer tool which was previewed this week as well.
Breathe in JavaFX™ Technology
Of all the years I’ve been to Java One, I’ve never taken advantage of any of the Hands-on-Labs. To be honest in previous years there really hasn’t been that much that interested me. I decided this year to change that and sit through a Java/FX one. I figured 90 minutes of going through a tutorial would be a good use of time and if nothing else would give me a bit of expsoure to the language and implementation that up until this point has been mostly theoretical. This was a Bring your own laptop tutorial which required the installation of the latest NetBeans IDE preconfigured with version 1.1.1 of Java/FX. The presenter introduced the three different tutorials that were included, stepped folks through the first few steps and then let folks proceed at their own pace. There were a number of helpers available if participants needed a hand or couldn’t get something working.
The first tutorial was a photo viewer application that displayed a number of photos with buttons to navigate forwards and backwards through the photos. We added various kinds of transitions using Timelines with KeyFrames. The tutorial was really well done but like most tutorials the reasons why a particular implementation was chosen was not explained. It does provide a good set of examples though to dig further into. The NetBeans implementation of drag and drop coding with the Java/FX elements was interesting to see. Code completion needs a bit of work still and as I’ve mentioned I’m not a heavy NetBeans user so some of time was spent just trying to figure out how to do common things in the IDE.
I have the content from the tutorials so it will be something I have a look at in the coming weeks/months to continue getting some exposure to this fast moving addition to the Java platform.
Flamingo: Bringing the Ribbon Component to Swing
Of all the sessions I attended, I think I was most surprised by this one. Don’t get me wrong there was a ton of great content in a lot of the sessions but I guess for this one I didn’t really have any sort of expectations going into it and came away with a sense of ok, here is something I really need to look at.
The Ribbon Component was introduced by Microsoft in the latest version of Office after conducting a huge amount of User Interaction studies. It’s quite a huge change for Microsoft and there have been some negative reactions from users but they believe that this metaphor makes learning and using their products much easier. Kirill Grouchnikov, who is probably most known for his fabulous work with the Substance Look and Feel has been implementing a Swing incarnation of the Ribbon Component. He spent quite bit of time talking about the various elements of the ribbon component (tasks, bands, application menu button, taskbar panel etc.) and how they work together to convey meaning and more important context to the user as they are using the application. He pointed out a blog by Jensen Harris at Microsoft that details the evolution of their implementation. I haven’t had a chance to look at it yet but it sounded very interesting.
Additionally he showed an implementation of KeyTips which, when invoked, show shortcut keys to the components in the Ribbon control. It’s really well done and something that has been missing from the Desktop world for a while.
This one has the potential of changing our UI implementation substantially. It of course needs some careful thought and consideration but I like it and if we can perhaps add it as an adjunct to our current UI implementation that might be the best path forward.
This Is Not Your Father’s Von Neumann Machine; How Modern Architecture Impacts Your Java™ Apps
This session was done by was Cliff Click and Brian Goetz key guys in implementing the JVM. They spoke at break neck speed about the evolution of CPU and Memory architectures over the years and how developers need to be aware of how hardware implementation may impact their code from a performance and reliability point of view. A lot of the content was really only applicable if you’re writing your own compiler/VM but it’s still good to have an idea what is going on under the hood as it were. There was a reference to a paper that sounds interesting called What every programmer should know about memory.
JideFX: Bringing Desktop Richness to the Internet
David Qiao the CTO for JideSoft presented a few ideas about how they hope to bring their excellent set of Jide components to the JavaFX world. He didn’t really have much to show aside from a couple of examples that are very much works in progress. I’m sure it’s hard for component writers at the moment given the pace of development and missing bits with the Java/FX platform but in all honesty I don’t know why he presented anything. It’s much too early.
The Groovy and Grails BOF: With Live Grails Podcast Recording!
Sven Haiges and Glen Smith of the Grails Podcast hosted a panel with Scott Davis, Dierk König, Andres Almiray, James Williams and Danno Ferrin. They took questions from Sven and Glen as well as from the audience. It was very entertaining well worth a listen. I discovered Spock which is a fairly new unit testing framework that sounds very interesting and bears some closer investigation.
Continue Reading
Java One 2009 – Day 2
Posted on 07. Jun, 2009 by todd.
Extreme GUI Makeover (Hybrid Swing and JavaFX™ Technology)
In this session, Amy Fowler, Jasper Potts, Paru Somasheka and David Grieve all from Sun took the Swing application that was written for last year’s installment of the GUI Makeover and added a bit of Java/FX. The idea is that there is a bit of a migration path for existing swing applications to Java/FX.
javafx.ext.swing.SwingComponent is the Java/FX component that can be used to wrap any existing swing component. The resultant object is a Node object that can be added to the FX scene graph. This is a decent approach but the biggest drawback is that none of the core elements for Java/FX (like transitions) can be applied to the contents of these kinds of nodes. They showed the CSS skinning approach that can be taken with Java/FX applications. It’s a good idea to separate the style (colour, font, size etc) from the actual components. Lastly Jasper showed an illustration of a an annimation on the Scene Graph.
It was pretty impressive all in all.
Move Your Users: Animation Principles for Great User Experiences
This session was presented by Chet Haas and Romain Guy. They introduced 12 animation principals that are documented in the book. The principals are related to traditional animation (cartoons) but they are very applicable to computer animation as well. They followed up a description of each of the principals with it’s application in building rich user interfaces on desktop applications. They did a great job. The content is something folks should consider when they’re implementing any sort of animation in their applications even things as simple as a fade transition or a scale. It’s really easy to get this stuff wrong and learning from the masters of animation who have been thinking about this stuff for almost a century could make a huge difference in your application.
The 12 principals are:
- Squash and Stretch
- Anticipation
- Staging (poses, camera angle, focus)
- Straight ahead vs. pose to pose (related to transitions)
- Follow through and overlapping action (objects should obey physical reality)
- Slow in and out (non linear timing)
- Arcs (things generally don’t move in a perfectly straight line)
- Secondary Action (an additional action that gives context to the main action)
- Timing
- Exaggeration
- Solid Drawing
- Appeal
One of the sources for their presentation was The Illusion of Life: Disney Animation
The Magic of the JXLayer Component
This session introduced the JXLayer component which is currently a java.net project. JXLayer is a wrapper or more precisely implements the decorator pattern for Swing Components. It has a bunch of different uses including a very lightweight way of disabling compound components, implementing mouse wheel scrolling as well a many other uses. We use this component in our framework quite a bit mostly in and around our UI security implementation. It’s great and if you write any Swing code and don’t know about this component go have a look. It was also announced in this session that this component is being promoted into JDK 7.
JavaFX™ Programming Language + Groovy = Beauty + Productivity
Dierk König author of Groovy in Action (still the best book on Groovy written to date in my opinion), presented a couple of different approaches to integrate groovy with Java/FX. One strategy is to use Java/FX for client code and then use a REST layer to have the Java/FX client talk to a back end written in Groovy (or Grails for that matter). This approach is pretty clean but you don’t get to take advantage of any Groovy code on the client.
Both Java/FX and Groovy are JVM languages and ultimately emit bytecode from their respective compilers. It is possible to reference Java/FX components from within Groovy but it’s messy. Andres Almiray has a JavaFX builder in the Griffon Project that begins to make this integration easier but it’s still early days.
The short answer is that true integration at this point in time is hard and will get better as Java/FX matures.
Hudson Community Meet-Up
I’ve been looking into Hudson for a few months now and it just keeps getting better and better. The project lead (Kohsuke Kawaguchi) gave a bit of background and some of the current trends of Hudson. The growth of the product and the community surrounding it since last Java One is very impressive. Plugins for Hudson are one of the distinguishing features. Tom Huybrechts from AGFA Healthcare demoed a new plugin he wrote that implements the JBoss Rules Engine (drools) within Hudson. Layered on top of it is a graphical builder for building workflow steps, gathering input at various points in the workflow and a ton of other cool stuff. It was very impressive and something I want to take a closer look at.
Netbeans project integration was also demoed (actually talked about as there was a technical glitch with the netbeans machine/projector combo). It would be interesting to monitor builds from within Netbeans, kick them off etc. but given that we’re an IntelliJ shop it’s not that relevant. There may be some form of plugin for IntelliJ but the web interface is great so I’m not sure we would even look at it.
Griffon in Depth
Danno Ferrin and James Williams gave an introduction to Griffon which is a Grails inspired framework for building Swing applications in Groovy. It’s still very early days with the project however the project team has leveraged all of the great work from the Grails project in bootstrapping the Griffon project. This is one technology that I’m quite excited about. Writing swing apps in Groovy is possible (see this post for an example) however writing a big Swing app would be quite a lot of work. The idea behind Griffon is to put a framework in place to support building Swing applications with the same sort of velocity the web guys are seeing with frameworks like Grails and Ruby on Rails. The fellows demoed a few applications written in Griffon the most impressive one was Greet which is a Twitter client written in Griffon. I wish the fellows much luck with this project and I’m trying to figure out a way I can help in some small way. Swing and Groovy in the same stack makes me very happy
Continue Reading
Java One 2009 – Day 1
Posted on 06. Jun, 2009 by todd.
General Session
- Pretty typical of previous years. Billions of devices, millions of developers blah blah blah.
- Java Store introduced. Strikes me a bit of me too wrt to the Apple App Store. No relevance for Entero.
- Scott McNally and Larry Ellison talk about the future of the platform (with all sorts of caveats about future looking statements). Said most of the right things. Look to keep investment up in R&D plus continue with Java/FX. Cautiously optimistic here.
- Lots of partner demos, nothing too exciting.
Deploying Java™ Technology to The Masses: How Sun Deploys The JavaFX™ Runtime
Good first session. Interesting to see that Sun has the same sort of problems as everyone else wrt deploying content to the desktop. There were a few good practical tips that I’ll want to dig into.
- Pack200
- JNLP additional tags.
Extreme Swing Debugging: The Fast and the Furious
This was an introduction to the java.net Swing Explorer project. This is a project that I’m familiar with but it was good to see the EDT violations feature as well as using the “Player” feature to find painting issues. It’s a great tool to have in your swing debugging arsenal.
Tuesday Afternoon Technical General Session
- Roadmap for JDK 7
- Modularity
- Project Coin (small language changes)
- EE 6
Extending Java™ Technology and Developing DSLs with the JetBrains MPS Open-Source Language Workbench
This was an interesting session for sure. The folks at JetBrains have a tool
they call Meta Programming System Workbench that is used for designing and working with domain specific languages. It built on the core IntelliJ platform and has a lot of really great features. I was thinking we could use it for embedding in our application for our users to build scripts initially. Longer term I’m thinking that implementing our formula pricing model in a DSL is the way to go but am still not sure about that. Regardless, this may be a tool that might make that easier.
- Development environment for building domain specific languages
- Handles compiling and parsing
- Works directly on the AST
An Introduction to Complex Event Processing on the Java™ Platform
This is an area I know nothing about. Complex Event Processing deals with the query and visualization of huge data volumes. Real time systems for things like stock trades or perhaps data that comes from SCADA systems. There is a branch of Computer research that deals with this sort of volume. There is a query language called CQL that is like SQL but has a temporal component to the query language. It also has specific constructs for filtering and aggregation of massive datasets. This content was presented by Oracle/BEA where they touched on their product.
Toward a Renaissance VM
This was a fascinating session by John Rose and Brian Geotz of Sun. They dove into some of the very nasty problems that modern compiler writers are grappling with. The JVM hosts a number of languages and has for quite some time. JSR-292 (Supporting Dynamically Typed Languages on the Java Platform) is the JSR under which this work is being done. I left this session feeling very humbled and grateful that there are some very smart guys working on new VM extensions that are going to make my life easier in the future.
Creating Java™ Technology-Based Applications for Mac OS X: Is It Cocoa or Is It Java Technology?
I love my Mac but am a little frustrated with Apple in the pace that they implement the JVM on OS/X. They are on 1.6 finally but Apple took a long time to get there. Regardless, there are a bunch of folks in the Java community that have stepped in to help making Java Swing apps on OS/X easier. In this session, Deane Richan from the Xito project spoke about a number of strategies for improving the integration of a Java Swing application on OS/X such that the swing app looks closer to a native OS/X application. Good session and a project I want to take a closer look at.
The Collections Connection (Gala Tenth Edition)
Josh Bloch, the creator of the Java collections library has been doing this Birds of a Feather Session for about 12 years (I think he missed a couple along the way which is why this is the tenth one). I’ve been to a bunch of them and always come away learning something new. Josh left Sun to work at Goggle a couple years ago. He is still very active in the Java community and continues to make huge contributions to the platform. This year he brought along a couple of his colleagues from Google; Martin Buchholz and Kevin Bourrillion. They spoke of a few things that might be coming in JDK7 but more interesting (from my point of view) is they also touched on the Google Collections package which adds a number of ‘missing’ collection implementations. It’s something I’ve wanted to take a look at for a while and even more so after hearing about some of the implementations in this framework.
Meet the Java Posse
Of course I’m going to pop in and see the guys do their third annual Podcast from Java One. It was a packed room and the fellows didn’t disappoint.
