 |
Wednesday, August 21, 2002 |
Taglib rants. In his taglib rants, Russell is looking at Velocity at a way to escape the confusing way that taglibs are being used. I don't see that helping though. Velocity has the same iterator and switch constructs built into it. Actually, the expression language in the JSTL is very close to Velocity syntax embedded in XML. In JSP 2.0, the expression language starts to look even more like Velocity. I don't think it's the tool, it is just having the disipline to use it correctly and write clean code. [Steve's Radio Weblog]
Agreed. The new EL in JSP 2.0 is looking very similar to Velocity syntax now, just no method invocation syntax. Plus you can disable scriptlets if you want too.
4:49:06 PM
|
|
Hey Charles or this damn subscription script.
...
Yes exactly. That's strange. Here my script, which works for me. Do you try it as webservice or normal script?.
[Gerhard Froehlich]
Thanks Gerhard! I've tried using exactly your script (preserving whitespace as best I can) and it seems to be about the same thing unfortunately. Who knows it might magically start working again...
4:44:16 PM
|
|
There was some discussion last night regarding the use of JMS behind altRMI to make asynchronous calls. Taking the idea further, I wondered if it might be possible to implement asynchronous callbacks using temporary queues. So requests that take a long time, but need to return a response to the user could present a 'please wait...' message, or pop up an alert when the response has arrived, without the client having to poll the server. Some sample code I found here looked a bit like this: Queue tempQueue = qSession.createTemporaryQueue(); TextMessage request = qSession.createTextMessage(); request.setJMSReplyTo(tempQueue); QueueReceiver qReceiver = qSession.createReceiver(tmpQueue); qReceiver.setMessageListener(new MyMessageListener(. . .));
Could be interesting, perhaps. [Pushing the envelope]
That'd work. Remember to call Message.setJMSReplyto(tempQueue) so that the server knows which temporary queue to reply to.
The only problem with this approach is that if the client dies, the reply gets lost. This is often fine in UIs but often not in server centric applications.
If you want to use durable subscription, so that the RPC can continue if either client or server dies and is restarted some time later, then just use a specific Queue for each client. Works fine.
Also you might wanna consider using a correlationID on the message so that you can associate the incoming response to the client with the original state or request information. The correlationID property on a JMS Message is a way to make stateful conversations, rather like using cookies to implement stateful web interactions.
2:50:31 PM
|
|
Hey Charles
I just read your rant on programming radio. Funnily enough, I found it while googling for stuff while trying to figure out how to get the damn rss subscriptions script to work. I think I have to whole heartedly agree. *sigh* [Brett Morgan's Insanity Weblog]
Hehe I needed two month to get it running:
As script:
- copy the script as subs.txt in your $RADIO/macro directory
- insert <% subs () %> into your homepage file (I personaly I created a test.txt under my www directory, added the tag and tried it local, first)
- upload the entire website
As webservice:
- copy the script as subs.txt in your $RADIO/webservice directory
- insert <% ["soap://127.0.0.1:5335/"].radio.subs () %> into your homepage file.
- upload the entire website
Tips:
I have the script not the webservice running.
[Gerhard Froehlich]
Thank you so much for these helpful instructions. Radio reallly should have this as a standard macro.
However I still get this error...
[Macro error: Can't evaluate the expression because the name "channeltitle" hasn't been defined.]
Any ideas? Did you take the subs.txt macro from here
2:15:11 PM
|
|
Automatic Class Diagrams.
Returning to a quest I have been on for a long time:- Automatically generating class diagram gifs under Ant control. What I want is some form of markup that says 'all subclasses of XXX, with immediate has-a relationships' and a gif to be generated with de-tangled lines. I had a go with Clad but it does not seen to work in situ any more. Doxygen had promise but is dificult to script under Ant control. JVision looked good, but lacked decent detangling and is GUI rather than command line. The UI always sucked too. Joe tips Novosoft UML but the downloads page fails five second test. Still looking.
[Part of the problem.....]
I'd love this too - I've wanted this for ages.
I'd like the ability to limit the class diagrams somehow. For example the stuff that pops out of tools like TogetherJ tends to show everything on one picture which can be a bit clumsy.
It'd be nice to use a little XML configuration file to restrict what methods/properties/classes appear on a particular diagram using Ant style includes/excludes syntax. Then we can have different diagrams for different parts of the system auto-generated nicely.
If we can ever get this one figured out, it'd make a mean Maven plugin then anyone using Maven would automatically get it, if they wish, as part of their build.
10:53:04 AM
|
|
Event/Listener pattern. The Event/Listener pattern in Java is a java-specific version of the Observer/Observable pattern. To be honest I find the Event/Listener... [bayard]
I agree, a reflection based Listener Support class could help implement the add/remove/fire methods for listeners. One neat idea would be to allow the use weak references in the ListenerSupport class. That way the listener objects can be GC'd if it they go out of scope. The bean listener pattern makes it very easy to force objects to not get GC'd, especially in Swing UIs etc, so avoiding strong references is often a good idea if you don't want memory leaks.
10:44:06 AM
|
|
JPetStore. Christopher Oliver points out JPetStore, a reimplementation of the classic J2EE PetStore application. Chris is looking at replacing the front-end... [Ovidiu Predescu's Weblog]
I'd be very interested in seeing the difference between a web app done in JSP/Struts and one done in Cocoon. Up until now I've found it hard to imagine using Cocoon for more traditional web apps, its always seemed more of a publishing system to me. I guess it shows I've not used Cocoon that much :-).
10:25:35 AM
|
|
Map myMap = new HashMap(); What if I want a map that survives restarts? Map myMap = new PersistantMap(); //Implementation left to the reader!
[Pushing the envelope]
FWIW it'd be pretty easy to implement a PersistentMap using Axion. For example to implement a persistent table to store the Map information in Axion it'd be something like this... /* create a table for the Map */ Table table = new DiskTable("myPersistentMap", someFile); table.addColumn(new Column("key",new ObjectType())); table.addColumn(new Column("value",new ObjectType())); /* add a row */ Row row = new SimpleRow(table.getColumnCount()); row.set(0, "cheese"); row.set(1, new Foo()); table.addRow(row); /* now lets iterate through the persitent table */ RowIterator iter = table.getRowIterator(); while (iter.hasNext()) {
Row row = iter.nextRow(); Object key = row.get(0); Object value = row.get(1);
}
I've left off the code for creating and Index object on the key column, but as you can see it'd be pretty simple to code. Would make a nice patch to Axion if someone fancies implementing it :-)
9:59:07 AM
|
|
BTW did you know that in JSP 2.0 you can create blocks of JSP code as ciustom tags or as variables and pass them into other JSP blocks. So you could pass the header & footer blocks into a JSP page or custom tag. This might be worth bearing in mind in your 'composite view framework' from a previous post. Is that what the ViewBeans project is gonna be?
[James Strachan's Radio Weblog]
Something along those lines. The general idea being that a web designer designs components, 'pagelets', small chunks of HTML, whatever, with placeholders for the data. Each ViewBean class is mapped to a different HTML component. The page is constructed by pulling the fields out of each bean in a list and merging them with the components. The completed HTML is then appended to the output stream. The therory being that the object graph in memory determines how the page is built. No logic on the page at all. Not quite sure how it will work yet, but that's half the fun... [Pushing the envelope]
Sounds interesting. Do post on your blog when you've more detail. I had a fascinating chat with Chris Berry from E*TRADE on how they do components and composition on their website, its pretty groovy. Incidentally you could maybe use Jelly as a mechanism for embedding logic inside HTML as tags, or turning beans into markup. More on that another day :-). OK enough of the Jelly talk already :-)
9:47:54 AM
|
|
Ooh the Sony-Ericsson P800 looks nice. Am torn between this and the Sharp Zaurus
8:56:41 AM
|
|
IBM GSA.
Who is using Tomcat or Jetty in production. Interesting stuff. Lots of companies seem to be moving away from IBM and BEA to the open source alternatives. [James Strachan's Radio Weblog]
Back when I worked for a new media offshoot of an old media company, we got quoted something in the order of 2 million bucks (aus dollars admittedly) for an install of webfear. The quote came from GSA tho ... [Brett Morgan's Insanity Weblog Zilla]
I'm aware of lots of companies (particularly in finance) who've got WebSphere either because it was part of a consulting/hardware deal or they needed it for mainframe connectivity etc. But of all the folks who have WebSphere, I've yet to meet anyone at a company who actually uses it as a web container. I guess its not suprising, IBM do tend to be at least a year or so behind the latest Servlet/JSP specs...
8:36:26 AM
|
|
© Copyright 2007 James Strachan.
|
|
 |
 |
 |
 |
August 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 |
Jul Sep |
|
 |
 |
 |
 |
|