WWDC2000 Session 120

Transcript

Kind: captions Language: en ladies and gentlemen please welcome carbon technology manager David Wright [Applause] welcome everybody I just wanted to see how many stayed because this is the first time this hall has competition with other sessions all right as you can tell we are so ready for all of you to bring your applications to Mac OS 10 by carbonizing them and this session is the kickoff for that so I want to just bring Scott Forstall up he's the director of application frameworks in Apple software engineering group please welcome Scott Forstall all right they've already learned about carbon so come on everyone ready to learn about Charmin you've been drinking heavy okay a couple years ago we came up with this carbon strategy and we were incredibly excited about it and we gave you the direction but it was a little bit fuzzy the strategy made sense and you all told us that but some of the details weren't quite there yet we needed to fill in exactly what were the carbon api's we certainly needed to fill in the implementation until last year we took carbon and we brought it into sharp focus and no I did not name my daughter carbon as tempting as that may have been to me it wasn't tempting to my wife so last year we really filled out the details of carbon we gave you a complete carbon spec we gave you a lot of tools that helped with carbonization we gave you this thing called the carbon dater that you've heard about which is an amazing thing the tool creates custom documentation to tell you how you can carbonize your application so over the last year it's been really exciting for me and the carbon effort to watch how many of you have started taking advantage of carbon it's been fabulous every you know every few days every week I see a new carbon application appear but I know some of you last year you looked up and you said I like carbon I like the direction I like the strategy the details make sense but it looks a little bit fragile now can't even hold head up by itself right and so you waited a little bit well over the last year carbon has matured a ton and carbon is now ready it is not fragile anymore and this year it's time for all of us and all of you to dig in and I've been working all the time so I have to work in pictures of her so I know what she looks like it's it's time for you not to worry about being being dirty getting your hands dirty getting your face dirty you've got to dig in it's time to really get started with carbon so let's do that at the end of this hour of bliss I could pull the junior high trick a junior high school trick of you know having a pop quiz right telling you close your books but ma near the desk those frightening words and I'd have five simple questions on this quiz and it'd be easy because I'm going to tell you the answers right now so the questions would be first of all what are the user benefits of carbon so when we went and design carbon we did it with the user in mind with a laser we looked at how can we better benefit the user next you know what exactly is carbon right so you've heard about the benefits you put a lot about carbon but what exactly makes up carbon we want to keep the user happy and of course you know you're all our friends we want to keep you happy as well so what are the developer benefits how do you build a great carbon application now how do you just build a carbon application but how can you go that step beyond and get a great carbon application and last when should you carbon I've all right let's dig in two years ago when we came up with a carbon strategy I had this dream and to this day I still think this dream best illustrates the user benefits of carbon so I've been thinking a lot about this dream recently and I had it again a little updated version so sit back and psychoanalyze me as I tell you my carbon dream or my Mac os10 dream so here's how the dream goes Apple is throwing this huge party it's the Mac os10 party and outside this part is a big sign and it says no Mac os10 all of your apps are invited an app start arriving at this party now the first group to come are these cocoa folks because the cocoa folks they're pretty hip to the whole Mac os10 idea they're old friends with maque that came into the party and they they said they came in through the 20th floor and they're dynamic launch they're walking around the party they're enjoying themselves they're gonna throwing messages at each other and they're having a good time the second group that came was a little strange it was just this big cluster this like a rugby scrum and they're all like attach the hip and they walked in together I couldn't separate from each other it was a bunch of old friends in there I mean we recognize everyone there's all these old friends but you know they're sitting there partying and they're drinking and they're having fun and one guy in the middle he drinks way too much boom falls in his face and the entire group boom falls in our face turns out I just look at that I said yo that that's classic and that's what that was that's the classic app there are always old friends and they're invited to the party but even at the Mac os10 party there no more stable there no more independent and they were before they're all there stuck together at the hips the next group that came in they came one and and they came running up to the door and they ran in and they said hey you know I'm John okay hey I'm Java - hi I'm Jonathan hey I'm John - and they ran across the room and they ran they grabbed a beer you know they they claimed they run everywhere and the last group to come with these real hipsters and these were the carbon apps they came up and you know they were old friends but they look slightly different like they're aware nicer clothes their posture was a little bit better they'll talked about you know just this little surgery they'd had a little while ago where they've been separated from that other group they were still friends with those guys but they were separated and there were individuals and they weren't tied to others and in fact however some real cows in this group a cash cow and these cash cows they looked as healthy as possible so that's what we're doing with Mac os10 we're throwing a party and it's the Mac os10 party and all of your apps are invited but if you have a classic app you really want to make it an individual and break it off and make it into a carbon out all right done with psychoanalysis what does it mean when we looked at building carbon and Mac os10 there were three main user benefits that we were shooting for first stability we'd like a more stable platform with more stable applications next performance and responsiveness so we want the app we with the whole system to perform incredibly well we want it to be fast we want applications to respond to you and third we really want to improve user experience let's start with stability stability comes in the form of protected memory so on Mac OS 9 there's a single address space and all of your applications run within this single address space now the weird thing is you sort of run on the honor system for Mac OS 9 right you you promise you're not going to write over other applications memory turns out most apps are honorable some on the back aren't and when those aren't honorable those are the ones that drink too much aren't responsible they fall down pull the entire system down now we want those apps to still run on ten and so what we've done is we've slid Darwin in underneath the Mac OS system and then those apps run in the classic environment but they still run within a single address space for all of those applications next we have carbon applications Java and cocoa all of these gets their own address space so each carbon application carbon app cases the party they're not affected by each other they live as individuals and aren't affected with the memory space of other applications so let's go ahead and demo this for you this morning Steve and his keynote showed a bomb app we bring this machine up and in his ball map it was a carbon bomb app and this is a beautiful application and the de-spawn map its whole goal is to write all over memory and take down other applications so he did it as a carbon application when that carbon application ran it just crashed itself what we've done here is we have a classic bomb app so that bomb app is running in the classic environment and when it runs it's going to try to write all over memory of course it's allowed to do that this is the drunk of the party and he's going to take down other applications now what you can see is on the left hand side we have a couple applications QuickTime and TextEdit or something and they're running as Carbon applications as modern applications on the other side we have two apps that are classic applications go ahead and light the bomb boom all the classic apps go away the carbon apps Coco apps Java apps are still running the question is where do you want to run your browser where do you run it want to run your fetch where do you want to run your applications you want to run them on the side it's not going to go away thanks Dave so the next thing we looked at is improving the performance and responsiveness of the system so there's a bunch of ways of doing that the main thing we get is with pre-emptive scheduling so what does that mean the OS on Mac OS 10 will preemptively schedule different tasks which means it'll actually choose to give a little bit of time to one app a little bit of time to another a little bit of time to another and it'll be fair about this all right this isn't like Lord of the Flies where you know you have to have the conch to speak and you have to give it up to let someone else speak the OS steals the conch and gives it to the next person so it allows things to preemptively schedule against each other what that means is if one task is taking you know a ton of CPU and it's just trying to hog it it doesn't matter the OS will still give other tasks some time so the user interface will be more live one application can't stop another applications UI from responding now it turns out this also improves stability why is that well if you get a ill-behaved application which just starts spinning and spinning and spinning on necklace nine right now that could hang the whole system right the system feels like it's hung because that application isn't giving up time to anything else on Mac OS 10 the OS will still time slice between it and other applications so other applications will still get time to do so we also with Carvin wanted to make the entire system PowerPC native so we took anything that was 68k we wrote rewrote it and everything now is PowerPC native so last we really wanted to improve the user experience we really wanted to rededicate ourselves to creating a world-class user experience now I'm not just thing I'm saying user experience because we care about the user interface right we care about the elegance and the cleanliness and the imagery but we also care about the behaviors what does it feel like to use this this whole system so the first thing we did is we proved improve stability and performance right if your system stays up longer if your applications don't crash then you have a better user experience we could have stopped there next we got rid of sticks I heat so virtual memory is always on now what does that mean you know this panel who loves this panel ok who wants this panel to die all right said you never again have to explain to someone and your user documentation go to the app and not the link go to the application do get info on it go to the memory part of that and set a number which makes sense you know what makes sense for a user on how much memory they should use they have say 64 Meg of RAM they want to use 64 mega Ram they have a gig which is you know all you guys in you want to use a gig this hit home for me this weekend when I was working on this presentation what's it this morning I kept on getting this panel over and over PowerPoint was telling me there's not enough memory it's not enough memory and so I'd increased the partition and then it worked fine for a while and then I'd add some images with my daughter and then suddenly what tell me there's not enough net memory again again gone so the last way we want to improve the user experience is of course with aqua let's talk through that when the Mac was born years ago and now I didn't name my daughter Mac either it was it was an incredibly fresh-faced right these are experienced the user interface was great and everyone really liked it and as the Mac has aged it's remained a great user interface but you know we looked at it recently and we said as good as the user interface is it's extremely hip still but it's lightly dated maybe you know hip but dated now don't get me wrong I mean it's still light years ahead of the competition competition so we thought we could do better and I believe with aqua we really have the amount of polish and attention to detail and elegance in aqua is extreme now as I said before you can still run your classic app on top of Mac OS 10 but your classic apps do not get the aqua interface so they're going to look slightly old right the plate within the same system but they're going to have the Platinum control so your users will know whether or not you've gone to the work to give them a stable polished aqua app or you're just relying on the classic experience all right those are the user benefits that we are striving for now what exactly is carbon so we looked at the Mac OS there's a whole set of API it's large set that makes up that defines the Mac OS and a lot of these api's are great and it's what you depend on for your applications and we really wanted to move those forward right our goal isn't to force you to rewrite your entire application in fact our goal was quite the opposite but some of these api's prevent progress so when we looked at these api's we said we can really split it you know in marketing terms into the good in the bad and the bad api's are the ones that prevent protection so for instance low memory Global's right everyone writes wildly to low memory Global's you can't do that in a protected memory environment so we had to get rid of those anything that prevented preemption we had to get rid of and any 68k specificity is so trap manager or segment manager anything that was 68k specific we had to remove that's part of the bad API so carbon is the good api's from the mac OS now carbon is a living entity carbon is growing carbon is not freeze-dried at some point in time but we're adding on to it so for instance we added on aqua so as we add api's carbon over time will grow to encompass those carbon is our vehicle for adding those api's so where does your app fit in here we've done a ton of measurements we built all these tools we built a lot of databases and we ran application after application after application through here thousands of applications and what we found is an application is typically about 95% carbon compliance or carbon ready what that means is 95% of the api's you're calling our fully carbon supported so there's no change for those but there is you know a subset 5% of the api's that are calling in to Global's that are calling in to data structures that we've hidden now and for those you have to do a little bit of work to move your application to be a hundred percent carbon compliant and when you do that then you'll have a full carbon application we didn't go crazy here right we didn't change the application model we're not telling you you have to start from scratch and rewrite your entire application we didn't go create an object-oriented Java API set if you want a great object-oriented Java API set go to Coco go to Java - right there are java api on the platform what we wanted to do here take all the work you've invested in the mac OS API and move it forward and let's be honest here right we're not automatic so you do have to do work to get a carbon application you have to recompile it's not binary compatible if you want to be binary compatible and run it in classic but you don't get the advantages of Mac OS 10 all right so the user is happy now you know what carbon is why are you going to be happy so there's a bunch of developer benefits that we've added into carbon as well first we want to make sure that you can truly move on to carbon without giving up the installed base so we want you to be able to sell it to both 9 and 10 I know that most of you are you know lazy most of you work you know 168 hours a week and we'd like you to work 80 so we want to do most of the work for you we want when you're carbonizing an application when you're moving an application forward that you do the work that's specific to your application not the system to work we'll do all the rest we really wanted to design this with future enhancements in mind Carbon is a living entity we want to advance it and it turns out that developing a carbon will enhance development productivity let's talk through these so first where do you want to run your application if you have a carbon application and there's two main platforms you care about and here I've listed Mac OS 9 2 generically menial Mac OS 8 1 8 6 Mac OS 8 and 9 and then Mac OS 10 so it's obvious that you'll be able to ship your carbon application on Mac OS 10 because carbon is an intrinsic piece of Mac OS 10 right one of the main points of Mac OS 10 was to provide carbon support so boom your applications Mac OS 10 sits right there now Mac OS 9 has a lot of the api's that are part of carbon but it doesn't have all of them so what we've done is provided this thin layer this fits in veneer which is called carbon lib or the carbon library the carbon library for most AP is just calls directly into mac os9 because the API is there but where we've added on AP is that are part of carbon but weren't part of mac os9 or weren't part of mac OS 8 6 those API s are implemented in and part of the carbon library so a mac os9 your application runs on top of the carbon library so next is we know you have a lot of code it's based on the mac OS AP is what we wanted to do with carbon is to preserve your investment in these api's make it easy for you to take advantage of new features and quickly get on carbon and we think we've done that in fact we've asked a lot of you you know how hard do you think it's been to carbonized those of you who have worked on it and consistently I've heard that's about the same work as moving from 68k to PowerPC for some of you who have really well written code it's a lot easier just moved right over for those of you who have a lot of skeletons in the closet a lot of cruft in your applications it's a little bit harder the next thing we want to do with carbon is design it for future enhancements so as I said carbon is this living and growing thing and in the future we'd love to do more things with it right we'd love to make it so the toolbox is re-entrant so add more threading support we'd also love to advance improve features now I'm sure this is happen to any of you but you know I've heard before when a new version of Mac OS has come out sometimes some people's applications are doing something they shouldn't have and the OS breaks them a lot of that is because our data structures are all open and you guys love to get in there and dig and do funny things right you learned this one data structure if you twiddle the third bit of the second field then you know windows stay on top or something instead of allowing you to manipulate these things in sort of a random manner with these open data structures in fact we have to hide those data structures if we want to make something re-entrant because we can't count on when you're going to touch that data structure if we can't actually put a walk around it in another thread so because of that we've made most of the data structures opaque right so you can't get directly at the data structures instead we've added accessors so semantic accessors that'll get exactly the information you're looking for and then actually it turns out your code reads a lot better because instead of just changing some part of some structure you're actually calling a function that tells you what your purpose was with the toolbox at that point so we're really designing this so when we come out with future versions of Mac OS 10 and Carbon we can advance the backend we can advance our implementation and you'll get the advantage without it affecting without it damaging your application so developer productivity now who here wouldn't want to make your application easier to develop what we found is when people come to Mac OS 10 and two-carbon they're finding it easier to develop the application and a little bit faster so why is this well first you don't crash the machine when you're debugging it right I worked on code before where you're debugging it and you take down the whole system I mean OCO die inherited not mine and I Mac os10 that doesn't happen right you just take down the application you're writing the one you're developing you don't take down the whole system so the debug find something fix it and then go to the next bug cycle is much faster it also helps you to find your bugs on 10 so you know those trickiest to find bugs are the memory Snatchers right it's the random little memory smasher where you wrote off to some random place in memory and then five minutes later the system starts behaving somewhat strangely and you have no idea why because when you wrote into that memory space and when your system or your application or system crashed aren't immediate right there's no causal connection that you can see so what we are not go is 10 if you write someplace random your app crashes immediately you get a back trace you find out hey I can't write to that segment that's that's outside of my memory space you can't write to know and we've actually had a lot of developers who have told us that you know they couldn't find some bug and then they pulled it over on carbon open five minutes they'd found the bug actually turns out that when we are carbonizing some of our tool box code we found some memory smashers that were on nine that we didn't know about so there's no more bugs in the tool box on nine all right so that's the developer benefit now how do you build a great carbon application all right our goal here is not for you just to build a carbon application but really to build the best one you possibly can the reason most of you are here and can afford to attend a conference and spend time and are getting paid isn't because you built some carbonate or some mac OS application just an arbitrary mac OS application it's because you built a best-of-breed mac OS application right you went above and beyond and you built something so good that it's better than the competition so when you look at carbon you should think about it the same way you shouldn't shoot just to build some carbon application but you should figure out how can you build the best possible carbon application you can so let's talk about that I'm going to go through a hypothetical application here right so this is not a real application but just so we can talk about the carbonization process talk about this group of people and they did read neo Kafka's the metamorphosis and so they wrote an application called I metamorph and I metamorph takes and morph one image into another right the same way that Kafka spoke a man turned into a bug overnight so here's this application and here's an example you take you know a dirty kid and you magically clean them up so you know that that's our slogan that's our slogan for a four-carbon right we we clean yep so this application that takes and does this processing has a lot of things that needs to deal with when going to carbon so what are those things well first of all this company has a whole lot of code right they have lots and lots of different pieces of code and they have to determine well what should they carbonize right what should this caught this Kafka enterprises this company what should they carbonize they have applications and nets and plugins and device drivers and all sorts of things so first they need to determine what pieces of code are candidates for carbonization so first of all the answer is application applications are absolutely candidates for carbonization you should carbonize your applications foreground and background so if you have a faceless background application absolutely you should carbonize that as well you should also carbonize plugins now there's two pieces of technology in the system that can really aid in this process there's a technology called core foundation and it's it's pretty low in the architectural stack and core foundation has something called CF bundle and CF plug-in and both of these will aid in your carbonization process of plugins so you should check those out now they shouldn't carbonize device drivers by their very nature a device driver is an OS specific piece of code right it's dealing with the OS and how the OS deals with devices so instead of carbonizing those they should continue on Mac OS 9 to do the same thing they were before with device manager and I'm Mac OS 10 you should look at i/o kit and right an i/o kit driver which will provide the functionality you want on 10 and lastly they shouldn't carbonize their system in it there so it turns out in its work counter to the goal of increased stability now there are some in it which by their nature are really just faceless background applications and so those should actually be carbonized those should become Carbon applications and run as faceless background you know servers but they shouldn't be carbonized as you know something which patches the whole system alright so how do you carbonize what's the process so it turns out it's really simple first since we've taken and made all these data structures opaque you have to go and work to adopt the accessors and this is probably the bulk of your work carbonizing your application and the great part of it is it's the easiest part of carbonizing it's really a grunge work mundane sit in your office from 1:00 p.m. when you get into work till you know 6:00 a.m. the next day for a couple days and you just walk through compiler errors that's all it is because the compiler is going to tell you if you're accessing a data structure which isn't there anymore so the first part is go ahead and adopt all the new access or functions the next thing is to use the new toolbox upp s so what is this we used to have generic functions for creating upp s for callbacks now we have more typesafe upp s which are created per callback that you care about so you have to go ahead and instead of using the generic ones use the more specific ones now if your duck if your application opens or saves files you want to use NAB services so go ahead and adopt the NAB Services API s and Apple help is now the way to provide help for your up patient okay so you do these four simple things that's it right we're done so I'm wasting your time here you could have done that while I was talking there's two really good talks that can teach you more about how to carbonize the first one is really transitioning your application so what is the carbonization process that one will go through more of the exact steps you need to take a lot more of the process and I encourage you to go to that one and then of course the navigation services talk which will tell you about how to use nad services but that's not it right you can do you can do more and you really do you really want to create the Best of Breed Carbon application so I don't know about you but you know when I watch some of the demos that are coming out in carbon I get pretty excited because I'm not writing an application in the same feel they are I mean they're they're looking great okay so what what should you do well if you look at if you look at this I metamorph application I talked about they do this big operation where they take an image and then they morph it into another image so there's a lot of computation that goes on in that it takes a while so what they're doing before is they were using thread manager right so they take and when you said start them start morphing these images it would take and it would throw this into a thread manager thread so you could continue working with the UI and changing other things now turns out that thread manager is cooperatively scheduled so what that means is as a threads doing work it is a separate thread but every once in a while it has to say okay I'm going to take a break right coffee break now stop someone else goes ahead does some work they come back they take a coffee break you get to work and you go back and forth and only once working at a time but it's up to them to decide when the other thread gets time to work so the problem with that is if you're working in this application and this other threads doing a lot of computation if it decides not to give you time then your UI feels a little stale it freezes for a little bit it's jittery it isn't the smooth experience that you really want to have in a carbon application on 10 now by the very nature of the thread manager ap is on 10 we can't make them preemptively scheduled because you assume based on the semantics of the AP is that it will be cooperatively scheduled now what we've done on 10 is of course there are the multi processing API is which we have a 9 as well the MP API is the multi processing API is on 10 are preemptively scheduled against each other so the OS itself will go between the threads and time flies so no one gets starved out so this I met a morph application instead of sitting on thread manager and doing cooperative scheduling it should go ahead and move to the MP api's and do pre-emptive scheduling now the way we've implemented the MP AP is is on top of P threads right P threads are the POSIX threads and if you wanted to you could go straight to POSIX threads and use the POSIX threads directly the MTA API is just a thin layer for an API you may know that uses the P threads alright so there's a session where you can learn a lot more about the threading and also shared memory and file systems and all the lower architectural levels of carbon now each year at this conference we get feedback forms from you and you tell us you want five full days of conference right you say don't cheat us out don't go to four and a half days we want five days so our schedulers this year have outdone themselves by taking one of the more important sessions and scheduling it in this room which I'm sure will be packed at 5:00 p.m. on Friday ending at 6:30 so I expect it's be packed all right the next technology you should really take advantage of is carbon events so carbon events is a way of sending user actions and other events throughout your application so carbon events does a lot of things for you it really improves your application the first thing it will do is improve performance so that said you should go and take advantage of it because we want to have applications running as fast as possible on Mac OS 10 so the way it does this is it sends events only when they're necessary it it means you don't have to turn pull constantly to see the state of something so what does that mean so a year ago when my wife and I were due with this baby well well my wife was due with the baby and I was doing nothing the grandparents started calling and they started calling once a week and then they started calling once a day and they started calling multiple times a day and they were saying you had she been boring it has to be born yet you know that constantly Consular pulling us over and over again and at some point I said you know stop calling I promise I will you know send you a carbon event well not me not that geeky I said you know I'll call you I promise I'll call you when she's born right I will send you an event I will call you there's no reason for you to constantly pull polling was not only you know somewhat irritating it's tied up the phone lines the phone was busy all the time the same thing happens right now on mac os9 when you start saying where's the mouse where's the mouse where's the mouse where's the mouse and the mouse you know the Christians are sitting there right you know where's Nelson it's sitting there hasn't moved at all you're tying up the whole CPU asking a question which doesn't change each time you ask you so what carbon events does is you sit back you say hey now it's like that hey Mouse but tell me when you move and so then when the mouse moves it'll tell you to move to another position you don't need to tie up the CPU by pulling and asking it where it is the next thing Carbon events does is it'll simplify and reduce code in your application so instead of you having to have a lot of code when an action comes then to figure out where it was meant for to figure out you know how do you direct it somewhere the carbon events themselves will figure out who the event was meant for and direct it there so it really simplifies your applications Carbon events also allow you to customize toolbox behaviors so again generic patching was too large a mechanism to do some of what it wanted to do right it was a huge hammer where you had to you know patch an entire thing just to change the minor behavior and in some cases it worked against our goals of stability so what we've done with carbon events is we've provided a nice mechanism where you can intercept events you can change them slightly there's a lot more specific api's meant for you to modify behaviors instead of patching an entire subsystems so there's a couple talks tomorrow about this and I really encourage you to go and learn all you can about carbon events now there's a lot more talks than what I'm pointing out I'm just pointing out some of the highlights that I think you you may or should attend the entire conference is full of great carbon talks that you should attend all right what does an application look like how do we package an application right you've built a carbon application and instead of packaging and how you have today is there a way we can make it so it's it's better for the user rights could make it multilingual we of course wanted to run on both Mac OS 9 and 10 and let's make it very very simple for the user right again we want to encourage simplicity so multilingual we've certainly found that would make a lot of money by taking exactly the software we've written and just selling it in a different language right localizing it to another language and selling it most of the work you do is to create your application it's not to do the language specific part so what we want is to support multiple multiple localization for an application extremely well of course the way to get to there is Unicode the standard for multi-language text and we have several things in the system that will help with that one is CF string so a technology also in Coronation which deals with Unicode strings we also have the multilingual text editor so a carbon text editor that deals with Unicode and we really want to support single binary multiple localizations what this means is you can have a single application and that application when run will run in the language of the users preference so that means when I launch an application it'll run in English when my boss who gave the last talk here runs an application it runs in French so the goal is to have a single application that different people in the same office can run and it runs in the language of their choice so next of course you know you want your applications to be able to run on Mac OS 9 and 10 we want to have a single package which itself you know one SKU you can have one box in one SKU and that itself will run in multiple localizations lots of simplicity see this is what met I met a morph started you know looked like when it started years and years ago right real simple single icon in a single folder there's no question where's the application I look at it now that's full of so much stuff right there's there's libraries there's help files and plugins and everything and when I look at this folder I just see a bunch of trees you know I can't see the forest I can't find out where is the application I'm looking to click the application I want to run so that's not what we want we want something very simple so we've solved all three of those problems making something multilingual allowing it to run Mac OS 9 and 10 8 9 and 10 and making it very simple with something called application packages so application packages is where we take an application is represented by a single item in the binder right so it's that one clickable thing now behind that single item is an entire folder hierarchy so there's lots of stuff in there there's there's files and data and all sorts of things but to the user it's a single item right very very simple and with technology called CF bundle which helps to retrieve this data and the resources now here's the way I think of CF bundle CF bundle is your high-end shoe salesperson now what does that mean you know when you go and you're shopping for shoes and you go into you know a high-end store not some place where you walk in there's two boxes of shoes all over the place you have to find your own shoes but you go into a really fancy shoe place and you sit down any point out you say I like that shoe in that size and in this color and it's very friendly person walks back behind this door and you have no idea what to do behind that door right you don't know where they go to look they have some structure back there where they have racks and racks of shoes maybe they have some way of knowing where to look for the right shoe but they go and they find that right shoe and they bring it out and they put on your foot so CF bundle does the same thing for you except you know put the resource on your foot you ask CF bundle ID like this local is a I'd like this resource in this language and CF bundle goes back behind this folder hierarchy and it finds that resource in that language and it brings it back to you that whole folder structure could be reorganized and you don't care because CF bundle knows how to find it now sometimes you know that the shoe sales person might come back and say we don't have it in that color but we have it in another color CF bundle can do the same thing where it might come back and say I don't have it in French and you can say I'd like it in English and you'll go back and find it and bring it back so see a bundle will help find all these resources for you all right so application packaging really allows us to have this very simple but very powerful way of compacting and putting an application together but you know what that's a really ugly icon and people do judge an app a little bit by the icon you want a really nice icon right it's it's the face of your application when it's not running and when it is it's the face in the dock so we really want to encourage you and carbon and that goes ten supports and encourages you to work on your applications and build really great applications so what you should do is use you know 32-bit color use transparency and anti-alias your at your icon and also make sure your icon looks really good from small sizes you know sixteen by sixteen all the way up to 128 by 128 because if the doc it's really big it's 128 by 128 per icon and you want your icons to look great so spend some time making great icons so there's a talk on Thursday to go over exactly how do you get those icons into your application all right aqua the simple adoption of aqua is very very simple right we've retained the Platinum metrics which you requested and we said great we can do that so it's really not very hard for you to adopt the basics of aqua but you don't want to have an application which just adopts the basics you want to have a great carbon application which has a great aqua interface so some behaviors like sheets will take a little bit more time to adopt but you should take that step to adopt them you should make sure that your menu layout abides by the new Carbon menu layout guidelines and you should be ready for the windows in your applications to be intermixed with other applications in fact this is a perfect time for you to really polish your application I mean as we come out with aqua and Mac os10 there's going to be a lot of emphasis by our users and by reviewers on user interface right we're concentrating on it and so it's a great time for you excuse me to really do a one over on your application and make it look great so as a couple talks especially more but here's two of the more important talks on aqua that you should attend right after this they'll be an overview and then on Wednesday you can learn exactly how do you implement it okay so how do you build your application how do you build your UI right you decide you're going to do a great aqua interface how do you build this we've provided a tool called interface builder which will help you build this interface builder is a WYSIWYG UI builder so you visually build and you visually edit your user interface it'll actually import your current resource manager resources so your data lifting the like and turn those into an XML representation which it uses the great thing about that is XML uses Unicode so you can actually have a tool process which will localize your application just by editing these XML text files so this is great interface builder will help with the Aqua guidelines so it'll help you lay out your application correctly and it also has a great concept of how Carbon event should work and really builds that right into the interface builder tool so it'll help you to take advantage of Carbon events and really speed up the process of using carbon events in your app this is a great talk on Thursday now you should attend to learn about that all right so you know what Carbon is you're ready to do it the question is you know exactly when do you do it so the I metamorph guys they were looking at two different scenarios the first one was let's come out with one more version of Mac OS 9 so one more Mac you know I metamorph on Mac OS 9 take like the next 3-4 months to do it and then come out with the version on Mac os10 right then come out with a carbon version which of course would go on 9 and 10 the second scenario is to say let's go straight for Mac OS 10 let's go straight for carbon and we're going to get Mac twist 9 for free as well now if you look at this the top one certainly gets you a nap sooner but the bottom one gets you the app sooner on 10 and never underestimate the value of being somewhere first I think about it this way this was fraternity brother of mine back in grad school he saw this new platform sorta like Mac OS 10 he saw this new platform and he thought it was a great thing and he started building some apps for this he built this one you know pretty good app and he and a friend they worked on this app they started adding content to this app and he thought it was great at some point he dropped out of grad school to start a little company to work just on this application on this great new platform now a year or so after that he had a lot of competition there were a lot of other companies that entered that same market segment but because he was first he was the one everyone went to so the platform of course is the web and the application the company is Yahoo so by being first it wasn't necessarily the case that Yahoo is the best but it was the place everyone went when they went to the web to find information the same thing we true with Mac os10 and carbon if your app is first to carbon it'll be the app of a given genre of a given breed of a given type it is the aqua version which is the carbon version of that application and that's the one people are going to be looking for so I'd really like to do is challenge all of you to two things first I challenge you to be beta with us so you saw you know Steve said this morning we're going to have a beta this summer and I challenge you to come out with a beta of your application at same time that we come out with the beta of Mac OS 10 because then our beta testers will be testing your beta as well right it's the best way to get the most people testing it as early as possible secondly I challenge you to be GM with us so when we ship our final version you ship your final version at the same time and then people will see that is the app the carbon app of that type for that application so on Thursday there's a talk about carbon live and Mac OS or carbon on Mac OS 9 and 8 all right so I've talked a lot about what carbonization process was like what I'd like to do now is bring up some third-party developers some of you to talk about the experience you guys had with carbon and how far you come I like to bring up John Wallace talk abouts now up to date doctor thank you very much all right John Wallace from power on software and Bill Parr I think Apple brought us up here to talk about this look for a couple reasons one of which is being a Mac software developer in Italy one of the larger Mac software developers but from Ohio I mean it I think it's a hyoe software developer to do this than all of you folks here and also because now today in contact are a pretty popular calendar and contact management Macintosh they've been around for a while and that there are quite a challenge for us when we first looked into it and it got easier and easier as we as we went along let's talk about the products now today in contact almost 3/4 of a million lines of C and Pascal code let's also take a look at time frames that's a lot of code it's a lot of code but what we did was we first started carbonizing are now at the date product which is we're going to show here today and when we carbonized now to date it first started off as being Pascal we went through week of a carbon kitchen and got us along and I would say by then at two weeks we were 90% of the way done with the carbonization process we also realize the tools were better in sea so we converted the profit product from Pascal to see about 300 thousand lines of code so what we're going to see right now is a product that's been that's undergone about 2 plus weeks of carbonization and probably about two weeks of conversion from from Pascal to C let's go take a look at it what we've got is we've got the Calvert and contact manager up it's all running under Mac os10 we're able to make use of some of the things that are going on in Mac OS 10 for example if you take a look at being able to do aqua style banners and so forth not too hard for us to take care take advantage of all the appearance things we haven't yet gone through the process of actually building on all of the the new buttons and the rest of appearance but just getting up and running took us about two weeks so what do we learn from all this I would have to assume that most of you are in the same boat that we were in we didn't know what to what to really expect least I didn't built we were lucky bill had done about 500,000 lines of carbonization before he came to power on software and this is this product was brand new damn what we found was number one there will be a couple weeks of just grunt work you've got to go through and you've got to modernize everything you've got to use the accessor functions rather than getting directly into a member variable off of a off of a port like support dot pork bits pounds you have to give us an axe as a function to get through that so it's number one number two is it was a great opportunity for us to modernize our code there are a lot of things that we didn't do because there are multiple multiple ways to do it do we use Mac TCP not anymore Alex all ot and those kind of things because of carbon it kind of put us a position where we were now modernizing and making our software really aligns more with where Apple was going I guess the third the third message that we got from all this was that this is real we've last year we got we had the promise of car and the promise that would be easy it is easy and we have the promise that it's going to be complete it is complete and also from everything we're seeing this week it's the future so I would highly recommend everyone out there first thing you do if you want an action step when you get to get back from the conference go home and carbonize it's not that tough within a few weeks your app will be up most of the way and I think if we go for the future so I'd like to say you know really a big thanks for Apple because I think it's great well thank you and one of the funnest things of my job is every few days as I said I get to see brand new apps coming to Mac OS 10 and over the last year it for me living on it has just felt more and more real now I'd like to bring up Mike Garcia from quark to go through quark Express [Applause] okay I am I brought a few notes because I'm not as polished as speakers some of the other guys up here when I first thought about what all's going to talk about up here I thought about what would I ask and I would ask somebody how difficult is it to carbonize your app and really the answer to that question depends upon your app how much code do you have that is non-standard non recommended as you know Express has been around for quite a long time are we run out of one source code base for all of our different versions one by two bytes Mac Windows and we have some non-standard things there because we were doing things on OS 7 and 8 for efficiency purposes we were mucking with builds that we really shouldn't have been messing with and now we can't because of opacity I the next thing you need to look at when you're carbonizing are what are the specific issues for your application or Express we have some specific issues we need to run Express on a less 8 so that presents somewhat of a problem because we need to support all of our old 4'o extensions on 8 and if we're going to support all of our old extensions we have to support our API on 8 and if you use our API you know we've got a lot of working directories we expose the Qt Global's there are some things that we do there that we just cannot do with carbon and so we had to branch our code for for au extensions versus carbon extensions the basic changes aren't that difficult opacity it's a lot of it's a lot of monkey work grunt works that's what we call it and it took about 2 months for one engineer to do opacity on Express because it's so huge it's it's over 2 million lines of code about 20 libraries and that's not including extensions so there's a lot of work for us to do opacity and you just like they said you go in in the morning and you start it and you do it there are some other issues that you will probably hit depending on your app for us some of those issues examples are working directories we use working directories all over the place and we give them to extension developers so we have to remove that because that's no longer valid on carbon and that presents a problem for our interface biz region stuff we were doing things with the viz region and clipping region for efficiency purposes where we draw and we can't do that anymore you can't just go into the window pointer grass pointer and mess with the fields in there there are a few other areas where we just did stuff like that and you can't do that anymore and that's that's one of the great things about OS 10 is it allows us to go in and clean up some stuff that we really should have been doing in the first place let me go ahead and show you Express running on ten okay as you can see we're using a navigation services here and here is a great little document I'll show the alien that we do to delete a box one of our Easter eggs and it's gone so there we go and that kind of illustrates leads us into some of the great side effects great benefits that we get from ten with that piece of code there we can and displaying the document we were able to turn off a lot of excess code we had to deal with double buffering OS gen does it for us now we don't have to have this huge chunk of code that does it other great side effects we've been able to reorder tech pieces of code that we've wanted to do couldn't validate it to product management and now we have to so we can go ahead dig in and let's redo the stuff the last thing I want to say really is that going over to OS 10 has been really fulfilling and gratifying and it's really cool stuff when when you start seeing your app go it's a lot of fun and the guys that Apple has been great and helping us the engineers are very helpful and they'll do what they whatever you ask them to do they'll they'll try and implement it for you or teach you how to do it and it's it's been great and I suggest you all start it now because it really is fun all right last I'd like to bring up Scott Thompson from Macromedia to show us freehand these lights are so bright it's really great for me to be here you have no idea the carbonization of freehand has been somewhat of a long process Apple actually asked us to carbonize freehand back in 1998 to the original WWDC we were trying to have it in for the thursday keynote we missed it by about two hours so I've actually carbonized the freehand code base three times since then believe it or not I did it for eight I did it for nine twice so I've had a lot of experience with this this time luckily I had the help of a great partner Kent Sorenson who's over here taking photos helped me out a lot so for us carbonization was and I realized them that sound a lot like a broken record because a lot of the stuff the guys have already said it's perfectly of for freehand as it will be for your applications as well but for us carbonization was largely a matter of modernisation Steve said in his keynote that you had to go through the application and clean out clean out all the crud freehand like quark is one of these applications that's very big ours is 1.2 million lines of code and we have lots of stuff that was left over from system 6 creating our own G worlds by hand those sorts of things going to the carbonization process really did let us clean out a lot of crud and get going we did have the big build up at the front where we had to go through and deal with the opaque data structures like they said it's a matter of sitting down steady guy with the compiler working through a thousand two thousand three thousand compilers giving them all squared away but once you've got that done you can get a few blink errors maybe here and there and you'll be running up on nine running on nine was a great first step then we started trying to play with running on ten running on ten we had a few crashes we got to find some of our right to nail bug those are there those sorts of things but once you work through a couple of small crashing bugs we got a whole lot of functionality really big part of our apps are working all at once and that was really great now we do have some areas that we need to work on still the big one that I don't have done is font support we have to update from the old resource based font manager to the new two-carbon font manager API that's yet to be done I haven't done a whole lot of printing yet and you might think that for free hand printing would be a big part but I know that coming down the line we've got this new print stuff coming along so rather than rework we have now I decided to just wait see if the new print stuff is all about and do it that way overall I think that the analogy that says that carbonized your application is roughly equivalent to the PowerPC transition I really believe in that that is actually true and it's been my experience in the three or four times that I've done freehand on carbon so why don't we go ahead and see what freehand looks like running I see up here on the screen now I'm little disappointed in this the notice is showing the 32 by 32 bit icon I actually have 128 by 128 I con I don't know why it's not showing up but that will give a shot so bring on launches we hope all right pay no attention to the man behind the curtain go ahead and go through this dialog I have to mention that this is a technology demo it's not a product announcement product marketing made me say that so here it is free hand is running we'll go ahead and open the application go to our documents freehand sample art bring up the lovely fairy picture created by Dolores Highsmith you'll notice that we got a lot of the aqua UI most of our aqwal UI came about as adopting the appearance manager we haven't done much beyond that appearance manager is really great I urge you to get a look at that if you haven't done yet some of the great stuff that we get running on tin besides the aqua UI the double buffering is really nice you'll notice as I move the panel around there's absolutely no redraw of the picture underneath it if you're an artist and it takes you a long time to redraw that picture if you have a really complex document this will be an incredible time-saver beyond that we do have basic drawings those sorts of things working you'll notice that the drawing is really smooth and lovely and stuff I added a minimal amount of carbon events into the tool tracking and that got me you know it used to stutter a lot but now it doesn't it's really great so moving to carbon was actually quite easy and I hope that you all get a chance to do it okay thanks go thanks a lot guys so you don't have to take my word as an Apple employee and what we find is the developers who have moved over to Carbon have been really happy with it and we're here for you to help make you know to help the process for all of you be as easy as possible so what are the take-home points first of all carbon apps will get a bunch of user benefits right we're going to make them more responsive more robust carbon is the way to take your classic app and get the aqua interface you won't get some classic but you will get it if you move it to aqua we really believe in this and we live on it right so the finder is a carbon application quicktime player a bunch of other apps their carbon applications so our system is based on it and we tune it every day because we live on the whole thing and now is the time to carbonize there's a lot more info you can get on the website there's a carbon site this new tech club site which is great it has this new inside carbon which is you know inside matte carbonized so if we can carve a nice talk you can carbonize app and the last one is interesting here we actually have a list of consulting companies who if you don't want to do it yourself you can just throw out some cash and they'll come and carbonize your application for you so you can go ahead and check that out David Wright is the technology manager to talk to if you have questions but the most important thing here is you know tonight after you've partied with the people you see here once a year and you're drunk and you get back to your hotel room and you want to impress your boss pull out your power book install dp4 on it and carbonize your application thanks a lot you