Brett Morgan's Insanity Weblog Zilla : Days of our lives. Honestly.
Updated: 24/11/2002; 11:59:41 AM.

 

Subscribe to "Brett Morgan's <Strike>Insanity Weblog</Strike> Zilla" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Wednesday, 2 October 2002

Code Weaving

XRAI

This one's a new idea from me. You already know that .Net provides a runtime-based system for accessing attributes (@tags), so you can simply do something like anobj.getClass().getAttribute("ejb.bean") for example, whereas in java you read an xml file, and XDoclet is a compile time system which reads attributes. JSR 175 works on a runtime system, but for now what do you think about a simple simulation of a runtime attribute access API? So the idea behind XRAI is a post-proccessor ant task which reads source code and modifies the compiled classes with BCEL and injects some static fields to classes. It injects things like private static final Attribute[] attributes = new Attribute[]{new Attribute("ejb.bean", ...)} and with a naming convention for method level tags too. You'll be able to access the tags with an API like this: AClass.getAttribute("ejb.bean"). Looks very simple and feasible imho. Ideas?

Ara.
[Memory Dump]

Superb. This was something I was thinking of at the weekend, how to implement .net style attributes in Java. I was thinking XDoclet or QDox would be the way to go as far as processing the attributes, but was stuck on how to weave them into the code. I initially considered extending the class with a dynamic proxy (I seem to be seeing them everywhere I look these days), but that would only work for interfaces. BCEL could well do the job, but how would you go about injecting the methods into the API? I'm curious. [Pushing the envelope]

I know I shouldn't mention it in this crowd, but you did say code weaving. Have you picked through the latest AspectJ 1.1 stuff? They seem to be working on some interesting code weaving technology which will allow them to delay the weave till anytime until class load time. Could be a very useful source of inspiration. IIRC it is using some part of the eclipse bundle of stuff.
11:05:15 PM    


Scheme, meet Namespaces

Jelly and SOAP.

Jelly and SOAP. Having been playing with Jelly a lot recently, I have taken a great liking to it. I have provided patches... [moatas]

Nice work Jim! Am looking forward to playing with it.

Alot of SOAP toolkits like Axis take the typesafe Java code approach of binding web services to Java APIs. This is one valid approach. I'm hoping that Jelly can be used as the other; working with any web service via XML and XPath rather than using typesafe Java APIs. i.e. using Jelly to script web services.

Extremely minor comment about your example. You can just use ${soap} to refer to a variable; no need to use the full directive of <j:expr value="${soap}"/>.

[James Strachan's Radio Weblog]

Let me get this straight - you guys are building soap clients effectivly by hand, in the middle of your script, using namespaces for seperation of data and code?

Man the schemers would be impressed - you guys are effectivly ducking the whole quote/unquote issue. Fun. Now I just need to unknot my brain...


10:58:42 PM    

Is Java past it?. Is Java passed its prime, and is this a problem? [itymbi ...]

A great little rant about why programming languages only really become useful when they get "complex". It's the libraries stupid. Anyone can do a small toy language. Doing a reasonable language with all the features everyone wants is reasonably hard. Writing all the libraries just takes forever. Maybe that's why java took five years to really bootstrap. And, honestly, I don't like c# chances of bootstrapping before Microsoft kills it.
10:52:40 PM    


JDO vs EJB

Dodging the JDO question.
I attended this J2EE shootout. I was the person that asked the question about JDO. [...] I also spoke to some of the other speakers. In general, the people were not knowledgeable at all about JDO, they did not have a JDO solution to offer, so they dodged the question. I also got the impression that these EJB vendors simply viewed JDO is minor competition. The fact that JDO can be used with their existing products seemed surprising to some of them. [JDO expert Dave Jordan, from a JDO Central thread].
[Blogging Roller]

Way back when I was working for a company called News Interactive we went on a BEA course. The instructor related a story where he high lighted the fact that inside Sun the EJB and JDO groups were basically at war with each other. I have no idea whether this was true/false/a complete fabrication.

To give you an idea of how long ago it was, the training was on WebLogic 5.0, with much huffing and puffing about the soon to be released 5.1. Dude, I'm old.


10:44:24 PM    

First day on my new job at Lecando. Pretty cool. Mucho open-source, 100% eXtreme Programming (you know, pair-programming, test-first, continous integration and so forth). Pair-programming will probably take some time getting used to but it seems okay, especially at the first day when there's plenty to ask about and you're not socially initiated. Uh, and isn't e-learning the Next Big Thing? :-) [jutopia]

Colour me jealous. Congrats anyway. :)
8:53:12 AM    


Javalanche has started rumbling. Hey, if you're not on Rafe's Javalanche mailing list, get on it! I subscribed a few months ago but haven't seen any traffic until last week, when someone posted a question and it has since sprung to life. It's for Java webapp developers. [kief.com]

It's sad when you realise that you are surfing for places to find more info to feed your 'blog. ;)
8:44:33 AM    


Unix sites. This is just a few generally useful Unix links, especially Solaris, which I'm collecting since I've plunged into running a passle of busy Sun boxen. [kief.com]

Good God, that post brings back memories. Heh.
8:43:47 AM    


Ambiguity

QDox AFAIK acts like a SAX parser, xjavadoc is like DOM...
Ara. [Memory Dump]

Actually it supports both ways. Generally users talk directly to the DOM like object model of the source tree. However the event stream is also available in case you want more advanced features (such as a custom object model, fast indexing, etc).

[Joe's Jelly]

Y'know Joe, you should really define the object of your statements. Tis only cuz I know that you are the author of QDox can I infer that we are talking about QDox here ...
8:39:19 AM    


Tradeoffs

Everyone seems to run full-fledged J2EE containers with Servlet/JSP engine integrated with EJBs on the same machine. I guess this makes sense from a performance standpoint but it seems to me this doesn't give you very good security... [Otiose Cognitions]

I must admit I'm a great believer in the onion model. Lock down ports at the router. Use iptables, or equivalent, to lock down ports on the machine. Be sane about your file system permissions. I also understand the argument where the web server should be in the DMZ with no business logic on it, effectivly making it a dumb client.

But can anyone afford the hardware for that level of security in this day and age?


8:37:03 AM    

Radio munching

First there was aggregator table busters. Now I am getting forms in my RSS feeds. Then of course there is the #prefs.txt breakage. Geesus. Radio != Robust.

[Later...] Will writes:

Re Radio != Robust, I like definition #4 here: http://www.dictionary.com/search?q=robust. When I hear "robust" applied to technologies, I always think of a robust smell, like shit.

Uhmm. Yeah. What can you say to that? :)
2:36:08 AM    


RSS from Blogspot. Does anyone know how to get RSS out of blogspot.com? I saw Rick Hightower's blog get added to java.blogs, but I can't seem to find the RSS feed? [Jason Carreira]

Unless I am mistaken, only BloggerPro generates an RSS feed.
2:33:58 AM    


My interview with Howard Rheingold. I interviewed Howard Rheingold about his new book, Smart Mobs, for TheFeature. Link Discuss [Boing Boing Blog]

It's funny to watch the blogsphere hyping a book that is probably inspired in part by the blogsphere. Then to realize that one's ramblings on said topic are just adding more hype .... Oh well. ;)
2:28:21 AM    


Footy, or how to turn eastern sydney into a battle zone

Weird New Zealand Dog Food Ads.

Now these dogfood ads from NZ are seriously funny. Damn Kiwis. Pity they can't play Rubgy, and will lose the league final this weekend to the mighty Rooster men. 

[rebelutionary]

I think it is time for me to don my honourary kiwi jacket and bet Mike a beer or three over the outcome of the match. It might even make me watch it. :)
2:14:46 AM    


JBoss 3 Doc

New JBoss 3 Get Started Docs. "JBoss Logo"

New JBoss Getting Started docs for version 3.0. Side note, if you like me in developing pjava applicaitons for both mobile and itv; then you need to make sure your JAVA_HOME variable list the JDK version last instead of first so that JBoss's run scripts find the jdk.

If you are using AmbitJ's JBoss plugin for SunOne(FFJ4); then you will need to comment out, ie rem the pause statement at the very end of the run.bat script. [ShareMe News]

A beta 133 page Quick Start guide to JBoss3.0. Tell me, who in their right mind calls a 133 page tome a "Quick Start" guide? *grin* I'm going to have to read this at length when I'm awake.
2:08:59 AM    


XDoclet Maven plugin.

XDoclet Maven Plugin

Today I finished implementing the XDoclet Maven plugin. What's intersting about it? Well, the fact that the plugin itself is autogenerated! So I wrote an xdoclet template which generates Maven's plugin.jelly file. The template looks at all tasks and subtasks of xdoclet and also at some special @tags such as @ant.required/etc and generates a plugin.jelly file which supports all tasks and subtasks of xdoclet. So let's say a new subtask is added to ejbdoclet, I should just run the template once again and the Maven plugin is updated and contains the new subtask. Just imagine what a headache it would be if I had to hand code it for all the tasks and subtasks (100+ of them!). James Birchfield also helped me in implementing it, thanks James!

Jelly

While implementing it I had to write some Jelly scripts too. Congrats to James Strachan for such a high quality tool. Looking at some of the tags I felt at home, looks very similiar to xdoclet's own template system, except that it's done right.

QDox

Rickard says:
Brett wondered if Joe should tell the XDoclet project about his new QDox JavaDoc replacement. And the answer is: no, because XDoclet already has a completely rewritten JavaDoc engine, which has been around for some time now, and also kicks booty (which one kicks the most booty I don't know though). The current XDoclet code is pretty fast.

Well, imho QDox and xjavadoc are created for completely different purposes. QDox AFAIK acts like a SAX parser, xjavadoc is like DOM. So whenever QDox comes across a @test tag for example a listener is triggered. It's good for limited cases imho, xjavadoc is for more sophisticated uses. AFAIK Joe has written it to have a fast and trigger-based system for his Mocklet project.

Ara. [Memory Dump]

This post reinforces three things for me:

  1. Always subscribe to the new members of java.blogs,
  2. Be prepared to ask silly questions, sometimes the answers are very revealing,
  3. Just how much information is understood on the basis of similies and metaphors.

Cool.
2:06:27 AM    


Where did Prolog go

Generator and Search Objects in Java.
"Generator classes are defined in the object oriented programming language Java by using continuation-style programming. Generator objects are used to write Prolog-like programs in Java to solve combinatorial constraint satisfaction problems."

Examples include the N-Queens problem and some useful web search functions: "GenURLsFromURL generates the URLs found in the page specified by a given URL, and GenURLcontainsString succeeds if a page contains a given string and fails otherwise." This paper adds Java to the several other LTU postings on generators: [1, 2, 3] (Generator and Search Objects in Java, Lloyd Allison, 2000) [Lambda the Ultimate]

This on top of a discussion I had with a guy at work today. What the hell ever happened to Prolog? My personal theory is that prolog was too hard for the general programmers understand. Unpredictable development and run times. Other theories?
1:15:42 AM    


Dog food. My goodness ... I'm reading rebelutionary before bed and what does he post, but the funniest fscking dog food ads... [javai18n]

Ack. Cough. Fall on floor. Giggle.
1:12:30 AM    


Intel's Huge Bet Turns Iffy.

"Every big computing disaster has come from taking too many ideas and putting them in one place, and the Itanium is exactly that," said Gordon Bell, a veteran computer designer and a Microsoft researcher.

[ideas]

So the reality is that the real market for cpu's is not in the high end market, but the low power end of the range. Both the CoLo houses (with their electricity bills and air conditioning requirements), and home users (with their wishes for laptops that can stay off of mains for hours and hours), are going to drive the market towards the cool end. The only thing that I can forsee changing that will be something like AI that chews tonnes of cpu cycles and does something interesting and useful with them.
1:11:22 AM    


TrayIcon. Interesting tidbit from Russell's Notebook on using the icon tray from within Java.
Project URL: http://jeans.studentenweb.org/java/trayicon/trayicon.html [All Things Java]

Do you have any idea how long I've been looking for an app that does this?!?! Thanks! :)

[Joe's Jelly]

I have no idea where I will find a use for this, but a use I will find. I'm sure.
12:26:05 AM    


© Copyright 2002 Brett Morgan.



Click here to visit the Radio UserLand website.

 


October 2002
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Sep   Nov

Previous Next
blogchalk: Brett/Male/26-30. Lives in Australia/Sydney/Carlingford and speaks English. Spends 60% of daytime online. Uses a Faster (1M+) connection.
this site is a java.blog