Updated: 17/4/07; 10:47:43.
James Strachan's Weblog
Ramblings on Open Source, Java, Groovy, XML and other geeky malarkey
        

Friday, October 4, 2002

Scripting Java Web Apps. From miceda:

A lot of code in a web application is devoted to glueing the presentation and business logic/data tiers together. Most of this code is dedicated to the same things: validating input, updating the database, deciding where to send the user.

One of the draws backs to using a compiled language such as Java in this scenario is the pain of code, compile, start web server, test, loop.... Seems to me that a scripting language ( jython) would be perfect as the glue between the html and backend components.

No only does the scripting language speed the development cycle but usually the scripting language is simple enough for junior programmers to use and become productive with.

Now I realize that using a scripting language in this area is not a new idea ( tcl and the AOLServer, Perl... ). But it certainly is still very uncommon in the Java web app world and IMO much needed.

I came to this realization about a year-and-a-half ago when I first started working on JPublish. Since then, JPublish has had script actions. I believe that you can take it one step further and not just limit your scripting to Jython, but instead take advantage of IBM's Bean Scripting Framework and allow numerous scripting languages. Currently, for example, I know that Jython, JavaScript and BeanShell all work within JPublish, all because of the Bean Scripting Framework.

Another interesting effect of using scripting languages for writing your glue logic is that you can add action editing and management as part of your Content Management strategy. Thus, actions become a sort of content in your CMS. That is what I have done for JPublish Professional, and it is quite nice to be able to edit your actions remotely with no need to restart the server.

If you are interested in learning more about JPublish, visit http://www.jpublish.org/.

[All Things Java]

Agreed with all of that. Much of the time I find that lots of 'glue code' can actually be described declaratively via XML along with a decent expresion language like XPath or Jexl (like Velocity). The great thing about this is that it makes it very easy to parse, transform, edit, validate your glue/mappings/actions. Its much easier to create user interfaces that create and edit XML than it is to create/edit arbitrary scripting languages.

This concept is one of the drivers behind Jelly. Try to put as much of your glue code into easy to parse declarative XML (rather like Ant does with building or JSTL does with creating web pages or BPEL4WS does for web service orchestration).  Whenever you don't have a handy declarative way of describing your mappings/actions/glue in XML or you want to do something complex, you can mix and match any BSF supported scripting language (JavaScript/Jython/Jacl etc) or use neat bindings for XPath, XSLT, beanshell, pnuts, SQL, SOAP etc.

So I tend to think of Jelly as an uber-scripting engine. Use simple XML where it makes sense or plug and play scripting libraries where they make sense.


5:40:24 PM    comment []

Calling the blog-support Java hotline.

Calling the blog-support Java hotline:

Ever since Java 1.1 file1.renameTo(file2) doesn't work across volumes (ie different unix partitions) - but from within Java you can't tell if the files live on different partitions, the method just returns false. What to do? Is there a commons class or something that will move the file for me? (I'm guessing you have to do it a byte by byte?)

[rebelutionary]

Its early days and doesn't have a website yet but commons IO looks like its got some stuff that might be useful. You can surf CVS here. For example the IOUtil class has methods to copy from an input stream to an output stream etc.


10:59:32 AM    comment []

Java on the Desktop. Gosling quoted: Microsoft provided tools that developers have ended up being forced to use to build desktop software, he said. "And, for lots of desktop developers [Windows] was the only market that actually mattered," Gosling said. "That is, I think,... [jeremiahcode]

Another thought for the day. I'd like to see is closer integration with Mozilla and Java. Mozilla is a great browser capable of viewing any web content very nicely and its cross platform and very fast. Its also got a full range of groovy widgets which are all fully integrated with XUL so its a great client, cross platform alternative to MS proprietary lock in.

So a simple Java API for viewing and controlling Mozilla would be cool; I don't think you can have a decent a graphical front end without a decent browser these days.


10:47:45 AM    comment []

Will open source finally kill off the $1.2 million CMS money pit?. Builder.com: Will open source finally kill off the $1.2 million CMS money pit? [Hack the Planet]

Interesting article. Got me thinking. With open source software like Linux, Mozilla as well as the many platforms like Tomcat, Jetty, JBoss as well as the heaps of great Java libraries and tools out there, its often hard for pointy headed bosses to get an idea of how many users a product has. I guess tracking the downloads is the best counter we've got so far, or counting the traffic on email lists. With commercial software its much easier to track this kind of stuff as people actually buy it.

There's a big difference between how many people download and how many folks actually use something. I wonder if it would be possible to add a little stat-gathering agent into open source platforms like Mozilla, Tomcat, Jetty, JBoss etc. So that as software starts up, every now and then it pings a server somewhere with the IP address and how often its been ran or something. It could maybe give a little breakdown of the open source libraries that are used (Struts, JSP, WebWork or whatever). I guess there's security issues and the possibility of spoofing but if those could be overcome this could be useful.

Imagine if Linux and Mozilla did this by default? We'd be able to say there are X million Linux boxes running and Y million Mozilla users. Right now we've no real idea. It'd be fascinating to get the real numbers. Recent figures of IE having 96% of the browser market seem quite unbelievable.

Being able to say how many users of non-windows and non-IE browsers there are out there would at least encourage web site developers to support standards. Also knowing the real size of the Linux market would certainly help software companies know which platforms to target.


10:32:35 AM    comment []

Just spotted Henri's slides on Jakarta Commons Lang. Jakarta Commons Lang is looking pretty good; I particularly like the Enum stuff and the Builders for creating comparators etc. There's lots of useful methods in the utility classes also.
7:44:52 AM    comment []

Fascinating Stuff
. Ara, James Strachan, Jon (tirsen.com) and Rickard have been discussing some really neat stuff. Today on the Jakarta-Commons list another interesting thread began (look for "[lang] Proposal for *NEXT* version").
Maybe its just the sinus headache speaking, but I see some synergy here! [Vanity Foul]

Agreed. Berin and the Avalon team's ideas on adding delegates to the Java language sounds cool. It'd be nice to unify all the C# style extensions to Java together in one place. Maybe Jakarta Commons Lang is the place?


7:25:36 AM    comment []

Console Plugin for Maven. As a followup to my previous post, I have submitted the Console plugin for Maven. The console plugin allows you... [moatas]

Excellent stuff Jim! Can't wait to use this, I've wanted one of these for ages.

I did create a little Jelly Runner written with JellySwing which runs Jelly scripts which avoids the JVM startup time when executing scripts. I was meaning to get around to extending it to provide an interactive Swing console for Maven to allow you to choose goals to use via a menu or tree. Though I'll be quite happy with your console plugin for a while! Many thanks.


7:06:11 AM    comment []

© Copyright 2007 James Strachan.
 
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




Click to see the XML version of this web page.
Subscribe to "James Strachan's Weblog" in Radio UserLand.
Click here to send an email to the editor of this weblog.
blogchalk: James/Male/31-35. Lives in United Kingdom/London/Islington and speaks English. Spends 60% of daytime online. Uses a Fast (128k-512k) connection.
this site is a java.blog

currently subscribed to:

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. <big>kev's</big> catalogue of this and that.

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. /\ndy's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. /dev/null

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ::Manageability::

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Abe Fettig's Web Workshop

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Absurdities and nonsenses

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. All Things

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. All Things Distributed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Andres Aguiar's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Aslak Hellesoy's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. bayard

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Be Blogging

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Blaug Blawg Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Blogging Pubbitch

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. bob mcwhirter

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brett Morgan's Insanity Weblog Zilla

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Behlendorf's Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Jepson's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Maso's Tecno-Geek Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Bright Eyed Mister Zen

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Cafe con Leche XML News and Resources

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. CapeBlog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Citations for : squishy

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Clemens Vasters: Indigo'ed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Cocoon and more

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Code Feed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Code:Q

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Codito ergo sum

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. corporate eejit

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Coty's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Craig Burton: logs, links, life, and lexicon

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. crazybob.org - web log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Crowbar Tech

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. cwinters.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Darren Hobbs

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. deem

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. deep:code

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dion

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dive into mark

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. DJ's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Don Box's Spoutlet

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Don Park's Daily Habit

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dorodok

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Doug Kaye: Web Services Strategies

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Eclectic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Eric Alexander

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ericfreeman.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Erik Hatcher - Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Erik's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Fast Takes

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Forwarding Address: OS X

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Free XML tools

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Glen Daniels

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Gordon Weakliem's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. graham glass: what's next?

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. gru's logic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. grubbel

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Guido Casper's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. IKVM.NET Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jason Carreira

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Java Testing, Tools, and Engineering

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. java.sun.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. JavaGu(i)(y)

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jeff Turner's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jelly

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jeremiahcode

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jeremy Allaire's Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Joe's Jelly

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Joel on Software

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jon's Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jon's StudioZ.tv Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. josh lucas' Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jutopia

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. kdub's log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ken Bereskin's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Knowing .NET

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. mabo

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mac Net Journal

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. MacSlash

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. manicwave

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mark O'Neill's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Martin Dulisch's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Matt Croydon::postneo

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Memory Dump

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. meta-douglasp

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. miceda

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Michael J. Radwin's blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mike Clark

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mitch Kapor's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mozquito XForms

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Nathan Torkington's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Nicholas Riley's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. nickminutello

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ockham's Flashlight

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Off the beaten track

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ongoing

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Organic BPEL

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Otaku, Cedric's weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Outer Web Thought Log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ovidiu Predescu's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Part of the problem.....

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Patrick Chanezon's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Patrick Logan's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Peter Drayton's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. PragDave

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. PSquad's Corner

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Pushing the envelope

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Raible Designs ~ We Build Web Apps

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Random thoughts

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ray Ozzie's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rebelutionary

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Remus

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Rick Salsa's Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rinkrank

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Rod Waldhoff's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rosewater

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Royle's Random Ruminations

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sam Ruby

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sanjiva Weerawarana's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sean McGrath, CTO, Propylon

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Service Oriented Enterprise

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. skizz.biz

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sklires Skepsis...

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Small Values of Cool

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Spike's GeekBlog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Steve Conover's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Steve's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Technomagica

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ted Leung on the air

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Blue Pill

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Fishbowl

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Mountain of Worthless Information

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Occasional Blogger

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. TheArchitect.co.uk - Jorgen Thelin's weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. TheServerSide.Com: Your J2EE Community Forum

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. thinair

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Thinking About Computing

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Tobiased thoughts

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Tomalak's Realm

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. toolbox

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. transMorphic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Vincent Massol Think Tank

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Weblog for Costin Manolache

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Weblog: Morgan Delagrange

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. WebMink

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Whispering

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. X180

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. XMLhack

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. xpzen.com: what's on my mind

Here's how this works.