Some reader favorites:
EJB fundamentals and session beans
Create a scrollable virtual desktop in Swing
Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API
Re-architecting the Forum's backend improves the application in three ways:
Why JDBC?
JDBC is Java's database API that adapts arbitrary SQL databases to Java and provides a common interface for using them. JDBC
works by providing three Java interfaces -- Connection, Statement, and ResultSet -- which are implemented by vendor-specific drivers. The programmer just plugs in the correct driver and sends the correct
SQL to access the database of his/her choice -- the rest of JDBC usage is essentially uniform.
For the purpose of this application, we use the simple message database structure, shown next, which we will access via JDBC calls to the Windows NT 4.0 machine that hosts it.
| Thread | Sender | Subject | Article |
This database is a quasi-relational database comprised of a single table, Messages. It conforms to the first normal form requirements of flatness and atomicity of attributes, but doesn't have a real primary key. For that matter, it isn't optimized either; the database is just for demo purposes.
Here's a complete listing of all the source code we'll use in this article.
Extending the API
The 1.0 version of Forum's API, as used by Forum and implemented in the ForumComm client communications library, looks like this:
Hashtable loadAllThreads () -- Loads all threads defined in server's config file.Vector loadThreadArticles (String t) -- Loads all articles in thread t.boolean postArticle (String art, String t) -- Posts article art to thread t.
Free Download - 5 Minute Product Review. When slow equals Off: Manage the complexity of Web applications - Symphoniq
![]()
Free Download - 5 Minute Product Review. Realize the benefits of real user monitoring in less than an hour. - Symphoniq