WWDC2000 Session 180

Transcript

Kind: captions
Language: en
well good afternoon actually I am NOT
Stephen era for those of you know me and
for those of you don't I'm Alex Samuels
the Java technology manager in apple
worldwide developers so i think i'm in a
in a very good mood today you guys
probably all know why I actually get to
stand up here and hopefully tell you
what you want to hear I'm one of those
people who's probably gotten a lot of
emails from you in the crowd asked me
when we can have Java too and for the
first time we're really able to go out
publicly and as you saw today in the
keynote give you what you want and talk
to you a little bit about what we're
doing with Java too and before I before
I bring up Steve I just want to go ahead
and put a general thank you out to all
the engineers that work on on job at
apple I think these guys have basically
gone got a long way we've come from a
situation where you could say in the mr
jail and maybe maybe we weren't doing as
good as we'd like to be and I think
we're in a prime position to be a leader
in a Java platform and I think today's
the day we start to tell you all the
information that you need to make that
happen so I want to give a little hand
to entire Java team
you guys make my job a lot easier so
with that I'm going to go ahead and turn
it over to Steve and Steve was a lot of
really really good news to share with
you today so I'll let him bear that hi
there hmm it's a pretty bright how many
folks I want to take a quick poll how
many folks were here last year quite a
few at the Java talk not only wdc okay
great so you know where we've come from
so I won't won't belabor it too much but
as Alan said on the team has really come
together not only the engineering team
but the developer support team Alan and
his folks that helped a lot of you guys
before we get a chance to to help a lot
of you guys so um I think all across the
company we pulled together and made Java
actually pretty relevant in the Apple
community and I think it just going to
get better and better you saw in the
keynote that we're going to be offering
Java to on Mac OS 10 it's a great fit
the mac OS 10 platform is great
foundation for for java a lot of the
modern components of the operating
system are our components that the java
really depends on like the pre-emptive
multitasking protected memory all that
good stuff you heard a lot of features
in bertrand stock i'm sure i think most
of you attended that and java was
developed on unix in a modern operating
system so again it benefits us as we
move the technology forward to be on a
modern operating system and have modern
underpinnings the the Java that we're
going to be shipping is Java to standard
edition later on I'll talk a little bit
more about what that means the swing you
I toolkits built into the standard
edition if you aren't aware that swing
is the modern GUI tool kit that people
used to write java applications awt was
a smaller UI toolkit that was
used for primarily for applets on the to
coexist right now in the Java to
standard edition and we've done a lot to
integrate with aqua the demo that you
saw on stage with web objects that you I
was a swing application it was a pure
java swing java to standard edition
application and it wasn't Coco for
instance that user interface work was
done by a very talented person we have
working on our staff from son named
LeeAnn rocker and I know she worked
really hard with the web objects team to
get that demo together and Lassen
definitely not least we have the hotspot
client vm this is an extremely robust vm
that in many cases is the second or
third generation technology the garbage
collection technology and it is
state-of-the-art the compiler in it
state-of-the-art and we'll go through
some numbers later but on the team
Yvonne posa Jim Lasky are our two leads
on that project just incredible results
with the hot spot technology you know it
was it was the type of decision that we
were contemplating last year I think we
talked about that we were disappointed
that we couldn't tell you that we were
going to commit to it and that's because
we didn't know last year and it's
amazing how well all that technology has
worked out for us so now we'll go
through a brief timeline
in February and 99 right before last
year's WWDC we shift mrj 2.1 GM and that
was the first release I think the teen
of Java that I think the team felt proud
of it we felt proud of it because it
perform fairly well what didn't exceed
our expectations but I think met our
expectations in many ways but more
importantly it ran a lot of applications
okay and that's something that mr j 20
was not doing it was not running a lot
of applications it was crashing and it
was dying and it just wasn't the type of
robust platform that we all wanted so to
one was a real breakthrough for us I
think it's delivered on the strategy we
outlined in 98 and it's interesting
because when I stood up here in 98 I was
trying to think how could I put in
perspective for you guys I felt about
four feet tall when I stood up here in
98 and last year I felt 57 which is
actually what I am and because we
delivered on a strategy we still weren't
happy with where we were but we knew
where we were going this year I feel
seven feet tall and you can tell I'm not
size would be tall but I feel that way
and I feel that way because again I'm
standing on the shoulders of some really
great people that they get fun to come
to work in every day frankly not a part
of the strategy we delivered on is we
wanted to give you incremental releases
the six incremental buzz and solve
incremental performance problems so we
did a release in March may in July and
that was another promise that I think
we've done a good job delivering on or
keeping was that we didn't want to go
dark for nine months and that was a
problem before that we would just wait
too long before we show incremental
progress so I thank the team for working
hard on those incremental releases and
those are driven by emails bugs customer
requests I really feel if we do a pretty
good job trying to prioritize what we're
hearing from you
and building into the product if not you
need to get a hold of our if there are
features that you've requested or bugs
that you haven't seen fix throughout the
dot releases that we've released you
just need to get a hold of Allen or a
developer support team and make sure
that feedback gets back to us so along
with the two dot one dot 3 we we shift
to two alpha and 214 was the last of our
21 based releases and the milestone
there was we met Oracle bronze
certification we've been working really
closely with Oracle because they're a
very heavy Java user and they want to
make sure their applications run really
great on our platform so we again we're
closer with them to make that happen so
in October we release defeat to that was
our first Java to base vm so that's one
even though we made no public statements
about where we're going with Java to
folks looked under the covers and
started figuring it out for themselves
and we did a 2 2 beta and then in
January we'd when GM with you 2222 was
our for lack of a better term I e50
release we did fix bugs outside I you 50
but it really was targeted at giving the
eat the user or developer a better
experience within the scope of I you 50
and then we did on dp3 which added the
classes it was our first release there
was still a lot of bugs in it and here
we're doing at DP for and the big
addition is the hot spot client so and
many many bug fixes to the Java classes
which we released in deep in vp3 so
that's been the progression it's been a
lot of work we actually combined our
Java to mr j team with our mac-10 java
team so now we're one java team and I
think the productivity enhancements
we've gotten from even making that
change has been pretty dramatic so again
I'm thrilled with the last year I think
a lot of people working on the team look
back and are probably startled with how
much we act
accomplished so before I go into the
crux of the talk which is centered
around mac-10 I'd like to briefly go
over are currently shipping product it's
mr j 22 i believe the latest version
minor version is mr j 221 and it
integrates with the iu 5 networking
stack cabinet file support cookies with
Lord application all these features
you're probably aware of if you've been
using the product how many people are
using 22 right now ok so you're familiar
with it so I am we add a long file names
of floor so that's our Mac nine product
and we're going to continue to enhance
it along the 118 code base and now I'd
like to go into the the crux of the talk
which centers around a three mug
strategy cutesy it so we have
performance compatibility that is we
want to make sure we're compatible with
all the existing Java code out there and
integration and I'm going to take each
of these three separately it's clear
that almost everything we do actually
fits into one of these and I think the
first one that's interesting to look at
is performance so we'll start from the
top so expect a vm 98 is the benchmark
we're currently using you might remember
in previous years we were using caffeine
marks we decided along with a lot of
other folks in the industry that
caffeine marks are not a great measure
of performance so we decided to look for
a benchmark which would meet our needs
and in fact came up with spec jvm 98
benchmark these performance numbers i'm
going to show you are for DP for just to
be clear the numbers you're seeing here
are not seconds they're a score so it's
a score that respect JVM benchmark gives
you and higher is better as you might
imagine and right here we have the are
which is basically the interpreter
running without the compiler so the
classic java virtual machine prior to
hotspot was running at 1.8 the
interpreted hotspot runs a 2.6 which is
roughly a fifty percent increase and you
can see the green is the compiler the
compiler in both cases runs roughly 10
times faster than the interpreted code
but what's much more important and
compelling than the fifty percent boost
we get is the amazing reduction in
memory amazing reduction in memory so
[Applause]
taking pages off disk is very costly and
it's clear that even though we've
upgraded I think most Mac ship with 64
megabytes now it's asking people to have
upwards to 128 and 256 megabytes is not
appropriate so we want to find ways to
make Java programs run in a sensible
footprint so what this graph tells you
is it only costs seven megabytes to run
compile this benchmark in compiled mode
and that seven megabytes not only
includes the compiled data data
structures but it includes the data
structures for the compiler itself to do
its job and you know it's going to be I
think roughly 40 60 50-50 split but in
any event from my perspective that's a
reasonable price to pay for compilation
and if you do the math it's 4.5 times
smaller and we've seen this translate
into not only our benchmarks but all the
applications we're running use far less
memory than they used to so we're
extremely excited about this it's only
dp4 we still have a lot of tweaking to
do but we still feel fairly confident
that we're heading in the right
direction the the thing that just
briefly about adaptive compilation
technology the reason it's so much less
is in the semantic JIT world where you
do where you're running in a class
a virtual machine what the compiler
tries to do is compile everything that's
it it's goin life to try and make
everything that and what happens with a
hot spotted active adaptive technology
is it measures itself and as the
programs running it tries hard to only
compile the things that matter and not
compile the things that don't matter
right so an obvious example of something
that doesn't matter is an initialized
method but there are obviously lots of
other methods that are we used once
twice maybe used a lot for let's say
printing but then printing it's locked
out and you don't need it anymore so the
hotspot adaptive compilation system is
always measuring to make sure that it's
compiling the right stuff and stuck JVM
is measuring it's a basically a suite of
applications I think it's six altogether
database the Java compiler I think our
Java compilers two to three times faster
now as a result of hotspot there's a
compiler compiler for Purdue in there is
data compression and expert system shell
and MPEG audio decompression think you
see these are applications that most of
you have probably heard of certainly you
know java the java compiler you've heard
of database you've heard of compiler
compilers data compression all this
stuff is stuff that benefits real world
applications that are being used out in
the java community so what do we have
left hotspot tuning this is our first
release even though we're happy we still
have a ways to go graphics tuning
especially awt there's still some issues
with how we integrate with courts and
the windowing system that we need to
resolve before we're really happy with
our awt graphics performance we're
fairly happy with the swing performance
and you'll see a demo later that I think
will will will show you that we're in
pretty good shape with swing yet we
still have some work to do there this is
on a feature which I've been persistent
about for years and I think we're
finally getting to the point we're going
to have it
I believe hopefully by GM is the ability
to run multiple java applications and
share a lot of its metadata it turns out
that if you look at a class file the
instruction stream is only a small part
of what makes up class file there's an
awful lot of metadata in there and if
you don't share that metadata across
invocations of a Java VM then you can
end up eating lots and lots of memory
especially for something like swing it's
a fairly large UI toolkit so again
imagine running five java applications
you want them to share as much data as
possible again to get the footprint down
and last and not least launch time we're
very adamant that applications have to
launch in a fairly sensible time frame
where sensible is between one and five
seconds and we have some very large java
apps were running now that that take
about 10 seconds so on that go is 10 and
again we'll show you that we hope to get
that down to five seconds but it's
certainly a long way from where where
we've come where some job applications
on mr j on mac 9 could take as much as
30 seconds 30 40 50 seconds so here's a
quick pointer three incredibly talented
people to in the vm space and one
graphics nut john berkey why I say Jim
berkey that same gym anyway it's John
berkey and they're going to be giving
that talk i highly recommend it it'll
give you a lot more details and then i
have today on performance compatibility
this section of the talk is mostly Sun
stuff but I still think it's important
to review with you if you haven't kept
up with the Java lingo when they went to
Java to they defined a whole new process
it defined a whole new set of terms and
so on and a lot of that was actually
good but it takes some getting used to
and standard editions called j2se that's
the acronym and a lot of people use
there's a micro edition and there's an
enterprise edition right now we're
focusing on the orange which is the
standard edition edition I think it
might be better turn desktop so that's
why I put that up the micro editions
probably better turn embedded and you
can think of the Enterprise Edition as
the server so since desktop is our focus
at Apple we want to be great on the
desktop and then potentially worry about
some of the other editions webobjects
for instance might take some components
from j2ee like javabeans but might not
support the whole stack in its entirety
those are decisions that we have yet to
make so key features swing interface
objects like it's one of the more
compelling features of Swing is it
supports multiple platform looking
fields and we'll get into that later
java 2d advanced graphics aboard the
java to dapi is actually very similar
and supports a similar feature set to
courts and in fact our implementation on
Mac 10 relies heavily on courts there's
new collection classes drag and drop is
a feature that I believe we have in our
mrj we put that in as a stopgap it was
modeled after the Java to support to now
eat we're just relying on the standard
drag and drop that on Java two supports
we have prints support and improve fonts
and international text there's a very
fancy policy based security mechanism
there's Corvus support for those who
were unfamiliar with Kaurava korva is a
way for other languages and other
prophecies to talk to java and vice
versa many people are using that
technology in the enterprise and a
really cool feature of Java to is
they've really taken each sub component
of the VM and made some nice api's to it
so for instance there's a
HJ BN these are all interfaces which if
you wanted to plug your own vm into our
implementation you could I don't
anticipate that most of you are going to
go to the trouble of implementing your
own vm but some of you may plug into the
debugger or the profile interface that
enables need to basically right GUI
based tools atop our VM and for
profiling and debugging and so on so for
instance those are the API so that Metro
works code warrior project builder and
so on and so forth use sound support and
a ton of other stuff it's just it's it's
huge so talking about that 118 is a set
of 23 packages about 5,000 members Java
to standard edition is just it's a huge
platform it offers a ton of
functionality and you know we went
through this last year of people who are
here contains about three times more
api's now whenever you do that big a
release where you've expanded your the
API surface area by three times you made
all kinds of changes you're undoubtedly
going to break people and that's one of
the concerns the people had in the java
community is as i take their 11 app it
can be challenging to find the
compatibility differences particularly
in the AWT area so this is an issue that
we're working on with son all the
licensees are working on what son I
don't think son will ever make that big
a leap that is add three times more AP
is at one step I think they learned
their lesson so to speak and the
releases that will be coming out now
will be more of an incremental fashion
again it's it's just more sensible to
increase it to incrementally release use
API is rather than go to 3x overnight so
as a result mission-critical
applications have been slow to move
there's a very good 15 page of document
on the web if you're interested in
concerns about moving your 11 code to
reference this document it has a
ton of great information on what the
source level binary and other types of
changes that you're likely to encounter
and in general new java applications are
targeting the java to platform applets
aren't aren't being written to java to
in general so we we test our our java
product with something called the j ck
the java conformance kit or compliance
kit from front sun and we're obligated
as licensees to to pass it but what's
much more compelling to me is how many
real-world applications we run so for
instance Oracle has 40,000 test Suites
we currently passed their tests as well
and are continuing to work with them and
passing even more Yahoo excited a really
interesting development is I think I
brought the magazine with me I don't
know if you guys have seen it but let's
see Charles Schwab has this really cool
on trading app it was advertised in this
guy over here it's called velocity
anyway but it's our first example of a
shrink-wrap java app that actually
people are using day to day in this case
for trading stocks a pretty mission
critical thing if that's what you want
to do and it's um that's worked
incredibly well we're extremely happy
with the reliability of that product as
well and they've been great to work with
an SI p is another company we're working
closely with to make sure their
enterprise applications are working
really well so we're getting a lot of
testing and it's it's really neat to see
how relevant actually this job of
technology has become in the enterprise
space so with that in mind I'd like to
bring up someone from Oracle things
Peter hello thanks Peter
[Applause]
okay our apps this is excuse me there's
actually just one great word which is
finally we've been working I've been
working with Apple on trying to get our
apps running on their a Mac platform and
variety of hardware os's in the past for
I think three or four years so we
finally actually been able to achieve
this with the most recent release if you
don't know oracle apps oracle apps are
basically mission-critical enterprise
apps dealing with financials and
manufacturing and crm applications call
centers sales force automation all these
different things there's 70 in total and
our code markets really are the
university market a lot of creative
services firms people that are obviously
have mac as a dedicated platform and
they also want to run their standard
business apps they don't want to have to
have them sit side by side with pcs so
we have actually I think easily a
hundred million dollars of potential
revenue that we could probably earn we
will probably earn as we move forward
into this space so that's a great
opportunity for you as well what I
thought I'd do is just show you a little
bit about our apps if we can switch to
the to the system this is that these
apps are built with Oracle's Jade with
Oracle's developer tool which is a four
GL style tool and it runs now on the mac
platform so what we're looking at here
is this is just going to be a quick
general ledger example but basically
what we have is a process flow navigator
so you know users as they want to do
transactions whether its purchasing or
general ledger manufacturing or billing
or whatever they have a kind of a map
that they can walk through as they go
through the transactions so one of the
things that we can do here is for
instance let's say we were going to
reclassify our revenue as we move
through these maps you get a little
green line indicating where you've gone
and what I can do now is launch the app
and as I do that we the app comes up
relatively quickly this is a-comin oh I
guess I should also mention the
environment here all we've got here
running is internet explorer with a
standard apple mrj and all of our apps
and everything is across the network
it's our corporate Oracle corporate so
what we have here is basically way to
look at information for our journal
entries we can resize some columns we
can add some tracks and things let's
just quickly do a journal entry kind of
show you want you to see you know part
of the the AWT that the modified or
enhanced pwt is you see the whole screen
just popped at once because all the
objects are being laid down in memory
before they're being displayed so what
we can do is we can do a quick
transaction here if I can type without
my fingers here so we can kind of go
down here one of the characteristics of
the Java app for us is what we call
high-volume productivity one of the key
elements we have to product strategies
or design points if you will for our
apps we have what we call a self-service
design point which is generally
characterized as HTML easy to use single
click that kind of thing we're all
familiar with it and placed in the hands
of completely untrained users the other
audience what we would call the
proficient professional clerk it's
somebody that actually demands high
productivity apps they're sitting down
their whole job is doing nothing but
keying in data all day long and what
they have some of their requirements are
things that only Java can handle things
like type-ahead things like when you're
looking for a list of values the the
windows pop up in the context of the
screen having keyboard equivalents
there's actually a large number of
things as you probably have made choices
yourself about what's good for Java
versus what's good for HTML so and of
course we have Java embedded in HTML as
well but these these are the core what
we would call heads down administrative
apps so you get certain kinds of
dialogues popping up
ah and all sorts of keyboard equivalents
here i'll just show you some of our UI
here what we're going to do is we're
going to move product revenue from see
here i have to define my accounts here
we've got so we have some unearned
revenue that we've received on behalf of
all these universities they've been
waiting for macintosh product all these
years i'm going to go ahead and and put
that in there and we'll add another
entry here and if i knew these entries
numbers off the top of my head and just
do it so here let's let's go here quick
transaction and now we want to go from
unearned revenue we're going to go to
miscellaneous revenue and we just so
happened oops Oh error message there we
have product X which means mac-10 so
we're going to go with that and we're
going to put in 100,000 whoops on 22 few
here we only do balanced entries okay so
basically we do a transaction we
interact with it a little bit we go
ahead and post the transaction up tells
me it did it and it gives me a tracking
number and basically the transactions
done so that's kind of a interactive
experience for a production user and
what I can do now is just show you as we
go down through the process map oops
what we want to do is as we go through
the process and post the journals then
you end up seeing you know the kind of
the continuous pneus of the process so
it's a great way to write apps and it's
a great way to build them modularly and
based on different kinds of control
points that businesses need this is the
kind of a really nice user interface to
break up
big apps into functional components and
do stuff so that's just the marketing of
our own products but basically that's
what I wanted to show which is our
developer product that is this it's this
product actually is the development tool
for roughly 7,000 of these products that
cover 70 modules so it's a very big app
and it's a it's the it's Oracle's
premier application thanks a lot ok so I
know there are folks out there saying
well that doesn't look like a Macintosh
you I that's not the idea the idea for
Oracle is and people could argue with
this but at least it's their goal to
have a branded UI and for them to have a
UI that works the same across multiple
operating systems and in fact Oracle
spends quite a bit of time making sure
their app does have the Oracle branded
look and feel so that's in a nutshell
why it looks different and again that's
one of the goals of the platform the
Java to you watch toolkit is to allow
you to have the branded you I if that's
what you want so I don't know how many
of you folks caught it but there was a
relief press release April 14th the
talks about son working closely with
some blue ribbon vendors fortunately
Apple was one of them there's been a lot
of frustration in the java community
some of you are probably aware of this
with sons attempt or lack thereof to
standardize java there was a nancy
attempt there was an ECMO at nth and now
the third pitch so to speak is this new
JCP 20 and we've been working closely
with them to make sure this is a
sensible process which will benefit
Apple as well as the other companies and
actually as well as individuals who
might want to get their say in as well
so i think this process is actually
looking pretty good and it's still
evolving
but the good news is we're at the table
the other press release as far as Java
compatibility is concerned is they just
released 13 which is the hot spot client
vm that actually we're shipping it's the
same hotspot client p.m. we're shipping
in DP for but we haven't integrated all
the 13 stuff yet so the release that
you're that you're getting is based on
somewhere in the middle between 10 and
13 but by the time we go GM we will
upgrade to 13 entirely which is the
current shipping standard we currently
pass ninety-six percent of the j ck test
i'm told for a beta product i'm pretty
happy with that so we have four percent
left that will nail on by the time we go
GM and as i just said we plan to upgrade
to 13 and son really did listen to their
customers for 13 again they got a little
bit burned by the big gulps they asked
everyone to take with 12 and 13 is
almost entirely performance and
compatibility focus it has almost no new
features and has about the same
footprint as the previous version so
another demo the first demo it might
have been obvious but again it's mr j to
to running on mac 9 platform the demo i
want to give now is asked blake stone
and incredibly talented engineer from in
price to come up and give a demo on java
to on 10 so thanks
before we launch into this I have to
clarify a few things we're going to be
showcasing some fairly interesting
technology here at this point it is a
technology demo we're obviously working
with early technology from Apple in the
form of DP for we're working with
technology of our own but we haven't
announced any products at this point so
I'd like to have to remind people of
that before things get too excited but
it is interesting to note what we've
been doing what we've been doing is been
working with a partner who is extremely
interested in building a premier Java to
platform in building technology that
makes Java developers sit up and take
notice so that attracts our attention
after all we have some absolute
world-beating products in that area as
well so there's some natural synergy and
we thought this is an opportunity to see
how they work with partners and how that
process might work out and be honest
it's been exceptional I've been very
responsive to our need for performance
tweaks our need for fixes in some areas
in fact just the last session I was in
with John berkey I saw him in the row
ahead of me busy trying to tweak a few
last things to make the product even
faster I'm not going to take the chance
and run with those fixes here on stage
but just so you know that kind of thing
is ongoing we're getting better and
better performance so what is it that
I'm talking about of course what I'm
talking about is jbuilder so if we can
switch to the machine over here and
bring it up I'd like to have a look at a
product that consists of about five
thousand classes so you saw the
statistics on Java to itself this is
enormous in terms of code bulk our
product is actually larger than the jdk
in terms of the amount of Java code
involved so will it run on this new
platform in a preview stage well we'll
hope so this is a demo after all we'll
see just how far we can get I'd like to
showcase some of what you can do with a
pure java application for those of you
who aren't familiar jbuilder is java
development ide and as such it has a lot
of what you'd normally expect the
ability to create and manipulate
projects edit code and so forth and I'm
going to start with a new project and
just bring up some of the Wizards that
we have for manipulating projects in our
environment
put the system swap itself back in
hmm it's always the way I like
demonstrations to begin we'll see if
this doesn't behave well for us will
restart the product of course this all
went incredibly well in rehearsal so
some of what was being talked about
earlier is to the launch performance for
java applications so we'll get an ideal
opportunity to demonstrate that here
launch performance for a java
application of course is critical and a
lot of what we're seeing is a very
expensive startup process in terms of
loading the imaging and so forth of the
basic class libraries but really the
launch time for the product is not bad
it's actually faster than a lot of
native applications on the platform
which is got a quite gratified so from
there we're going to go ahead and start
off with our new project so we build a
new project here within that project I'm
going to request that we go ahead and
build an application and it will give us
a couple of the sort of basic
application starting points and a frame
and bring us into the editor in this
environment what's interesting here to
note is that we're running a pure java
application the editor isn't some piece
of native code in the environment the
editor is actually written in Java code
and as such you'd expect it to exhibit
performance problems but in practice
things like syntax highlighting noticing
the keystroke that the contents was
changed into a comment is incredibly
quick the ability of the environment to
keep up with structural changes is quite
amazing as well what you're seeing on
the left hand side here is a structure
pain showing me the structure of my file
but I have a single class with a number
of elements declared if I were to go in
and declare a new structure element it
just shows up in the list so we're
parsing behind the scenes to try to give
us the information about what is in our
particular file here and we can browse
using that information as well we're
also getting additional information on
the fly because we're parsing the Java
code in the background if I make a
mistake in my code and just keep working
it'll notify me by showcasing that there
are errors in my code and allow me to go
directly to that line of code so i can
fix my error on the fly so we're not
waiting for compile time to catch that
kind of thing it's an extraordinarily
productive environment so I'd like to
start with that as a starting point
and go ahead and try to build something
but of course when you're building
something what you'd really like to be
able to do if use a visual layout to
work with Java Bean so I'm going to move
over to the designer here and in the
design environment we have the ability
to place javabeans i'm going to use
swing components after all they are more
or less standard javabeans and they'll
allow me to to prototype the UI fairly
rapidly for those of you coming from an
environment where I hear lots of
concerns about layouts is there enough
space on my layout to accommodate this
change well if you're a Java developer
you know that there's some extremely
sophisticated technology for dealing
with layouts but it can be quite
difficult to learn so it's easiest to
start in sort of a raw positioning an XY
layout mode I'm going to go ahead use XY
layout to place a scrolling region and
within that scrolling region I'm going
to go ahead and drop a list and I want
to drop in a couple of buttons and I
want to drop in a text field and then
we'll go ahead and write some code
what's interesting is that I have been
writing code all along everything I do
in here every time I drop a component
every time I edit something it's writing
java source code so you can see behind
the scenes that it's written source code
here to set the text on the buttons and
so forth what's unique about our
approach is that we don't deal with this
as a code generation or one way
technology we don't block this off from
your editing we treat this as a fully
two-way tool where I can go ahead and
modify my source code and then drop back
into design mode and you'll see that
those changes are reflected immediately
in my design it's actually parsing and
executing the store
so we'll make a few more adjustments to
my layout here and once I've got to lay
out more or less the way I want it of
course this this gives me absolute
positioning which 1i scale things are
changed the text on buttons isn't going
to work for internationalization so I'd
like to change it to a grid bag layout
so what do I need to do I need to tell
it to change to a good bag layout and
what's happened is behind the scenes
it's figured out the optimal grid bag
layout to use for that position so as I
internationalized this he's my
internationalisation will see the
automatic adjustments that are taking
place so I've got the basic layout in
place and I'd like to go and add a
little bit of code behind the scenes and
of course we can just wire events up i'd
like to go ahead and and wire up an add
item and immediately I discover i want
to add an item to a list swing lists are
a little awkward you need a model you
need to wire up the model and so forth
that's fine this is fully to way we can
drop back into our designer and pick up
a swing model using our class browser
you'll notice that our class browser
knows about com Apple classes it's
because it's dynamically discovering
from the classpath what classes are
available so if you add third-party
classes or switch to a different version
of the vm will automatically adapt to
that additional technology but let's go
in right now and pick up the Java X
swing and I'm going to use the default
list model I can find it and so I'm
going to drop a default list model in
place take my J list and wire the model
up and now I've established a
relationship between those two and i
think do something interesting in code
with them what i'd like to do in code is
go ahead and add something to that list
model do i remember the name of the list
model no heavens it's a list default
list model something so i'm going to
invoke code insights which is a
technology that from within this context
tells me here are the things i can
legally refer to in this case it knows
about default list model one because
within this scope it's visible okay i
want to use default list model one what
do I want to do with it well now it's
really a Tyvek scare
and said here are the available methods
and there is in fact something called
add element and for add element it's
gone and checked and there's only one
overloading of that method it takes one
parameter of type object and it's even
gone to the source code for that method
defined the name of the parameter obj
it's kind of convenient so we'll go
through and take up the jtextfield
jtextfield one and again use code
insight to find get text it takes you to
know parameters or an offset in a length
but that sounds fine to me we'll go to
the next step which is that I want to
wire up the delete button to go ahead
and delete the selected item okay so it
looks vaguely similar but what I really
need to do is I need to find out the the
position of the selected item and I can
do this from the list there's a get
selected index but what does that return
if there's no selection well if I can't
remember off hand I can simply select
with a single keystroke but I'd like to
go and find the declaration to that
method it found the source code where I
can see the Javadoc see offhand but it
returns negative 1 if there's no
selected item and just use the browser
style controls to navigate back to where
I was writing my source code
so if the position isn't negative 1 i'd
like to go into that default list model
and remove and it takes an integer good
it's going to make my life easy so I've
got live code here I'm going to go ahead
and compile that code it's compiled it's
running we have our own compiler
integrated in the environment you'll
notice of course since it's loaded it's
active it's a lot faster than using Java
Sea from the command line and we've got
a live application so we'll put in one
and two and three select with pellet
directly next time we'll delete one of
those items gleet does nothing if
there's no item selected and so forth
now it just so happens that our wizard
has helped me write a well-behaved java
application that if i close the window
the application goes away have you ever
written an application where that's not
the case it's easy to get rid of all of
you I and still have a rogue task in the
background so we provide a natural
mechanism for seeing not only console
i/o from your application but to be able
to see that it's still running courtesy
of an icon here and to be able to just
stop that application directly from
within the IDE kind of a nicety ok so
that's sort of a basic swing application
but if I wanted to take that to build a
mission-critical database application
with it to be sort of painful there's
obviously a lot of work that needs to be
done to wire things up to swing so let's
go another step and see what it would
take to write another application within
this project from my other application
I'm going to take advantage of the fact
that we ship with an awful lot of
interesting technology out of the box
our own class libraries which you're
free to redistribute in the form of
something we call data Express so I'm
going to drop the data Express database
and try to go and connect to a database
but wait we need a JDBC driver and we
need some sort of database on the back
end well it's nice our professional
edition actually ships with a full
sequel database entirely written in Java
called J datastore have a quick look at
that that database behind the scenes I'm
going to go and open a J datastore
database and I'll have to bring up the
database technology so we'll launch the
server here and then browse quickly to
see some of what's available in this
particular database
so this database we can see how much how
object allocation is working within the
file we can see a bunch of the tables
that are available within the tables we
can see indexes and so forth so we have
this full management interface again the
management is your face itself of course
is written in Java so we've got a
database to connect to let's go ahead
and use an existing connection to this J
data store database test that connection
to make sure again the database is up
and running that we can connect to it
without any problems probably shut the
database down helpfully by quitting that
prior application and then go ahead and
connect the query to it and so we have a
nice little component that represents a
query see ya and connect the query to
our existing database use our built-in
sequel builder to go and find a table
within that grab all of the columns from
the table we can see the sequel that
it's automatically generated on our
behalf and we have a query fine but we
need to connect that to visual
information that's fine we have
components to that as well I'm actually
going to just use borderlayout to do my
work here drop a strolling region and a
table and how much co2 by written so far
well I can connect to this database and
get live data at design-time end at
runtime without writing a single line of
code and we'll take that a step further
drop in a status line and the navigation
interface as well and connect those both
to the same data set so now i have an
application that i'm going to go ahead
and compile and run and we'll go ahead
and connect to the database and see what
zero code can do in terms of database
connectivity with java that's excuse me
launch time again takes a moment for it
to come up and actually connect to the
database in the background
but what will have here is a UI that
allows me to view that information
manipulate information navigate through
it etc so we can navigate we can of
course resize columns we can reorder
columns if I want to change the name of
somebody here I can change it we can see
in the status area that I am editing a
row normally the status area shows us
what record were on we can commit those
changes back to the database all without
writing a single line of code so that's
fine let's def dandy what we've got is
the ability to be extremely productive
at dealing with Java code in this
environment but you wouldn't have much
of a full-featured ide if you didn't
have a debugger so I'd like to take a
quick tour of the debugger we're doing
okay on time here have no idea to be
armed basically I'd like to bring up a
basic application place a breakpoint in
it and we'll go in and launch the
debugger our little application here
performed some some basic console you I
in this case it's going to prompt me for
my name before hitting that break point
and then stops when it hits the break
point of course at that point I'd like
to be able to see the context that I'm
in so I can see that I am stopped at a
thread called main in the main thread
group which is in the system thread
group and that there are two stack
frames here I called from the main
method into the go method and I can see
in the go message that I can see the
this reference drill down into that see
the class that it belongs to any of that
classes parent classes and static
members I can see other variables and
context like this first what have you we
have some interesting convenience
functionality for allowing you to
manipulate information as well I can
actually go and change values on the fly
in an application on debugging for
example if I step past this line that
prints my name I could go and even
change a string value on the fly and say
the new string value
I got focused in the wrong place here of
course we are running on beta software
please expect a few quirks along the way
so we can change string values integer
values within the debugger we can also
do things that are quite unusual for a
debugger like create a field breakpoint
what's the field breakpoint it's going
to tell me every time it tries to
reference this particular variable so
I'm going to continue my execution here
and we'll see that it is stopped
automatically at this line which is
referring to name and giving me the
message stopped at break point reading
debug me name in fact we can go and
select for that field breakpoint
individually whether it should break on
reads of that variable or break on
rights of that variable so an enormous
amount of flexibility I'd like to do one
last look because Java takes a serious
look at what it takes to do
multi-threaded applications there's
language support built right in for
multi-threading so what happens when we
go to debug a multi-threaded
applications well it adds a whole new
set of problems because we need to be
able to keep track of what locks are
being acquired in this case I'm
acquiring two locks on a thread and our
debugger will actually show you the
monitors it'll show you what the object
is that's locked and what thread is
locking it and as I proceed a little
further here and get three threads we
can see situations where this object is
is owned by one thread there's another
thread waiting on it so that we can see
situations where we're getting multiple
threads cooperating here and go a step
further to situations where our entire
application has locked up on us and by
pausing it we can see that it's
highlighted these two as the cause of
the deadlock that is currently active in
my system
I can tell we're running a little low on
time here I suspect but I would like to
take this time to really point out that
what we've taken here is again an
enormous java application and brought it
over to the mac OS 10 platform and while
it would be natural to say what kind of
porting work did you do to bring it here
the porting work we've done is working
with Apple to tell them what issues
we've run into in terms of compatibility
with their vm not a single line of code
has changed from our shipping products
this is the product you can purchase
today on a number of other platforms so
that's really exciting from our
perspective we're looking forward to
moving a little further with this
technology incredible
well that demo blows me away you guys
were a little quiet didn't it blow you
away do again it's the best way for me
to show you how real Java to is on Mac
10 this thing is a torture test for the
Java VM I think son uses it internally
to make sure their stuff runs every time
they make a change so again it's you
know not a shipping product it's not
perfect yet but considering how much
work was done on in prizes part it's
just incredible how far we are and the
person on our end who actually helped
get it to this point and really owned
this is John berkey John can you stand
up for a second in fact last year at
WWDC when I got off the stage Blake
introduced himself and told me they were
doing this work and asked if we were
going to have Java too and I said yes
we're working on it and then went back
to the shop and just informally said to
the folks we have to make sure this
stuff works for next WWDC and to see it
working now again is really great at
that time it wasn't even the product you
would come and shown me the product
later on and when actually I gave
obvious demo as well because it was the
first pure jaw large pure java
application we had seen running on
windows at the time that look like a
great application it wasn't slow it
didn't look funny and and so on and so
forth whereas a lot of the other IDEs
and products in the java space we're
typically not as a fit and finish that
we typically expected Apple so let me
find my deeper I think it's in my pocket
okay so the last part of the talk we
have like 15 minutes left and because
this is an overview talk we're advised
not to do Q&A so I don't think we're
going to have any time to do Q&A today
so I urge any of you if you have any
questions on this stuff either go see
the other talks about Java or come to
our feedback form which we'll talk about
later so now I'd like to talk about the
third buck third mug which is
integration by far this is the most
important thing we're doing at Apple is
integrating this in a sensible
integrating job in a sensible way what
does that mean from my perspective
windows deployments totally busted now
because again son has made this big leap
they went from 118 to a 2.6 megabyte
footprint that's what those numbers say
to a nineteen point two megabytes
installed footprint with one dot to dot
to Microsoft doesn't bundle this we are
going to be bundled bundling this so
anyone who writes to the job of two
platform gets to depend on it on our
platform they don't have to lug it
around like they have to on Windows to
give you a sense for what 20 megabytes
installed is is like I decided I'd
measure carbon and carbon weighs in at
about 11 megabytes on DP for so you know
since you're a Mac Developer what carbon
is about so imagine two times that which
is again what the installed footprint is
on Windows but the install footprint is
only one side of the story the I think
the most important side of the story is
Java was not the design with a static
deployment model in mind just think if
you're an application and you're
carrying around this Java Runtime
environment that's 20 megabytes and it's
just a part of yourself so to speak why
are you paying for the interpretation
why are you paying for the class
verification why are you paying for
interpret you know there's just so much
stuff you pay for because Java is a
great systems model system language and
vm model that carrying it around makes
no sense from a time perspective either
so both from a time and a space
perspective
what people are doing on Windows is
nonsensical the Sun will solve this
problem I believe even in spite of
Microsoft but it's all today on our
platform so Oracle can go to their
customers when they move the Java too
and not have to carry around another 20
megabyte jar file every time they open a
connection for instance so I think it's
pretty critical that we r bundling this
stuff we're tightly integrating it and
we're going to make sure the footprint
is is very low as I think most of you
aware we really like the Java language
and virtual machine again it's a great
model it's a great systems model C++
drifted away from any application uses
at the system layer because it wasn't a
great system level object model it's a
fine it's a fine object model but it's
just as an appropriate for systems
development and that's one of the
reasons job is taken off technically as
much as it has it's very appropriate for
a system object model just to further
explain what I mean by that I'm sure
some of you are aware with the fragile
base class problem i guess is one common
way of referring to it but basically the
ABI that a compiler uses is is in the
c++ world typically proprietary and
owned by the compiler java vm specifies
how all da class files are to be
interpreted this is a huge
interoperability win and it means you
can migrate to new instances of the vm
fairly painlessly see we have the java
to standard edition packages but here's
where we innovate we have web objects
and as you heard today we're going to
appear java version of whether objects
but even right now it's all wrapped
today so that you don't even know it's
written in objective-c even though it is
cocoa written in objective-c we wrap
that as well but it's totally accessible
from java and quicktime is is also
accessible from java all three of these
technologies are incredibly important to
apple and sitting atop is project
builder
and interface builder let's take the
tools first I just want to show you a
screenshot of something I think you saw
in the keynote avi brought it up reef
Lee we have totally rewritten what next
used to call project builder rather than
rename it we kept the name but rewrote
the entire product we figured most folks
in the apple community didn't really
weren't familiar with project builder so
we you know the name was sensible so we
kept the name and rewrote the whole
product and what you're seeing here is a
sketch which is on the system you can go
look at it it's a cocoa objective c
program it's a little bit silly we still
have yellow in the package names but
they'll be renamed appropriately before
we go final with this but right there
you could see with project builder we're
going more for i guess some people refer
to it as user centered some people refer
to as a document centered but that
editor flash viewer is used to view or
edit multiple data types in the keynote
i think you saw a fancy diagram in there
in this case you can see there are
release notes which is an RTF file
that's a tiff file and that's a java
file all from the same context you're
not switching to and from many apps and
project builder is a tool which a teepee
for fully supports c c++ ansi c
obviously and supports a lot of our
frameworks java developments just coming
online it works fairly well but for GM
it's going to work a lot better if you
care about it go see the project builder
talks oh another important thing to
mention about project builder you just
saw the great enterprise development
environment one of the big differences
between project builder and jbuilder is
jbuilder is pretty much a single
language single framework development
environments targeting java too okay
what project builder is it's a
multi-language multi framework
development environment again it
supports the sea based languages along
with job
and it's going to be supporting
applescript as well there are some
demonstrations on that so there are
trade-offs you make in a multi lingual
on environment that you don't have to
make in a single language single frame
work environment so I believe both
actually have different markets and I
hope to see both of them thrive in our
community with objects they are giving
their state of the union right now I
snarfed a couple of their slides if they
fortunately they're going at the same
time because this was going to steal
some of their thunder but powerful I'm
sure you're familiar with it we use it
internally pretty extensively we run our
whole apple store on it and here are
some of the features so one thing that's
important to note with web objects and
we use it there are many many customers
who are using it Disney mci just Steve
showed the whole list of them at the
keynote it's technology which is very
mature it's been around for a while and
it integrates not only with Java now but
with quicktime for java as you saw in
the keynote we want many awards the most
recent one i believe is we won the cody
in march and it's critically acclaimed
five-point know the big thing with five
point 0 is just going to pure java right
now it depends on the objective-c
runtime for its deployment and the
benefit of going pure java is where the
objects can benefit from all the other
java VMS that are being done at HP axon
and so on just as we're investing in
java so it means we don't have to deploy
some of the objective-c technology on
some of the servers and it uses jdbc and
i believe by i don't know when five
point i was going to be released i guess
i shouldn't stay in the future quicktime
for java i won't go into it except
there's a beautiful book that's been
written I don't have a copy and I
couldn't get a screenshot of it
but I urge you to take a look at
stacey's or wherever you buy your book
on computer books there's a great book
on quick time for java and again it
gives you the real professional quality
digital media capabilities from java and
in fact allows those class files to be
used verbatim on either windows or mac
there's nothing proprietary a special
that we're doing to make this work and
there's a quick time for java talk
actually right after this one they'll
probably be really nice to talk to you
to attend an a2 okay the swing looking
the swing integration we've done is
pretty unique in the many of the
platform looking feels that are done
with swing are emulated that means they
don't interact with the Native system at
all they try and emulate the look and
feel what happens there as you can
imagine is when the look and feel
changes you have to then re emulate or
end up having the wrong look and feel
and in addition to changes sometimes you
just get it wrong because you didn't
really understand what the native
looking feel was so there's a whole
class of bugs that I'm usually crop up
around emulation so what we're doing is
integrating directly with the appearance
manager so the aqua look and feel you
saw on stage in the web objects demo
with swing was a swing application that
was again written directly to appearance
manager under the covers the java
programmer didn't know anything about
the integration it just happened
automagically so we also do the correct
many placement correct meaning
associated with the screen as opposed to
the window and swing applications look
great so from our perspective now the
job is fairly fast and I think it shows
that that demo again that's a large
application the performance of it is
fairly good so the only problem so to
speak with that app is it didn't have
the Aqua look and feel so I'm going to
bring blake up briefly to show
you that ok I can get the mic back great
what we're going to do is have a quick
look at the fact that jbuilder was
designed from the beginning to be look
and feel aware so when we go to choose
ide options it gives us the ability
among other things to switch between the
installs look and feel so here the mac
OS adaptive look and feel is just one of
the ones that shows up so once we pick
that and hit ok we'll see that we get
the aqua look and feel
menu bar at the top of the screen
context menus that are translucent an
actual display that gives us you know
again additional tab the work so it
looks fantastic and we're really looking
forward to allowing this to be sort of
the default look and feel basically if
this is something you're excited about
please let us know spend some time to
catch me while I'm here at the show or
talk to Tony here in the front corner if
you can wave or tel apples so this is
something you're interested in seeing
thanks again so okay so actually I have
these boring these will seem boring now
but that's good thank you see Oh what I
do oh ok ok so you'd see switching back
and forth it's almost like well let's go
to the next one here's a it's called
metal it's the built in Java look and
feel and when you switch to aqua it's
almost like it comes to life it's just
so much prettier
right so unfortunately some of this cool
aqua integration isn't in DP for so you
guys won't be able to play with it for
do people or sorry about that we
actually hope to do a net release in
between now and GM where you can get on
some of the stuff for months before we
actually go GM we're going to improve
our project builder support for jobs i
think i mentioned that we're going to a
new application embedding model the main
folks you care about this or like omni
web the internet explorer folks that's
how you embed a vm and an applet within
an application but you may have an
application that wants to embed this
stuff within you if so then I you'll
have this application and bedding model
that we're doing Wow closing thoughts we
have how many minutes we have four
minutes left so I guess what's getting
fun now is we have a team that's kicking
some serious butt on this stuff and
there's real applications that are
starting to get exciting like velocity
like Oracle's apps like this beautiful
ide that in prize is done and
fundamentally that's what we do if this
stuff there's no way to look at Java by
itself and say it's great you have to
look at the applications that are going
to be produced on top of it and say
they're great and if in fact they're
great then we're happy and we know we're
doing a good job so I have like two or
three minutes left I'd like to bring the
team up and give them a round of
applause folks you want to come up
you