Java Application Development with Linux

Java Application Development with Linux

4.0 3
by Carl Albing, Michael Schwarz
     
 

ISBN-10: 013143697X

ISBN-13: 9780131436978

Pub. Date: 11/22/2004

Publisher: Prentice Hall

Linux is the fastest-growing Java development platform because it saves money and time by serving as a platform for both development and deployment. But developers face significant platform-specific challenges when managing and deploying Java applications in a controlled production environment.

Written for Java and Linux developers alike, Java™

…  See more details below

Overview

Linux is the fastest-growing Java development platform because it saves money and time by serving as a platform for both development and deployment. But developers face significant platform-specific challenges when managing and deploying Java applications in a controlled production environment.

Written for Java and Linux developers alike, Java™ Application Development on Linux® is the hands-on guide to the full Java application development lifecycle on Linux.

Determined to spare other developers hours of trial and error, Albing and Schwarz demonstrate the platform, tools, and application development by showing realistic, easy-to-follow examples. After a simple command-line application introduces basic tools, this program leads readers through business-logic object analysis, database design, Java servlet UIs, Java Server Pages (JSP) UIs, Swing GUIs, and Standard Widget Toolkit (SWT) GUIs. Scaling up to the enterprise level provides the opportunity to use both the JBoss Application Server and the Apache Geronimo Application Servers, and Enterprise JavaBeans (EJB).

Readers learn how to

  • Use development tools available on Linux, such as the GNU Compiler for Java (gcj), Ant, the NetBeans IDE, IBM's Eclipse Java IDE, JUnit, and SunONE Studio
  • Develop business logic layers using Java DataBase Connectivity (JDBC)
  • Add a Web interface using servlets and JSPs
  • Add a GUI using Sun's Abstract Window Toolkit (AWT) and IBM's SWT
  • Deploy EJBs in Linux

The authors conclude by demonstrating how a hierarchy of budgets can be created, tracked, and shared with Concurrent Versions System (CVS).

A companion Website includes all source code and a link to each tool described.

Java™ Application Development on Linux® can propel you from a standing start to the full-speed development and deployment of Java applications on Linux.

Read More

Product Details

ISBN-13:
9780131436978
Publisher:
Prentice Hall
Publication date:
11/22/2004
Series:
Bruce Perens' Open Source Series
Pages:
600
Product dimensions:
7.00(w) x 9.30(h) x 1.30(d)

Table of Contents

Preface.

Introduction.

I. GETTING STARTED.

1. An Embarrassment of Riches: The Linux Environment.

What You Will Learn.

The Command Line: What's the Big Deal?

Basic Linux Concepts and Commands.

Review.

What You Still Don't Know.

Resources.

2. An Embarrassment of Riches: Editors.

What You Will Learn.

Eye to Eye with vi.

Editors Galore.

Review.

What You Still Don't Know.

Resources.

3. An Experienced Programmer's Introduction to Java.

What You Will Learn.

Fundamental Language Elements.

Using (and Making) Java APIs.

Encapsulation, Inheritance, and Polymorphism.

O, Templates! Where Art Thou?

Virtually Final.

A Useful Simple Application.

Review.

What You Still Don't Know.

Resources.

Exercises.

4. Where Am I? Execution Context.

What You Will Learn.

A Simple Start.

The SystemClass.

The Properties Class.

The Runtime Class.

Review.

What You Still Don't Know.

Resources.

5. The Sun Microsystems Java Software Development Kit.

What You Will Learn.

All You Need, and Not One Thing More.

The Java Compiler.

The Java Runtime Engine.

Complete, Up-to-Date Program Documentation Made Easy.

Dispensing with Applets.

Going Native.

Introducing RMI.

The Java Debugger.

Return to the Source: The Java Decompiler.

Bundling a Java Program: Put It in a JAR.

The Rest of the Toolkit.

Review.

What You Still Don't Know.

Resources.

6. The IBM Developer Kit for Linux, Java 2 Technology Edition.

What You Will Learn.

Use Linux Features to Make Multiple Java SDKs Play Nicely Together.

How the IBM JDK Differs from the Sun JDK.

What Are All These "_g" Versions?

Review.

What You Still Don't Know.

Resources.

7. The GNU Compiler for Java (gcj).

What You Will Learn.

A Brand GNU Way.

The GNU Compiler Collection.

Compiling Our Simple Application with gcj.

Options and Switches.

Reasons to Use gcj.

Reasons Not to Use gcj.

Review.

What You Still Don't Know.

Resources.

8. Know What You Have: CVS.

What You Will Learn.

Source Control: Whys and Hows.

A GUI: jCVS.

Review.

What You Still Don't Know.

Resources.

9. Ant: An Introduction.

What You Will Learn.

The Need for a Different Build Tool.

Obtaining and Installing Ant.

A Sample Ant Buildfile.

Review.

What You Still Don't Know.

Resources.

10. Integrated Development Environments.

What You Will Learn.

NetBeans: The Open Source IDE.

SunONE Studio Community Edition.

Eclipse: The Source of SWT.

Review.

What You Still Don't Know.

Resources.

II. DEVELOPING BUSINESS LOGIC.

11. Balancing Acts: An Imaginary Scenario.

What You Will Learn.

Statement of the Need.

How to Develop Software.

What Makes a Good Requirement.

Whom to Ask for Requirements.

Requirements for the Budget Application.

Documenting, Prototyping, and Stakeholder Buy-In.

Review.

What You Still Don't Know.

Resources.

Exercises.

12. Analysis and Design: Seeking the Objects.

What You Will Learn.

Facing the Blank Page.

Using CRC Cards.

Finding the Objects.

Finding the Methods and Attributes.

Essential and Nonessential.

Analysis Paralysis.

Real Software Engineering.

Core Classes.

Review.

What You Still Don't Know.

Resources.

Exercises.

13. JUnit: Automating Unit Testing.

What You Will Learn.

JUnit: Why All the Fuss?

Design Then Test Then Code.

Installing and Running JUnit.

Writing Test Cases.

Running Test Suites.

Review.

What You Still Don't Know.

Resources.

Exercises.

14. Storing the Data.

What You Will Learn.

Follow the Objects.

Of Persistence.

Thinking of the Future, or Painting in Corners.

Oracle, PostgreSQL, MySQL.

Being Self-Contained.

Beyond the Basics.

Persistence Is Not the Whole Story.

Setting Up PostgreSQL for BudgetPro.

Review.

What You Still Don't Know.

Resources.

Exercises.

15. Accessing the Data: An Introduction to JDBC.

What You Will Learn.

Introducing JDBC.

Making Connections.

Querying Data.

Getting Results.

Updates, Inserts, Deletes.

Review.

What You Still Don't Know.

Resources.

Exercises.

III. DEVELOPING GRAPHICAL USER INTERFACES.

16. Getting in the Swing of Things: Designing a GUI for BudgetPro.

What You Will Learn.

A Simple Swing Program 342

Stompin' at the Savoy, or The Swing Paradigm.

Slow, Slow, Quick-Quick, Slow: The Basic Swing Objects.

Layout Managers.

Beyond Arthur Murray: Actions, Listeners, Events.

Getting Down to Cases: Designing a GUI for BudgetPro.

Review.

What You Still Don't Know.

Resources.

Exercises.

17. Other Ways: Alternatives to Swing.

What You Will Learn.

The IBM SWT Toolkit.

Porting BudgetPro to SWT.

SWT and gcj.

Review.

What You Still Don't Know.

Resources.

Exercises.

IV. DEVELOPING WEB INTERFACES.

18. Servlets: Java Pressed into Service.

What You Will Learn.

Servlets: Program-Centric Server-Side Documents.

Perspective.

How to Write a Servlet.

Input, Output.

Matters of State: Cookies, Hidden Variables,and the Dreaded Back Button.

Designing a BudgetPro Servlet.

Review.

What You Still Don't Know.

Resources.

Exercises.

19. JSP: Servlets Turned Inside Out.

What You Will Learn.

Servlets Turned Inside Out: JSP.

How to Write a JSP Application.

Using JSP with BudgetPro.

Review.

What You Still Don't Know.

Resources.

Exercises.

20. Open Source Web Application Servers.

What You Will Learn.

Downloading JBoss.

Be an Enabler, or "Let's Be Codependent!"

Installing JBoss.

Things That Make It Go.

Disposition of Forces.

Apache Geronimo.

Installing Geronimo.

Running the Geronimo Server.

Review.

What You Still Don't Know.

Resources.

V. DEVELOPING ENTERPRISE SCALE SOFTWARE.

21. Introduction to Enterprise JavaBeans.

What You Will Learn.

Expanding to EJBs.

What's in a Name? An Introduction to JNDI.

Review.

What You Still Don't Know.

Resources.

22. Building an EJB.

What You Will Learn.

EJBs: You Don't Know Beans?

Review.

What You Still Don't Know.

Resources.

23. Deploying EJBs.

What You Will Learn.

Lend Me Your EAR: Enterprise Packaging and Deployment.

Deploying the EAR.

Maintaining a Distributed Application.

Abstracting Legacy Applications.

Review.

What You Still Don't Know.

Resources.

24. Parting Shots.

The Future's So Bright, I Squint and Look Confused.

Our Book Is Yours.

Came the Revolution.

What You Still Don't Know.

Resources.

Appendix A. ASCII Chart.

Appendix B. A Java Swing GUI for BudgetPro.

Appendix C. GNU General Public License.

Index.

Read More

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >

Java Application Development with Linux 4 out of 5 based on 0 ratings. 3 reviews.
Guest More than 1 year ago

Java was developed to be a cross-platform language. 'Write Once, Run Anywhere' is the slogan, and an admirable ideal to attempt to reach. So when I first saw the title of the book Java Application Development on Linux, I expected to find descriptions of some idiosyncrasies in the Linux environment that affected the 'Run Anywhere' part of the equation. What I got was a lot more.

The authors, Carl Albing and Michael Schwarz, chose to create a book that is a complete guide to writing commercial-quality Java programs. They focused on how to use the tools of Linux to assist in the creation of Java programs. The book is broken up into five major parts: Getting Started, Developing Business Logic, Developing Graphical User Interfaces, Developing Web Interfaces, and Developing Enterprise Scale Software. Each chapter is self-contained, and the reader can choose what they read without losing track. Each chapter starts with a summary of what you'll learn, and concludes with a 'What You Still Don't Know' section.

Part I provides a 10-chapter overview of Linux, Java, the SDK's (Software Development Kits) from Sun and IBM, version control via CVS, and IDEs. The first two chapters cover a sampling of command-line Linux, plus the Vi editor to create your programs. Chapter 3 gives you a overview of the Java language, and Chapter 4 covers how the program can deal with the context in which it's running. The next two chapters cover Sun's SDK and IBM's development kit (briefly). Chapter 7 describes how to use the GNU Compiler for Java (gcj) to create native-code programs.

Larger programs definitely need some form of source control, so the widely available Concurrent Versioning System (CVS) is clearly described out. For building and deploying the numerous files of a larger project, Ant provides value beyond what the make facility can offer. Finally, Integrated Development Environments (IDEs) are covered. The focus is on NetBeans, but SunONE Studio Community Edition and Eclipse are also covered.

If the book stopped after Part I, you would still have a valuable addition to your bookshelf. However, Part II continues with a five-chapter discussion on how to get requirements, documentation, and buy-in; how to analyze the program and discover the objects to be created; automated testing with JUnit; storing data in databases using Oracle, PostgreSQL, and MySQL; and using the Java Database Connector (JDBC) to access them.

Most users want some form of a graphical user interface (GUI) to access the program and their data. Part III describe how to create a GUI using Swing and the Standard Widget Toolkit (SWT).

By far the most popular way to access programs is via a browser. Part IV describes Java Servlets and JSP (JavaServer Pages), and also talks about two Java-based web application servers (JBoss and Geronimo).

Finally, Part V covers Enterprise JavaBeans (EJBs) in what the authors describe as 'an almost criminally brief introduction'. While it is definitely an overview, they still cover more than enough about EJBs to get you rolling. They wrap up the book with a plea for help. The book is an Open Content book, and therefore they are requesting comments, suggestions, and patch files to help improve the text and examples.

I have to admit that Java Application Development on Linux is an extremely readable, very informative, and deep without being lengthy book. The tone used by Carl and Michael was very conversational. I found it enjoyable, interesting, and highly informative. The only complaint I have is that they tried to cover a little too much in a single book. EJBs definitely warranted more coverage than they provided. In all, I rate it a 4 out of 5.

Guest More than 1 year ago
When first embarking on a new journey into a programming language, the average traveler might want a map and a compass to show them where they are, where they're going and how to get there. If where you are is Java newbie and where you want to be is programming Java apps on the Linux platform, then _Java Application Development on Linux_ is a map and compass you can use to get from here to there.

This book is another in a long line of great technical reference books from Prentice Hall's Bruce Perens' Open Source Series. While some of the previous books I have revied from the series tended to be more in depth, this one has the benefit of starting out slow and covering all of the bases. You can know little to nothing about Java as a programming language and come out with a solid understanding of the fundamentals after the first few chapters. Anyone who has an object-oriented programming background will zip right through the opening pages, but for those that don't, spending a little more time will bring them into the ranks of the initiated.

All of the programming basics are covered, from constants to strings, from arrays to variables, and all of the fundamentals and not-so-fundamentals of object-oriented programming, like classes, methods, objects, properties and polymorphism. Then the reader is steadily moved along into more involved topics, like putting your Java classes into JAR files, how to use the Java debugger, the software development kit and so on. At the end of each chapter, there is a small section on what the reader still doesn't know. The purpose of this is to keep the reader clued in on their progress, explain what is to come and keep things moving along. All of which makes for a fast-flowing read. Generally this is hard to find in a technical book, many of which tend to be dry and boring for the most part with the index being the most read section.

By the end, the now initiated reader will explore programming applications for various interfaces and APIs, including Swing, SWT and JSP, and will even find out what JavaBeans are and how to use them and what JNDI is and how it can work for you.

With all that said, this is a fundamental resource book for anyone who would want to learn how to program Java applications under Linux. Much of the information can be borrowed to develop applications on other platforms as well. The introduction and first few chapters of this book are extremely informative and give the reader an excellent comprehension of Java as an object-oriented programming language and all of the fundamentals he will need to go further as an application developer. The later chapters tend toward information overload, and while the information is good, some things are skipped over to save time and space. It may have been better to separate this book into two different volumes, giving the second half twice as many pages and more room to breathe. But overall, this is still an excellent technical book and adequately achieves its main goal of making a beginner application developer out of a Java layman.

Guest More than 1 year ago
I read this book with especial interest. For it pertains directly to my work environment of Java programming under linux. So I was curious to see what the authors have to say. The book explains simple linux level commands like grep, find, tar and zip. Because in practical terms, your Java project will have files scattered across various directories. Outside of your source files, you'll need these commands for maintenance. Also, vi is covered, including its improved variant vim. The latter is nice since it has colour coding of Java keywords. Makes editing much easier. Later on, the book covers the Sun and IBM SDKs. Free and easy to use. The data storage chapter is concise; perhaps too much so. For realistic applications using JDBC to hook to MySQL, Oracle or other databases, you may need more thorough coverage elsewhere. Likewise with the section on building a UI in Java. For completeness they have a brief discussion. The authors also strive to include discussion of higher layers built in Java. For enterprise level applications. So they go into JSP, servlets and EJBs. Enough detail is given to understand the gist, and to see how to fit these together. A commendable effort, given the vastness of current Java packages.