Application • 52:07
Mac OS X is a great platform for prototyping, developing, and deploying your next Internet application. This session will cover in great detail the powerful technologies incorporated into the platform for website building. We cover PHP, mySQL, Tomcat, Apache, and additional open source favorites that are built in to every copy of Mac OS X, as well as others that you can readily install to create compelling websites.
Speakers: John Montbriand, Ted Jucevic, Daryl Lee
Unlisted on Apple Developer site
Transcript
This transcript was generated using Whisper, it has known transcription errors. We are working on an improved version.
Thank you for coming to our session. My name is John Montbriand. I work in Apple Developer Technical Support. Part of what I do is I take care of the sample code collections and the technical note and technical Q&A collections. And of course, doing that, I have plenty of opportunity to work with web servers and prototyping stuff on the web. And that's what I'm here to talk to you about today.
So first of all, let's set the context for what we're talking about here today. We're talking about building your website on Mac OS X. So what does that mean? A website has many components, and you look at your website through web browsers. So we're going to talk in this talk about all the different components of a website. And... Sorry.
We're going to talk about all the parts that make up a website, which include server software, scripting languages, HTTP software, and databases. Now, when you're developing a website, what are the things that you do? The first thing that you do is, of course, you upload it to a server, and then you look at the website with your browser. Now, that whole activity, there's only one thing that takes a lot of time there, and that's the network.
Because you have to make your pages on your machine, upload them to a server, and then view them with your browser. So the feedback loop you have going on there, it's really slow, and it can take a lot of time to develop the website that you're working on. So what I'm going to talk to you about today is putting this all onto one computer and getting your computer configured so you can preview your website, and you can edit your website. So you have a really close feedback loop when you're working on your website.
And going through that, we're going to talk about the server software, setting up that to bend HTTP pages. Of course, on your machine, you have Apache built in, and I'm going to show you how to configure that to do things like PHP and server-side includes, and it's very easy to do. The next thing I'm going to talk about is database software, where you can get that, how you can download it and install it.
There's some really easy-to-install packages available on the Internet that you can use. And we'll be showing you where to get those and how to install them. The next thing we're going to talk about is scripting languages. There's a whole bunch of really good scripting languages installed on Mac OS X. You can extend those languages, you can add packages, and you can install extra ones as well, and we'll be showing you where to get those.
Then I have two special guests coming in to talk to you about server-side Java and how you can install that on your machine and do your prototyping locally. Now, of course, I should point out that none of this requires Mac OS X server. You can do all of this with your client. You can do all of this with your client version of Mac OS X. All the things that I'm showing here today, you can do these on Panther, Jaguar, and I think all the way back to 10.0, as far as I know.
So let's start talking about HTTP server software. We have Apache installed on Mac OS X, and of course, on Mac OS X server, it's also installed. It's installed with a few more options already set up for you, and of course, there's some really nice configuration software available on X server. But we're not talking about that today. We're just talking about the client version and how you can turn that on.
Now, basically, if you want to turn on Apache, all you do is you go into the server settings or the sharing settings, and you turn it on using a checkbox. And for those of you who are more savvy on the command line, you can use that to turn it on and off using the Apache control statement shown there.
Now, I'm going to show today how to set up three different websites. The first two are going to be in your sites folder inside of your home directory. And the first site I'm going to show, I'm going to show how to set this up. This is the basic kind of layout of how we access these. We're going to show how to access websites through your local host address and then through URLs with the tilde username. And then I'm going to call one folder site one and one folder site two.
And we access all this through the user configure or through the local host URL with the tilde username. So the first thing we need to keep in mind is all the configuration globally on your system is stored in the HTTP configuration file. And I'm going to show you how to set that up to turn on PHP. But we don't actually have to do anything to that file beyond turning on different options. You can turn on PHP. You can turn on Mod Perl if you want.
And those things are all there. And you just need to turn them on. So I'll show you how to do that. Now, for each one of the sites we're going to do, there's different URLs that you access those through. There's going to be tilde username site one, tilde username site two. And these are all referring to folders that are installed in your user sites folder.
Now the configuration for those specific folders are stored inside of... This is a normal thing to do if you've developed on any web servers and you want to prototype. You'd use the htaccess files and you just place those on your servers with your various options like turning on server-side includes, for example, or turning on PHP inside of plain HTML files instead of requiring people to type PHP at the end of their URLs, which some people might not be very comfortable with.
So the first thing we're going to go, this is how you turn on Apache and how you set it up so it will actually look at HT access files in your...
[Transcript missing]
What those are is basically, they're a special kind of HTML comment, and you put some contents in there, and what that'll do is when the server is vending out the file to various web browsers, it'll look on the disk to find a file by that name, and it'll replace the comment with the contents of that file.
A lot of people use this for standard headers and footers on their websites, so this is kind of an interesting option to turn on, because then you can have standard headers and footers for all your pages, of course. Now in site two, we're just going to turn on, we're going to use these commands to turn PHP processing inside of plain HTML files. So now you, instead of having .php at the end of all your files, you have .html.
And for some people, they can't really tell how you're automating your site then, because you're just using HTML as far as the world is concerned. Behind the scenes, of course, you can have PHP running, processing your pages. So here's a small demo. I'm going to switch over to Demo Machine 2. First of all, here's the HTTP configuration file that I'm using. And inside of there, I've enabled the PHP commands. So here's the first line. And all I did was I took the comment symbol off the front of that.
And here's the second one. So searching from the top, there's the load module statement. We uncommented that. And then we uncommented that. And that's turned on PHP on your system. And you can use PHP in all your files. And after that, you probably don't want to do any more changes to the HTTP configuration file. Now, in here, this is my Apple user configuration file. And that's located inside of, well, you can see it up here. It's etc. HTTP users, Apple configuration.
And this is the important statement here, is just allow for HTTP config, HT access files to be used. And that governs the access over, you provide an absolute path name up here, the user's Apple sites directory. So everything in the Apple sites directory, now if there's an HT access file in the folder, it'll be used to determine the options for that folder and all the subfolders of that folder.
So these are standard Apache configuration things. So I have site one set up here, so we can say, local host, local host. Site 1. So that's my site with server-side includes turned on inside of it. And if we look on the disk here, As far as zooming in the finder windows, I could try doing that. Is there a--oh, hold on, yeah. Give me a second to do that.
It's on? Turn on soon. Thank you. Thank you. Okay. I guess when I'm in front of people and nervous, I'm not looking at the thing in front of my face. Okay. So anyway, here's site one, and here's my HTML file, and of course, here's my include file. Now, inside of there is a control option plus. Okay. Okay.
Okay. I guess when I'm in front of people and nervous, I'm not looking at the thing in front of my face. Okay. So anyway, here's site one, and here's my HTML file, and of course, here's my include file. Okay. I guess when I'm in front of people and nervous, I'm not looking at the thing in front of my face. Okay. So anyway, here's site one, and here's my HTML file, and of course, here's my include file. Now, inside of there is a control option plus.
brought up the help for me. It knew I needed help. OK. Now, inside of Site 2, I'm doing PHP processing inside of an HTML file. So if I make this more obvious-- So here's all the content that you can see inside of this page. And this is all generated from the PHP. Those of you familiar with PHP will be familiar. This is the PHP information command. I'll show you the contents of that file as well, if I can get back to the finder. So I'm not actually using the header include file there.
So here's all the PHP that's being generated here. That's the PHP command. And of course, This is all the content that's being generated there. So that's my little demo. It's not that exciting. If you're expecting some flashy web stuff going on, then, well, that's not there. But we'll switch back to the next slide.
[Transcript missing]
I'm going to build this on the computer here. So the first thing we bring up, here's our configuration file for my Apple user. And I'm going to add in-- So the first thing we bring up, here's our configuration file for my Apple user. And I'm going to add in-- So the first thing we bring up, here's our configuration file for my Apple user. And I'm going to add in-- And then I'm setting up a virtual host here. And the document root is going to be site three inside of my sites folder for my user.
And I'm going to log errors and accesses in these two files here. So once I save these, I'm going Then we'll be able to go into-- we need to go into the terminal so it reads in our new configuration. And I'm doing the Apache Control graceful method to restart the server.
And then I can go into-- You can see the site name that I'm typing in there. Okay, there's my exciting demo. But what's going on in the background here is this is reading in the configuration for that site. And I've set up site 3 here, and that just has a service site include. And I've done the normal thing here. Now, htaccess files are in all these folders, and we can open those up inside of the terminal here. I'll go.
So here's our htaccess file right here. And there's basically the commands that I have inside of it. Service side include, parsing, turned on. So that's a very simple way to set up a virtual host inside of your machine. And that way you can basically emulate the same functionality as you have on most websites to install whatever software you need on those.
Now, for more information about Apache configuration options, and stuff, there's a really good book by O'Reilly. And there's also the Apache website here that you can go to. And I also mentioned Darwin Ports, because if you're interested in installing other server software other than Apache, you can go there, and they have a whole bunch of different servers that you can install on your machine that are kind of interesting to play with. Or if you have special servers that you're developing for, then that's a good place to go and get the server software that you can install.
So in our next session, I'm just going to go over the different databases you can install in your system. And I'm not really going to do any demos here, because while databases, that's even less visually interesting than my last demos. So what you can install, I'm going to go over mySQL 4.02, PostgreSQL, and Berkeley DB. And of course, there's some others that we have available on the platform as well.
These are the free ones, but there's other ones like Oracle and Sybase that you can get as well. So I'm going to talk about... MySQL, where you can get it, there's a really good double-clickable install system style package that you can install from their site. You can go to their mysql.org. It's a fast, popular database. It's used in almost every web server seems to have it these days. I think a lot of people are using it. So that's a very popular package that you might want to look at.
PostgreSQL supports more advanced SQL queries that you can use. It's more interesting if you want to do some advanced programming. They do have an install on their website at postgreSQL.org, but there's also a really easy to use install on Darwin Ports that you might want to install instead because that's all pre-configured and there's no hassle installing it. It's very easy to do.
If you do install the Darwin ports, Darwin ports have variants. So if you want it to run as a server on your machine instead of just installing the libraries and software that is not launched by default when you restart your computer, then you'd want to use the plus server option that I've shown there in the Darwin ports install command.
Berkeley Database. I've seen some people use this with Perl. Some people do that. And I've included reference to their website here. It's also available as an install package from Darwin Ports. And that's why I provided a reference there. Now, there's some high-level SQL tools that we can use. And... There's the Cocoa MySQL, which is really easy to do, and that's kind of for looking at MySQL databases.
It's a high-level viewer engine that lets you do SQL queries and lets you look at SQL data and that sort of thing. The second one is MacSQL, and that's kind of a generic database product that you can use for viewing databases, and you can download that from Runtime Labs.
What that provides is a UI on one end, and then you have various drivers for different databases that hook up, and then you have a database in between there that you can use, and then, of course, there's your database running on your other machine. PHP My Admin is another tool that runs in PHP, of course, and I began this session saying I wasn't going to do a demo, but I do have a demo of this, so I'm just going to give a quick demo of using PHP My Admin. So if you go to their website, and that's what I've done here, we can download it. There's a gzip package. And I'll just download that. And hopefully it will appear on my desktop.
So basically the demo here is I'm just going to download the-- oh. I'm going to have to cancel this demo. I'm very sorry. What happened was originally I had mySQL installed on this machine, and I forgot to do that just before our session. And it was really neat, because what I do is I download PHP MyAdmin, just drop it into the site, and then it would work. But we'll just move on to the next slide, I'm afraid. Sorry. I just got here before, and I completely forgot to install that last one. So anyway, here's the database software references. And we have mySQL, and there are various websites.
And also you might want to look at Darwin ports, because if you're using things like Python or Perl or PHP, there's a whole bunch of plug-in modules for various different database accessing drivers that you can get from Darwin ports. Of course, the Perl ones you can get from CPAN.
We're going to talk about scripting languages next. There's a whole bunch that are installed on Mac OS X by default. You get PHP, Perl, Python, and Ruby. There's all the old Unix favorites, the command line tools and whatnot, but you don't really use those for scripting web pages, but you might use them building web pages, of course. I'm going to start by talking about PHP because I think that's one of the most popular ones for web developers. Of course, you need to turn that on, and here's the commands that you can use.
I showed how to turn it on before, but these are basically the two lines that you uncomment to turn on PHP for running in your programs. All you have to do is take out the sharp symbols at the beginning of these lines and restart your Apache, and that'll get it going.
Now, for PHP configuration, the default configuration, I found, I didn't really like it. So these are the two things that really bothered me about the default configuration for PHP. And you can, of course, go and change those. We provide all the defaults in a file that you can make a duplicate of using the command that I've shown here.
And what you'd want to do, like, for example, the magic quotes thing, that kind of caught me by surprise, because what it does is in the GPC stands for get post cookies. And in all the get post cookie data, it's on by default, and it puts little backslashes in front of all your quotes and things like that.
So you might want to turn that off. The other one, if you want to upload files larger than two megabytes or have post data, which is tied to the upload, the maximum file size, greater than two or eight megabytes, then you might want to adjust those parameters. So you'd go in and make a duplicate copy of the default initialization value variables for PHP that we provide, and then go fiddle with the preferences so they're the way you like them.
Perl is installed, 5.81. We have Perl 5.81 installed on Panther right now. And if you want to upgrade that, you can go to Darwin Ports, and of course, you can download that. That installs in a separate directory, and it doesn't overwrite the systems Perl. That's a good thing. And you can talk to me after if you want to know about ways to go about aligning that.
Of course, once you install Perl and you have the latest Perl installed, you can go and use all the CPAN modules and the DB database accessing modules and database accessing drivers for various databases and stuff like that. Mod Perl is available, and you can turn it on in the same way that you can turn on the PHP inside of the Apache configuration file. I'm not really going to go over that, but if you know about Mod Perl, then you know how to turn it on.
Python is installed. There's a whole bunch of Python updates and modules from OpenDarwin. That's a really good place to look for that. Of course, here's the Python website. I was really impressed by how many different Python modules were available on the Darwin port site. You might want to take a look at that. It's kind of a neat language.
Ruby, it's more of an object-oriented version of scripting languages for people that like object-oriented programming. It might be something really worthwhile for you to investigate if you do a lot of object-oriented stuff. And here's their website. You can upgrade Ruby, and there's a whole bunch of Ruby modules for accessing databases and whatnot on the Darwin Ports website. So that's the scripting languages section. We talked about Darwin Ports, and that's a really good place to go. It's one of my favorite sites, if you haven't noticed.
And there's lots of add-on scripting modules there. Other languages you can get. If you're building your web pages dynamically or using different languages to create them, there's a whole bunch of other languages you can go get there. And if you're running C programs that do image manipulation or automatic image generation for, like, raster titles or something like that, there's a whole bunch of different libraries you can get there as well. So here's some information about different places you can go to find information. There's a lot of different ways to find information about these different scripting languages, of course. There's the man pages and the pro doc pages and stuff like that built into the system as well.
So the last section, we're going to talk about server-side Java implementations available on Mac OS X. The first section is Java servlets. For those of you who don't know, Java servlets are little Java programs that run inside of Apache. You can actually run them as a server inside of Apache as well. We're going to show you some of the tools that we have available on Mac OS X for developing servlets. You can develop them inside of Xcode. We have Ted Jucevic here to give us a demo of what they are and let you see how they work.
I'm not sure if they can hear you. I assume that people can hear me. So let's actually go to, I guess, yeah, that's the right machine. So the only thing I've really done for this machine is I've downloaded and installed the application server preview. You can get that from connect.apple.com. It says it's a preview, but it actually has final candidate implementations, releases of JBoss, Tomcat, Ant, xDoclet.
It also includes templates for Xcode for doing, let's see, servlets, enterprise Java beans, and enterprise applications. Now, what I'm going to show you here, I've actually got the server up and running. Where is that mouse thing? There it is. Don't worry about the text. I don't need to zoom it in.
But this is just the log file. This is the file that comes that when you start up JBoss, this is what it generates. The only thing I've done is after you install it, you can actually start it up by going into CDing into library, JBoss, 3.2, bin, and then there's a run.sh script that you can run, and then you're up and running with it. So the next step is let's go and actually launch Xcode.
Now servlets, yes, it's Java and stuff like that, but it's not complicated. Even if you really don't know Java, to do a very simple servlet is very easy. One of the key things is even though I'm doing the development for this on Mac OS X, you can deploy this to any other server that does servlets, any other server that has Tomcat or the JBoss with the Tomcat, Windows, Linux, Solaris, of course, XServe. And so I'll just put this in my home and let's call it helloWODCSF.
So it creates a project. This is actually an AMP build script that it uses. So if you want to-- say you're working on this project with other people and they're using some other tool, say like NetBeans
[Transcript missing]
Let's see, that's the title, and then this is the content. The template comes up with Hello World. And let me see if I can zoom in on this a little bit. Let me get the text. Let me set it to, let's see, like 18.
There we go. So let's go down to here. And the do get, this is when you send a get command to the server. This is where it comes in. It actually sends in the request.
[Transcript missing]
And let's go ahead and do the build. Now, one thing about this AMP project is it actually does both the build and then also installs it.
So you notice that the terminal over there just kind of kicked up. What that was is the AMP build actually copied it into the directory for you. So you notice that the terminal over there just kind of kicked up. What that was is the AMP build actually copied it into the directory for you.
You could always go to another machine, but you're on that machine. And actually, I changed it a little bit from what I had before. So the first part of the URL is actually the name of the project, sf. And then the second half of the URL, the server hello world, actually comes from inside the sources. There's the xdoclet comment right here, the server hello world.
[Transcript missing]
With any luck, I should get low WWDC. So, of course, your servlets would be much more dynamic and stuff like that. But, you know, the entry level for servlets is very low on Mac OS X, and it makes it very easy to develop and then deploy to any other platform. So thank you very much.
So, of course, your servlets would be much more dynamic and stuff like that. But, you know, the entry level for servlets is very low on Mac OS X, So, of course, your servlets would be much more dynamic and stuff like that. But, you know, the entry level for servlets is very low on Mac OS X, and it makes it very easy to develop and then deploy to any other platform. So thank you very much.
And that's kind of interesting in itself. Now, to do that, I have Daryl Lee, who is a senior engineer from the WebObjects team who's come to give us a talk and give us a demonstration of how to do that. So here's Daryl. All right. Thank you, John. So how many people out there know what WebObjects is or have heard of WebObjects? Great. How many have worked with J2E technologies before, EJB, servlets, et cetera, et cetera? Okay. Great.
So what I'm going to tell you about is how WebObjects and J2E kind of integrate well together. So what is WebObjects? It's a Java application server that Apple builds. It's a development and deployment environment. So we think it's probably one of the best ways to build large enterprise-level applications that have a lot of enterprise needs.
And some of the vertical customers or solutions that people have deployed have been for online banking institutions, travel agencies, e-learning solutions. We use it for our iTunes Music Store, our .Mac services, our online Apple Store also. So there are many other solutions that are out there, but that just gives you an idea of what people have done with it. So at its core, what is WebObjects about? I think the power of WebObjects is in our core frameworks.
And we have frameworks, if you've heard of EOF, that allow you to model the data, in your database, or other data sources, and connect to that easily, and map that to your application. Then we have a bunch of frameworks that allow you to publish your data, either to HTML, or maybe a desktop application, a Java desktop application, or maybe build a web service. On top of those frameworks, we have a bunch of tools and assistance that help you configure your UI and build your applications rapidly.
So if you're familiar with WebObjects, a lot of people have done what we call a .woa deployment, or the application bundles are bundled in .woas. We also have a different option for deploying in J2E containers, and that's the .war bundle. And .war bundles or web archives are a J2E-specified way of deploying an application bundle to any J2E-compliant server. So if you have something like JBoss, you can take a .war bundle and deploy it into that, and also take that same .war bundle and deploy into WebSphere or WebLogic or whatever J2E container that you'd like.
So let's dig a little deeper into the functionality within WebObjects. So the first thing you want to do is get some connectivity to your data. The standard way in Java is to go through JDBC, the JDBC interfaces. So if somebody writes a JDBC driver, then we can connect to that kind of data source. So today we've talked about mySQL or Postgre.
There are JDBC drivers for that. There are a lot of commercial drivers for like Oracle, Sybase, and you name it. So if you're connecting to relational databases, we can support that. And in the same token, if you're connecting to directory services, Java has a standard interface for that. So the JNDI interface is the way to go. And things like... Open LDAP and iPlanet, we can support that kind of connectivity as long as they have a JConnector for that.
So when you're trying to map your data from your database, we do this thing called object relational mapping. So we're mapping the actual tables and rows in your database to actual objects so that your app can access that. And we have an EOModeler tool that I'll show you a little bit later and how to use that tool.
So the next thing after you've kind of modeled your data is... You'd want to figure out what mediums or where you'd want to publish that to. When you hear the name WebObject, you think, "Oh, okay, so that's a web client." So we obviously vend HTML as one option.
But some other things I want to make you aware of is that if you want a richer experience, we also help you build Java clients for the desktop. These are kind of three-tiered applications. So they would be a Java client, which would talk to a WebObject server. Which would then talk to your database.
And then we also support web services. So web services are a very popular buzzword lately. And so if you hear Microsoft is pushing .NET services, and basically they're just sending out soap structures, if people are familiar with soap. So web services kind of encompass SOAP, XMLRPC, and WSDL.
I'm not going to go into all those acronyms. But... We have assistance that allow you to take your data with your model data and actually configure a service so that you can interconnect with other computers or applications that can talk web services also. So after we've done that... I want to just tell you about our rapid development tools.
And these assistants really allow you to rapidly prototype your applications within minutes. So later in a demo, I'm going to show you that within five minutes, I can build an application without writing even a drop of code, and customize the UI, and get it up and running. So it's definitely a powerful tool to use in our WebRx distribution.
So getting started, what do I need to get on my disk to download on my laptop today and get running? Well, first you're going to want to pick a nice IDE to work in. We're Apple, so we encourage you to use Xcode. It's a great environment for building Java applications and WebObjects applications. So definitely check that out.
If you are more partial to an open source solution, grab Eclipse and download that. And then we have a couple of open source projects that support WebObjects development. So if you have heard of WoeLips and WoeProject, if you download those and install them, then you can use Eclipse to build WebObjects applications.
The next thing you want to do if you don't have WebObjects on your disk is to go to our website, www.apple.com/webobjects, and download a free trial version of WebObjects. It's their full feature development tools there. The only thing you need is a 30-day free trial license. So that'll get you up and running, and you can play with everything that we've got.
So if you're interested in the .war bundling that I was talking about and deploying that way, I would suggest that you download the application server update or preview that Ted was demoing earlier, and that has Tomcat and JBoss. So those are all pre-configured to run on Mac OS X, so it saves you from downloading the binaries from JBoss.org or Tomcat.org and getting all that installed correctly and configured correctly.
Okay, so without, I would like to jump into a demo, and if we can go to laptop, laptop over here. Okay, so this is kind of like the end product of what I'm going to show you. And what you can see is that this is a very full-featured app. I can add records over here. I can edit records. I can delete them, and I can sort them.
And hopefully my session hasn't timed out yet, so it's still interactive. So this is what we're going to try to get to by the end of my demo. One other thing I want to point out to you, just because it looks cooler, is a more fuller model that I've built.
[Transcript missing]
So I want to build a simpler model for you. One other thing I'll point out is that you also can see the relationships between the various tables, the foreign keys and the primary keys, and how they relate with each other. Okay, so let's build a simpler model and reverse engineer this from our database. And the first thing we want to do is I'm going to connect to a JDBC data source. connect to it with a JDBC connection URL. Hopefully that pasted in correctly.
The next thing it's going to do is ask me all kinds of questions about do I want to be queried about relationships or stored procedures or other things. And we'll just take some very simple options and say we're going to ask about primary keys. John Montbriand, Ted Jucevic, Daryl Lee The next thing it's asking me is, okay, what tables do I want to work with? And I just, for the simplicity of this demo, I just want to pick one table, and I'll pick listing address.
Let's finish. So here is our model, and it's really simple, and like I pointed out to you before, here's our table, and there are columns. And one other thing I'll just point out to you, say I want to change something or if I was just modeling this on my own and I didn't have any database or any of the tables set up in the database, we can generate the SQL for actually creating those tables and those relationships, the primary keys, the foreign key bindings, and stuff like that. And you can execute that script or save it off as a script. OK, so let's just save that model.
Let's put that on our desktop. Okay, so what I'd like to show you next is how in Xcode we'd build a direct web application. And what that does is allow me to rapidly prototype a web application. And as you can see, we have a bunch of other templates for web objects. So if you're building a Java client or if you're building a web service application, and there are variations thereof. But I'm going to do a web application today.
Let's just call this test and put it on the desktop. So we want to eventually deploy this as a WAR bundle, so I'm going to select that option. This is a standalone one where it beds all the jars and necessary resources that we'll need. And this is where we'd put our little trial license in.
If I wanted to add web services support, either vending web services or consuming web services, I would select these options. And what this is asking me for is whether I want to use JDBC type of access or if I need JNDI types of access. And I will take just the standard frameworks that's added there, and let me just add our little listing model.
Now, what this pane is asking me is, OK, what kind of default template look that I want to start off with? I'm not forced to stick with this, but I will be configuring this a little bit later. So let's just go with a neutral look and then build and run our project.
So there's not a real lot of Java code in this project. As you can see, there's like three Java files, and there are a few components in here, and then there's our model file that we were just talking about. This will launch and pull up my web browser here. And this is my application without any configuration. And as you can see, it's fully functional out of the box. So if I wanted to query on it, there's no problems. I can sort right away.
and I can add and do other kinds of operations on the table. So as you can notice, some of it's not so pretty. I don't like this apartment number string that it's previewing for me here. And I don't particularly like how it's presenting the zip code string or something like that. So I'm going to show you how you can customize this without even having to recompile your code.
[Transcript missing]
So, okay, here's our assistant. Hopefully that's large enough for everybody to see, but... What I want to do is I want to change this apartment num attribute name to something that's more displayable. And I'll just call this apartment.
[Transcript missing]
I can do the same thing. Let's do it for zip code again. And let's just call this postal code. And we can update that, and boom, it immediately updates. So we can save our changes. And let me just show you how the deployment in JBoss works. Okay, so we want to go to Xcode. And let me just point out one thing in our targets over here. And let's select that.
Now I can tell Xcode where to drop my WAR bundle by configuring this one property here, which is the servlet_webapps directory. And it's telling it to put into the JBoss deployment directory in /JBoss3.2 deploy. So I just wanted to point that out to you. If you had installed your application server in a different location, that would be good to know. Okay, so let's build our and deploy our server.
Once it finishes building, it will automatically put it into the /library/jboss folder. And while it's building and stuff, I'll just show you one other thing, a way you can tell that the JBoss server is up without having to look at your terminal or something like that. If you go to localhost 8080 on the 8080 port and you hit that, you'll get this welcoming page. So it's a quick way that I use all the time just to check if my server's up. So let's try connecting to our application. I'm pretty sure it's deployed.
[Transcript missing]
So thank you very much, Daryl. Here's some reference materials for doing server-side Java applications. Now, okay, I'm going to sum up, and what we've talked about today is basically doing all your web development locally on your computer.
Like, for example, you're all carrying around laptops, so let's say you wanted to do website development, testing, prototyping on your laptop without being connected to the Internet. This is what we've been talking about today. We talked about server software and how to set up Apache so you can do local serving off of pages, and so you can emulate all the server-side options that you'd have on a regular server on the Internet, such as server-side includes doing PHP and virtual hosting.
We talked about databases, where you can go to get them to install them, where you can find them on the web, some installation options for Postgre, for example, and where you can get modules to access them from various scripting languages. And we talked about some scripting languages that are pre-installed on Mac OS X, and how you can turn on PHP, and that sort of thing. We also had two demonstrations of different options for doing server-side Java on Mac OS X.
And these were all running locally on a local machine, so you can do your development, testing, prototyping, all on the same machine. And, of course, we had servlets, which are the simple ones, and we had J2E application development with WebObjects, which, of course, as you noticed, that was our flashy graphics demo.
So, now, in the end, here's the reference library information. We have a connect.apple.com DMG that you can download at the end of the day today. And, of course, Dorm and Ports is a good place to go look for information and downloads for software that you can install to do web development and prototyping on your machine.