Configure player

Close

WWDC Index does not host video files

If you have access to video files, you can configure a URL pattern to be used in a video player.

URL pattern

preview

Use any of these variables in your URL pattern, the pattern is stored in your browsers' local storage.

$id
ID of session: wwdc2008-902
$eventId
ID of event: wwdc2008
$eventContentId
ID of session without event part: 902
$eventShortId
Shortened ID of event: wwdc08
$year
Year of session: 2008
$extension
Extension of original filename: m4v
$filenameAlmostEvery
Filename from "(Almost) Every..." gist: [2008] [Session 902] Using WebOb...

WWDC08 • Session 902

Using WebObjects to Build Powerful Web Applications

Tools • 1:10:13

Newcomers and veterans alike will enjoy this fresh perspective on modern WebObjects development. Watch Apple engineers and developer community members walk through the process of creating a powerful, interactive web application with WebObjects. Learn how WebObjects makes it easy to quickly develop and deploy scalable professional websites.

Speakers: Jumana Al Hashal, Guido Neitzer, Pierre Frisch

Unlisted on Apple Developer site

Downloads from Apple

SD Video (858.3 MB)

Transcript

This transcript was generated using Whisper, it has known transcription errors. We are working on an improved version.

  • Good afternoon, I'm Pierre Frisch. You probably, some of you at least know me. Some of you don't, and I'm the WebObject Engineering Manager, Mr. WebObject at Apple. and I actually manage all the engineering effort around the WebObject. And this afternoon, we have got and this afternoon we have got a very interesting session where Jay and Guidoo, who are two trainers on WebObjects, who are going to build in front of you a full WebObject application in under an hour. So let me now invite Jay and Guidon on stage. And let's get started.

So, hello everyone. It's pretty full. It's amazing. So you're all interested in WebObjects. That's good. Just a show of hands, who here has not used WebObjects before? Nice, excellent. Then we'll go ahead with the demo. Okay. So what you will see today here is we start by using a plain Eclipse and we show you how to get the tools installed.

We create a simple WebObjects application and we will use the Flickr API to show you how to access a third party website. We will use a database to store some local data and we use the Ajax framework from Project Wander to add some nice things to our application. We will also show you one of the key features of WebObjects and that is how to build reusable components. and last but not least, deciding on a deployment strategy is something that needs to be done and we will talk about that too.

Thank you all for coming this afternoon. WebObjects is a mature, scalable, and a very powerful platform. And it can meet the demands of enterprise-level needs of organizations such as Apple and BBC, but it can also meet the needs of the most modern web application development So, since this is an intro session, we're just going to go ahead and build a Web 2.0 mashup application for you. But before we get started with building the project, we're going to need to get you some tools. And the tools are, first, WebObjects.

They are an optional install on your Xcode and developer tools, so go ahead and install them. Next thing you're going to need is Eclipse. Eclipse is an open source development platform. It is the officially recommended platform by Apple and the most widely used by WebObjects developers everywhere. Eclipse is plugin-based and it comes with an extensible tool set. And so to bring in your WebObjects development to Eclipse, you're going to need Wallips. Wallips and the Woe Project is also an open source plugin being actively developed and enhanced all the time. Wallips and Woe Project are going to keep track of your projects.

They also will give you access to some awesome goodies. EO generator, a database modeling tool that is Entity Modeler. And also it will give you access to the WebObjects nightly builds, which we announced earlier this morning that they're going to be available for daily updates. So, luckily, we have all of these tools on stage.

So we're just going to go ahead and use them to build an application. Worth mentioning, though, is that there is an integrated installer. So if you've never used WebObjects before, get your hands on the integrated installer and try it out. Now we're going to go to demo and Guido will show us how to build our first application.

So what you see here is a freshly installed Eclipse, no plugins installed, just downloaded, unpacked and started. As you are all developers here, we assume you have the developer's tools installed and that you have also checked the WebObjects checkbox to install WebObjects while or with the developer tools.

Eclipse, the work, the welcome screen here just has some overviews, what's new, samples, tutorials, but we want to go directly to the workbench. The workbench is basically this window here, a window which has several perspectives. Perspectives are layouts for that window. Volips will install a new perspective optimized for WebObjects development. So we go ahead and install Volips by going to the software updates, find and We want to add a new feature to our Eclipse.

We install from a local Volips site just to make it a little bit faster. And click on Finish here. We select the standard install. It's all we need. No profiling, no scripting, no whatever. We accept the license, which is a BSD license. Volips is open source, so you can contribute there. And we finish that. Eclipse downloads now the plugin. As soon as everything is downloaded, we install it.

And we just restart our workbench to come back to Eclipse with the Volips plugin now installed. Okay, you see, nothing has changed. Wow. So we need to switch now to the Volips perspective. Again, a little bit has changed, not much. You see now here in the lower left corner is the related view. In the upper left corner is the Vopackage Explorer. These are two views that know about WebObjects, that know how to present WebObjects parts of your project. So I go ahead now and create a new WebObjects application, which I name Hello World.

[Transcript missing]

and Paul Schmitz. Next, we don't add something here, so let's just finish that. Volips takes now a template for a new project and builds a project from scratch for you with everything that is needed in that project. One feature of Eclipse that is particularly nice is that it builds your project on the fly as soon as you add files or as soon as you change files. So when this checkbox, when this checkmark here is set to build automatically, your project is built and good to go. So what I do here is I select the application.java file.

I go to Run as, VoIPlication, I haven't written any code. and The application starts up and we come back with a hello world, just fresh from the templates in about, I don't know, two minutes, three minutes. So that's pretty easy. But it's not boring, but it doesn't do much, so I want to explain a little bit what's going on here. The main page that is shown is this one here. So, this is main.java. Not much going on on that. So, with a shortcut, I switch to the HTML file for that.

And you can see here it has a simple template. It took that from the project template to just build the Hello World example out of the box. What we want to do now is we want to access some third-party API to make that demo a little bit more interesting. So I'm going to the finder now.

and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and Paul Schmitz, and The next thing where I have to cheat a little bit, unfortunately, is that I want to don't write that HTML. So I'm going to paste that in, and I'll explain in a minute what that's doing.

and I'll add a small Java class that helps us to, or well, with wrapping the Flickr API with some very simple calls. I will show you that it's not doing much, it's just for our convenience that we don't have to write too much code and don't confuse you with the Flickr calls. We want to show WebObjects and not the Flickr API.

So, what we see here now is the component editor which is part of Volips. The component editor helps you write your HTML files. You see there are a couple of errors at the moment. There is no key search value in main. There's no key search in main, which is true because main is just plain empty. And we will start using Volips features now to add the stuff we need.

What we have here, I make that a little bit bigger. What we have here is a Vau column, Vau form tag. This is used by WebObjects to render a form tag in the final HTML. That form tag includes a text field which puts its value into a variable called search value and a submit button which will call a search action and will have the label go.

When we get back the results, we want to show them in a list. So we use a VORepetition which iterates over a list of results and puts each item, which will be a photo, into a photo variable while it's iterating over that. And a VORepetition works the way that it displays the part that is inside the repetition for each item that is in the list.

Unfortunately, we're not using the new WebObjects features with the namespaces and the var colon notation, but that will come with the next WebObjects release, and I think it's a great feature to even have less code on a page like that. So we start going now and add the search value, which will be, the variable name will be just search value. It will be a string, and we want to add a method for getting and setting the value.

We add that, bring us back to our component Java file, and you see here, Volips generated the needed code for us. When I switch back to the component, that error is gone. I'll do the same for the other variables. Which in that... In that case, the result is a mutable array of photo objects. Photo objects is something that is in the Flickr package. So I add that, I save again, I switch back. I add a photo, which is just one single photo in our results array.

go. Everything is there. It found now also the photo.url as a key path to the URL attribute of the photo object. This is called key value coding, and you provide a key path to the photo object and the URL attribute to that object. This photo object is the currently displayed photo in this result list.

Now we have one error remaining. That is the action for the search button. We'll add that too. I do all the time command click on these errors, and Volips helps me to generate the appropriate methods. Here it is. What I want to do now is call the Flickr API.

I'm going

[Transcript missing]

and to our results array. So we do this search photos with our search value. And I want to show you that there's not much going on in that class, so we don't cheat too much. So this is just calling search. I go down here. The search method just does a rest call to the Flickr API. Pretty simple with our search value and gets back some results.

So I'm basically done with what I wanted to do for that part, so I start the application again. And we have our text field now. You can type in San Francisco, because we are in San Francisco right now. Click on Go, and the application does a call out to Flickr, hopefully.

and it doesn't work. That's pretty interesting. and Paul Schmitz, the founder of WebObjects, are the founders of the WebObjects platform. and for whatever reason, maybe I mistyped something, we have no results here and Going back to the component, I can show you that I have linked the image, like the photo here, with a VoHyperlink tag that goes to the photo URL. That is something we get back from Flickr. I switch to Safari again, I click on that photo, and there it is, a very nice photo from Cupertino. So, back to slides, please.

[Transcript missing]

because it's rainy and you want to stay dry. Don't repeat yourself, just write code once, put it in a component, and reuse that component. If I want to write two applications that use that Flickr search, I don't want to have to rewrite all the stuff that Guido wrote because he dumped it into main. If he wrote it into a component, then I can take that component, use it in another application. And we're gonna talk about more advanced ways of reusing code later on.

Also, writing things into components allows you to style them, to create look and feel, and to be very specific with that. And also, you can use it to integrate third-party components and third-party functionality. Most often than not, somebody has written what you want, and so don't reinvent the wheel, and learn to use, to reuse. And eventually, say you're trying to build social networking applications all over the place, so you make collections of these components that you can reuse all over the place, and build your own tool set, which is really gonna dramatically cut down on your development time.

So now we're going to go back to demo and see how we can use the database and the entity modeler. Yeah, enough of these dry theories. That's pretty interesting about talking about your adapter and all that stuff, but

[Transcript missing]

So, enough theory. We want to go in here and add a new entity that we will use in the next example. And that is a tag.

We name the entity tag. The table name is tag. And the class name for our Java class is this one here, www.dc.tripliner.eo.tag. It took entity modeler, this is that window here, which is, again, a part of the Volips plugin. Took this path here, the class path, not the class path, the package name, from other entities we have in here, so we don't have to type that. And entity modeler is pretty intelligent with that. It saves you writing lots of stupid things you never remember, and you always type wrong, at least I do, and so very handy here.

We add a new attribute by double-clicking in that part here. I need an ID for a tag, which is the ID prototype, and here you can see it automatically switches the data type to integer. Then I add a tag name, and the table for that or the table column for that is tech_name and this is a varchar255. So when I save that, EntityModeler comes up with some hints for us. Oh, we forgot to assign a primary key.

Nice, we will do that now. We click on the little key icon in this column here for the ID. We save again. Error is gone, so our model is valid at the moment. But it's not very useful right now, so we want to add a relationship between tag and visitor.

We say new relationship between these two objects, a tag relates to one visitor, and it should use an attribute called the VisitorID. I like the lowercase D here better, and it should use the table column VisitorID. From visitor, a visitor can have many tags, and so we don't have to do anything, because that wizard here did everything right for us, and that situation, we have set up a relationship between tags and visitors. We will do the same now for the photos.

We add a new relationship. So, from Flickr photo, each photo belongs to one tag, but in that case, we already have a key in our attributes added, so I switch off that box, and now can just go in here and select the attribute I want to use for that. This is tag ID on the photo, and relates to, as a foreign key, to the ID of tag. On the tag side, again, there's not much to do, everything fine.

Click okay here, now our model is done. As I said, we cheat a little bit, we just created one entity, but I think you got the feeling for how easy it is to work with database models in Entity Modeler. If we don't have a database right now, we can just select our root entity, or our root entry for that model here, and, whoops, click on create SQL, and it creates all the SQL we need to create that database for us.

We don't want to do that because we already created that database, so I close that window again and also close that. So now, what we have is a model, but we need Java files. The Java files for these entities. This is why we are having all these errors here because we are missing the Java files, for example, for tag.

So, we don't want to write code again because we are lazy, we are WebObjects developers, and we want to let the tool handle that task for us. So, I do a right-click on the model and I go to the Volips tools and create an EO generator file. An EO generator file is a configuration file for a tool called EO generator, which will take the entity and create Java files for us.

For each entity, it will create two Java files. One that is regenerated every time we do the generation. The other one is a subclass of that first one. And this is the place where we can add our business logic so we never have to bother about merging code.

So I'll do that now by right-clicking on the EOGEN file, say EOGENERATE. It created here the package for us. I can open that now, and you see there's an underscore. Let's take the tag, because we have built that. An underscore tag.java file and a tag.java. So let's take a look in here. This is the file that gets generated every time you do the EO generate task.

It has a lot of nice little things in here, like tag name key, which relates to tag name. So we can use that for key value coding. It has a lot of methods here to create new tags, to access parts of our tag, to access the Flickr photos for a tag. Everything built, again, from a template that ships with Volips.

Now I open the tag itself. Empty class. If you write any business logic that relates to a tag or to a visitor or to a flicker photo, you would put that code in this class and this will never get regenerated as long as it is in your project. Basically, we're done again. I want to stop that application, and then I'll explain how the rest works. So, I do a run as a web application again.

because I'm a lazy developer but I learn, so I use Cupertino now.

[Transcript missing]

and It again happens all on the main.java. That is the Java file for the main page. Right now we are still single page application, pretty simple. So the search we have beefed up a little bit. So that part does now, you know that from the first demo, return null means please return the same page again.

and Alex Hauke. We have a method to find the existing tag. This uses EO qualifiers to qualify on the tag name and the current visitor. We get the current visitor by setting a user cookie during the page response. It's not very interesting to show that, so I'll skip that. that for now, it's pretty basic stuff.

Let's just say we get a visitor from the database by using a cookie, looking up the value in the database, and loading that visitor to our session. And these qualifiers here will build parts of your where clause that gets sent to the database. In that case, for the tag name, it uses the tag name key as the attribute to search on. It uses the search value as the value to search for, and it uses a case insensitive like on the database to find that tag. For the visitor, we do a slightly different one.

We use, again, the tag visitor key, which tells the tag, hey, look for a visitor with the current visitor of the session. And we want that to be equal. Because the current visitor is an object. So you see, we don't have to pass in primary keys. We don't have to say, okay, get the primary key for that current visitor for the cookie value. We all get that from EOF.

Next thing we do is we combine these two qualifiers with an and. That's just done by using an EO and qualifier and putting an array of our two prebuilt qualifiers in there. Then we just ask the default editing context to... find these objects. And we assume we get only one back, but I was lazy with writing that thing here. So I just... If the result is not null, we take the last object and return that to our calling method here. And found an existing tag.

If not, we create a new one. We use one of these prebuilt methods that were built by the... EOGENIC. The generator template to pass in the context, the value we searched for, and the current visitor to build the appropriate relationships. and We tell the session to save the changes. And as Jay said, we should code defensively, so I'll add a try-catch block here now.

Use a little bit code completion here. That might throw an NS validation, oops. and his validation exception. It might throw others, but I don't want to bother with them now. We print the stack trace and ignore the rest. because we know it will work, 'cause we are good coders here. Okay, now, at that point here, when we are after that collie brace, we have a tag. Either we found one or we created one. So, we set this as the current tag on the session, and do the search, and now can relate photos to this current tag.

The select photo does something very similar, but it just uses, again, an editing context as the sandbox for doing things, creates a new photo with all the information that we get from the Flickr photo, and stores that related to our tag in the database by just calling editing context save changes.

I have one note here. We use the session default editing context, and in all the WebObjects books, and all the sessions you will hear, this is not good practice. For us, we just wanted to show how it works, and the sessions editing context, the default editing context has one big advantage.

It gets auto-locked by the session. We don't have to do anything. We don't clutter our code here with lock, unlock, and all the handling that can happen if something throws an exception or so. So, if you do that, take a look at editing context patterns best practices, and do it right.

Use the default editing context maybe for reading, and use new editing context you can just create on the fly for writing to the database, so you don't poison your default editing context with stuff that will never get saved to the database, or might be undone, or whatever. So, the remove method, again, uses that editing context from the photo. It removes the photo from the visitor. In that case, it works just for us, it works also on the tag if we delete that, but don't want to show that.

It's just, this is how you remove something from a relationship, and then you say, tell the editing context to delete the object, and to save its changes, and return the same page again. That's what was done here. When I click remove, you return the same page, image is gone, and it's saved to the database. That, it is gone, so it was deleted from the database, not saved.

So, another very, very helpful tool when you develop with WebObjects, as Jay said, is the component model. You can nest components into each other. Components are just snippets of HTML with the related Java code. What I want to show is how you create a consistent look and feel.

and when I switch to the component for this file, you see that I have the HTML body declaration. We have the closing declaration down here. And I want to take that off of that page because we don't want to write that for every component, every page we add to that application later on. So I'll create now a look and feel component by clicking on the components folder and selecting new component. We name this one the page wrapper.

It's not a specific name, you can use whatever name you like, but page wrapper is something that is used in parts of WebObjects and just became something like a naming convention. Some people call it site look and feel or look and feel, just name it whatever you like.

It will go to the components package again. Again here, Bollips was smart and tells us, "Oh yeah, you have a components package, "so why not putting it there?" And I'll do that now. Just click Finish, that thing is empty. Yeah, sure, because I wanted to have an empty component.

I get the header part from the HTML, paste it in the page wrapper, go back here, take that part of the HTML out of main, and put it into the wrapper. So this is now our look and feel component, but how do we tell WebObjects that all the pages should get placed here? This is done by using a tag, a WebObjects tag called the VogueComponentContent.

It tells WebObjects, whatever is the current page that gets displayed, or the content that tells WebObjects, please wrap me inside a page wrapper to put the HTML in here. So we just place this tag on our page wrapper, and now we say on main that we want it to be wrapped inside a page wrapper.

Use code completion again in here. That's a quite nice thing from Bollips, that you have code completion nearly everywhere. Like you can use code completion for resolving this one here, by typing SE and relating it to search value. It works not only on Java, it works on your project. And another nice thing is that, let's just do that again on page wrapper.

and Yann Le Pallon, and I'm going to show you how WebObjects works. Open one view here and use this view here. With that one, we can take something from, for example, our application and take an attribute from here, in that case the name, and just drag it to our HTML. And if I let go now, it will just add this one as the value binding.

As it is done, I don't want to do it right now. We just save that now. our application is And now, we have added a page wrapper as our look and feel component. We started again and we expected to look exactly the same as it was before. So, if I search now again, Cupertino.

Nothing really special in that example, but if you have like navigation components, complex HTML headers, JavaScripts you want to load, CSS files you want to load, you can add them on the page wrapper and you never have to worry about that from your components. Again. So, this was a little introduction to EOF and the component model in WebObjects. And we go back to slides, please.

[Transcript missing]

First of all, we need to add our AJAX Frameworks. So we go to our build path, configure our build path, go to our WebObjects frameworks, edit them. I go to our local library frameworks, and what am I going to add? I'm going to add AJAX. I'm going to add the ERX extensions and the ER jars from Project Wonder. And that's all I have to do, and I'm done with adding frameworks. Now we have to do two little more things. First, we need to extend our application to use Project Wonder.

I'm going to do a couple of things here that are not necessary for this particular little application. But if you want to do more complex AJAX, it is nice for you to just extend

[Transcript missing]

and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and and And notice that right now I have, oh, I don't have an error, haha.

I was gonna show you a neat feature of a clips but I can still show it to you. Notice here how my imports, I have ERX session but I also have one that I don't need anymore over here. So command shift O to organize my imports and it does it for me.

And it's when you have complex projects, it's a really satisfying shortcut. So now we are pretty much done and we can just use the AJAX framework in our application. I have already added my My component in there, which is my Ajax Flickr photo search. So let's just go ahead and have a look at it. What do we have in there? We have the page wrapper that Guidro wrote for us.

And in there as well, we're going to have a container and we're going to define something called an Ajax droppable area. A left one and a right one. And in the left one, you know, we're going to have the same repetition that he had that has our search results. And it rates over photo. So to display our search results over there.

So not much change in here. Except we're going to define that image as opposed to just a regular image. We're going to define it as an Ajax draggable. So we're just enabling drag on that item. And in the right-hand side, we're going to do the same thing. We're going to define... and An Ajax droppable area with a word repetition that's going to repeat over our favorite photos. And each photo is also going to be a draggable item. So there is no change really to the Java side. I'm just changing HTML here. And I'm going to go to our page wrapper.

Make sure that in the page wrapper right now, I am going to be calling no longer just the regular simple Flickr search. Which I had gotten out into a separate component. And what are we calling it? Ajax, Flickr, Photo Search. and we're going to save that. I'm trying to think, is there anything else we need to do? We shouldn't. But we have an error here, so let me double check what's going on.

and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and David DeRose, and Regina. Thanks Dimitri for helping us out on that and run the application. Hopefully it runs and doesn't embarrass us.

[Transcript missing]

Well, can anybody see what I did wrong? Not the ARX application, ARX session. We've added everything. Can you see anything, Guido? Guido Noguera: No. Let's double check that we've added the frameworks we have right.

[Transcript missing]

up up up. So, okay, Ajax is there. Yeah, that's what I was first thought, but I'm not sure. Okay. Um, I guess we don't want to bother with searching now for that arrow. Maybe you just go to the application we have prepared for a case like that when things happen that shouldn't happen and, you know. Okay. No, it's, it just has not finished building in the background. Here you go. It's back up. Okay. Um, so now this is our photo, um, component and all we added is a style sheet around it, and this is the drag and drop component.

and We go and search for Cupertino again, and now we have our little photos here. And, you know, we added just a little bit of animation using WebKit here to just like magnify the photos so we can look at them and marvel. And so now we just want to add something to our favorites, and we added over here.

and it is in our favorites bucket. Another thing that I wanted to show you was that, you know, Guidon and I spent some time trying to work together and just wrote a bunch of social networking tools. So basically went out and found APIs to things like Twitter and like Yahoo and stuff like that and wrote a couple of components.

One that reads news is an RSS reader and one that posts your Twitter messages out to Twitter. So we wanted to see if we can break it, I guess. So we go back to our page wrapper and this, we just collected all of these components. We wanted to talk about more advanced ways of architecting your code.

So all of these things I want to use in every social networking application I write. So I just dumped them in a social networking tools4j and I just put them in a web objects framework which is just, you know, you write a new framework by going file, new, web objects framework and just collect all of your components and all of your libraries that you're going to reuse across your organization or different projects in there. And once they are here and you've related them to your project, you can, you just use them as if they were in your own application. So in here, I'm going to also add, and Al Shachar, the founder of WebObjects, are the founders of WebObjects.com.

[Transcript missing]

News, what was it called? News widget, here we go. So we add that to our application, just hit save. I don't really need to reload my application to restart my application. I just reload it and hopefully it shows up. Yahoo might be just a little slow. Or Flickr might be a little slow.

We're missing something again. So now you see how it is an iterative process to develop software. Regardless, it's unimportant to show that particular component. It's just an extra component. If it's not working in our framework, that's something we can debug later. But basically, it did not take us much to be able to add a little more gloss to our application. And just by using a few more clicks and adding the AJAX framework into our application. So next, we are going to... Back to slides, Paula. Talk a little bit more about frameworks since they're not working right now for us.

So yeah, thanks Jay for that demo. We saw the concept of frameworks in that demo. We were using the Ajax framework from Project Wander. You saw that Jay created a social networking tools for Jay, and I hope it's also for me, right? Framework. They're just the job. And this is a great way to organize your project. Frameworks help you to don't repeat yourself.

Why am I going to say that all the time? They help you to structure your code by placing things that belong to each other inside one framework. Like you can put all your business logic in a business logic framework with your database models, with all the logic going on within the framework.

And then you can use that logic to create a framework for your business and your business. So you can create a framework for your business and your business, and then you can use that framework to create a framework for your business. So that's what we're going to do in this demo. I'm going to show you how we can use the framework. So we're going to go to the enterprise object.

And like in this example, you can create a framework for social networking tools. And you can just use these components, these utilities that are in the framework as they were in the application. And a great thing with that is you can use third party frameworks. We use the Ajax framework here. We use your extensions as the base for our Ajax demo.

And there are many, many other frameworks that we can use. Any third party frameworks out there you can use. And Project Wander is just the biggest and I guess the most active of these because there are many contributors to it. And it has that really great Ajax framework which you should explore and just take a look at it, learn from it, and use it because I think it's really cool. So, we have one remaining item that is deployment and Jay will talk about that part.

So, deployment. Now we have an application and the last thing you want to do is deploy it. Deployment means to make your application available for users so it can serve its intended purpose. One important thing about deployment is never think of your deployment as a one-time task. Deployment is a strategy. It's a strategy that needs to be organic and needs to be responding to how your application is growing, how it's behaving in the production environment. And you need to take a number of... items into consideration.

First of all, security. Is this an app that needs to be accessed over SSL? Is this for internal use or external use? Who has access to it? Expected user load. Is this an application that's gonna have the same small number of users using it all the time. Is this something that's gonna, where the user load is gonna grow and how is it gonna grow? It's important to think about the projected growth of your application.

What is your application server load? What else is on that server? And how CPU intensive are your operations? How much memory is a single instance using? Performance expectations. Is this an app that is mission critical? Does it need to be up 24/7? and Phil over support. How are you going to handle it when your instance goes offline, your whole application goes offline, and your database goes offline? These are things that you cannot leave until the moment they happen.

They need to be part of your deployment strategy to think about all of these things and then go ahead and choose a deployment strategy and keep monitoring. Use the tools. There's a statistics page. Look at that and always keep your application under surveillance and see if it's going to be able to do it. how it's behaving.

You have multiple deployment options with WebObjects. First, you have Direct Connect, which let me clarify, this is not actually a deployment strategy. This is for you while you're developing. It's a startup argument. You can set what Direct Connect enabled to true, and this way you don't have to set your own deployment environment when you're coding. It allows you to do some resource hot swapping and do it without having to affect other users or other programmers.

You can do a WebObjects deployment as a regular J2EE deployment. For servlet deployment, just include the Java WoJSP servlet framework. You can also do it as an SSDD deployment, which means that all of your frameworks, all of your WebObjects frameworks, including your system frameworks, are going to be embedded in that and deployed. Now, you can do the same thing with a traditional deployment, which is really what I'm going to recommend you do.

Traditional deployment just means that you are going to use the tools provided to you by Apple. There's a WoT SD that's managing the communication. You're going to use Apache as your web server. There's a WebObjects Apache model that tells Apache how to handle WebObjects requests. And use the Java monitor to start and stop your instances.

And instead of just talking about that, we're just going to show you quickly what Java Monitor looks like and how to start and stop your instances. And instead of just talking about that, we're just going to show you quickly what Java Monitor looks like and how to start and stop your instances. and stop an instance. So we'll go back to demo.

So yeah, a deployment for WebObjects is pretty much a basic task you have to do like more often than you will expect. And it's pretty simple if you stay within the normal, small scale deployments. It can grow with you. You can script everything. You can call it from the command line.

You can create complex staging scripts to stage your application to a test server. It's using Ant for building the deployable bundles. And the first thing I want to do here is tell that this project is using the framework that is also in our workspace. And I just say that it has a project reference to the social networking tools for J.

and then I can go in here and say, oh, I want to do something else because Jay talked about the including everything deployment. I just want to make things hard for you. That would mean we have to embed our frameworks and everything that is needed by the application.

It's not a servlet deployment I'm doing here, so I just, for now, I take it easy and just say true in that case. I say, WebObjects is a web application based on the WebObjects runtime and the system root. The system root is the framework from your user home. The system root is the system frameworks.

In that case, this is WebObjects itself. If you set this to true, it will embed a whole WebObjects runtime to your application. You can deploy to a machine that just has Java installed and the needed tools like Java Monitor and Votasty. And you have WebObjects there. It's running out of your application, so you don't have to do much more. I click now on my project here and I say, yeah, tools install. And because I set this as a reference to my project.

It automatically selected that one. Now, I can't really do that deployment with the system frameworks right now because that will take too long. That's about 5,000 files. And that will take like three to four minutes on that little hard drive we have prepared here. If you use the Java frameworks from the new WebObjects nightly or from the WebObjects 5.4, I learned that they are included since 5.2 something.

These are just way less files. So it would be much faster, but we haven't done that here. We use the standard frameworks. And so we don't want to do that. We don't want to copy 5,000 files now. What we have done here is prepared that. So I can go now to that library, WebObjects, applications, the demo three. And this is what is built by Eclipse if you go on the install dot dot.

And then we can do the actual install. You can see in the contents in library there are all the frameworks we need. There's Ajax framework. There's E-extensions. There are all the WebObjects framework included right in our application bundle. We can take that, drag that to a server, set it up, and be done with the deployment.

The tools for that are here. Oops, that was one of our problem views. - That was our Twitter, trying to bring down Twitter using WebObjects application. - Oh, okay. I have already added that application here. And that is done by typing the name here, using a wizard to just provide the path to the executable for our application. And then we get a configured application here.

Okay, that was prepared for the demo. So this is the path to our executable. It writes its logs to library WebObjects logs. These are all default values, so we haven't changed much in here besides just setting the path to the actual application. And the detail view for that application is here. This is one instance of this application.

We could add more instances to handle a higher load, to be able to have more concurrent requests, and so on. So this can really scale on that machine with more instances, and you can add more machines and add instances there, too, if you just deploy to these machines, too, and tell Java Monitor where it can -- Java Monitor and the one thing that is in the background, it coordinates, it's requests that come in from the browsers to your application.

The thing is called BotaskD. It knows about these applications because Java Monitor writes a configuration file, and BotaskD reads it, knows about the application, and can redirect requests to these applications. And now this application is running. I can click on that, and I hopefully don't see an error right now.

Maybe I do, but it worked on the demo hard drive quite fine, but -- Oh, yeah. Here we go. Here is that component that we added that will not show up. Right. That's a news component. That's the thing that takes longer to load. It does a call out to Yahoo News with the WWDC08 search word and shows live news from -- These news. Okay, news are gone. No longer there.

So that was deployment with the traditional VOA style, meaning we install from within Eclipse, we take the created bundle with all our frameworks with WebObjects in there, drag it to a folder on our server, and start it up with Java Monitor and let Votacity coordinate the rest. Back to slides, please. So now we have shown you how to create this whole entire WebObjects application from a fresh Eclipse install all the way to deployment and using Java Monitor starting and stopping the application.

What's the point of a lot of the stuff that we have shown you? Oh, yeah, I have to say it again. It's don't repeat yourself. I don't know whether it's a third time or the X time. I don't know. Yeah, that is the motto of WebObjects. Do it once and debug it forever. Use Eclipse Volips tools. They are being worked on all the time. So just use them and learn all the tips and tricks. There is tons of tips and tricks in Eclipse. and it'll make your development cycle really tight.

So, and learn to use EOF. The Enterprise Objects Framework is one of the very nice tools inside WebObjects. It helps you accessing a database without writing SQL code, without handling all that table generation stuff, and so on. You can do that, and in some situations you have to, but you don't have to do it normally, in your normal workflow.

It provides you with the hooks. If you know how it works, you can use these hooks. Otherwise, it'll work just right out of the box. Also, leverage the powerful third-party frameworks and libraries. As we've shown you, Wonder has tons of stuff out there for you. There are similar open source applications that are active and out there. If you need it, somebody probably written something similar to it, go learn from them or just use their stuff.

and one of the key features of modern applications is to integrate with external services. We have seen or we tried to show the Twitter service, oh we didn't do that, we didn't want to bring Twitter down with its Ruby on Rails implementation. I know. No worries. No. We used the Flickr API, we accessed Yahoo News with a keyword to show news from Yahoo all inside one simple WebObjects application by just using their provided Java APIs to integrate a whole lot of network tools out there into one application.

And if social networking is not your thing, there are other services you can be hooking up to, geolocation services, to credit card services. It's just WebObjects is adding and continuously improving web services as part of the framework. So just keep learning about it and use it. And finally, get involved in the community. It's an active community. We had a wonderful two days before WWDC where we had lots of sessions. You spoke there as well.

And it's a very active community. There are mailing lists. Join them. Learn from the people. Ask questions. And last but not least. Yeah. In our own interest, get training. If you don't know how to do it, find someone who does and they'll show you how. And we'll give back to Pierre.

I just want to say thank you to Jay and Guido. At the same time, I want to give you the date of the next training session they are organizing, one in Seattle, one in Frankfurt. - I thought it was Atlanta. Okay, Frankfurt. And also, they would organize training session for you if you don't want to go in those training which are just regular classroom. You can actually ask them to organize custom training. - Custom training and custom training. - I know they do that regularly for groups. So if you have got a group of developers that you want to train, that's a new problem.

Again, if you want to know more, Matt is here and he's going to join us on this stage for the question and answers. Documentation, community, labs. Why is there normally two labs? There is one on Wednesday and one on Thursday. There is one that disappeared. Okay. It's meant to be two labs.

There is one on Wednesday, one on Thursday. And there is a community event on Thursday afternoon where you are going to have a number of developers showing their great apps and talking about WebObjects. So if you want to know more about WebObjects, that's a great place to go.