WWDC2000 Session 181

Transcript

Kind: captions
Language: en
good afternoon what we're going to be
doing today is going through basically
this is the next in the series of Java
talks we're going to be doing to the
conference and the goal of this cut this
talk is to basically make sure that
we're all on the same page as far as
developing java applications because i
don't know how many of you already have
existing applications but Java we've got
applications coming from mr j on classic
mac OS also from a collection of other
platforms what we wanted to do before we
dove into some of the other talks is to
make sure that we're all working from
the same foundation and understand how
development on Mac OS 10 is going to
work going forward so the first thing
that I'm going to be going through
configuring nope nope that's me the
first thing that we're going to do is go
through just some basic foundations of
what is on the Mac OS f 2 10 platform
the CDs that you got yesterday make sure
we're clear on the infrastructure that
you've got the development tools that
you have available to you and that kind
of thing and then we're going to do is
spend the bulk of the presentation
walking through what you need to do to
bring your applicate your java
applications to mac OS 10 how you build
them how you set them up that kind of
thing to the point that you're actually
ready to deliver them to your customers
on Mac OS 10 and then at the end I'm
going to point you at all the different
sessions that you can go to after this
to get more information but we wanted to
make sure before you went into those
other talks that we're all talking on
the same page so it occurred to me when
we were like going through setting up
this presentation I'm trying to figure
out how to lay this out so it would make
a certain amount of sense and it
occurred to me that building a java
application is real similar to cooking
for to put it real simply there's a
whole collection of steps that you have
to do to go through and make an
application that are very similar
actually to the steps that are required
to bake a cake or something like that
first of all there's a collection of
ingredients and tools you're going to
need to make sure you have in the case
of a recipe it's let's say you're making
a cake it's that flowers the sugar the
eggs all that kind of stuff it's the
pots and pans the oven that kind of
thing
you in a job application is real similar
you've got your source code you've got
the things that you're bringing from the
other platforms into the equation and
then there's the things that we provide
beyond that there's a bump there's a
collection of pre-prep steps that you're
going to need to go through and we're
going to go through that as a relates to
your application then there's the actual
bulk of the preparation of your
application what you do to actually
build the application to get to the
point where you've got a running
executable that you can test and run and
debug and that kind of thing but in my
opinion almost more importantly
especially if you're coming from a point
where you've already got an application
is once you've got the application ready
and running there's a collection of
basically flash-in-the-pan kinds of
things all of the garnets and the stuff
that goes around your application to
make it behave well and fit in well with
the Macintosh so we're going to go into
how to make your java application then
blend into the Macintosh and be
something is that your end users will be
happy using especially you've got
hardcore Mac users that are used to a
whole collection of behaviors there's
things that you're going to need to be
aware of in your application to make
sure that Mac users are happy with your
application and then finally there's the
delivery how do you actually bundle it
up and give it to your gear developers
so let's dive in first of all there's
this applies and ingredients that you
need to walk into your development with
like I said before the supplies and
ingredients in cooking or the arguer the
things you buy from the grocery store
and the things that would be in your
kitchen in your java application it's
your source code it's your make file
that your projects your your code
Warrior Project if you've got those any
resource files icon files images that
kind of thing and it's also the tools
that we're going to provides I'm going
to walk you through basically what we're
going to be providing and what you need
to bring to the game so let's start off
first with a basic gun in the block
diagram that you're if you're familiar
with in all of these talks is the basic
architecture as it relates to Java first
of all you've got the classic Mac OS 10
core OS is a standard UNIX tile mock
colonel all of the systems facilities
that UNIX developers are familiar with
are going to be avail available to you
on Mach 10
an F why Mac os10 lends itself very well
to Java Java is designed around that
those kind of primitives in that kind of
architecture so that's what's sitting
under the covers that's some of the work
that we had to do on classic Mac OS to
shoehorn Java on to classic Mac OS we
don't have to do as much of the
nitty-gritty kind of things because the
OS is down there on top of it you've got
the standard UNIX development tools that
UNIX development developers are familiar
with as far as command line tools all of
the facilities that you come to know and
love or know and hate depending on how
well you like UNIX those are all down
there and available to you so if you're
coming at it with from a UNIX
development environment you've got those
available to you in addition there's the
Java which is there the bulk of this
presentation in these talks is what
we're going to be providing is a core
java java to version 1 to 2 platform
with all the java tools that are
familiar to java developers on solaris
all of the standard command-line tools
in addition to a collection of tools
that Apple's providing to you to make
your application better make your
application development experience
better on the Macintosh Mac os10 pardon
me and on top of it is your application
so that's the kind of final product that
we're hoping to walk out of this
presentation with so first of all the
supplies what you what what we're going
to be bringing to the table is a basic
unit mocks Colonel Java to standard
edition and project builder which we
believe is a world-class development
environment that you can use to build
your applications and that's what the
core of this presentation is going to be
about it's using project builder to
build job applications I'll go into some
of the other tools briefly as well but
this is how we're going to slam this
presentation and what you're going to be
bringing is your standard java
application and your recipe for building
that may be the make files that may be
the code word projects that kind of
thing but however you build it your
understanding of how to build your
product so the base development platform
is a like I said the standard mock UNIX
base OS standard UNIX development tools
for those of you that are that have more
complex job applications that are pure
Java you're going to care about a
collection of these things like make
organ ooh make or
jam that comes with project builder ccgt
see if you care about those kind of
things gdb standard UNIX development
tools for building native methods for
building any other portions of your
platform in addition to Java to the SDK
standard edition right now what's on
your CD is is the one to two version of
the doubts you standard edition our
plans for Mac OS 10 GM as they stand
right now are to rev to the 13 version
but that wasn't available at the time we
had to slam the CDs so we didn't merge
that in to what you got a news on your
CD but that is a plan for Mac OS 10 GM
high-level Java to feature Stephen over
some of these and I could spend an
entire talk talking about all the
different features that are in Java too
and I don't want to go into all those
details but there are some high-level
features that you should be aware of
that are interesting especially to those
of you that are familiar with mr j on
classic Mac OS first of all there's the
Java foundation classes which I mean I'm
bias that those my opinion is the most
interesting which is the swing UI
framework particularly wishes a a much
more flexible much more well architected
UI framework for developing applications
that allow you to write applications
that much more seamlessly move from
platform to platform then we got with
the classic awt it also allows for
pluggable look and feels and you've seen
actually demos of that in previous
presentations of the mac OS look and
feel the aqua look and feel that we're
working on for Mac OS 10 in addition
there's the Java 2d graphics
architecture which is an extremely
powerful graphics architecture that
provides a lot more graphics primitives
and in functionality than you got out of
Java in the past and we're working
really hard to tie this in with the
platform and the infrastructure that's
available on Mac OS 10 there's also a
collection of collection classes the
kinds of infrastructure that a lot of
equitation developers end up rewriting
rewriting whenever they get a new
platform javis providing a lot of those
things for you in addition there's a
policy-based enhance security model
which is a much more exhausted security
model than was available in the past
much more flexible and also at
election of 80 eyes to the vm and this
is a particularly interesting to those
of you that are doing development tools
we would actually love to hear from you
if you're doing development tools
because the the vm that is on Mac os10
allows for provides api's for plugging
and debuggers and plugging in profilers
and that kind of thing so if you're
interested in that they're the follow-on
talks will give you more information
about that we would actually love to
talk to you about that and then there's
a gazillion other features I mean I
don't know if you I don't know how many
of you saw talked yesterday but the the
Java to platform is huge compared to the
JDK 11 platform so in addition like
we've done on mr j in the past java for
mac OS 10 is going to provide a
collection of other features as well
first of all the hotspot client compiler
you saw a bunch of numbers on this
yesterday we hope that this is going to
give us amazing performance on Mac OS 10
and make your application screen in
addition there's the we're working on an
improved application embedding model I
don't know how many of you are familiar
with the J manager but the J manager
we've discovered over the course of
years of development is kind of complex
to use and a little confusing to
application developers to use on Mac OS
10 we're moving to a much simpler and my
opinion much more powerful embedding
model that is very similar to what
you're familiar with with developing
other carbon applications so Blaine's
talk tomorrow will provide more
information on that as well as a new and
improved Jade Iraq native method access
that will that we ended up having to
read CH ain't make minor changes to to
allow for pluggable VMs which is one of
the features of the mac OS 10 java and
then there's a collection of other
features that it's better available as
well what isn't in DP for i figured it
was worth calling out what isn't there
so that when you're poking around and
starting to play with this that you
don't expect things that aren't there
first of all the aqua look and feel for
swing it's not that it's not there
there's a collection of very visible
bugs so when you're playing around keep
in mind is that there's a couple of very
visible bugs that you'll see that just
didn't
Sekot we were like cramming to get stuff
in and you'll see that those bugs have
actually been sick recently but they
didn't make the cut for the CD so we're
going to work on a mechanism to get
those out to you but in the meantime
you'll notice things like scroll bars
aren't appearing and things like that
that will be fixed obviously the
civility fixed on stage but I didn't
want you surprised and mailing us
telling us that it wasn't there because
we know implemented support java 2
provides a impressive implemented
support for internationalization and
that kind of thing and that is not wired
into the system is implemented support
right now since implemented support
isn't there java sound java tube
provides them actually provides the
sound of architecture which wasn't was
really there in previous versions it was
but java to sound isn't there and
printing almost is there but not quite
so and the emerging toolkit classes
emerge a toolkit classes are one please
if you're using in your application we
would also like to hear from you because
we didn't put those in largely because
we need to rethink some of those and see
how they apply to mac OS 10 so those
will be in as appropriate NGM but where
we architecting some of those so if
you're relying on those those aren't
available in DP for we talked about what
the ingredients are in the kinds of
things that you need but the next step
in any recipe is making sure that you've
got everything available to you all the
supplies are lay it out easily
accessible so that you can dive into the
actual presentation the first thing that
you're going to need to be aware of is
your sources you should be able to and
actually what I've done what was doing
in the hall yesterday is basically
taking a you're classy Mac OS drive
slamming it on Mac OS 10 you've got your
folder fold sources your projects all
your all of those kind of things just
make sure that they're available to you
straight across when it was whether it
be unix unix style things or your
networks projects the other thing you
need to be aware of is development tool
there's a collection of using that word
over and over again there's a collection
of development tools options for you
this presentation is going to be
targeted in a project builder because
frankly I think it's really cool but
there's a collection of other
development tools and development
that are also reasonably cool as well or
really cool as well depending on what
the kind of application you're
developing so project builder is what
we're going to be talking about but
metrics codewarrior is also available
and there's I don't remember if they
could wear presentations already happen
or will be happening but code word for
mac OS 10 as well as you can develop on
classic mac OS your code worker projects
and bundle them up for mac OS 10 so
that's an option as well as standard
UNIX tile tools so there's a lot of
options for you and hopefully more to
come and then there's a collection of
other tools the standard JDK tools which
I keep saying over and over again that
are all there there's alternate tools
such as a dike impaler which in certain
situations we've discovered is a lot
faster than Java Sea but it depends on
your situation there's application
packaging tools that we're providing to
you for creating app bundles and we're
going to go into have bundles in a
little little more in a little while but
we're providing some tools for you to be
able to do that kind of thing and
debugging tool there's standard UNIX
debugging tools GDB GDB there's also
work going on to integrate the debugging
into the IDE there's already debugging
support for native apps and we're
working on Java debugging in the IDE so
you should be able to within project
build or do full-fledged Java debugging
so the other thing to be aware of and be
familiar with before you start diving in
is where to find the JDK those of you
that are familiar with unix platforms
will be familiar to a certain extent
with what you find on the disk on Mac OS
10 on necklace 10 in general the
libraries and frameworks are down if you
go through to your director agent if you
installed it you may have noticed in
system libraries frameworks there's a
Java VM framework that's where the
entire Java VM lives there's links in
UNIX places to make make some of the
make files and work in that kind of
thing but essentially you've got inside
your Java VM framework you get your
classes directory that has classes dejar
you've got command headers all the
normal kinds of stuff you also see a
versions directory in there this is an
internal development process we're not
going to have multiple versions of the
JVM on the on the final shipping product
but this is this is how standard mac OS
10 applications are going to be bundled
up so if you go rooting around you'll
discover things that you're familiar
with this is different
what you're familiar with if you're
familiar with him RJ because mr j
separates out the runtime from the
software development kit so that you get
the mr j sdk with all the tools and that
kind of thing those are on the disk here
so those all be available to you and one
in one place so the preparation for the
preparation I'm gonna call the N Rucker
up on stage who is actually also the
person that wrote the Mac look and feel
she's going to help me drive some of
some of the demonstrations the thing to
keep in mind as I'm walking through the
entire presentation is that we're going
to be working on project builder What's
in project builder right now supports
building Java applications but it
doesn't support it through some of the
wizards and that kind of thing there's a
few hoops that we're going to have to
jump through to get to a final built
java application and i'll point out the
differences i'm also going to push up a
demo project up on the mailing list
which will tell you about at the end of
the presentation so that you can city
you can see the things that our
temporary solution workaround versus the
things that you're actually going to be
doing there's but the final goal of
project builder is to have full support
for java applications but what's on
what's on your desk right now it doesn't
do that so for this could i have demo
one up on that monitor please ok so the
first thing that you're going to need to
do when you're when you're building your
application is create a new project so
for this is fairly straightforward new
project the Wizards right now like I
said don't support building java
applications we're going to kind of walk
around it's doing the building of the
java application so in this case what
we're going to do is build a carbon
application because there's a small
carbon stub that we're going to build
this going to launch java so you would
select build carbon application and then
select your project name in this case
i've actually got one that's kind of
precooked a little but i'll show you the
flags that I didn't want to dwell on all
the little the little details so in this
case we're going to cancel out of here
go to file and click select open new
project and then just like the metros TV
project and open that up what you'll see
in here is
basically at your entire project and
what we're going to do with this
template project is bring in all of the
sources all the different pieces that
make up your job application so first of
all what we're going to do is that all
of your sources so to do that you click
on the sources directory and go up to
project add files and select all of your
sources you can you can add them in
hierarchies or you can add them one by
one what we're going to do is go ahead
and add all the Java sources yep the
project builder project project builder
is aware of how to build Java code just
not as standard applications so you can
see in here we've imported all the
sources into Java in addition there's a
collection of resources that you're
going to need to be aware of them be
including in your application to make
your job application look and feel like
a Macintosh application so what we're
going to do here is it again to add
resource files you add files and then
what we're going to do is there's a
metalworker icns basically what I've
done in this is taken the Metalworks
that you get out of standard Java
distribution and made some minor things
to be able to build it with project
builders so we're going to have a metal
hooks that icns where's your icon files
i'll show you how to wire in icon files
and your emerge a app properties so go
ahead and add those emerged a app for
those of you that have already been
playing with mr j and gotten the latest
mrj sdk you'll see the MOJ app builder
this is a new application bundling model
that will allow us to take applications
back and forth I'll talk about that a
little little later but the important
piece of it is it emerged a tap step
properties file so if you could work on
that go back one go back to the finals
emerge a apt up properties what you can
see in here is basically the apt up
properties is how you define all of the
details of how to launch the application
this is where you define your main class
this is where you define your class pass
and then there's a collection of other
you can define command line switches you
can define all the different flags that
we would normally pass into the vm you
define these in here so what you can see
up here is I have defined a the common
app ille emerged a applications main is
that metal works which was the main
class and the class path is where
find these and you'll see that the
Metalworks is just the standard class
the contents resources java metalwork
jar is what project builder is going to
build so that's that path up to it I'll
talk a little bit about in just a second
it but it's a reference into the app
package and project builder is going to
actually build a jar that is called
whatever your target name is on that jar
and so you're going to need to point
your mr j emerg a app tap properties
into there so the other things you can
see up here are some of what I what I
was talking about some of the kind of
workarounds that you're going to need to
be able to use what you've got in your
CD right now a lot of these will be
going away and project builder will be
able to burp out the correct application
for the GM version project builder but
right now you're gonna have to do a
little bit a little bit of a dance to
get this to happen so what you can see
here is the java apps show which is
basically a little tiny see carbon
application that actually launches the
java application and and the headers and
then there's a collection of external
libraries and frameworks which are c
libraries and frameworks that are on the
system that the app builder needs carbon
the system and then lib app shell which
is basically a piece of our java vm that
is responsible for bootstrapping up to
DM so those things will be abstracted
away from you in the final but i did
want to point them out in this
presentation because when you're rooting
around in your project builder files and
trying to get your applications up and
running you're going to need to be aware
that they're there for right now so um
so with that let's go ahead and set up
the build so that we're ready to build
so we blink on the target and then link
on the Metalworks target so we select
the actual application target that we
want and what she'll see up here i am
just flying through this what you'll see
up here is a collection team of pains
that allow you to set all of the build
flags that you need for your application
actually go back to the files supposing
build phases real quick this is where
project builder is rocking all of the
different files that make up your
applications so you can see here you
should check when you're importing your
gear sources that all your sources
appear in here you can see all your Java
sources you can also see the little stub
app we have there the frameworks and all
other bungle resources and things like
that you need to make sure that those
are all visible and appearing how you
expect them to appear I miss imported a
couple of files yesterday when i was
playing with it and they ended up in
bundle resources and set of sources so
you should double check just to make
sure that you didn't make a mistake and
importing your files so the next thing
we want to do is click on build settings
build settings for the way you define a
collection of flags that you need to
build your application first of all it's
the application project name which in
this case matches the targets the more
important ones you need to be aware of
most of these are fine with the
exception of down and build flags there
there are two flags that were that
project builder doesn't add to the
carbon application by default that you
need to look for if you're not going to
use our template the java compiler which
points at the java come which java
compiler you want to use if you want to
use JQ appointed as a different java
compiler and then the library search
path and this basically points the
excess have some compilers to point to
the right to be able to find the java vm
library so and the rest of this should
be set up fine so the next thing we want
to do is blink on the application
settings and this is where for those of
you that read through your book the book
they gave you yesterday I'm you'll see
there's a collection of information that
goes into bundles whether they be at
bundles whether they be frameworks or
what whatever they are there is a info
ducky list that is defined in your
application that defines a collection of
properties this pain here is where you
go ahead and set those kind of things
this is where you settle the different
via bundle properties and any custom
properties that you might want to use in
your application so most of these are
actually set up correctly when you build
your application you can see your
executable to find its metal works you
could change that if you if you're doing
anything custom the only one that we're
going to define in here is the CF bundle
icon file the icon file is where you
would drop all of your your icons for
mac OS 10 so in this case we've got
we've already got a file called
Middlebrooks icns that we're going to go
ahead and put push into there so go
ahead and hit return so that's all we
need to do in there you can add things
if you want you don't need to
the defaults for the most part of fine
and then there's the executables pain go
ahead blanc on the executable saying
this should be fine but it defines where
the executables live and how project
builder is going to go ahead and run
your executable so with that everything
is set up at this point to be able to
run your application you imported all of
your sources you set all of your command
line switches you can you told it about
all of your resources that kind of thing
and so what we want to do now is go
ahead and build there's a couple of
different ways you can build it's a
build menu up top or there's a shortcut
which you can see the little hamlet
hammer there if you blink on a little
hammer it's going to go ahead and
execute essentially under the covers of
jam make files but the pains that you're
going to the things that you're going to
need to be aware of for right now or
first of all the rules the world berber
pull down the bottom right and then the
upper left you can see the Hammers
turned into a stop which tells you that
it's in the process of building you can
all you also saw a collection of lines
scroll by and that middle little pain
there had there been build errors you
would have seen in the upper larger
white cane a compiler fail its failures
that kind of thing there weren't any
because that's not the point of this
exercise so so so at this point we're
ready to go ahead and run your
application so if you blowing come a
little computer screen or again in the
debug menu say run it'll go ahead and
launch your application so what you can
see here is your standard java
application you notice down in the dock
there's the icon for our application
that's the icons that we actually put
into we defined in the properties pane
and it's a standard java application
windows have mac frames but this is
standard metal works that you've seen in
the java distribution so that's all set
so now at this point actually can we go
back to this am I going to short-circuit
something go back to the finder yeah ok
so now in favors jobs dead you can see
on our disk we've got our metal works
folder which is where all of our sources
were you can see the source directory
native is the little stubs that we have
in there you can see the metalwork
subkey deepraj which is what you'll
select to open it in the future you can
also see a build directory we open that
build directory you'll see we've got the
different pieces that go into our
application intermediates where our
project builder is going to leave all of
the intermediary build files and you can
also see the application this is the
application that we just ran so if you
double click on that it's going to flip
flip over that's what project builder
Ram so we've got an application on our
disk that's ready to go so that's the
basic preparation phase so like I said
and can we get the slides back up on the
screen then so like so like I said
there's the basic preparation phase okay
you've got a lot of sources that you
want to dump on Mac os10 and you want to
get them up in building project builder
should make it very easy you've got a
collection of build tools and that kind
of thing that will help will help you
and get your java application up and
running but in my opinion nope demo has
presentation in my opinion once the
preparations done you basically got a
pie in a pan that isn't particularly
appetizing to people that are going to
want to actually use your application
each of high whatever there's still a
bunch of steps that you need to go
through to to build a full-fledged maca
to natchitoches application we would
love to believe that what Java stop this
housing is right one runt once run
anywhere really is the case but in my
opinion what I've been trying to tell
developers for years now is that there's
still a lot of work that unit maybe not
a lot of work a lot less work than you
would have to do if you're porting from
Windows and Macintosh with see but
there's still a fair amount of work you
need to do to make your application look
and behave like Macintosh users are
accustomed to if you've got users that
are accustomed to your own custom UI
framework like oracle head and that kind
of thing that's fine and that's
different from Mac users and Windows
users but in the case where you're
trying to write an application that's
transparent to the end-user what the
development environment is then you've
still got work to do to get there the
first most obvious thing you probably
saw in Metal Works running is the look
and feel the look and feel looked like a
java application it didn't look like
what Macintosh applications look like
and this is a problem so what we've done
and what you've seen in previous demos
is the Aqua look and feel the mac OS
look and feel for
swing and what we've done is implemented
a look and feel that will run both on
clot on Mac os10 now and we've actually
are investigating project plans to bring
it back to mac OS 8 as well the layers
on top of swing that takes advantage of
the macintosh toolbox that takes
advantage of carbon and lets you write a
macintosh right swing applications that
feel or at least look like Mac
applications the first the first thing
to keep in mind is it it's mac OS native
it's implemented on top of carbon this
has a couple of implications first of
all it should be it should be fast
second of all it won't run on other
platforms we have no intention of
bringing the neck look and feel to
Windows that would I don't really want
to do that so we have no intention it's
layered on top of carbon it uses the
carbon infrastructure and the most
important thing from my perspective is
that you're going to get the aqua
appearance on Mac OS 10 or the platinum
of experience on Mac OS 8 and or a
classic Mac OS and most importantly
you'll get the changes that are made as
the underlying platform progresses with
no work on your part more importantly to
me no work on our part it sends its
layered on top of carbon as the behavior
that looks and that kind of thing of the
experience changes are calling to carbon
will exhibit that on in your application
so let's say tinges I'm non scrollbars
any of you behave the looks of the Aqua
appearance as they change your
application will pick them up for free
like I said you get the Platinum
appearance on classic Mac OS we don't
have product plans for that immediately
but we do intend to roll that out we
just have we don't have release platform
for it that was where the initial work
was done for the look and feel was on
top of class cannot go it the other
thing is mini placements menu placement
is one of those things that Windows
users mac users fight about all the time
and we've been fighting with with swing
is swing um traditionally has had the
window the menus associated with windows
which in my opinion is wrong so for the
mac look and feel we've allowed you to
change the menu placement so the menus
are in the right place where Macintosh
users will expect them so that when you
bundle your application out it will look
like a Macintosh of Macintosh
applications
so to enable this it's super easy it's
super easy right now what you've got on
your CD doesn't have it on by default
largely because it's still got bugs in
it we're still not completely happy with
what's on the CD so we've still got some
work to do so it's not on by default but
to turn it on just to play with it it's
super simple it's just like enabling any
other look and feel you go ahead and
call you I manager that set look and
feel to calm Mapple mrj swing Mac look
and feel just like you would any other
look and feel and then if you've got a
pre-existing component tree you're going
to go ahead to go ahead and tell your
component tree to update itself to walk
through an update to look and feel so
that they become visible and catch the
exceptions kind of standard java kind of
stuff there's nothing you need to do to
get the mac OS menu placement if you're
writing standards cleaning applications
you're probably already doing what you
need what you need all you need to do is
call j menu a jframe said j menu bar
that will set the menu bar that you need
and put it in the right place there's a
couple things you need to keep in mind
first of all you can't have a aw na WT
menu bar associated with it at the same
time you need to pick you're going to
need to pick swing menus ready to be t
menus you also can't do the sunday
dialogues right now they don't support
heavyweight menus so and there will also
be a property to be able to disable this
so let's say the architecture of your
application in the short term isn't set
up to be able to deal with menu bars in
the right place there will be an
architecture to be able to disable this
although we really rather you put them
in the right place so but like i said
it's super easy basically to get the max
look and feel for swing it takes almost
no effort on your part to enable it so
if we could get this screen up demo one
up on the screen oh cool so like I said
it's super easy let's go back in the
project builder in project builder
you've got your metal work so Java which
in this case is where we define the Mac
look and feel so all we need to do is
enable the Mac lookin is where you
define your look and feel so all we need
to do is basically comment out the line
uncomment the line that sets the metal
and comments do the right thing
rebuild take just a second and we should
be ready to go that's the only change
that needed to be made and if we run it
now we get to Mac look and feel and
what's funny is when I was doing this
the other day I liked looking at home
Ian it's broken together empty frames
then I realized that metal works is
basically a desktop with menus we
planted the menus to the right place and
now we've got full metal works with the
mac look and feel just like you would
expect the only change that you had to
make to get a nap lakay shin that looks
like the mac look and feel it's exactly
kind of cool huh it's kind of impressive
so that's all you have to do to make
your changes to make it look like the
mac make it use the mac look and feel
but and if we can get the slide back up
in here one more time but that's not
quite enough it's fine to make it look
like a mat make the widgets and that
kind of stuff look like a Mac but that's
not enough to get to the point where
your Macintosh users will see an
applications they're aware of you are
going to need to go and read the McAdoo
Shh I guidelines you're going to need to
be aware and basically the the best the
best advice I could give you is if
you're not familiar with with how
Macintosh applications behave play with
them for a while figure out the kinds of
things the kinds of behaviors that
McIntosh application developers expect
things like menu placement in naming
there's a collection of standard menus
in standard places and Macintosh users
are going to expect they're going to
expect a file menu they're going to
expect it they're going to expect a
number of items in that file menu to be
standard they're going to expect the
command key shortcuts to be standard
they're going to expect an edit menu the
same kind of thing button positioning is
another thing is like the ok and the
cancel button and dialogues Macintosh
users have come to expect that certain
behaviors hitting enter in a dialogue
when an ok button is up is going to do
the correct thing and that's that user
experience is different than windows so
it's it's fine to take your application
to the other platform to build it for
the other platform
and you're basically there and
technically you can run and that kind of
thing but I guarantee you that if you're
trying to ship a heavyweight application
that users are going to use on a regular
basis that they're not going to expect a
Java look and feel that you're going to
have to do a little bit of work to
rearrange things so a macintosh user is
familiar with them keyboard shortcuts is
another mean basically maxidas users
have come to know and love behaviors of
their application and in my opinion the
application user shouldn't be aware of
the platform you developed it on they
should all they should be aware of is
that the application does what it
expects and harmonizes in the
environment that it's supposed to be so
if it's expected to look like a macro
application then there's some behaviors
that you're going to need to be aware of
too so the best thing I can I can
suggest is play with some a commercial
applications if you haven't already i'm
sure most of you have already but you
haven't already become familiar with
that and pick up the H I guidelines
because there is some work you can't
just take an application across and
expected to behave like macintosh'
application Java is different so you
need to be aware of that so finally
there's a final step of okay we've
gotten mad cuz we've got an application
that looks like a Macintosh applications
behaves like a Macintosh application we
now need to deliver to our users this is
this is something that actually I'm
actually kind of excited about a mac OS
10 mac OS 10 has created this concept of
a bundle and what i would suggest you do
is I was actually leaping through the
documentation we gave you when you first
got here there's a really good chapter
in that book on what bundles are there's
application bundles frameworks that kind
of thing that gives you a good breakdown
of what all goes into a bundle and when
you're building heavyweight applications
you should be familiar with that and
that's what we are taking advantage of
on top of Mac OS 10 so Java applications
are bundled just like any other
applications where you've got your info
ducky list which I pointed out before in
project builder is where you define
Mackintosh specific settings you'll also
notice there's a mac OS folder inside of
the content folder and the contents
folder is what contains all of the meat
of your application I'm inside there
there's a mac OS folder which is where
the native stub application lives
for the most part you're not going to
care about that if you're doing a job a
pure java application because we're
going to generate that for you when
project with project builder GM we're
going to generate that for you but
that's what was generated with a little
stub code that I showed you preview you
can also notice the resources folder
resources java is where all your java
build stuff is going to go and it's also
where your image a apps that properties
goes and all the other resources to go
along with it so it's a pretty well laid
out this should be obscured from you
user we've created a tool so that if
you've already got a built java thingy
you can drop you can bring your
pre-built jars or zips or whatever over
to Mac os10 you don't need to go through
the full series of steps on building
your application with project builder
let's say you've got an application that
has a jar already what you would do is
use the mr j app builder to define all
the all the same kinds of things point
at your image a property's emerged a app
that properties file point at your
configuration files any of your
applications that kind of thing and
emerge a app builder will cons up an
application for you so you don't have to
go through project builder if you don't
want to and it'll have the same effect
but pot this this functionality is being
merged in the project builders so
project builder is going to do the same
thing the other cool thing in my opinion
about the bundle model is it's going to
carry back and forth between classic Mac
OS and Mac OS 10 the goal by Mac OS 10
GM for us is for you to be able to build
a applicant application bundle that will
carry from Mac os10 to classic mac OS
with basically no changes the packaging
is the same mac OS 9 is aware of mac OS
10 bundles and should display them to
users as a as a single double clickable
application the folder nature will be
visible on pre 90 systems and the way
that we get the way that we're going to
deal with that is if you again this is
all documented in the book that you got
earlier but the way that you're going to
get around that is your Macintosh
application folder is going to have an
alias at the top to the classic thing so
that your your pre 90 users will open
that folder and double-click on the
alias now in DP for
you can build mac OS 10 applications we
don't have the support for you yet we
will for GM to be able to build classic
mac OS applications so for GM you'll be
able to build a job application bundle
that has the information for both
classic Mac OS and Mac OS 10 for what's
on your CD you're not going to do that
right now so that's basically how you
get to a full packaged application the
things I want you to take home is first
of all that the development environment
while it's a little different isn't
really all that different than you're
familiar with you're familiar with UNIX
then all the tools you're available
you're familiar with are available but
also if you're a more jdeveloper we've
provided a collection of tools and
interface to abstract you away from the
use unix isms you'll notice we never in
this demo never went down into a command
line to do any of that kind of work
project builder should take care of all
that for you but if you need to you can
go down in there like I said we've got a
collection of advanced development tools
we've got the ability to create a fit
and finish that makes your application
the fact that your application is a java
application transparent to the users and
we've created a simple developed
delivery mechanism so my goal in my hope
is that you'll be able to go home with
what I've given you and the CD that
you've got with the ability to create a
fully bundled Macintosh application
you