OLPCities/Accessing Database: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
Line 32: Line 32:
<center>PREVIOUS LESSON: [[OLPCities/Dynamic write|Dynamic write]]...........TOC :[[OLPCities/Tutorials|Tutorials]]..........NEXT LESSON : [[OLPCities/Changing avatares and auto-save|Changing avatares and auto-save]]</center>
<center>PREVIOUS LESSON: [[OLPCities/Dynamic write|Dynamic write]]...........TOC :[[OLPCities/Tutorials|Tutorials]]..........NEXT LESSON : [[OLPCities/Changing avatares and auto-save|Changing avatares and auto-save]]</center>
[[Category:OLPCities Tutorials]]

[[Category:OLPCities]]

Revision as of 00:07, 14 February 2007

The system OLPCities works mainly in the 1st tier - the interface level - but can contact the 2nd (application at server) and 3th tiers (database).


Tut10-1.jpg

At 2nd tier we can use ASP .NET (a good option because we can have JavaScript sintax) or Java Servlets or Java Server Pages or CGI using PHP or PERL etc.

An important "OLPC activity" using OLPCities can be researchs of opinions about many different subjects. It's important for kids to know that different persons can have different opinions.

At the demo of this lesson you can vote about the OLPC project. Will it be a success or a disaster?

The results are updated each time you go to the Lot having the panel of the percentages.

You can vote only one time. There are a flag (and a cookie) to control it. You can use another machine to vote again :-)

OBS: This is not very accurate and there are a "bug" here because you can vote many times returning to the previous page, using the resource of the browser. It would be easy to fix this problem (testing if there are a value at the cookie at the moment of the vote) but we let it like it is, and you can test the system (change of the percentage) voting many times.

This application was created using ASP .NET and a Microsoft Access database. We will not present here the code because ASP .NET and SQL and Access are out of the scope of this tutorials serie.


Another thing to pay attention is that we are using a "Dialog". It's like the system talking to you. You can create Dialogs to be showed when the avatar collides against "characters" (OLPCity's residents) to explain something etc. At the prototype (ALPHACity) there are some examples of Dialogs.



You can play with the demo (and vote - pay attention that the quantity of votes will change but not necessaryly the percentages ) going to: http://www.dmu.com/olpctut/tut10.aspx.



PREVIOUS LESSON: Dynamic write...........TOC :Tutorials..........NEXT LESSON : Changing avatares and auto-save