Im working on a small community site that will be used for me and my friends. The site will allow users to post a review about anything, it could be a good book, a tasty recipe, the movie they watched yesterday, etc.. I have implemented the user info in XML for login and registration and was about to start working on the review posting.
Since im pretty fresh in jsp/servlet/JDBC/XML (im a student and did a ebay-look-alike-project last autumn and was very impressed about the whole thing, and thus the interest for this small project), i really dont know what technology is best to implement these various actions in. In the 'ebay-project' we used JBDC for everything, but im reading more and more about XML and it's flexibility, and thought "why not? i will probably need to learn it some day", so i went doing the login- & registrationprocess in XML(JDOM) - and it works very well. Now im about to implement the review-posting, and was wondering if i should stick to XML or use JDBC(pro's con's?). With a database, its very easy to get, for example, the average score of a review based on several user's rating. In XML im abit worried that the XML-files will become very large and im also abit lost on how i should structure the files if i use XML.
So, my questions are really these:
*What pro's and con's are there by using XML or JDBC(in general and also for this kind of project)? *If XML is the choice, how would you suggest i structure the XML-files? All reviews and comments in the same file or how would you recommend it? *When there are numerous users online and all of them are either posting their own review or a comment, is there anything in particular i should think of?(like using synchronized in some actions)
The server will probably be a dedicated one, running Tomcat 5(Pentium III probably) or renting a cheap web hotel. Some technology may be better than the other one, but is more demanding in hardware etc(reason for info )
Any response is appreciated!
Regards, Mattias Liljenzin, Sweden(no we dont have polar bears here )
Maximilian Xavier Stocker
Joined: Sep 20, 2005
I suggest reading the following thread there is alot of detailed explanation and real world examples of why this is a bad idea. XML is fine but not for this just read the link and if you have follow up questions ask.