AOP, aka multiple inheritance? Rickard’s

AOP, aka multiple inheritance?

Rickard’s recent descriptions of his activities in AOP have been very interesting. From my (probably flawed) understanding, it seems that the runtime behaviour extension framework he talks about bears a striking resemblance to an implementation of multiple inheritance. Even more cool than that, a dynamic, runtime adjustable form of multiple inheritance.

We like that.

In an alternative view, it almost resembles a return to modular, function based programming, where cross-cutting behaviour (such as logging) is encapsulated in a single location, and applied everywhere the application requires it. Interesting.

What I’d really like to

What I’d really like to attempt is a port of MockMaker to .Net. That would be interesting.

One thing I’ve noticed is that porting heavily test-covered code is incredibly easy. It helps that C# resembles Java’s long lost twin brother in many ways. What’s really good is that the test code can generally be copied almost verbatim as it tends to be quite simple, and it lets me drive the production code into existence in the .Net idiom, as I’m duplicating the intent rather than simply pasting Java into C# and fixing all the syntax errors.

Woohoo, two weeks off. What

Woohoo, two weeks off. What will I be doing? Probably sitting behind a keyboard coding 🙂 Sort of an open source busman’s holiday. When I’m not slumped on the sofa that is.

Started contributing to the .Net MockObjects project this weekend. It’s still in the early stages but the fundamentals are there. I can’t take any credit for that, Griffin has gotten off to a great start. All I’ve really done so far is convert the unit tests to NUnit 2.0. Watch this space though.

Following on from where sleep

Following on from where sleep interrupted me…

Having thought about it some more, I’m not sure a dynamic proxy would be needed in this case.  If the app. container wrapped the component object inside a simple non-dynamic decorator object and handed that to anything that needed it, swapping the implementation could still be done on the fly just by changing the decorator’s reference to the implementation.  Wouldn’t be as cool though 🙂

JMX and dynamic proxies.  This

JMX and dynamic proxies.  This could be interesting.  One of the things I’m not fully up to speed on with JMX is how you actually interact with the MBeans.  Having managed, pluggable components is great, but my POJOs (plain old java objects) still need to access the things, and having the entire API exposed in the management interface sucks.  I’m having the seed of an idea, but can’t quite verbalise it yet (not at my best at half-midnight).

Let’s see.  Wrap the component in an MBean, and expose its management properties.  Fine.  Register the MBean in the server.  Expose a management operation that returns the implementation of your component.  (This is where it gets sketchy).  Place the implementation inside a dynamic proxy, and have the application container pass the proxy to any objects that need the component (inversion of control).  Do something with notifications so that the implementation object or app. server itself can be called back whenever a managed property is altered.  Retrieve the new component instance from the JMX server and place that inside the dynamic proxy, replacing the old one.  Any clients that have a reference to the proxy instance should now be calling the new component.  Hot swapping.  Hot damn.

Am I making any sense?

Eclipse – thought I’d give

Eclipse – thought I’d give it bit more of a test drive. Its been
fine, apart from its wierd insistence that non-project source files have to be
in jars. Why can’t I just point it at a directory? And its hugely annoying that
you can’t apparently specify a project source code directory outside of your
project path. My opinion currently is that the SWT widgets make it look nicer
than IDEA, but it has a way to go in ease of use terms. Oh yeah, and it deleted
a whole bunch of property files in my classes directory without telling me it
would, which was nice. [Pushing the
envelope
]

In wonder what really does make it look nicer than IDEA? [Begblog]

On further reflection, its not so much that it looks nicer, as more ‘native’.
Swing apps. can look slightly cartoonish. IDEA isn’t one of them thankfully.
Maybe I just fear change 🙂

Don’t worry about me switching just yet – IDEA has pretty much become an
extension of my hands!

While playing with Webwork and

While playing with Webwork and the JMX-RI it occurred to me to wonder what webwork would look like if it was JMX-ified.  If the action mappings were exposed as managed properties, would it be possible to re-configure the workflow of your webapp on the fly via a browser?  Hmm.  That could be fun.  What about using JMX notifications to make WW reconfigure itself in response to network events?  (Like putting a ‘we’re sorry’ message over a bit of the app. if a db goes down, then automagically re-enabling it when it’s back up).  Is this even remotely possible we ask?

If nothing else attempting to find out should improve my understanding of both WW and JMX.

Its been a morning of

Its been a morning of issues so far:

Eclipse – thought I’d give it bit more of a test drive. Its been fine, apart
from its wierd insistence that non-project source files have to be in jars. Why
can’t I just point it at a directory? And its hugely annoying that you can’t
apparently specify a project source code directory outside of your project path.
My opinion currently is that the SWT widgets make it look nicer than IDEA, but
it has a way to go in ease of use terms. Oh yeah, and it deleted a whole bunch
of property files in my classes directory without telling me it would, which was
nice.

Webwork – A bit fiddly to get started with. The skeleton app didn’t work
initially, it was looking for an ‘xhtml’ directory that wasn’t there. I
eventually found it in the examples folder, and copied it to the webapp,
whereupon it worked fine. From what I’ve seen so far in my dabbles it looks
like there is a lot of good stuff here though.

WebWrock!Test first web-apps once again

WebWrock!

Test first web-apps once again wooohooo![Joe’s Jelly]

Superb. Now all I need is a handy project to use WW on. I feel tempted to write a blogging app. and see how many open source frameworks I can shoehorn into it! Oh, and it’ll need to be scriptable with Scheme, my current ‘just for fun’ language 🙂