Mar 18 2008

weblogic descriptor

adam

Just so I don’t have to google this again, here is how to fix the weblogic.xml descriptor when you get this message:

library is on the classpath of this project, but is not in the weblogic.xml file

Adding a library reference to the deployment descriptor

1. Select and expand the project in question in the Project Explorer view.
2. Locate the node labeled WebLogic Deployment Descriptor and expand it.
3. Find the node labeled J2EE Libraries.
4. Right-click on the J2EE Libraries node and select Add.
5. Click Browse and choose the library that should be referenced.
6. Adjust the reference information as necessary.
7. Click on the Ok button.


Mar 17 2008

Testing Flex

adam

Flex applications are reasonably easy to write, and they certainly build themselves a lot faster than standard web applications which need a rich user interface. Testing them is a bit of a problem though. I looked as ASUnit initially, but the whole framework was so Windows-centric that I gave up in disgust. I could tell after a very short time that even if I got it working on my Mac there would be no way to run it in an automated build loop.

After that I started playing with FlexUnit. This framework is much more generic and quite simple to use. The most confusing thing about it is that there seems to be a FlexUnit project on Sourceforge as well as Google code and they don’t appear to have anything to do with each other. I couldn’t make head ‘nor tail of the Sourceforge one but the version on Google code, which appears to have some Adobe support behind it was simple to install and use and this article gives quite detailed instructions about how to use it.

Testing in Flex is still not always that easy, even when you have a reasonably easy to use framework like FlexUnit. You still have to write code which can be unit tested. This is the real value of rigorously testing your code. You have to write your code in such a way as it can be tested. When you do this your code becomes more loosely coupled and more highly decomposed. This leads to not only more testable code, but to more re-usable code…”Vive le testing”

Once you have tests you need a constant integration loop to run your tests and keep you honest. Initially we didn’t think this would be possible, turns out we were wrong. Antennae is an open source project on Google code which addresses exactly this problem. A detailed explanation of how to install and use it can be found in the Flex Cookbook. There is a fair bit of mucking around involved, but with a bit of determination you can reasonably easily get your Flex codebase to build and execute it’s FlexUnit tests in a constant integration loop.


Mar 15 2008

Migration Complete!

adam

Ok, my weblog has found a new home. It started life at Voodoo Programming, a domain I let lapse when I began consulting too regularly to do any work there. It then lived a private life on my laptop for a while, it didn’t see a lot of action during that time. Now it has a new home at oneadam. Hopefully I will be a bit more diligent about blogging things again, now that I have my vanity domain, I have been extremely slack of late. I look forward to broadening my blogging horizons, perhaps not just limiting myself to tech tricks and notes to self.


Mar 8 2008

Multiline Labels

adam

Doh, blew quite a bit of time on this thinking that there must be some way to make a Label multiline… there isn’t! Have to use a Text control. Note to self: Google first, think and experiment later.