Skip to main content
main-content

Über dieses Buch

Beginning Java with WebSphere provides a step-by-step guide for creating and installing both client- and server-based Java applications using Rapid Application Development v8, WebSphere Application Server 8.0, and Java.

Since more and more Java applications are moving to the server and using HTML for the user interface, there is a minimal amount of time spent exploring the Java GUI components. More specifically, this book covers graphical user interfaces using RAD's Visual Editor, variables, conditional logic, and application improvements/enhancements from the client side. And, from the server-side, this book covers servlets, JavaServer Pages (JSPs), database accessibility (JDBC), custom tags, and concludes with JavaServer Faces (JSFs).

This book concentrate on base topics that allow you to get to the server-side and database topics quickly.

Inhaltsverzeichnis

Frontmatter

Chapter 1. Java Basics

After a very short history of Java, we will jump right into Java programming. We will create and use a bare bones program to demonstrate the Java basics and the capabilities of Rational Application Developer.

Robert W Janson

Chapter 2. Java on a PC

In this chapter, we will expand on your knowledge of Java applications by showing how to instantiate (create) an object and demonstrating how constructors work. We will highlight the key differences between running a Java class as an application and creating an object. We will also provide a more detailed explanation of how Java “works” and “what comes with” Java. This explanation will also cover what really happened when you clicked buttons and chose RAD (Rational Application Developer) options in the previous chapter. In addition, we will explore some online documentation that explains the classes that “come with” Java.

Robert W Janson

Chapter 3. Graphical User Interfaces

This chapter will explain the basic components of a graphical user interface (GUI) and how to use them in Java applications. We will begin to explore the different types of relationships between classes and document both the classes and their relationships using the Unified Modeling Language (UML).

Robert W Janson

Chapter 4. More GUI and the Visual Editor

This chapter will explore GUI components in more depth. We will introduce the concepts behind listeners and event driven programming. We will then, show how to implement listeners, use them to solve the "window closing" problem (from the previous chapter), and enable buttons to perform functions. In addition, we will show, in more detail, the advantages of inheritance (i.e., specialization), especially how it decreases the amount of source code that must be written by the programmer. Finally, we will introduce RAD’s Visual Editor (VE). VE is a very productive tool for generating GUI classes. Through an extensive tool bar and drag and drop, VE provides a GUI for defining GUIs!

Robert W Janson

Chapter 5. Variables

In this chapter, we will introduce primitive variables and compare/contrast them to reference variables. We will demonstrate how to perform math and logic functions using both primitive and

String

variables. A new GUI component, text field (which enables a user to input information to an application), will be demonstrated and we will revisit inheritance in more detail.

Robert W Janson

Chapter 6. Conditional Logic and Checkboxes

In this chapter, we will tackle conditional logic. Conditional logic, also called “If Then Else” logic, is used extensively in programming. It has probably been used in almost every “real-world” program ever written! We will use conditional logic to enhance our applications so that frames can perform multiple functions and execute calculations that are more realistic. (Conditional logic can be a little baffling to first-time programmers but I have confidence in you!) In addition, we will cover some new GUI components, item events, and delve deeper into comparison operators.

Robert W Janson

Chapter 7. Application Improvements

In this chapter, we will add functions to not only make our application easier to use, but also decrease the chance of “runtime” errors. For instance, we will begin using choice components to insure that only valid data is supplied to the Java application. In addition, we will “catch” errors before the user sees them. Once an error is caught, the application will either resolve the error or tell the user (in much clearer/simpler language than the JVM error messages) what the problem is and how to solve it. We will also explain the concept of iteration (looping) and show how programmers incorporate iteration to increase efficiency.

Robert W Janson

Chapter 8. Servlets

So far, we have focused on client-based (desktop) applications. In this chapter, server-side (Web-based) applications are introduced, and the advantages and disadvantages of client versus server-based applications will be explained. There will be a short tutorial on HTML (Hypertext Markup Language) and then we will show how easy it is to create Web pages using RAD’s Page Designer rather than entering HTML. We will then explain and create a Java servlet (i.e., a Web-based Java class), demonstrate how to tie a Web page to a servlet, and show how to pass information from a Web page to a servlet using a form.

Robert W Janson

Chapter 9. Java Server Pages

In this chapter, we will make your programming life easier by introducing Java Server Pages (JSPs). In addition to making it easier to build a GUI interface, JSPs can use JSP tags and Expression Language (EL) instead of Java statements. JSP tags (and EL) are very useful because their syntax is much simpler than Java statements.

Robert W Janson

Chapter 10. Database Access

In this chapter, you will learn about the objects needed to access a DBMS (Database Management System). In addition, we will cover the architectural topic of data encapsulation and use SQL as the data access language. We will then demonstrate how to configure the RAD and PC environment to connect to a DBMS and how to access the database from Java applications.

Robert W Janson

Chapter 11. Custom Tag

This chapter will demonstrate how to create custom tags and use them in JSPs. This will require a more detailed explanation of how tags work, as well as covering new topics such as XML and tag libraries. The database access classes (created in Chapter 10) will be used in the server-based application to insert, display, and delete information from a database. We will also demonstrate how the MVC architecture makes incorporating these functions immensely easier.

Robert W Janson

Chapter 12. JavaServer Faces

In this chapter, we will explore the Java application framework called JavaServer Faces (JSF). In addition to learning some of the new JSF classes, the advantages of the JSF architecture will be explained and the tutorials will demonstrate how quickly a JSF application can be generated with a minimal amount of coding.

Robert W Janson

Chapter 13. Installing a Java Application on a PC

In this Appendix, we will show you how to install an application onto a Windows PC from the RAD environment. The means explaining system environment variables and the software required to run a Java application on a PC. We will also explore PC batch (.bat) files and show how they make applications easier to use. Finally, we'll demonstrate how to import files into the RAD environment. The example assumes Chapters 1 and 2 have been completed.

Robert W Janson

Chapter 14. SQL

SQL is an industry-wide, standard set of relational commands that allows users to both define and manipulate data in a database. SQL has been adopted as the common interface for relational data definition and data manipulation functions on all major relational DBMS (Database Management Systems).

Robert W Janson

Chapter 15. Installing a Java Application on WAS

In this appendix, you will learn what a JEE application server is and how to move a server-based application from RAD onto a WebSphere Application Server (WAS) using the WAS Administrative Console. In addition, you will learn about EARs (Enterprise Archive files) and WARs (Web Archive files) and how to export EARs and WARs using RAD. This appendix assumes that you have completed at least the JSP chapter but will demonstrate how to install and access the server-based applications created in Chapter 9.

Robert W Janson

Backmatter

Weitere Informationen

Premium Partner

Neuer Inhalt

BranchenIndex Online

Die B2B-Firmensuche für Industrie und Wirtschaft: Kostenfrei in Firmenprofilen nach Lieferanten, Herstellern, Dienstleistern und Händlern recherchieren.

Whitepaper

- ANZEIGE -

Best Practices für die Mitarbeiter-Partizipation in der Produktentwicklung

Unternehmen haben das Innovationspotenzial der eigenen Mitarbeiter auch außerhalb der F&E-Abteilung erkannt. Viele Initiativen zur Partizipation scheitern in der Praxis jedoch häufig. Lesen Sie hier  - basierend auf einer qualitativ-explorativen Expertenstudie - mehr über die wesentlichen Problemfelder der mitarbeiterzentrierten Produktentwicklung und profitieren Sie von konkreten Handlungsempfehlungen aus der Praxis.
Jetzt gratis downloaden!

Bildnachweise