February 12th, 2002, 10:47 AM
Web Development project for university: I need help/advice!
I am in the planning stages for my final year project in a Computing Science degree at University.
My main interest is web development and at the moment I am trying to decide which technology route I should take to implement the project. I have heard that PHP is easier to learn so I am going to use it (unless anyone can give me reasons not to!)
The project suggested by my supervisor is for an online booking system for a cinema.
I have worked out some rough details for this as a sort of development sepc (what it should do etc)
Users have to sign up and log in with password and username
They will be presented with a graphical view of the cinema seating plan
they can click on a seat, this will bring up a form to fill in to book that seat
this form will include credit card info etc (this wont need to actually work as it is for a uni project)
Once the user books the seat they will get an e-mail telling them which seat they have booked, for which film, seat number and at what time the film is on and what screen etc
There will be a "My Bookings" area where the user can edit, delete etc his/her bookings at any time
Once the time and date of the booking has elapsed the seat will become available for booking again
Once a seat is booked, when someone logs onto the page a different graphic of that seat will be displayed with a different image....this can be selectable and bookable for a different date
Anyone else have any ideas what could be included in this?
I would really really appreciate any help from people on this. I am a novice with PHP but have some Java experience so I think I can pick it up....and we have a uni library full of books on PHP
Basically, I want someone to help me out with some practical advice on how to undertake the project, any code ideas, any ideas for functions for the site that I may have left out. This is a very important part of my degree program and is worth a lot of marks so I need to get it right!
Any help/advice at all is appreciated.
Thanks in advance,
February 12th, 2002, 12:50 PM
Hmm, sounds a bit too much like the Adobe SVG example for theatre bookings:
I'd use PHP if I were you, unless you're going to use a Microsoft Access database. You also need something like a mySQL database running the behind the scenes show. Possibly a nice touch would be the user being able to print his/her tickets, or PHP automatically printing tickets at the server end.
Suggestions, start with a database then get the graphics sorted. You could easily hack together twenty pages of PHP to do what you rerquire within a week, so get the time consuming stuff like an accurate database design and the graphics well out of the way early on. Also, get the flow designed correctly, users shouldn't have to log on before getting the pricing details.
You also will need to look into how payment/security works so that although you're not implementing them you cal explain how it would all work in reality.
February 12th, 2002, 01:07 PM
Thanks for that link, it should prove useful in working out some functionality for the site.
I am not familiar with SVG though. i will have to look it up and see what it its!
I agree that my project is similar to the link above so it should be a useful working model" to investigate for functionality and what the system should do.
It was my supervisor who suggested the project so i will have to check with him to see if he knows anything about SVG.
Thanks for the reply,
February 12th, 2002, 04:36 PM
svg is a vector graphics markup language. This will be very non-trivial. There are some mozilla builds with built-in svg support.
February 13th, 2002, 04:38 AM
We're working heavily with SVG where I work. It's probably the best thing for the graphical display you mention in your project, you can have PHP create an SVG page to manage seat changes after they have been booked, you can also have (as you've seen) something a bit more special than standard graphical interaction. You could always go all the way and have a VRML tour of the theatre where the user can choose a seat by seeing how good the viewing angle is etc.. That would be very very impressive.
February 13th, 2002, 09:17 AM
Oh, my. Don't kill yourself and your viewers. SVG would certainly be nice, but you could accomplish something very similar (the probably without the 3D look, unless you want to go back to the killing yourself thing) with PHP's image manipulation functions, not that this would be entirely easy either. It would just not involve learning yet another language.
Last edited by webgremlin; February 13th, 2002 at 09:19 AM.
February 13th, 2002, 09:38 AM
I don't think I got the tongue-in-cheek of that sentence across properly. It was just a joke. Yes it would be impressive but anybody who has seen the way you write VRML would immediately rule that out of the equation.
Remember also that you will have to create some sort of adminitrative and/or staff system to deal with bookings, after all the same system should be used for people who call by telephone and make bookings. Also the staff somehow need to remove bookings or update plays etc...
February 13th, 2002, 01:29 PM
The SVG concept sounds interesting. it certainly looked good in the Adobe example I saw.
Does anyone know of any good resource sites for SVG? I dont want to get stuck into it unless I am confident i can get everything working together in time (May)
I was thinking last night of a possible solution to the seat change.
Heres what I had in mind: The user goes to a page that has for example 100 seats laid out on the screen, each one is a seperate image.
Once a person clicks on the seat they are taken to a form where they fill in their details and submit them. This forum would also submit a hidden field to a database say "seat id" and another called "seat status". The seat status for all the seats would be set to 0, once a user submits the forum and books the seat this value is changed to 1.
Now, back to the main page.....when the page loads there is some PHP code with if...else statements for each seat image. They check the database "seat status" for each seat....if it is set to 0 they display HTML code with an image of a seat and the link to book it. If the status is set to 1 then it has been booked already. This will trigger the else part of the statement and produce HTML code with a shaded out image of the seat and no code for a link to book it.
Anyone have any ideas on that regarding if it will work, how hard it would be to implement....any coding tips for it (i.e. any way to have one if else statement that loops for all the seats rather than 1 for each seat?)
I appreciate all the help so far
PS: SVG sounds good but I am wary of getting bogged down in learning too many different languages in this 10-11 week timeframe....bearing in mind I have a life outside university so I cant spend all my time awake on this and I also have 2 other classes to do work for
February 13th, 2002, 01:41 PM
of course you don't have to write 100 if/else statements - that's why there's functions.
p.s. if your seats are in a convenient rectangular arrangement, just write a couple loops to call a function and spit out the code for each seat.
Last edited by webgremlin; February 13th, 2002 at 01:51 PM.
February 13th, 2002, 01:55 PM
These are the little tricks I have to learn
I was pretty sure I wouldnt have to write 100 if-else statements!
Would anyone have any code samples or snippets that might give me something to get sarte don for this sytem?
I have saw some at hotscripts etc but they are mostly complex working systems...I just need some handy functions etc to combine into one application easiluy......and which I can write my own code for to fill in all the gaps.
The specific elements I need to get started on ere:
A "My Bookings" section in which users can go in and cancel their bookings when they want
Some way for the seat status to default back to unbooked after a certain time (ie: the film showing is over, end of the day etc.)
I was thinking of having the users submitted info passed to a script which makes a pop-up window with a graphic and text filled in which can be printed off as a ticket.....
Thanks again for your help everyone.
February 13th, 2002, 02:16 PM
if you want to pull this together in the next 2-3 months, the first thing you need to do is run through some basic tutorials --"my first php page" kind of thing. google for php tutorials to find them (I don't think I've kept any in my bookmarks). Make sure you understand how the web's stateless, page-based application environment is different from normal programming (in java or c or whatever). then write the whole fool thing in psuedo-code. the whole thing. At the very least outline the main code of each page and identify the pre and post conditions of all functions. once you have all that, start working on implementing individual functions, or database access, or whatever. just pick a part that you can basically take out from the system as a chunk and test seperately. When you're trying to figure out how to do something, first check the php manual. there's a built-in function for almost everything, and the manual is pretty logically organized. you might also try looking for a tutorial (there are lots on connecting to databases, for example). If you still can't figure it out, ask here. Usually, though, if you know exactly what you're trying to do, you will be able to figure out how from the manual.
I set myself the task last month of writing a network game in java. I knew no java at all before, and the process I described above is almost exactly how I succeeded in doing it. If I'd figured that all out earlier on (especially the part about completely specifying the functionality first), I could have saved myself even more time and probably had time to make it graphical instead of text-based. (my game was othello, btw. I developed a protocol, wrote a server that handles the game logic and protocol, and a pretty dumb client that connects to the server and waits for another client to connect too - then they play. It's not very pretty, but it works and it's playable)
February 13th, 2002, 02:29 PM
I like the sound of your technique. At Uni we are always told to make sure everything is decided on before we satrt coding and doing it all out on paper in pseudo code is a good method for this.
Since my last post I have just come back from the uni library with "Professional PHP Programming" (Published by Wrox) and PHP3, Programming Browser-Based Applications by Deavid Medinets. Have you ehard of these before? the Wrox book is very in depth but I will try to follow it as best I can, the other one is aimed more at beginners. The only drawback with the second book is that is is based on PHP3.....are their any fundamental differances in PHP3 and 4? I am hoping the theory etc and a good part of it are the same.
I have already completed the sitepoint PHP Tutorials by Kevin Yank (I think his name is Kevin anyway) so I understand how to add to a database, delete from a database, connect to a DB, and display info from a DB as well as if-else, while and for loops etc. That wasnt too difficult and most of the theory was easy to understand....probably because I have some Java experience.
Anyway, I think your technique with a combo of the 2 books and online tutorials should get me going nicely
By the way, do you know of any good PHP editors? At the moment I am just using EditPlus which is good but I am wondering if there are better development tools i can download.
February 14th, 2002, 07:00 AM
You don't really need PHP books to be honest, as webgremlin said, the manual is very good. Learn the manual and where things are in it. You've got plenty of time before May so don't worry about the timescale. You can get something like this done in a week (life outside Uni may take a hammering though). One thing I always like to stress is that you shouldn't be too concerned about the security measures at the moment (login/registration scripts) as these aren't as much an integral part as people think. All you are essentially doing with the security part is setting a cookie (sessionID possibly) and verifying that the cookie is in place before processing a page. The way to do this is have in each page (before the opening <html> tag):
where safeguard.php is a script that checks for the cookie and matches it against the session table. If the value of the cookie isn't in the table then it redirects the browser to the index.html page so that they can log in. Having a session timeout will help as well so that if somebody leaves their browser open they are auto logged out after x amount of time.
BTW, which Uni are you at?
February 14th, 2002, 10:59 AM
Thanks for the input. I think I will hang on to the PHP books though for one reason: I have access to the internet from the University labs but at home my PC is not online, so I will need some referance material to look at when I am not in uni
By the way, I am at the University of Ulster in Ireland.
As for the security aspect of the site: i will have to discuss this with my supervisor to find out how much work I need to put into that area and decide which approach to take accordingly.
February 14th, 2002, 11:21 AM
If you're not online then download the PHP manual and get it transferred across to the computer at home. If you've not got access to Zip/Jazz/CDRW then just download the HTML version and split the files into managable amounts then stick them on a bunch of floppies.
The suggestion about the security system was simply because I know how annoying it is when you've been spending ages trying to figure out why something didn't work only to find out it was the security features. The best methos is something like an included script that is out of the main program flow and can be updated altered at any time, and removed to make the testing phases easier.