password
username
Sponsored by CakeMail, an email marketing software.
Newsletter preview

Tuesday, Sept 30, 2008

Ease the Pain of Reporting in Excel

Stop manually importing data into spreadsheets and formatting them - use e.Spreadsheet Designer instead. It's a free, easy-to-use report writing tool with a true Excel authoring environment for automating the creation of Excel files and reports.

Download Your Free Copy Today

Perspective

Protect Your Code: 30-day Protecode Trial



Visit the DZone Tech Library



Be sure and
check out a
No Fluff Just Stuff
Java conference
coming your way!

10/10-10/12 Minneapolis
10/17-10/19 Toronto
10/17-10/19 St. Louis


A Developer's Perspective
Next section
David has spent the last twenty years building enterprise software in databases and middleware, with long stints at Sybase and Sun. David is currently the database architect for the NetBeans IDE, where he is working on using integrated database intelligence to improve developer productivity.

Why is the default answer always a web app?
By David Van Couvering

On one of our NetBeans mailing lists, a new programmer asked a question, how should they build their application that needs to run on ten client machines talking to a MySQL database.

The quick answer was "build a web app."

I just don't understand this. The web app architecture is - c'mon, admit it - ugly for applications that need to have dynamic behavior (e.g. almost every app out there). It was never built for that. HTTP/HTML is a static, document-oriented protocol and markup. HTML came from SGML, which is all about documents and publishing, not dynamic database-driven OLTP applications.

But the browser is ubiquitous. It's the absolute best way to distribute a service out to many people. Its the visual channel into the Internet. So we've worked with it. Thousands of developers have grown up building apps using HTML/CSS/JavaScript, session state, multiple tiers and so on.

But it wasn't always that way. When I was fresh out of school, the browser didn't exist, and we built simple client/server applications. The client talked directly to the database using a database-oriented protocol.

There were issues, of course, the primary one being how to manage versioning and upgrades across thousands of machines, each with their own operating system and versions, some of them sporadically connected (e.g. on laptops). One of the key advantages of the web is that you install it in one place, and everybody automatically gets the upgrade. And it runs on everybody's machine. It's so cool.

But today there is Java (write once, run anywhere) and Java Web Start (auto-upgrade to all your client machines). They are mature and battle tested. If your application is only going to run on the local network, there is absolutely no need to create a multi-tiered HTML/CSS/JavaScript monster. You can use traditional client/server, with rich clients written in Java and deployed by Java Web Start talking directly to your database using JPA/Hibernate/JDBC. You can use the visual design tools in NetBeans or Eclipse to visually build your application. No hacking <table><tr><td> garbage.

Having a middle tier also allows you to disintermediate between the clients and the database, which can give you a chance to improve performance and scale through things like caching, pooling, clustering, replication and so on. But none of that is needed when you have a small number of users, so why create complexity when it's not required?

Now, if you're building an application to be accessible over the Internet, or if you need to scale, it's a different story. You need a middle tier, and one that speaks HTTP if you're going over the Internet.

But even then you can use Java and Java Web Start, and your client application can talk to the middle/web tier using a service API. There is no reason why the server should be responsible for composing the UI for your application. It can be a server, not a UIer.

If you have Java antibodies, you can use Flex or Silverlight. Or take a look at Cappucino.

There are reasons why these RIA architectures are popular - they are meant for dynamic applications and dynamic behavior, unlike HTML, which really was never intended to be anything more than a way to display static documents. With these RIA environments, finally we're getting back to building apps with tools and an underlying architecture that match the dynamic application paradigm.

Now, folks like Google want you to keep building browser-based HTML applications, using JavaScript for dynamic behavior to muck with the DOM (note their new browser with superior JavaScript performance). Why? So they can scan your text-oriented application and inject targeted ads. Not possible with RIAs where the application is compiled into byte codes.

But just because it works for Google doesn't mean it works for you or your users, or that it's the best architecture. It's just the architecture we've had to work with for the past fifteen years.

Now, there are times when a web app makes sense, absolutely. The answer, as always, is "it depends." But when someone asks you how to build a database-oriented app please don't just default to "web app". There are other, potentially superior, options out there...

Until next time,
David Van Couvering

To read more of David's work, visit his blog.

 

Code Too Slow on the WAN? Test First with WAN Emulation.

Developers write code on a LAN, while the code runs on a WAN. This white paper describes how WAN emulation helps developers overcome this disparity. It explains why the technology is indispensable for optimizing development in an increasingly networked world.

Find out more. Download this free whitepaper now!
DZ Top Links

DZone Top Links
Next section
Back to top
most clicked this week from dzone.com

dzone

Most-clicked links this week


 
Popular at JL

Popular at Javalobby
Next section
Back to top
A recap of some of the most popular and active Javalobby.org discussions this week.

Using JSF and Flex Components Together

Exadel Fiji extends JavaServer Faces (JSF) by allowing the use of Flex components within a JSF page. Fiji stands for "Flex and JSF Integration." When using...

0 replies - 11351 views - 09/16/08 by maxkatz in Articles

Caching, Parallelism and Scalability

When your boss asks you to rewrite your application to be more performant and handle greater throughput, what do you do? Once upon a time, when Moore's Law...

7 replies - 6860 views - 09/18/08 by Manik Surtani in Articles

Ant or Gant?

Yes, this is exactly what I am frequently asked by my clients and many developers. It isn't easy to answer this question. There are several  projects using...

28 replies - 5940 views - 09/23/08 by Meera Subbarao in Articles

Is easyb Easy?

I was introduced to easyb by none other than the creator of easyb: Andrew Glover. In spite of hearing and reading a lot about easyb from Andy, I never had a...

8 replies - 5465 views - 09/17/08 by Meera Subbarao in Articles

JSF Jumpstarter: Free PDF Book Download

The JSF Jumpstarter book is a short (67 pages), tutorial introduction to JSF, suitable for new JSF developers. If you need to get up to speed quickly with JSF,...

2 replies - 5157 views - 09/18/08 by John Ferguson Smart in Articles

When Good Developers Go Bad

Having spent many years on different online communities and forums, not least JavaLobby, I've noticed some trends about how developers act from behind their...

14 replies - 4734 views - 09/19/08 by James Sugrue in Articles

Putting Java to REST

Last month I gave you an Introduction to REST. It was 100% theory, so now its time to see a little bit of REST in action. Since I am primarily a Java...

8 replies - 4493 views - 09/22/08 by Bill Burke in Articles


White Papers & Announcements

Product Announcements
Next section
Back to top
Product and service announcements for Java developers.

JFreeChart 1.0.11

A new version of JFreeChart, a popular chart library for Java, is now available.  Version 1.0.11 features:

1 replies - 1744 views - 09/22/08 by David Gilbert in Announcements

API Design Fest '08!

As part of promotion of "Practical API Design: Confessions of a Java Framework Architect" and also in celebration of the 10th anniversary of NetBeans...

0 replies - 1136 views - 09/24/08 by Geertjan Wielenga in Announcements

yFiles FLEX 1.3 Released

yWorks announces yFiles FLEX version 1.3, the new major release of its Adobe Flex-based add-on for their flagship product, the yFiles Java class...

0 replies - 985 views - 09/24/08 by Sebastian Mueller in Announcements

Scale-out Appserver GigaSpaces XAP 6.6 released

GigaSpaces XAP 6.6 has been released. XAP, the eXtreme Application Platform, is an application server designed from the ground up to scale out, with...

0 replies - 637 views - 09/22/08 by Joseph Ottinger in Announcements

Free Open Source Test Workshop: Selenium, soapUI, TestMaker

Free workshop to be held in Los Angeles/Anaheim, San Francisco, Chicago, NY, and London. Software developers, QA testers, and IT managers are challenged to...

0 replies - 623 views - 09/24/08 by Frank Cohen in Announcements

JLaunchPad 1.0.2 and Scriptlandia 2.2.5

New versions of these projects are available for immediate downloads: JLaunchPad 1.0.2. JLaunchPad (launcher) is the set of Java classes and shell scripts...

0 replies - 614 views - 09/24/08 by Alexander Shvets in Announcements

ItsNat v0.4: Chrome, FireFox 3, Android v0.9 & iPhone 2.0

ItsNat, Natural AJAX, is an open source Java AJAX Component based Web Application Framework. In this release, support for Google Chrome, FireFox v3, Android...

4 replies - 579 views - 09/23/08 by Jose Maria Arranz in Announcements

JavaRebel 1.2.1 & Spring Plugin 1.0-M2

We are very proud to present not one, but two simultaneous releases.

0 replies - 535 views - 09/26/08 by Jevgeni Kabanov in Announcements

Aspose.Total for Java Q3 2008 Released

Aspose.Total for Java Q3 2008 release includes many new and improved features in this java components suite. Now you can read and write PPTX presentations with...

0 replies - 104 views - 09/29/08 by Usman in Announcements


Your Account

Your Account
Next section
Back to top
Manage your account info for this and other Javalobby publications.

Manage your Javalobby membership details

Click on the following links to:

Contact Info
Next section
Back to top
Here's how to reach us, we love to hear from you.

Email us
Send news items to editor@javalobby.org
Send questions, complaints, or suggestions to feedback@javalobby.org
Send advertising inquiries to advertise@javalobby.org
 
  Call us
  Our number is (919) 678-0300. We'd love to hear from you!
Legal
Back to top
The fine print we'd rather avoid completely.
  Feel free to redistribute this newsletter in part or in full to your friends.
 
Javalobby News is a service mark of DZone, Inc.
Copyright © 2001-2008 DZone, Inc.

Thank you for your continued support of Javalobby and DZone. Click here if you prefer not to receive the Javalobby weekly newsletters.
DZone, Inc. - 1251 NW Maynard Rd. - Ste. 300, Cary, NC 27513 - (919) 678-0300