Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Scott: Scripting and Java GUI?  RSS feed

 
Michael Wexler
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As some may know, Groovy has some Swing specific syntax, and there are many Swing libraries which are scripting friendly. Does your book talk about this at all? Do you have recommendations for people who like the simplicity of scripting and so need simplicity in coding a gui?

For example, I am a judoscript fan, and some folks have recommended Buoy as a library to make Swing easier. Do you have any suggestions?

Thanks,

Michael Wexler
wexler at yahoo dot com
 
Scott Delap
author
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've looked at Buoy a little but not enough to comment one way or the other. James Strachan and I talked a little about Goovy and Swing at JavaOne last year. From my perspective the one thing I would be careful with is the balance between ease of use and code structure. Especially in a larger application it may make sense to have a more stuctured form design in terms of base classes, builders, etc. If things are quickly scripted together, such a design might not evolve. All that being said as long as you keep application structure in mind scripting things should be fine.

Specifically with the book, scripting isn't on the immediate timetable post 1.0. Seems that communications and deployment are the two most asked about topics and therefore will probably come first. However, the great thing about a SourceBeat book is that I can add things based on reader demand. I'm not looking at only adding 4 more chapters getting to 400 pages and quiting. I see this book as a living resource for desktop development. There is no reason why it might not have 800 pages including a chapter on scripting a year from now.
 
Scott Delap
author
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In terms of suggestions, I've not actively used scripting in the applications I've developed. I'd want to look at things a little more before recommending one technology or another. Sounds like a good question for me to post on ClientJava.com for discussion.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Scott Delap:

Specifically with the book, scripting isn't on the immediate timetable post 1.0. Seems that communications and deployment are the two most asked about topics and therefore will probably come first. However, the great thing about a SourceBeat book is that I can add things based on reader demand. I'm not looking at only adding 4 more chapters getting to 400 pages and quiting. I see this book as a living resource for desktop development. There is no reason why it might not have 800 pages including a chapter on scripting a year from now.


Hi Scott,
May I know how you add those additional chapters into the existing book? Once a quarter of the year or once per half-year? Or does it depend on the amount of readers' requests for a certain topic? Thanks...
 
Scott Delap
author
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well there is no hard schedule but I'm going to try to add a least one chapter a month. There will probably be brief break the next month or so while I write the sample RSS reader using the techniques covered in the first 7 chapters. I'm figuring it will take two chapters to detail how everything has been written and wired together. I'll probably post blog updates and ERP's of the app itself while I'm writing it. I'm also going to try to have more descussion on design patterns (specificially Fowler's Presentation Model) in this chapter. After the RSS app is done, I'll get back to adding chapters once a month or so. I might squeeze in 2 in 6 weeks occasionally if possible. There is are just a lot of things I'd still like to cover. I see no reason why there aren't at least another 250 pages in 5 or 6 months.

There will also be periodic updates to the existing chapters over the time frame. I don't have as much general change to deal with as Matt Raible for instance with Spring. I think this will let me write more new material. However, I already know that Foxtrot is adding asynchronous workers and I'm sure Validation will have some updates in the next few months.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just really think the way sourcebeat works is cool. There is no reason why a book can't evolve over a short time and there is no need to have to wait for a 2nd publishing of the entire book just because a few pages changed. The word Live says it all.
 
Scott Delap
author
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is the idea at the moment. It should really pay off for titles on large frameworks like Spring and WebWork. They have a decent amount of change over a 6 month timespan. Normal publishing can't keep up with this. Which would you rather buy in 6 months a book on Spring 1.1 or Spring 1.3?
 
Denis Robert
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a chance to check out Buoy in some detail. It took me 2 days to create a usable XML + JSR223 Scripting framework around it. I must admit that it's by far the best candidate I've seen to date for that task.

Buoy's redesign of the event mechanism is what really stands out. It does away with listener interfaces, replacing it with a judicious use of reflection. It was pretty easy for me to write code to redirect event listeners to JSR223 compiled scripts because of this.

In addition, it dramatically rationalizes the component architecture, doing away with the plethora of methods in Swing which are there simply for the benefit of backwards compatibility and event-handling (the add*Listener methods), while at the same time preserving easy access to the underlying power of the Swing architecture, by preserving a 1-to-1 correspondence with Swing components.

Spring, Buoy, XML and JSR223 would make a very interesting app architecture, IMHO...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!