PROFESSOR: Today we talk about web based programming and also discuss the two projects. What I just give you are additional notes on web based programming. Okay. The notes are pretty much self-explanatory. Well, if you have already loaded your database this is nothing new now. So the first two pages describe how you can load a database and establish the ODBC and then you can start programming in web base. So when you first start, you need to of course create some user, create a new user. In this case, bill. And then you can initialize the database by running a PSQL program. Now, I already E-mailed to all of you a longer PSQL program, the idea is basically the same. Namely, we first create the tables, and then we insert the tuples into these tables. Some of you already asked me questions that not all of the tables are with data. Well, this is deliberate. This way, you can try to put in some data yourself into, for example, the copy relational table and you need to do something similar to do that. This is a chance for you to try this kind of thing. So once you run the program, you'll load the database. And this database is the one I use in the class notes where I have the SP relation, the CS relation, S and P relation. Okay. So you run your program when you are in SQL plus mode and this will create initial database. Now, in the PSQL program I mailed to you at the very beginning, there are dropped tables because this way you can reinitialize the database. If you screw up something, no problem, you just the run the program again. The ODBC connection, now as I explained last time, this enable our system to know that the certain data file corresponds to certain database and what driver needs to be used. Now you notice the interesting things that, that there are quite a few drivers that you can choose from. In other words, if your database is in excel or access or in D base, it can also be supported. So that's nice. That means that we can be quite flexible. Okay. So, let's suppose in this case DSM or data source name is test ODBC and user name is bill, no password. Then the forms, whatever forms you create must use this data source name. The forms are also quite self-explanatory and in fact, you can see in your handout the URL's so you can actually go on the web and try those programs to observe the results. Now, like I mentioned last time, basically, you have the SQL statement and then your form processing part. Oh, by the way, the search string that I was mystified last time is entire URL string that you can see. Now, some of these examples are interesting. If you go to the one which is called search all. Search all and get all. Now, this program is used to print out two different tables, depending upon what user select. In other words, we can use the same program or the same form to generate the S table or the P table. Now in order to do that, we have to have a variable in the query. You can see the select, from. Notice here, normally we should have the name of the relation, right? But here I have actually a variable so whatever is in the brackets is actually the variable which is also mentioned here in the form. Okay? So, notice that variable name is TA which is passed here. So depending upon user selection here, he can select SC or P, then TA will get, will take on available S, C or P and test to here. You can see this quite flexible. So, the relation names and if you will, you can use attribute, attribute names can all be replaced by variables if the need arises. Okay. But after you look at a few of these forms you notice they are quite similar. So, you should not have great difficulty in writing -- starting to write some programs. Okay. These are additional notes you have. So now you can start working your, either project. Any questions regarding the mini projects? Yeah? STUDENT: Is web base or anything about this going to be covered on the final at all? PROFESSOR: The principle of middleware and the principle of course CGI interface servers, stuff like that will be covered. And also like I explained, the concept of this active form, how we set it up will be covered, but I will not go into programming detail. Yeah? STUDENT: The last couple of E-mails that I got from you when you're answering questions about them, you said have you to use my data. Does that mean we have to use the same format in the files? Before you said that we could make up our own format for the first project. PROFESSOR: Yeah, first project, as long as you bring your own computer in, there is to problem. STUDENT: Okay. PROFESSOR: I do have some data set up on my machine. If you bring in EXE and you use my files you better conform to my format. If you set up everything on your laptop, bring your laptop, no problem. STUDENT: Okay. PROFESSOR: Has to be general enough. You have to have DBD or several, some query files, some result, the T files. PROFESSOR: Okay. Yeah? STUDENT: If we do the first project you say you will make some changes to make sure it's not -- are you going it change, say we did the second part of it, are you going to make any -- PROFESSOR: You mean bonus part? STUDENT: Yeah. Are you going to add relations or anything? PROFESSOR: No. That's a little too hard for you. So basically I will add a few tuples, stuff like that. Or I could start from the very beginning, right? I can remove a relation, that I can do. That should screw it up. In other words, you should not be able to -- yeah. Because I regard the second part, if you can go to the second part you are really accomplishing a lot I will not be that picky on the second part. Yeah? STUDENT: The test machine that we'll be doing our test run for you on, it will be a connected machine, we can run it from UNIX? PROFESSOR: Project two? STUDENT: One. PROFESSOR: Project one you are bringing diskette with EX executable. STUDENT: You did mention that we could do it in UNIX if we wanted to. PROFESSOR: Yes. Okay. So in other words, you just want to log into your own account? Sure. No problem. It's connected. That's what you mean, it's connected to the network. Yeah. STUDENT: On project 2, we can just have a web server on our system at home and just leave it on and then for like our DEMO log on to it? PROFESSOR: Right. This is the hardest. And of course, if do you that it's perfect. STUDENT: So you can see that it's our stuff. PROFESSOR: Sure. That will be perfect. Then you already integrated everything. Yeah. But like I said, you know, I still will try to do that before and last minute Murphy's law, nothing works. So just be ware. STUDENT: What do we do if that happens, if for some weird reason the network happens to go down that way. PROFESSOR: The easiest way to is to bring your own laptop to my office and show it to me. That will bet best way. STUDENT: Yeah. But I can't do that because I don't have a laptop. PROFESSOR: If you want to do by remote accessing your server. STUDENT: I can do that as long as the nyet network's up. It's probably going to be up. PROFESSOR: You're taking big chance. I'm not saying you can't do that. just make sure it works. STUDENT: If the network happens to be down -- PROFESSOR: Just come back. That two days I'm going to stay very late. I say 7 p.m. if some student want me to stay longer, I will. I won't come in early. Nobody wants to come in early. Most people show up around 5 or something. STUDENT: This project. PROFESSOR: Which? STUDENT: Number two, all of the files involved with it, is that's what on list on first page? PROFESSOR: No, no this is just example. This is showing if you use two forms, one for search one for circulation, you should have at least these two HTF files. And then have you -- can have any number additional forms. Depending upon how you program. STUDENT: What I'm asking is, instead of bringing my computer into here which is not going to be too easy to do, PROFESSOR: You put on a diskette all of the forms, bring it in, and then we will upload that to my account, my machine in Chicago and test run here. Test run there. STUDENT: I can put everything on a CD and bring it in? PROFESSOR: You ask a little too much. I don't have CD drive here. A diskette. But if you have UNIX account we can also FTP. STUDENT: I can FTP from home. PROFESSOR: But make sure you try that beforehand. Because things, again, not necessarily work. You have to make sure have you right data source, day name and all that. STUDENT: I could also place that on another web site somewhere for to you access from here? Would that work? PROFESSOR: Yeah. As long as it is FTP-able it's fine. If you put it somewhere I can FTP those files. All this will slow me down. I prefer you set up everything beforehand. I remember, we have probably just about circumstance, seven minutes per student. Also, very -- just about six, seven minutes per student. Also, very important, put everything in MANILA envelope. Put in diskette, printout and everything. I do that for sanity check. I do that to make sure somebody doesn't copy everything from somebody else. But almost everything rely upon your DEMO. If your DEMO works you are doing fine. If it doesn't work have you to come back that day. More questions? STUDENT: I notice in this example you use micro soft ODBC four oracle. Is that what you want us to use. PROFESSOR: No, no, this is what bill did. My other TA in Chicago. STUDENT: Is that what you want us to use? PROFESSOR: You can do whatever you want. I don't mind. So I think these two projects you are doing fine now because you're asking good questions. So I know you are starting, don't wait too late. Start now and try to turn in by the early bird. I like to at least get half of you finished up by the early bird. Any more questions? Okay, that is all.