Simple and Clean
Beefing up your Trails app
A while back, Chris Nelson introduced the Trails web application framework, an admittedly Rails-inspired system for pulling together the basics of a web application -- putting a web interface atop CRUD database manipulation -- with a minimum of fuss, hassle, or heavy lifting.
The trick with some simple frameworks is that they end up being too limiting. Fortunately, Trails is more sophisticated than it might appear at first glance. As Chris puts it:
To steal a great quote from Larry Wall, the inventor of Perl, Trails is designed "to make easy things easy and hard things possible." I hope I convinced you last time that easy things are indeed easy. Now it's time to look at some of the features that allow you to build a real application.
In our Feature Article, Further Down the Trail, Chris shows how to create one-to-many relationships, customize the order in which things are displayed, customize the kinds of widgets used to present editable items, and how to validate user input.
In Projects and
Communities,
the SwiXml project is a small GUI generating engine for Java applications and applets. GUI's are described in XML documents that are parsed at runtime and rendered into javax.swing objects. Swing programmers can start writing descriptors without learning a new XML dialect, as class names translate into tag names and method names into attribute names.
The newly-released Mac OS X 10.4.3 update apparently fixes Eclipse bug 95475, "Eclipse get progressively slow under Mac OS X 10.4 (Tiger)". One comment in the bug log is typical of widely-reported experiences with 10.4.3: "I can confirm that the fix works. My Eclipse was running horribly, every time. After upgrading the OS last night it appears to be normal."
The latest java.net Poll asks "How often do you write Java Native Interface (JNI) code?" Cast your vote on the front page, then visit the results page for results and discussion.
There are more JavaOne 2006 suggestions in
today's Forums. In
Re: Desktop, flozano writes:
"I think Java apps need to pay more attention to packaging, and JavaOne could help a lot to spread best practices and unite people to define standards in this area. You should invide people from JPackage and Debian to help on this. It's not ok to have dozen copies of the same libraries (like Log4J) around my system, because each and every app has it's own lib folder with third-party jars they deppend on. Besides eating up disk space, this prevents us from getting class code sharing and so from running many Java apps concurrently. It's also not ok to have each app install its own JRE and sometimes one prevents the other from working properly. I'm tired to fix Windows registry, environment and manualy erase Java exes and dlls from windows\system folders. We need something alongside the Linux packaging system, maybe integrated as a new JWS."
Mixed feelings prevail in the Book Club discussion of Beyond Java. In
Re: Chapter 1: Owls and Ostriches, rickcarson says:
"It is interesting to see someone who has written Java books lose interest in the language. But is there something genuinely 'wrong' with the language, or do they just need a change, some fresh air? I think that Java is still evolving, some good (annotations), some bad (generics), some in between (autoboxing seems like a good idea but I have recently seen some posts about nasty problems it can introduce with things like == ). Which is interesting. Up till about 1.3 I pretty much whole heartedly agreed with everything that went in (particularly 1.2 was a good step forward). Subsequently I do find myself a lot more in the 'conservative' or 'grumpy old men' camp."
When Vikram Goyal says I want a piece of the pie in today's Weblogs, he's talking about action in the J2ME space: "While everybody, and I mean everybody, is talking about the coming death of Java and the demise of Struts, nobody seems to be realizing that their is a new frontier on the Java horizon. Java on the mobile phone is making big money."
In the announcement JAX-WS Project Created on Java.net, Doug Kohlert writes:
"A new JAX-WS project has been created on Java.net. This project is for the reference implementation of JSR 224 that Java API for XML Web Services."
Simon Brown addresses some feedback to his webapp series in
Comparing webapp frameworks : Why?:
"'Imho this is a complete waste of time and it will be another biased comparison without any real use whatshowever.' So, why am I doing this?"
In Also in
Java Today,
"High-volume database traffic is a frequent cause of performance problems in Web applications. Hibernate is a high-performance, object/relational persistence and query service, but it won't solve all your performance issues without a little help. In many cases, second-level caching can be just what Hibernate needs to realize its full performance-handling potential." John Ferguson Smart's Speed Up Your Hibernate Applications with Second-Level Caching examines Hibernate's caching functionalities and shows how you can use them to significantly boost application performance.
Is a Struts-based web application completely testable? You can apply DbUnit to the database and JUnit to your business logic, but the Struts actions themselves have proven a gap in testability. In Test-Driven Development Using StrutsTestCase, John Ferguson Smart writes: "testing Struts actions has always been difficult. Even when business logic is well confined to the business layer, Struts actions generally contain important data validation, conversion, and flow control code. Not testing the Struts actions leaves a nasty gap in code coverage. StrutsTestCase lets you fill this gap."
In today's java.net
News Headlines :
Registered users can submit news items for the
href="http://today.java.net/today/news/">java.net News Page using our
news submission
form. All submissions go through an editorial review before being
posted to the site. You can also subscribe to the
href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
feed.
Current and upcoming Java
Events :
- November 1-4, 2005 - Enterprise Java Architecture Workshop: San Francisco
- November 4-6, 2005 - Lone Star Software Symposium 2005: Dallas Edition
- November 8-10, 2005 - JavaOne Tokyo 2005
- November 11-13, 2005 - Rocky Mountain Software Symposium 2005: Fall Edition
- December 7-10, 2005 - The Spring Experience 2005
- December 10-11, 2005 - Weekend With Experts
- December 10-14, 2005 - ApacheCon 2005
- December 12-16, 2005 - JavaPolis 2005
- January 9-12, 2006 - Enterprise Java Architecture Workshop Mexico
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e"> events submission form.
All submissions go through an editorial review before being posted to the
site.
Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the
href="http://today.java.net/today/archive/">java.net Archive.
Beefing up your Trails app
- Login or register to post comments
- Printer-friendly version
- editor's blog
- 375 reads





