OLPCities/Accessing Database: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
OLPCities works mainly in the 1st tier - the interface level - but can contact the 2nd (application at server) and 3th tiers (database).
The system OLPCities works mainly in the 1st tier - the interface level - but can contact the 2nd (application at server) and 3th tiers (database).





Revision as of 16:15, 27 September 2006

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 :-)

This is not very accurate because - at the first time - you can vote many times returning to the previous page, using the resource of the browser. To do something really safe we need to register the users at a database etc. etc.

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 think 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 :OLPCities Tutorials..........NEXT LESSON : Changing avatares