Introduction

Over the past several years, rich client desktop platforms have gradually increased in popularity. Leading this trend have been the NetBeans Platform and the Eclipse RCP. The popularization of these desktop platforms has been primarily driven by their related IDEs, which are based on these platforms, providing tools for applications developed on top of their infrastructures. While the Eclipse RCP bases itself, via SWT and JFace, on homegrown idioms and concepts, the NetBeans Platform relies completely on the standard Java APIs, via AWT and Swing, fully integrating the official concepts of the Java Standard Edition.

In the desktop world, rich client platforms are used first and foremost because of the architecture and flexibility they offer to continually growing applications. A significant factor is the increased productivity and flexibility in being able to assemble an application for one purpose and then reassemble it for a different purpose without much extra work, thanks to their flexible modular architecture. Especially for large and professional applications, these concerns are of particular relevance.

It is my opinion that all desktop applications stand to gain from basing themselves on a rich client platform, regardless of their size. The case for this argument can be made by looking, in particular, at the lifecycle management offered by rich client platforms, together with their rich set of APIs, which provide out-of-the-box solutions for the daily challenges faced by desktop application developers. These solutions are tailored specifically to the demands of these kinds of developers, as a result increasing productivity significantly. However, the universal relevance of rich client platforms requires an appropriate handling of the related concepts. At the very least, the developer needs to be comfortable with the main idioms of the platform in question. Only then can the real advantages in increased productivity and improved quality be realized.

The supposed complexity of rich client platform concepts is one of the central reasons why such platforms have, so far anyway, not been adopted as a de facto standard in the development of desktop applications. At the outset, developers often have the impression of standing in the foothills of an overwhelming mountain of new APIs and concepts. However, once developers integrate these APIs and concepts into their mental toolbox, a surprisingly expansive vista of synergies and simplifications is suddenly available, making the learning curve a worthwhile expense.

Consider the most recent enhancements in the Java Platform in relation to desktop applications, such as the improved desktop integration and the performance enhancements, and then examine the plans for the Java Platform in the future. When you do so, you'll notice that the Java Platform is moving in directions that rich client desktop platforms have been exploring from their very beginnings. When I refer to the future, I am referring in particular to the Java Module System (JSR 277), which promises to bring the central concepts of rich client platform development to the Java Platform.

Finally, I'd like to include a note on the NetBeans IDE in relation to the NetBeans Platform. The IDE provides, via its thorough and helpful wizards, effective support for developers getting started with application development on this particular rich client platform. Important for an easy start is that many of the APIs and concepts you will learn about are directly derived from the Java SE API. Thanks to these factors, you will be able to get started with the NetBeans Platform quite quickly. Reuse of components across different applications will then also rapidly become a possibility.

How This Book Is Structured

This book is aimed at Java developers wanting to create desktop applications on top of the NetBeans Platform. No knowledge of the NetBeans Platform is assumed. The primary goal of this book is the practical explanation of the basic concepts and functionalities of the NetBeans Platform. In the process, you will be introduced to the great support for this kind of development offered by the NetBeans IDE. You will hopefully begin asking yourself why you haven't been developing your desktop applications on top of a platform all along! At the very least, you will learn about the many advantages you could have benefited from in your past Java programming activities.

Firstly, the book discusses the definition of rich clients and rich client platforms. The argument for the general usefulness of these concepts culminates with an examination of the advantages of rich client platforms in general and the NetBeans Platform in particular.

Next, you are introduced to the architecture of the NetBeans Platform. You'll learn how a rich client application is structured, how your application's business logic is integrated into the NetBeans Platform, and how to efficiently use the NetBeans Platform concepts and components. You'll also be shown how to make your applications user- and locale-specific, how to distribute them, and how to update them after distribution.

An important discussion relating to rich client development is that of persistence. This book dives into this topic in some detail, introducing you to the Java Persistence API in combination with Hibernate, as well as with Java DB.

The desktop integration possibilities offered by Java 6 are explained as well. The powerful Visual Library API, which has belonged to the NetBeans Platform since version 6.0, is examined closely, as is the increasingly relevant topic of web services.

This book discusses the similarities and differences between Eclipse RCP and the NetBeans Platform, and walks you through the migration of an existing Eclipse RCP application to the NetBeans Platform.

The individual chapters are structured such that they are as loosely tied to each other as possible. The intent is for you to be able to dive directly into a chapter, without having to be too familiar with the preceding or following parts. I think you will find this approach optimal for the development of rich client applications on top of the NetBeans Platform. To give a practical perspective to each chapter, and to let you use their contents immediately, the explanations in the book are accompanied by small examples, rather than a large overarching application that spans the whole book. At the end of the book, a complete application on the NetBeans Platform is described in some detail, from its starting point to the implementation of business logic, in a tutorial-like format, describing the creation of an MP3 Manager. In this application, you'll integrate the Java Media Framework together with a Java DB database.

All the examples and explanations in this book are based on Java 6, together with the NetBeans Platform 6.5, although Java 5 should in most cases be sufficient, too. You can obtain the Java Development Kit from http://java.sun.com, and you can download the NetBeans IDE from http://netbeans.org. You can download the examples as complete NetBeans projects from the Source Code section of the Apress web site, at http://apress.com.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.135.80