Java for WebObjects Developers-P1 - Pdf 68

Java for WebObjects Developers-P1
Provides a quick-start guide for developers
learning to use Java with WebObjects

 Apple Computer, Inc.
2003 All rights reserved under the copyright laws of the United States
and other countries.
1 Infinite Loop, Cupertino, CA 95014 USA
Java for WebObjects Developers
Version 5.0
Apple, the Apple logo, and WebObects are trademarks of Apple
Computer, Inc., registered in
the United States and other countries. Use in commerce other than
as “fair use” is prohibited
by law except by express license from Apple Computer, Inc.
Enterprise Objects Framework is a
registered trademark of NeXT Computer, Inc. Java and all Java-
based trademarks and logos are
trademarks or registered trademarks of Sun Microsystems, Inc. in the
U.S. and other countries.
All other trademarks mentioned belong to their respective owners.
We at Apple have tried to make the information contained in guide as
accurate and reliable as
possible. Nevertheless, Apple disclaims any warranty of any kind,
whether express or implied, as
to any matter whatsoever relating to this manual, including without
limitation the merchantability
or fitness for any particular purpose. Apple will from time to time
revise the software described
in this manual and the manual itself, and reserves the right to make
such changes without

of multi-threaded or networked programming, Java turns out to be a
rather simple language for
humble, general-purpose jobs running on a plain old computer. With
some basic ideas, and some
familiarity with the most commonly used language constructs, you
can go a long way. This is
especially true when your Java code is part of a larger system that
handles a lot of the details already.
To get started, all you need is the Java relevant for a WebObjects
developer.
But Java “the language” is still something to learn. It is a general-
purpose programming language,
and it is object-oriented. The term “object-oriented” is vague and
spooky to some, fresh and intuitive
to others, even old hat to a few. Mostly, it means just good, modern
software technology. Objectoriented
programming is based on a small set of powerful concepts and
somewhat specialized
terminology. From this perspective, it should be clear that Java is a
way of thinking.
Your job, however, is to communicate your thinking to others—a
computer, or another programmer.
From this perspective, Java is a way of speaking.
The basic goal—getting you to think and speak Java
While it may take a bit longer than 21 minutes to digest this guide, it
will likely take a lot less of your
time and energy than other approaches, while achieving similar
results. The content is based on the
fact that, to begin developing WebObjects applications you don’t
need to know everything in the Java

guide.
Prerequisites and assumptions—where are you coming from?
From the perspective of its richest and most powerful capabilities,
WebObjects is a programming
environment. The chief assumption this guide makes about your
background is that your are
a programmer. From a multitude of languages, you have used at
least one, ideally two or more.
You should be familiar with the following terms and the concepts they
convey: data type, variable,
operator, expression, statement, conditional, loop, procedure or
function, argument or parameter,
and return value. This much is required.
You don’t necessarily have to know much about object-oriented
programming, but it certainly
helps if you have been exposed to the vocabulary and the concepts.
For many, the hard part of Java
programming is learning how to think like an object-oriented
programmer. Terms are essential, but
it is the ideas that the terms convey—the way of thinking—that is both
simple and elusive. This guide
does not present object-oriented programming in rich detail. It takes
the opposite view—learn by
example and gain your own understanding simply by using it.
There are a number of good resources to strengthen your skills in
both programming and objectoriented
thinking listed at the end of the guide.
You’re a Java hacker—do you even need this guide?
The best way to determine if you are already Java-savvy enough to
work with WebObjects is to see

class. It is a bit of a chicken and
the egg problem. As such, you cannot do anything real in Java until
you have covered the second
chapter. Although the first chapter presents real and useful Java code
examples, they are incomplete
outside of a class definition. While reading the first chapter, you might
wonder where and how
these code samples are used. Who calls them? Where do I place
them in order to compile and run?
The answers will become clear by the time you are finished with the
guide. Some answers may not
become clear until you begin building a WebObjects application. In
the meantime, relax and absorb
what’s at hand.
An optional third chapter is included to help you understand how your
Java code fits in with the
rest of the WebObjects infrastructure to form a complete application.
Here is where you learn a bit
about compilers, class files, and the big bang that launches the
application and activates your code.
But these are incidental details; they are not part of the core spirit of
thinking—and speaking—like a
Java programmer. The fourth chapter provides an overview of Java’s
exception-handling architecture,
which allow you to deal with error conditions within your application.
Exceptions are used
pervasively in WebObjects, and in Java in general, and a basic
understanding of their role is essential
for effective Java development.
What’s not covered and why

Java environment as it matured
from version 1 into version 2. This guide, however, is mostly about
the core Java language itself,
which has remained fairly consistent over time. One area of
relevance where this is less true, though,
is Java’s support for collections of objects (arrays, sets, and so on).
Depending on which resources
you read, you may see references to the new collection features, the
old ones, or both. WebObjects’
support for collections is currently loosely associated with the legacy
features, however this guide
notes both new and old.
A bit about WebObjects
WebObjects is an award-winning cross-platform Web-based
application server. With frameworks
that define a coherent, rich, and mature object model, WebObjects
gives Java developers a first class
object-oriented environment. With a complete runtime support
infrastructure, WebObjects provides
everything for packaging and serving components that focus on your
application-specific logic.
WebObjects is a complete development and deployment
environment. The integrated graphical
tools encompass the full open-ended life cycle of production Web
applications—prototyping,
development, documentation, debugging, performance analysis and
stress testing, deployment,
monitoring, reusing, and evolving.
The WebObjects framework handles Web-based transactions. It
features a flexible componentbased


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status