WWDC2004 Session 420

Transcript

Kind: captions Language: en thank you for coming to her session my name is John Montreal an awful 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 collection and of course doing that I've plenty of opportunity to work with web servers and further typing stuff on the web and that's what I'm here to talk to you about today so first of all let's just the context what we're talking about here today we're talking about building your website on Mac OS 10 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 the website and sorry we're going to talk about all the parts that make up a website which includes server software scripting languages HTTP software and databases so now what's when you're developing a website what 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 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 loops 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 on to 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 in going through that we're going to talk about the server software setting up that to vend HTTP pages of course on your machine you haven't passed to be 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 this 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 scripting languages there's a whole bunch of really good scripting language is installed on that goes ten 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 knock those ten server you can do all of this with your client version of Mac OS 10 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 HPV server software we have apache installed on mac OS 10 and of course on mac OS x server it's also installed in solving a few more options already set up for you and of course there's some really nice configuration software available in 10 server but we're not talking about that today we're just talking to 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 out three different websites the first two I are going to be in your site folder inside of your home directory and the first side 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 at the tilled username and then i'm going to call one folder site one and one folder site too and we asked this all this through the user configure or through the localhost URL with the tailed username so the first thing we need to keep in mind is all the configuration globally on your system is stored in 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 easy access those through there's going to be tilled username flight one till username side two and these are all referring to folders that are installed in your users sites folder now the configuration for those specific folders are stored inside of HD access files and this is a normal thing to do if you've developed on any web servers and you want to prototype use use the HD access files and you just place this on your servers that 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 Itachi and how you set it up so it will actually look at HT access files in your in your sights folder now by default on the client install of Mac OS 10 HD access files are ignored so this is the first thing you'll have to do and all you do is you add in for your username let's say you're logged in on this machine that i'm going to show you on your logged in its Apple so we'd call it apple conte and we provide these options inside of there these are all options that you can look up in any attached configuration mount module and on the dmg I provided all these files for your reference so you don't have to copy them down now this this basically turns on HT access files once you install these commands in your users configuration file you go and just restart apache using either the checkbox or you can do it by using the pseudo apache control command now for site 1 i'm going to show how to turn on server side includes for HTML files what those are is basically there are special kind of HTML comment and you put some contents in there and what that'll do is it'll wreck when when the server is ending out the file to various web browsers it'll look on the disk to find a file by that name and it will replace the comment with the contents of that file a lot of people use this for certain standard headers and footers on their website 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 flight too we're just going to turn on we're gonna use these commands to turn on PHP processing inside of place it's plain HTML files so now you instead having dot PHP at the end of all your files you have dot HTML and for some people they well they can't really tell how you're automating your sites and because it's you're deceiving HTML as far as the world is concerned behind the scenes of course you can have PHP running do processing your pages so here's a small demo I'm going to switch over to demo machine to now first of all here's the htp configuration file without me using and inside it 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 site note let's go to the top so searching from the top there's the load module statement we uncommented that and then we uncommented that and that turns on PHP on your system and you can use PHP and all your files and after that you probably don't want to do any more changes to HT the 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 etcetera HTTP users alpha configuration well this is the important statement here is just allowed for hdb config HT access files to be used and that governs the access over you provide an absolute pathname up here the users apple sites directory so everything in the apple sites directory now if there is an htaccess 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 these are standard Apache configuration things so I have site one set up here so we can say localhost site one so that's my that's my site with server side includes turned on inside of it and if we look on the disk here as far as sunni in the Finder windows I could try doona 0 hold on yeah give me a second to do though it's on turn on to her thank you thank you okay I guess when I'm in front of people are nervous I'm not looking at this thing in front like ice but ok so anybody here site one and here's my HTML file and of course here's my might include file now inside there it's a control option + ok so here we have the this is the server side include statement there and basically what happens when the file gets read in inside the browser I can find Safari now ok so if we view the source here on the on this page we can see that that comment once you're placed with this this text here which is inside of my include file and that's where it was replaced so that server side includes inside of flight number one and I brought up the hell for me it knew I needed help ok now inside of sight too I'm doing PHP processing inside of an HTML file 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 from the PHP those of you familiar with PHP will be familiar this is the the PHP information can and i'll show you the contents of that file as well i can get back to the finder so i'm not actually using the header include file there but here we go so so here's all the PHP that's being generated here that's PHP canal and of course this is all the contents being generated there so that's my little demo it's not that exciting in if you're researching some flashy web stuff going on then then well that's not there the louis leads back to the next slide so that's that's how to do those are simple websites with you know you have to use the problem you might notice there is you have to use tilled user name and/or tilled username then the name of the directory and now that might not completely reflect what you're doing on the web because like usually you have something like my site com and you want to mirror that kind of thing so what you want to do then is set up a local virtual host and what that does locally on your machine is still using the word local host to refer to your site you set up an extra name to refer to your own computer so what we do here on the first first little flexion we see up there what I've done is I've added to name the alien skin for local host on my machine and we're calling it a local name I think in my demo and I'm calling it local site but and then it's been in the next part we add this this virtual host section into our configuration file now the advantage of this is if you're doing debugging and shuffling your site then of course you get server-side logs generated for your virtual host and you can have as many of these set up on your machine if you want so you can set up localhost local site local this local that for as many different site secured building and you'll get a server side access log you'll get a server-side error log you can set up a document root for that directory which means if you understand a little more about the server side include thing you can do include virtual rather than include file which goes to the document root looking for documents rather than relative to the source file the other thing you can set up also is a scripts directory to on a per host basis but now I have a demo of this but I like to show you and I'm going to build this on the computer here so the first thing we bring out here's our configuration file from my Apple user and I'm going to add in the virtual host parts here so here's the local site is the name that I've set up and inside of here's my hosts file now I'll make that bigger soon so inside my this is my host database once you eat this once you edit this file you don't have to restart your system or anything so I'm adding in here local host I'm adding in another psych letter name alias for that IP address called local site and then on setting up a virtual host here and the document root is going to be site three inside of my tights folder for my user and i'm going to log errors and accesses in these two files here so once i saved these 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 and all right sorry you can see the site name that i'm tucking in there and and ok 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 three here and that just has a server-side include and I've done the normal thing here now HD access files are in all these folders and we can open those up and inside of the terminal here I'll go in there and open one up to see Casilla so here's our htaccess file right here and there's basically the commands that I have inside of that server side includes parsing turned on so so that's a very simple way to set up a virtual host inside of your machine and that with that way you can basically emulate the same functionality as as you have on most websites two and install whatever software you need on this now for more information about Apache configuration options and stuff there's a really good book up by o'reilly and there's also the apache web site here that you can go to and i also mentioned our gun ports because if you're interested in selling other server software other than apache you can go there and they have a whole bunch of different 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 on your system and that and i'm not really going to do any demos here because well databases that these unless there's really interesting than my lasting love but so what we have until what you can stall i'm going to go over mysql 4mm four-point-oh to postgresql and berkeley DB and of course you know there's some others that we have available on this off on the platform as well these are the 3 1 so that there's other ones like oracle and sybase that you can 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 installed system style package that you can install from their site you can go to their MySQL dot org it's fast popular database to thin 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 out postgresql this is the more advanced support some more advanced SQL queries that you can use and it's more interesting if you want to do some advanced programming now they do have an install our website at post grade SQL done 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 house while enjoying and it's very easy to do if you do install the one Darwin ports don't kourt's have variants so if you wanted 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 and the Darwin port since all command Berkeley database I've seen some people use this with pearl some people do that and i've included reference their website here it's also available as an insult package from Darwin ports and that's why provided 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 looking at mysql databases it's a high-level viewer engine lets you do SQL queries and lets you look at ql data and that sort of thing the second one is not guess ql and that's kind of a generic database product that you can use for viewing databases and you can down that load 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 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 you know I beyond the session thing I wanting 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 now so if you go to their website and that's not done here we can we can download there's a gzip package and I'll just download that and hopefully it'll appear on my desktop so basically the demo here is I'm just going to download the home I'm gonna have to cancel this demo I'm very sorry what happened was originally I had my SQL 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 minds man 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 their various website and also you might want to look at darwin ports because if you're using things like python or pearl or PHP there's a whole bunch of plug-in modules for various different database accessing drivers that you can get some Darwin ports of course the pearl ones you can get from C done now we're going to talk about scripting languages next and there's a whole bunch that are installed on a necklace 10 by default you get PHP Perl Python and Ruby and there's all the old UNIX favorites to command my tools and whatnot but you don't really use those for scripting web pages but you might use them building web pages of course now I'm gonna start by talking about PHP cuz I think that's one of the most popular ones for web developers now of course you need to turn that on and here's the commands that you can use I I showed how to turn it on before but these are the these are basically two lines that you uncomment to turn on PHP for running in your programs and 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 did I didn't really like it so these are the two things that really bothered me about the deep a configuration for PHP and you can of course go and change those we provide all the default in a file that you can make a duplicate up 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 forget post cookies and in all to get those cookie data it fits on by default and puts little backslash it's 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 2 or 8 megabytes and you might want to adjust those parameters so you'd go in and make a duplicate copy of the default initialization Belliard variables for PHP that we provide and then go fiddle with the preferences so so their way you like them pearl isn't solved 528 one we have thrill 5.1 installed on counter 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 system's pearl that's a good thing and there's live stock me out here if you want to know about weight we could go about aligning that now of course once you install pearl and you have latest Perl installed you can go and use all to see pen modules and the 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 install turn on ph the PHP instead of a sheepish ashley configuration file i'm not really going to go over that but if you know about mod perl then then you know how to turn on python is installed and you can get the whole bunch of python updates and modules from opened darlin and 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 so you might want to take a look at that and it's kind of a neat language in a ruby it's more of an object-oriented version of scripting languages for people that like object-oriented programming 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 a whole bunch of Ruby modules for accessing databases and whatnot on the Darwin ports website so so that's the scripting languages session we talked about Darwin ports and that's a really good place to go one of my favorite sites if you haven't noticed and there's lots I on scripting modules there other languages you can get if you'd like to if you're building your webpages dynamically you're using different languages to create them there's a whole bunch about the languages you can go get there and if you're if you're writing 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 about these different scripting languages of course there's the man pages and the product pages and stuff like that built into the system swamp but the last section we're going to talk about server side java implementations available on oculus town and the first section is java servlets now for those who don't know java servlets our little java programs that run inside of apache and you can actually run them as a server and side of apache as well and now we're going to show you some of the tools that we have available on knockos 10 for developing servlets you can develop them inside of Xcode and we have Ted juice of a cure to give us a demo what they are and let you see how they work I'm not sure if they can hear you can that people can hear me so let's actually go to I guess yeah that's the right machine I'm 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 connect i'll calm it says it's a preview but it actually has final candidate implementations or releases of jboss tomcat and x doclet it also includes templates for xcode for doing see servlets enterprise javabeans and enterprise applications now what I'm going to show you here I've actually got the server up and running where is that most thing there it is don't worry about the texts I don't need to zoom it in but this is just a log file that comes up that when you start up jboss this is what generates the only thing I've done is if after you install it you can actually start it up by going into see being into library jboss three dot to bin and then there's a run da 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 cert to do a very simple product servlet very easy one of the key things is even though i'm doing the development for this on mac OS 10 you can deploy this to any other server that does servlets any other server that has tom cat or you know the j box with to tomcat you know windows linux solaris of course xserve and so i'll just put this in my home and let me put it and let's call it hello wdc SF so it creates a project this is actually an ant build script that uses so if you want to say you're working on this project with other people and they're using some other tools say like NetBeans or eclipse or something like that it's all just ants so it's all cross plateau you know you can use it on pretty much any machine so I'm going to go ahead do a build but actually before we do anything let me just go into the source and make a change here and the change that I'm doing is actually just let's see that's the title and then this is the content the the template comes up with hello world and let me see if I can zoom in on this a little bit then you get the text and let me set it to you're like 18 all right 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 that where it comes in it actually it sends in the request the response and essentially everything that you're printing out is in these quotes if you have just a static page or something you're generating or something like that you can pretty much just fill in these quotes but that's not what several it is it's supposed to be dynamic and all that but what you can do is you can take this request data and then based on that we reply with whatever you want so I'm going to go ahead and change this to WWDC and up that's a habit and let's go ahead do the build now one thing about this ant project is it actually does both the build and then also installed it so you notice that the terminal over there just kind of kicked up what that was is the ant build actually copied in to the directory for you jboss and are actually Tomcat in this case because servlet notice it was there loaded it up and you're up and running so the next step is of course to test it you could always go to another machine but you know 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 the actually the name of the project FF and then the second half of that URL the servant hello world actually comes from inside the sources there's the X doclet comments right here the surveillance hello world with that you can configure exactly where where you want it to be accessed from on the server and stuff like that so if you have multiple of course servlets you don't want them all to be have a collision space on them so any luck I should get hello WWDC whoo so of course your service would be much more dynamic and stuff like that so but you know the entries level for servlets is very low on mac OS 10 and it makes it very easy to develop and then deploy to any other platform so thank you very much so thank you ted and ted's are are one of our engineers and apple developer technical support the texture of java now so next section we're going to talk about j2ee application development on Mac OS 10 using web objects Lebanon juice is Apple's rapid application development technology or developing websites and it's for building j2ee applications we're going to show you how to use live objects most people think of web objects in terms of well you have to have a little object server but we're going to talk about it in terms of well we're going to just use web objects for developing j2ee applications for placement on any server in the world doesn't have to be a weblogic server and that's kind of interesting in itself now to do that I have duralee it was a senior engineer from the weblogic steam has come to do give us a talk and give us a demonstration of how to do that so here's Earl all right thank you John so how many people out there know what llevaba kiss or heard of web objects great how many have worked with j2ee technologies before ejb servlets it's all right sir ok great so I'm going to tell you about is how web barbican j2ee kind of integrate well together so what is web objects it's a java application server that Apple build it's a deployment end of 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 or have been for online banking institutions travel agencies elearning solutions we use it for our itunes music store r dot mac services or online store 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 web objects about I think the power of web objects is in our core framework and we have framework if you've heard of eos that allow you to model the data in your database or other data sources and connect to that easily and map back to your application then we have a bunch of framework 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 and so on top of those frameworks we've 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 web objects a lot of people have done what we call a dot lua deployment or the but the application bundles are bumbled in Louis we also have a different option for deploying in j2ee containers and that's the dot waar bundle and thought war bundles are or web archives are a j2ee specified way of deploying a application bundle to any j2ee compliance server so if you have something like jboss you can take a wire bundle and deploy it into that and also take that same war bundle and deploy into websphere or weblogic or whatever j2ee container that you'd like so let's dig a little deeper into the functionality and within web objects 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 post gray there are jdbc drivers for that there are a lot of commercial drivers for like Oracle sybase and you name it so so if you're connecting in 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 openldap and I planet we can support that kind of connectivity as well as they have a J connector for that so when you're trying to map your data from your database you we do this thing called object relational mapping so we're mapping the actual tables and rose in your database to actual objects so that your your app can access that and we have a needle modeler 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 too when you hear the name web object you think okay so that's a web client so we obviously then 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 web object 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 dotnet services and basically they're just sending out substructures if people are familiar with soap so web service is kind of encompass soap xmlrpc and wsdl i'm not going to go into all those acronyms but we have assistants that allow you to take your data with our money your model your model data and actually configure its service so that you can interconnect with other computers or applications that can talk web services also so after we've done that I wanted to tell you about our rapid development tool and these assistants really allow you to rapidly prototype your applications within minutes so I'm later in a demo I'm going to show you then within five minutes I can build an application without writing even a drop of code and customize the UI and get up and running so it's definitely a powerful tool to use in our in our web RX 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 web objects applications so definitely check that out if you are more partial to an open source solution grabbed eclipse and download that and then we have a couple of open source projects that support web barwick development so if you have heard of whoa lips and blow project we download those and stall them then you can use eclipse to build web applications the next thing you want to do if you don't have web box on your disk is to go to our website wwlp.com web objects and download a free trial version of web objects they're full-featured development tools there the only thing you need is a 30 day free free trial license so that will get you up and running and you can play with or everything that we got so if you're interested in the dot war bumbling that I was talking about and deploying that way we have I would suggest that you download the application server update or preview that Ted was demoing earlier and that has tom cat and Jay box so those are all pre configured to run on mac OS 10 so it saves you from downloading the binaries from j botha 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 has timed out yet so it's still interactive so this is what we're going to try to get to you 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 dealt with my model hablar okay there we go let's resize on so if you look at this and let me put this in a diagram view which is much more interesting to look at this is some data in my database that I've modeled and what I'm what I've just selected here is the agent entity which represents a table in your database and say this first name attribute what we call attribute it really represents a column in your database and if you if we do get info we can kind of get a little bit more information like the actual column name is first underscore name so I want to do build a simpler model for you oh one other thing I'll point out is that you also can see the relationship between the various tables of 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 and connect to it with a jdbc connection URL hopefully that paste it in correctly there we go the next thing it's going to do is ask me all kinds of questions about do I want to be great about relationships or stored procedures and or other things and we'll just take some very simple option to just say we're going to ask about primary keys investigating it's asking me is okay what tables do I want to work with and I just for the simplicity 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 I'm like I point out to you before there is 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 am the tables set up in database we can generate SQL for actually creating those tables and those relationships the primary keys foreign key I'm relation bindings and stuff like that and you can execute that script or save it off as a script okay so let's just save that model and let's put then on our desktop okay so what about 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 were building a web service application and there are variations thereof but I'm going to do a web application today and let's just call this test and put 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 next so resources that will need and this is where we'd put our little trial license in if I'd wanted to add web sources support either vending web services or consuming web services i would add select these options and what this is asking me for is whether i want to use jdbc type of access or if I need Jan di types of access and I will take this to standard frameworks that's added there and let me just add our little listing model now what this pain is asking me is ok what kind of default template look that I want to start off with it I'm not forced to stick with this but I will be configuring this a little bit later so let's just go with the neutral look and then build and run our project so there's not a real a 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 and this will launch and pull up my web browser here and this is my application without any configuration and as you can see I can it's fully functional out of the box so if I want to query on it there's no problem so I can sort right away and I can add and do other kinds of operations on the table so as you can notice it's some of its not so pretty I don't like this apartment number of string that is it's previewing for me here and now i'm particularly like how its presenting the zip code string or something like that so i'm going to show you how you can customize this without even have to recompile your code and what i would do is i would select the assistant and log in and then i want to select this customized link what that's going to do is it's going to bring up an assistant it's any applet that will help me configure some of the properties with it an application oops so okay here's our assistant hopefully it's large enough so everybody 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 and just to see how cool this is let me just pull this up so as you can see it's still apartment number right here for that the old way of displaying it but if I hit the Update button right here it will dynamically update that and apartment now shows in my application I can do the same thing with dude for zip code again 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 to pull the web the deployment in jboss works ok so we'd put a good Xcode and they just point out one thing in our targets over here and let that now I can tell Xcode where to drop my my wire bundle by configuring this one property here which is the servlet underscore web apps directory and its target to put into isn't into the che box deployment directory in flash jboss 32 deploy so I just want to point that out to you if you had installed your application server in a different location that would be good to know ok so let's let's build our and deploy our server and once it finishes building it'll automatically put it into the flash library jboss folder and while building and stuff i want i'll just show you one other thing that you can way you can tell that the JBoss server is up it without having to look at your terminal or something like that is if you poor if you go to localhost 8080 on the adat 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 servers up so let's try connecting to our application i'm pretty sure it's deployed and let's just try so it's at test web objects test out well and here's our application we can log in and we can query on it and sees here our customizations and as you notice we're on the 8080 port so I just hopefully it was clear to you that when i was in xcode now I was building stuff that that was actually the development environment but when you deploy you'll have a different URL here and you'll see the 8080 colon or whatever you map your your JBoss server to so hopefully that clarifies dis on how easy it is to build a web Alex application and how it's almost virtually crowed free when you're trying to prototype your application for the web so back to you John so thank you great thank you very much Daryl here's some reference materials for doing server side java applications now ok i'm going to sum up and what we 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 here's this is what we've been talking about today we talked about server software 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 a 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 post gray 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 os10 and how you can turn on PHP and another sort of thing we also had two demonstrations of different options for doing java java server side java on mac OS 10 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 shrivel its which is the simple ones and we have j2ee application development web which of course as you notice that was our flashy graphics demo so now in the end here's the reference library information we have a connected apple com dmg that you can download at the end of the date say and I of course dorman 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