David George

An occasional blog

Aspect Oriented Development

I never realized that I was one of the pioneers of Aspect Oriented Development (AOP). However I was randomly browsing the web the other day when I came across this paper from the [http://www.aosd.net/2006/archive/AOSD06-IndustryTrackProceedings.pdf|5th International Conference on Aspect Oriented Programming] in which the paper on using AOP for Performance Management cites my x.Link profiler.

I started x.Link back in late 2002. It uses hooks into the Java JVM classloader to modify bytecode on the fly to provide hooks into the entry and exit of methods. The methods to modify are specified by regular expressions. A bit like AspectJ and Spring AOP.

· 2008/08/20 11:31 · David George

Spring Security 2.0

I've been looking at Spring Security in my free time with a view to integrating it into my Magneato CMS. The Spring approach is based on declarative security. You basically tell the Security Filter what you want to protect with which roles. It handles user logins/logouts and checking the user has sufficient rights to access each resource.

Protecting URLs is a breeze but applying security to methods was a bit more complicated. The only good example of method level security I could find was from Craig Walls but he was working with a standalone application outside of a Web container. I finally realized that you could only apply security to Spring Beans that were injected (or loaded from the application context) into other beans (or so it seems). The other thing that got me was a strange exception when I split the application context into separate files. Any references to Spring Security outside of the XML file where the security elements were declared gave me a: BeanCreationException: Error creating bean with name '_authenticationManager'. I finally had to result to using security annotations.

· 2008/08/15 16:10 · David George

Vélib'

I was up in Paris for a few days last week to sort out some tax affairs with the United States IRS. I'd not been in Paris for four years but had been an assiduous cycle commuter in the city. My daily run was from the Latin Quarter out to Puteaux and la Defense, about 12km. Okay I sometimes did it on roller blades. I was therefore interested to test out the new Vélib' system.

Now citywide free service bike hire is not a new idea. Lyon in France has had a Vélib' system for at least a couple of years. But Paris' ineffectual mayor Bertrand Delanoë likes nothing better than jumping on a bandwagon that will get him a bit of media limelight. You may think I'm being harsh but I had to suffer under the first Delanoë term when Paris' cycle paths degraded under a sea of litter and illegally parked cars.

Vélibs can be hired around the city at 250 bike parks. I took my first bike from la Madeleine outside the Decathlon store and road over to Cherche Midi via the Concorde square and assembly national. You need to be subscribed in the system with a credit card, you can register from a day to a year. A day's registration costs 1 euro but there is a 150 euro deposit if your bike gets stolen.

After registering you get issued with a card with your subscriber number and are given a separate four digit PIN code which you will need to remember. Don't write it on the card because if this gets nicked someone can steal a bike and you will pay for it. Enter the subscriber number and PIN into the meter having first selected the bike number you want to rent. Bikes with red lights cannot be rented, I think they must be awaiting service or something. You can then press a button on the locking post to release the bike. The bikes are generally road worthy but the three speed gears may not work 100% properly, seat post height will need to be adjusted and bells all seem to be Fubar'd. On one bike the seat post quick release was broken so I suggest a visual check of the bike you want to rent. You can always change it at no cost.

The bikes ride well but are very heavy. Around 18kg. I guess this is a compromise as they have to be durable. There has been a problem with people renting them at high parts of Paris - like Montmartyr - then riding them down hill so that all the bikes end up around the Seine. A fleet of lorries cruises around the city moving bikes around the various parks. In my experience you can normally find a spot at your destination to park a bike, otherwise you will need to check out the next park shown on the meter.

Here is the great thing. If you ride for less than 30 minutes, for example Madeleine to Cherche Midi is 12 minutes. Cherche Midi to la Bastille 15 minutes etc. You will not pay another penny. Paris is small and if you avoid the uphill parts like going to the 16th district or Montmartyr, reasonably flat so you can easily get around without paying a penny provided you always return the bike directly to a park. Once the bike is locked you can go to the meter and print out a receipt. It seems to automagically recognize that the bike has been returned.

Parisian friends were raving about the system saying how it had caused a “sea change” in the mentality of Parisians and that Delanoë should be canonized. Well these guys didn't cycle before so have no real terms of reference and I think this is a bit overblown for the moment. However the system was in widespread use but motor vehicles still outnumber bikes at least 20:1 and no quarter is given. I had a couple of close shaves and the Vélib' can't easily sprint out of danger. I wondered what effect Velib had had on existing bike usage. If anything this seems to have gone up, the Velibs giving Parisians a taste for cycling.

The system is run by private firm JC Decaux so one would hope that the bikes and parks will be well maintained. The financing of the scheme is a bit grey - a recent Capital programme on M6 covered the smoked filled rooms where the deals were done. JC Decaux is one of the young Turks of French state capitalism. After the first year the firm revealed that there had been 27.5 million trips with 200,000 annual subscribers and 4 million occasional users. The system is being rolled out into the suburbs.

· 2008/07/22 16:34 · David George

Scrum

Ken Schwaber co-developed the Agile process talks Scrum to some Google engineers. Ken is a good speaker and the talk is pretty interesting and worth giving an hour of your time to. I'm a big fan of these online training videos. It would be very hard to see a speaker of Ken's calibre where I'm based.

For those who don't know scrum, it is project management technique focussed on short iterations cycles and real deliverables and good team communication. Some of the ideas are not new. Anyone who has done project management will know that you need milestones in order to measure progress and that a milestone of the type “deliver working project in 2 years” is pretty useless (yes but we've all worked on those big projects, typified by Brooks in the MMM, where at the end of the massive 2 year cycle nothing working actually gets delivered. Scrum is very useful for managing “internet time” type projects where traditional techniques can prove too rigid. It gives a high visibility of progess and impediments to delivery to both team players (pigs) and stakeholders (chickens) while minimizing the time spent in meetings. Scrum is a good compliment to eXtreme programming.

Here is a rapid introduction to Scrum: http://www.softhouse.se/Uploades/Scrum_eng_webb.pdf.

· 2008/06/06 11:29 · David George

ExtJS

I've been developing with ExtJS recently. ExtJS cross-browser JavaScript library which enables the construction of rich applications using AJAX techniques. Now AJAX is all the rage and I've already done a proof of concept using Direct Web Remoting (DWR) but ExtJS is in a whole different league. It provides a whole gamut of GUI widgets to enable the building of simple forms to complex GUI applications. At RGIS we've recently built an ExtJS front end onto a data browser applications and the difference with the old HTML version is like night and day.

Programming ExtJs takes a bit of getting used to, or rather programming JavaScript does. It looks a lot like the Java I'm used to relies a lot more on techniques like functions passed as parameters. Okay if you've programmed Spring this has analogies. I've been working on a JCR 170 Repository browser for part of my Magneato CMS and I'll post the code later. Of course after all this hard graft I came across the Ext Filetree widget which does a lot of what I want. This is one of the problems with ExtJS at the moment. Although there is a vibrant community there are few tutorials, one of the best is Colin Ramsay's screen cast on DataViews and Uploading. I get the feel that Colin has a good understanding of how to work with ExtJS in an extendable way. The other problem with ExtJS is they can't decide what license it is to be release under with lots of changes and fudged LGPL versions. This is quite destablizing for anyone in the community who wants to use the toolkit.

Resources

· 2008/06/01 11:37 · David George
user/david-george.txt · Last modified: 2008/06/01 11:24 by davidof
Recent changes RSS feed