WWDC2000 Session 144
Transcript
Kind: captions
Language: en
good afternoon ladies and gentlemen
please welcome the user experience
technology manager John Gill NZ will
good afternoon and welcome to session
144 this belongs to user experience
subtract sort of and the reason for that
is that in all of the user experience
sessions so far we've been talking about
aqua related things so the look and feel
of 10 how to properly design icons how
to lay out your dialogues these sorts of
things that we talked about the aqua
overview and some of the other sessions
that have occurred so far this week as i
said in the aqua overview session the
first day of the conference you you know
the Macintosh is known as being friendly
and easy to use known as being
consistent and one of the most sort of
notorious behaviors of the Macintosh is
that when you you know movement of files
around the file system is very easy you
can move folders of whole applications
and when you move files and documents
from applications around you know the
Mac always knows which application
created it when you double click it it
knows which apt to launch and these
sorts of things and it never sort of
forgets these these types of
relationships this session is going to
talk about a lot of it's going to talk
about this subject matter and it's going
to we're going to talk about packages
which are new for 10 well they're on
nine but their new they're they're
important for 10 there's a packaging
your applications putting all the
pertinent in one place so that users
have a really great user experience
moving those things around as one unit
and we're also going to talk about the
relationship of documents to
applications and so to welcome on stage
to talk about this material I'd like to
call our no gore doll who comes from the
user experience engineering team at
Apple
[Applause]
example clicker good afternoon everyone
so notice is a few companies session you
probably are wondering a lot about what
the what we're thinking and I hope that
by the end of the session will have
answer of that question and that you'll
feel better by the default topic my name
is a homie brother oh and work in the
user experience Department and I'm going
to talk to you today about two main
things the first one is what we roughly
called packaging and it means how you
put your application together I'd appear
to the user as I mentioned as part of
the user experience even though it's not
may be directly involved directly at the
pixel look on screen but it's definitely
part of the user experience the other
thing I'm going to talk about is the
double click user experience in what
happens when you double take again
that's more like a behavior but it's a
very important one in Mac OS has always
had a very good user experience that
regarding obviously for making changes
in micro stomach which I'm going to talk
about so back in the old days an
application was a single file and it was
very easy when you want it to install
the application you should dragged it
that was it you had everything with it
everything used to be a resource for
candle if you remember that it was years
ago with the introduction of Power PC
the code portion got to move to the data
port so the data forks are the code
itself and then in the resource for Q at
the resources for the application the
string that you need to be localized the
user interface and so on today on Mac OS
10 that still works you can still have
that you can still up your applications
in one single file data for contents the
code which was for contain the resources
and you can have either carbs here RB or
pls key resource and I'll talk about
that one little bit more detail in a
while to tell the system that you're not
just the classic application but that
your carbon application and that we
should not try to launch you in the
carbon invert the classic environment
but just director
environment that's like the minor
difference between what we may have had
before and what we have in microwave 10
as far single fire application the thing
about singleton applications though is
that contrary to this very simple
picture like just one an icon and
everything looks simple and all that now
there's what you're more likely to see
something like that where you have maybe
one type of the application sure but you
have a lot of auxiliary file next to the
application whether they'll be the help
system to help contact some sample code
some sample documents or sample code if
you're doing a development environment
and also the stuff that kind of makes it
more difficult for the user to know
actually what is this post double click
and also that makes the application or
fragile because it means that you know
if they move the wrong file the
application will not lunch anymore and
you know that that's the kind of
experience that may happen on some other
operating systems that we don't want
that to happen on my quest and so we're
doing things to fix that go back to the
good old simplicity that we had before
and to do that we're introducing the
concept of application bundle let me
just tell you that apologize in advance
that we haven't been very consistent in
our terminology you may have heard the
term package and bundle and use
sometimes interchangeably we're going to
try to be more consistent from now on we
promise so we're going to talk about
application bundle to talk about the way
of an application is packaged and we're
going to talk about file packages to
talk about documents that defend a
similar format but bear with me bundle
package it's all the same thing so
what's the bundle it is a directory
instead of being a single file as we had
before it is now a directory and to know
that it's a directory that actually is
contented application there are three
ways that we can identify it the first
one is you can set a bit as a special
bit in the HFS metadata that
and indicate that this is a bundle
folder and that's likely the bundle bit
which have been unused it was only
useful documents with it until micro f85
like oh it's nine likewise nine but now
it actually means that the entire folder
is to be considered one unit if you will
one bundle there's also a special file
that we looking for inside directory and
if we find it we know that the package
it's the second way to do it I'll talk
about that file in more details in a
little while and finally there's another
way that this can be indicated is by
using an extension that realtor
extension dot app there you go wait and
it's not over that can tell the system
that you know this is also a package
even though it may not have the bundle
bit set and even though it may not have
the package in full file there the
reason for the extension there is just
in case you know the application gets
moved around and so maybe a file system
that doesn't know how to deal with that
with the HFS where the data and the
bunnelby get some set for some reason or
something like that so it's like like
more safety precaution anything else
important thing to remember that app is
not required got two other way 20 k let
your application is actually application
okay all right now there are two bugs
left in DP for the way you would ship it
right and one of them is the way
sometimes you actually need me to put it
that app to make you understand another
thing that we are not doing in that in
the teepee for right now is that if your
application as the app will actually
displayed in the file system and we want
to change that later so the few caveats
with the p4 we're not quite done that's
the direction that we want to go where
you can indicate that something is a
package one of three ways you choose if
you are familiar with the previous
version of my quest and medicine server
and before there was another format for
bundles that was slightly different
that's what I'm going to talk about that
format is still supported we still
recognize you know with some of the
Senate
but we don't recommend you using it so
you can just you know if you don't know
about it you can just forget about it
and if you are using it should consider
using the new format now so what's
inside this directory we have multiple
binaries for different runtime
environments multiple localizations and
all the auxiliary files that may not be
that important for the user to see and
that could break the advocate get moved
around what's important about all this
though is that we want to get back to
that don't you have everything that
makes an application be presented as a
single icon that's the goal to go back
to the simplicity that we had 16 years
ago even though think as chandel a bit
in the meantime so the way we're doing
this that we're having this box with all
this neat content inside of it but it's
a nice way to put everything together
and to carry everything together around
and you can use it as a whole without
having this way to get to dig through it
and that's what the user is going to see
that's what user experience ones we have
once we have 1i connell application
something very simple that doesn't mean
that you know you can't have any files
outside of it maybe it makes sense that
we read me next to it or something like
that but again nothing important should
be outside of it now let's see what's
inside the box we're going to open it
and I'm going to talk about all the
components of what goes inside the
package this is kind of what it looks
like i'm using this fictitious like it's
not the fictitious it's on the CDP for
CD but it's a sample app called sketch
and at the top you have the sketch
directory which is what it really is and
inside of it there are a number of sub
directories which I'm going to detail
you'll notice that I'm using two colors
on the slides the things that are in
yellow are the things that for which the
system expects the name to be what is
indicated here you can't choose it to be
anything you want the things that are in
white is left up to you so that's going
to turn this slide on the others i'm
going to happen after that
so the first thing I think it's better
than most I guess is the binary they
actually the actual executable for your
application where it's located is inside
content which is basically where most
everything is and inside of there there
is a directory that's called Mac OS with
no space that contains that expected to
contain the binary for mac OS 10 this
binary can be either CFM or micro base
binary it doesn't matter both either
will work and it can contain a resource
box if you want one the case of CSM you
really do when it's not going to work so
well and it gives us macro you don't
have to in general I know that there is
some concern about data to that resource
working some confusion that what we're
saying there what we want to have is a
we want to have something that works
really well in environment that don't
support resource for that well you know
like other operating systems or the
volume format so that we can operate
nicely with all those different
environments and one way to make that
easier is to not rely on the resource
for so much certain minerals never use
resource for it means if you can live
with that resource for you can do
everything with you today without the
source port or using a different format
of the resource for which I'm going to
talk about then that means that your
application for example can live on the
server you know the doesn't thing is
that doesn't know anything about h FF
meta data and can still work there that
means that you can use some wonderful
utilities such as tour to a package or
application and ship it around or you'll
be easily FTP or whatever so there are
some advantages to that and you know
we're encouraging you to do that as much
as possible that's what we're trying to
do on the system all the system we're
trying to have everything works
potentially without relying on AFF
although for the system is designed to
work less on HSS so that's the binary
you can have resources in there but
there's a better place for it I'll talk
about it in a while so what you
recommend at you have here is just
the code that's necessary to make
application do something next it's a
very important file and I'm going to
talk about it several times today we
call it the plist or inputted plist
sometimes it's also called info dash
microwaves that plist and the reason for
that because you can have a generator on
version of specific Kimiko expand or
version of specific to another runtime
environment then it's basically always
the same file it's an XML file that
contains a lot of information about your
application the system uses that to
basically know everything there is to
know about your applications what's your
name when were you born what documents
you have to open everything you know how
to do which icon should be displayed for
application and so on and I'm going to
some detail about the content of that
violence in a while package info is
another file in there that is very
simple file it states by a basically
contentious type and creator which is
also information that's available in the
info that period it's redundant and the
reason why we have it here is only for
performance reasons so that we can very
quickly find out what the typing creator
of a package is without having to pause
the xml file necessarily so it's an
optimization but that site is important
because I talked about it earlier the
presence of this file can help us figure
out that something that looks like a
directory in fact should be presented as
a single file whether it's an
application or an application bundle or
file package so if you don't have a
creator for some reason your application
doesn't have a creator because its
legacy application for whatever reason
that's okay you can still put you know
for ? of the Creator that will work and
we'll just use it the type which in that
case would be a ppl an application
finally in the resources directory we
have everything else and then show you
what that is the first thing is going to
be something that's all your apps
they're going to have which is the icon
for the application itself the plist
contains a reference which is the name
of the file that contains the icon and
you're going to look for that file
inside we froze it so here you see the
split in white it means the name can be
whatever you want but it will have to be
the same one that specify need appeal is
of course as we know to find it if you
have icons for your documents as well
that's what it would be as well and the
plist again would indicate what the name
of those files are so that we know where
to find them you can have your own stuff
in there as well if your application to
both filters of some sort of export
filters or you know graphic filters or
any kind of additional data think that
the user can install optionally that
kind of stuff you can put that in there
as well and can have sub directories you
can organize that however you want
exactly the same way that you would
organize your application today if it
was in the just in one big folder so
that's up to you we don't impose any
organization in jail you can also have
the file that's going to contain
resources and then the Macintosh sense
of the world and my quest toolbox sense
of the world is that if you have a file
in there that is the same name as your
binary that it is that arrow softly at
the end we will open that the medically
for you because we'll know about it and
we'll figure out it you prolly once you
have used that file so before I was
telling you know if you want you can
have binary that doesn't contain any of
the resources of just content the code
you can do that have the resources in
there and when your battery gets
launched this part will be open
automatically for you so that you know
you don't really have to do anything it
works like it's always did even though
the things on living in two files
now one thing is important about
resources whether it's this particular
resource file or others you may have
that with DP for we're introducing a new
format for resources and that format and
gun to your feeds it's a resource porch
that lives in the data fork so it's
exactly as if you had you know what you
would have any resource for the same
binary stream if you will accept is
throw in the data fault that's exactly
how we going to call that that we
thought isn't data for something like
that but the advantage of that the
reason why we did that is that what it
means is that any body you know any OS
that's out there today any utilities or
whatever knows about those things they
can back back them up you can compress
them you can encrypt them they can do
whatever they want with them it's just a
fire for them it doesn't matter and the
resource manager now has routines that
allow you to open those things and
create them and regulate them and so on
but again as I mentioned if you just put
that file in that location with that the
name of your binary data RC will just
open it for you whether it's stored in
the data form with a resource for it
doesn't matter you'll just get your
resources that's what counts for you the
resources that are in this particular
location that I've just met with roses
directory are things that should not be
localized and sometimes it happens maybe
they're the logo to application in there
maybe there is some various data that
you need to have in there for whatever
reason and but those that are in there
should be things that I'm not localize
that will stay the same no matter what
the user preferred localization is the
things that do need to get localized
however go into a folder that that's
called for example English the approach
obviously that's not the only name it
can have you can have often relatively
generic names with indicate the regions
like English and French and Japanese
and you can also have more specific one
if you want so that you can have fine
little a great deal of control for that
you could have for example the French
Canadian version which is the French
French version or the Belgian version or
whatever and the system will pick which
one to use based on the user preference
you don't have to do anything as long as
you provide those directories the system
will do the right thing and we'll pick
whatever is available so the user said
you know I really like to have new my
applications in French and you happen to
have a French localization that's what
will be used if you don't have one will
fall back to according to the user
preferences and if you only have one
that's the one we'll use and again you
don't really have to do anything for
that except follow this layout for your
application so that allows you to ship
one application that contains multiple
localization for your different markets
very efficient way of doing it inside
this directory that the special file
that you can have that's called
localized that are a toffee and some of
the when i talk before scheduled at our
SRC it can be either a file that
contains a resource fork which will be
sources in it or it can be as filed its
to delhi pork that contains the
resources yeah and just like the other
file it will be open automatically so
you'll have both the non localized
resources as well as the localized
resources open by the time that your
application is running and the right
ones too without any effort on your part
if you have other type of data that
needs to be localized for example of
help file you can put it in there as
well and you can use some API to find
those files and to find the right ones
to find the english one versus the
french one you know depending on the
user choices and so on there i appear to
do that that makes that make it really
easy
okay so that's kind of watching
resources a lot of information that
we're really hiding from the user
because they're not interested in the
details most of the time an overall
depth what an application bundle looks
like on my quest m directory a lot of
structure all the files some have to be
there because the system uses them
others there are left for you to put
whatever you need to put in that folder
when we introduce my quest line we
introduce what we call app packages
we're calling them bundles now get the
same thing they haven't changed to the
name and the structure is slightly
different and that might have confused
you when we were talking about bundle
and packages and you know looking at the
technology thing hmm looks like this I
look Andy Petree it looks nothing like
it so what does it all mean that's what
it looks like a mech website oh that's
what we recommend that it looks like a
microwave sign my cosin you as much
fewer constraint about what the layout
of your directory is mostly because the
system does less for you the only
concerns that you have really for mac OS
9 is that you should set a bundle bit on
the folder so that's the only thing at
mac OS 9 recognizes and at the top level
of this folder you should have an alias
to your application to the binary that
you want to use a microwave slime it
might be the same one that you are using
a mac OS 10 ish or carbon application i
can run in both environments or you can
choose to have a complete difference one
to have an application that completely
tailored to micro s9 and I've a
completely different application running
for my quest and complete different
binary i should say but from the user
point of view would be the same app this
elliot should be relative that's the
challenges technote i'll give you the
reference we take notes we can find more
details about that so that again the
thing can be moved around the areas will
always point to the right look binary
one thing that were enhancing over what
we are describing the tech notes
previously is the addition of it's just
a suggestion
nine really it helps make things more
consistent and that's the addition of
the content directory with a mac with
classic director inside of it and the
reason for that is that because it's
going to mesh well with microwaves 10 so
and then you can add something that
looks like this the alias contents
microwaves classic and then in there
your binary and whatever size you have
of course well nine you don't get
support for multiple localization it
just worked like it does on line and if
you want if you're doing a carbon
application and you want that
application to be able to run both
online and on 10 you can merge those two
models together so you get something
like this on this side over there you
have microwaves classic that contains
all the stuff that's needed for nine the
binary help file whatever is made it
there you have the l.e.s that points to
somewhere in there that will be used by
Mac OS 9 on the other side you have the
mac OS and full of pillows packages for
resources that are used by 10 what's
important though is that at the top you
have only one item when the user
double-click on that item that icon that
they've seen in the finder whether it's
on 90 110 the right thing happens
although it's going to be something
completely different depending on the
runtime environment but from the user
point of view the right thing happens
then again they can move it around and
all the pieces come together they don't
have to worry about you know I don't
know if I need that file you know I
don't know that doesn't look right to me
the implication doesn't work anymore
don't want that at this point I'm going
to give you a little demo to show you
what a package application bundle looks
like
if we can yeah fun running classic do
this its work kind of so let's have a
look at that so I have this CD here that
content as a city that I've inserted in
the machine that's a fake thing I just
press that last night but it can give
you an idea of the things you can do now
with microwave stand for one thing
you'll notice that you know have a
background for my for my app and it
spread variable for icons that are put
together you know its temperature like
them and move them around it's so
picture so we can take advantage of that
to make some interesting thing and then
there are a few things on our the top
level of the city like the icon for my
app is actually a nap bundle and goodies
that contains like the Installer stuff
and the additional stuff that user might
want to install and just a readme file
for the ideas that you know user just
but your app it put a city in every the
reason if they want to probably will and
they just drag the app maybe you know
these in some cases you might not even
need to have an installer so you know
keep it two things as simple as possible
so let's have a look inside that
application here they do get info on it
we can have a look at when what's inside
and I'm going to give you a few tricks
but you might want to write down because
I don't think we've actually put that in
the documentation and it is useful
during your development in get info
there are several panels that apply to
this item one of them thats particular
interesting is application file cannot
be even at your watch inside but
sometimes you really want to look inside
the folder and we used to have a button
vp3 but to do that that we removed in DP
for it might come back but in the
meantime very important and that's where
you want to write down you want to press
the option key while you double-click on
the icon there so new in DP for is a
relapse service that launcher actually
quickly and make it that another track
get info double-click there you go I'm
playing with fire and paying for it and
you're going to know why it in a second
so that's the content of my package I'm
doing it leads you here as we can
disclose the thing and see what's inside
it this is the package that that was
designed to work both on nine and ten so
the top level here it has an alias to
the application that i want to use
online that application itself is in
there like contents micros classic and
now that's where i'm playing with fire
i'm actually going to try to launch it
to show you something that's kind of
cool this believe it or not is actually
mac draw 0.9
look at the date Olga's 34 and it still
runs on mac OS 10 so the point of this
is that you can have very different app
for your mac OS 9 version that you have
on my quest and cool if you want of
course you can have a carbonized version
that's going to work both online and on
10 the other stuff that you have in here
and here are some custom folders or
specifically my applications color
palettes here the very important info
that plist i got them all this stuff
about my app now later on i'll go into
more detail what's in there and then in
there i have the binary for my microwave
send version that of my app this happens
to be a cocoa a java cocoa app what this
one obviously isn't so we see we support
multiple runtimes that sounds cool the
package info file that tells us about
the typing creator of the thing and then
plug in another folder for my app and
then sigh resources a bunch of other
file that my app needs to have access to
some tiff files that contain different
pictures displayed in the user interface
of this app the localized version of the
resources the name is a cocoa app and so
on so you can go in there move things
around you know do whatever you want
with it of course you don't want to
encourage your users to do that but
sometimes they may need to actually get
access to that and we'll give them
access but that should really be the
back door version of configuration of
your app
I mentioned that we also support
multiple localization so the way that
this works is that in the system
preferences there is one of the elements
of system preferences international and
international you have the list of
languages and the user can order that
however they want if they want to have
french first they can have french first
then English those whatever what that
will do is that that's will have a
direct effect when they double click on
their app the system will use that list
to figure out in which order to look for
languages so here if I have put French
for the first thing the system we look
for with the differential localization
open that and and use that so that's
where those things are our control okay
I'll come back this mission later
there is a session later on this
afternoon that will talk more details
about that in particular it will talk
about the EPI that you can that you have
that give you access the content of
those things we can go in there and ask
for files and we look in the right
director info on this afternoon session
157 all a 15 p.m. which are interested
in that and what kind of api's are
available to get access to that go to
that session ok now I'm going to move on
to another topic soak the bed how to
take it you're up together and now i'm
going to talk about what happens when
you double click on document so that's
what we call duck binding what it means
is the binding of an application to a
document in other words that the double
click user experience that's a very
important part of the mac with
experience and that's something that you
really care about a lot so i'm going to
give you five easy rules to follow for
doc binding and if you follow them
nobody gets hurt and everything's cool
first one all the apps have granite that
app and it cannot contain any spaces the
spaces are evil for unix you cannot use
flash the space right hey that's the
first one come on a formal all the apps
must live inside the siphoning / app
otherwise you know we don't know about
those apps and it's a small front
did someone applause their old files
must have a three-letter extension the
vid they don't we just don't know what
to do with them there is no creator
inside that's something of the past and
we're moving forward toward three-letter
extensions no more kid or inside their
evil and finally am just in the center
here and finally to install an app very
easy that's actually what they do and
some other opening system so for those
of you who are believing everything you
read in rumor sites don't that's not
quite how it works what we want to do in
my quest and that regard ugh by name is
to preserve the ease of use of Mac OS 9
very conscious of that and obviously
there's something as we want to preserve
moving forward with microwave stand but
that's not where we want to stop just
don't want to do something that's just
as good as microwaves line they're a
bunch of the thing is want to take into
consideration the first one is we want
to play nice with others what I mean by
that is that we want to interoperate
really well with other operating systems
because we realize that we don't have a
hundred percent market share yet
we're working on it so there are other
operating systems out there and it's
important that files that get created on
our printing system or that your
applications if they're stored on you
know remote servers and so on work and
like don't get in the way of the
administrator of those of those servers
and so on if you are if you have if you
know something straight administrators
of those types of service today you know
that they don't always like what when
they have mac users that get on the
servers because we can surely credit all
around and so we want to behave better
in that regard also we took up two
different volume format as if it is a
great volume format you know it has very
modern it has multiple fork expensive
metadata also the very nice features
that we want to preserve and you know
that's why HSS is the main volume format
for mac OS 10 but at the same time we
want to be able to live in an
environment where there are other volume
formats that may not be as smart as HSS
is so we want to fit in and in this
wonderful universal we also want to work
in an environment that's much more
network than it used to be you know its
users can login we want them to be able
to have their different preferences not
to have that you share that necessarily
and that requires to make some changes
which are going to more detail and
finally even though the mac OS 9 user
experience for double-clicking is great
we think that there is some improvements
that can be made in particular for more
advanced users think that for you know
novice users it works great always does
mostly what you expect like when it
tells you that can find this app and
then app and you know that you use red
today to change the type in creator the
side front of minor details it's pretty
good but we want to make it better in
particular from love it for more
advanced users in other words wanted to
make easier to use and more powerful at
the same time and that's not easy
let me tell you that's not easy that's
what we're trying to do with mac OS in
general that this is part in an area
where the ease of use is very important
and adding new features also is long
overdue so how does it work other duck
burning work a very important concept in
dog biting is the concept of the
document type which didn't really exist
in Mac OS 9 before yet the file type but
you know the files that doesn't tell you
anything about other ways that you can
represent the what the format of this
document is one way is the file type
that's definitely true but it might be
other ways for example extensions which
are use on other operating systems on
the internet more frequency and in some
cases just accountant to the file you
know maybe there's a header they contain
some signature of something like that
can tell you some information about what
this file format is so we've abstracted
that by having this concept of the
document type that's just a string of
its rear length that defines that you
define those strings inside your
information p list after an example in a
while what it looks like but for each
type of document that you know that
basically you'll have an entry and this
entry will be indexed by that document
type string other info the typing
creator that can be used to identify the
type of the document again this is
specifically TFS stored in the h FF meta
data we support that if it's there you
know if you have an hf as well in format
and the document as a seventh-grader of
course we're going to use that but we
also want to work when it's not there so
it's optional because HFS might not
always be around where your documents
are stored
ok so it's an extension is something new
to mac OS mike receiver had the concept
of file extensions profane we're
introducing that and trying to have a
life support for it the definition of a
file extension on that quest and is it's
something at the end of a file name it's
up to 32 characters in length after a
dot thing to keep in mind about
extensions that there are not localized
we don't have to worry about you know
having different version of the
extension for different localization all
that that's not the case it's not
intended to be localized there are not
case-sensitive either and the characters
that you can use an extension is
actually it's really reduced you can use
a to z 0 to 9 and the characters dollar
% underscore and Kilda and if there are
any other characters that you really
really want to use for some reason let
us know about it so I think that we
district covering enough and the reason
why we're limiting the character set is
because by doing that we want the user
still have the freedom to use anything
else not that basically an example of
that is that we have also another
limitation that if an extension is only
one or two digits in it we don't
consider it to be an extension and why
do we do that well because we want to
allow you to add something like first
paint 10 and not ever confuse and say
does Oh what kind of extension is that
and what is an application that can open
the door so that 0 is not an extension
that your SB is not an extension either
can you tell me why it has spaces in it
exactly to be continued that the dot is
not an extension either for a number of
reasons because that is not valid
character depending on the I you profit
met actually control is empty some valid
extensions on the other hand are the
always popular XD mp3 d6
food at sea but that's an extension that
you know might advertise and used before
and Doug that surf and and Doug that
surf and I can't say the case that you
see the difference right there the same
that the same extension but like I say
the case doesn't matter as far as
extensions are concerned and it's
another example that shows you that you
know if you want you can have you don't
such as three characters in what's up to
32 so you can use your entire entire
application name is make sense of course
if you already have some extensions that
are defined for your document types
because your application is cross
platform for example and you had to deal
with those issues before now use the
same thing that you have on the double
platform the whole point of this is to
make interoperability easier so don't
have extensions that are Mac os10
specific because that would be kind of
missing the point you want something
that's my question specific you know you
typing creator don't use extension okay
this is something that we're going to
try to implement as soon as possible but
it's not yet in deep before and that's
the hint and I want to talk to you about
that because that's something that I
think is important to aware i can think
about it because we could do some
interesting stuff with that here is
basically it's a sequence of light in
the the first k the first 7 24 bytes of
the document that can help us identify
what the document is that's also
referred to as a magic cookie in unix
that's one of the good things with
uniquely are awesome and that's also
something that's used sometimes not all
that not all popular documents formats
have that but very secondly they do for
example acrobat PDF files the first four
bytes of the neck or bad PDF files are
always percent PDF if you just look at
this full bite you have a PDF file even
if you have no extension and the typing
creator has been left for some reason so
putting it all this together
if you actually if you have a document
that's just called image that JPEG
without any type and creator you know
maybe that's something that you just
downloaded maybe to mp3 from metallic
shell something well we can still tell
from the extension that the type is jpg
file if you have the type we're going to
use that and even if there is no
extension if you even if you just called
image again the same thing we're going
to know that it's a JPEG file and
finally you could have just the name
image no expansion and no typing creator
by looking at the proper byte sequence
the beginning of the file which was jpg
happens to be ffvi 250 we're going to
know still there is a JPEG file what's
important it doesn't do those three
cases no matter how the end result is
the same we know that it is a JPEG file
and once we have that information we go
on to the next step which is going to be
to find the application to use to open
that thing the way this works on mac OS
9 is that there's a internist that's the
database that needs to be rebuilt every
so often it's a per volume database
which was a problem for us because we
wanted something that would follow the
user rather than you know work
differently depending on where you log
on you know and one machine does
something and other that something a bit
different so really something that had
more customization that was more per
user and also there were others through
the mutations like it was very difficult
to extend to add any sort of information
beyond but it's already knew it was
already trained at my tits what is
holding and it only knows about typing
creator and the extension for that so
basically the desolate it is to continue
to be used by micro-fine and classic the
mac OS and finder still maintains it if
you copy an application that have a mac
OS 9 application for example between two
volumes Mac os10 finder will do the same
thing that the micros 900 did which is
to update the death of database
appropriately so that they're all
synchronized but it's only used as a
fallback when there is no other
information
the preferred mechanism that we use now
is a registration mechanism grab the
difference with the death of their days
which means it before we know about an
application we have to run into it there
are a few well-known locations which is
basically where we are going to
recommend users that is throw their app
let's not give you slash bin slash apps
and I'm not going to have to put them
there they can read put them anywhere
they want but the few well known
locations will go in there and we'll
look to see if there are any new
applications I've been installed
anything else change and we'll use that
kind of as a basis will start with that
as a starting point like the
applications folder and in DP for there
are several applications folder for you
too many applications folder will clean
that up eventually but will still look
in those epic those places where we have
the applications folder if some for some
reason and application has not been
registered yet launching it will do that
and sometimes just looking at it will do
that the point is even though there is
this registration step that's necessary
very often you won't even see it worst
case what can happen the double click on
this document and it needs an
application we've never seen before
we're going to ask you you know I don't
know about this document where's the app
for that I'm going to find the app and
that will be it will remember from now
on you know oh yeah that app okay fine
and as a side effect before you register
all the avatar that one next to it too
because we'll figure out and maybe do
some other interesting stuff in there
okay when we run into an application we
try to learn as much as possible about
it we remember where it lives and we
look inside the plist to extract all the
information in there such as what is the
signature of the application the bundle
name is version number of creation date
etc and we're going to use subsequently
that information to find back which
application we supposed to vouch so that
for example unlike which is under the
limitations database today it's
basically the last application that the
purchaser that's win
and the registration the disabilities is
non-trivial so that means that if you
have a version of photoshop for into the
top five in the same days you double
click on something and the photoshop
document and sometimes one version with
lounge sometimes another version we
launched and you never know which one so
because we have now all these additional
information such as the version number
and creation date and so on that allows
us to give preference to more recent
version over older versions for example
the application signature if you're a
carbon developer you may be familiar
with that already 24 character code I
will remind you that there are some
invalid ones that you're not supposed to
use which are 0 for ? and four spaces if
for some reason you don't have a
signature which can happen to be your
note the cocoa app we never had a
signature and you know use for question
marks when you don't know what to use we
encourage you to register your app
signature and to get one at the end of
the talk I have a URL that you can go
through to do that so if you don't have
a signature 3 easy to get and it can be
useful to have there are two ways that
the bundle information the binding
information can be specified one is the
way that it's always been done using a
bndl resource and all its related
resources 28 which five times you know
that what the icon for those file types
are supposed to be and that's pretty
much all you can specify using of the
MDL is rather limited we still support
that if you're a carbon application or a
classic application will find out that
information register that and you know
will live with it but if you do that
that means that you have no way of
telling us all by the way those PDF
files okay sure they can have the
signature PDF space you know but I also
know how to deal with them if you find
the father that the extension dot PDF
that you know download from the internet
whatever
so with the BND lv throws you can't tell
us all that with the plist you can the
way you use the plist so again you have
two choices depending on how your
application is packaged if your package
is a single file as your application
might be to their mac OS 9 then you just
added plsc resource that contains the
same content that and in for the police
would otherwise you can just have the
info that plist file and there that's
what's inside the info that police file
it has a number of keys with an XML file
as I mentioned before the number of keys
and different values you have something
such as the name the identifier which
kick which due to uni key so that we
have a unique identifier for your
application other information signature
version getting fostering etc and then
for each type of documents that you know
that you specify what the type name is
the icon files use but the valid
extension for the type are there might
be more than one think about HTML and
HTM for example the u.s. types and the
role and the role is kind of something
interesting you can specify whether you
add actually doesn't know how to handle
this type of document but just note
about them can provide an icon for
example or whether you can actually view
them or just edit them or print them or
prying runtime services so there are
different again the desire hints that
you can provide us that can help us
choose which application is that even
what the user wants to do and at this
point I'm going to show you what the
plist looks like you try to do that
quickly I'm going to going to use a BB
edit for that why not so I'm going to go
inside the directory of my app here
surfin suspended app compound and I'm
gonna have to say oh I want any fighting
there and that's my cue list here
let me make this text me bigger so you
see you don't lie it's an XML file I've
edited comment too because you can add
comments in there you know next to for
your app you know refer to do whatever
you want there but can have some
comments and you have the different keys
so the bundle name for example this one
is actually an important one because
that's the key that we use to know what
to put in the top left of the menu here
so that's what we call the short name of
the application so user visible name the
identifier the type and creator and so
on and on and on and on and so here you
have the list of all the documents that
the this application knows how to deal
with kind of what it looks like and then
there's a little bit more and I'm going
to talk about in a minute
I have a few more slides to go through
and I'd like to have some time for Q&A
so I'm going to go a little faster
fasten your belt all right so here very
quickly we're 41 few examples about how
you would work better that you have in
the command created by a carbonyl
classic app type in creator and the user
did not do any customization look just a
quick word about that it will be
possible for user to either globally say
I want all my HTML files to always open
with Dreamweaver no matter no matter who
they were created with that would be an
option that's not in DP for yet we'll
have that by the time we shave hopefully
so that's one way that you can that user
can override something and you can also
do that on the five by five basis or you
could say this file I created it in
Dreamweaver but now from now on I wanted
to open in explorer and you can do that
without using resident engineering the
creator and all that all that stuff so
if there is none of that no use a
customization you double click on it
well look for the most recent
application with a given creator and
we'll use that it's exactly the behavior
that you would have to then micro it's
fine that's kind of like the vanilla
case very simple if you download the
file from the internet and this file is
no typing creator and let's say the
engine dot PDF and again in those
special user settings we will look see
which applications know well first we'll
find out that PDF what type is that
we'll find out if acrobat PDF documents
and then again we'll use the most recent
app that knows how to deal with those
type of document now here's the case
where the user has specified an override
I said there is no typing creator the
extension that HTML but the user has
said I want all my HTML files to open
with internet explorer in general except
for this one that should open with
Dreamweaver follow me there but it's
kind of like you have several levels of
override the user can provide definitely
more for advanced user but it's an
important feature for some of our
customers and in that case when you
double click on it dreamweaver will open
it coalition bowl the q words the bet
installation now that we have this block
with all the stuff in it well have you
put stuff in it you have to open the box
not necessarily in the plist there are a
few additional keys that you can provide
they can be very useful those keys can
provide us information about what items
can be installed optionally in your
application where those items are
supposed to be installing your
application and where we can find them
too so for example you can specify a
source for whether files will be coming
to come from and a list of those files
and for each of those files I'm going to
specify the name of the item is you can
specify the script description that's
optional you can specify where on the CD
for example this file is to be found
where it's supposed to be installed and
whether the item should be just copied
over or what an installer should be run
which case you say the reaction should
be open and we just launched installer
for that item let me show you what it
looks like
so if i go back to my plist some other
information that i have in there is the
installation information so that's the
key were thinking about it done on the
solar key info here i specify where the
source of the files i want to install is
in decay in this case it's a volume
thats called surf can describe is my
installer CD and then i have a list of
items here for example i have a list of
color palettes my signatures application
that users can install this is the path
on the CD where those items are stored
and this is where they go inside my
bundle so no matter where the
application is that's where they are
installed and now the specific items in
this color palette category that
describes the different items and here
have been very simple just given the
file name for all the items you could
also specify a description and so on and
optionally some other key such as you
know whether the item should just be
copied over open that's what I was
talking about earlier if you want you're
going to get very simple which is what I
did here and justify the minimum which
is just the file name here i have the
same thing for another category which is
plugins exactly the same kind of
information there so once you have all
that let me show you what you can do
with it i'm going to quit my goal and
let's see
close this guy put some applications so
all your unfold that and all it means I
just dragged it over really not that
complicated I'm going to go back to the
application files panel that I showed
you earlier and this pups are different
categories of things one of them is a
list of localization so for example the
user could decide to install just
English that's what they want or just
one localization and if there are others
that are available at a later time they
can just click the install button to add
them to their application or to remove
them if they don't want them anymore so
that's a default category that's always
there and those are the two others that
i've added i've shown you in the plist
the color palettes in the plugins those
are the files that are specified in my
pillow so that's what gets displayed
here and you see here on the status
column it tells you whether the item is
already installed or not if it's not
installed you can just selected I have
the CD in the computer which is right
there we go back to my app and if I just
click here and click install going to
look on the CD it has copied it with
class because it's a small file and wow
the same way you can remove something if
you don't want it there anymore and so
same thing with plug-in so that gives
the user some very easy way to do some
very limited installation that doesn't
mean that you don't need an installer
anymore you might still want one but
that is for some very simple things it
allows the user to do some installation
without having to worry about you know
messing up something because they get
access to the contents of the directory
directly okay
so a few things for you to do define a
type they also thing about extension for
your documents again we want to play
nice with all the files system and
operating systems out there you should
consider having a unique signature for
your application answering well let's
refer your applications also for your
document format if it's an existing
document of document format may not have
this option but if it's a new one really
think about it which is your signature
for you app that's the URL i was talking
about you can go there to register your
signature make sure it doesn't conflict
with someone else and finally really
seriously consider using a plist either
as a single file or even better as an
application package I hope I've showed
you the advantages that we can have to
end that you know all work together and
improving the user experience if you use
application packages and info please to
tell us more about your application
basically that's what it's all bad if
you are still thirsty for more
information charge few resources
technote 1118 describe the mac OS 9
packages which are called bundles now
that's the URL where you can find it and
on the DP for CD at this path there's a
system overview that go into what I've
talked about and you can go back to see
what the keys are and so on so it goes
into more detail but that's again on
your DP for CD and at this point I'd
like to ask basically done with what I
had to tell you today thank you for
attention
you