Skip navigation

..technology & code

Technology
What’s cooking?  is programmed to work on a  mobile phone with a 320×240 resolution screen, WAP and the latest Java version (CDLC 1.1 - MIDP 2.0). To test the prototype, we used a Nokia N73.
We chose to use an advanced cellphone because a big screen would have let us develop a more complex software with a nicer graphic.

Code

java_icon MIDlet [.jar - 1.8 Mb] - txt Source code [.txt - 57 Kb] - rar_icon Source folder [.rar - 4.3 Mb]

The code is divided into four main logical parts: graphics, drawing, variables and actions. This way, it becomes easy for everyone to read through the code and finding information quickly. For example, everything that concerns the graphics, like objects, declaration of images variables, loading icons and fonts, is defined in the upper part of the code; all the actions and events when you press or release a key are defined in the lowest part.

code_graphic.jpg

The structure of the software has been divided into 7 sections (splash screen, main menu, “what’s for dinner” section, “users’ list” section, personal profile, other users’ profile, “search for a guest” section), according to the differences in looks and logic of the pages. Moreover, each of these sections has then a different amount of sub-sections, called Modes, that defines the position of the cursor and/or where in the screen it is focused at the moment.

code_sections.jpg

Each main-section is recalled in a function called drawMenu(), that defines which kind of graphics will be designed on the screen: title of the page, images, descriptions, etc. According to other parameters setted in the function (like the Mode, for example), it also uses different icons and icon backgrounds to display the current cursor position.

code_drawfunction.jpg

Everytime a key is released, according to which key has been pressed, some of the main variables value will be changed: for example the Mode when you move the cursor, or the section when you click onto a main menu icon.

code_keyreleased.jpg

The software is navigable through almost all his sections and options, except for those parts that required dynamic infos and an actual interaction with an external database. In fact, because of lack of time, we decided to use fake contents: for example, the dinner organization results are always the same four users (whose data has been saved in an Array), and it’s not possible to send private messages or comments to the photos.
We preferred to give an overall idea of the whole software’s navigation, instead of developing just a small section to make What’s cooking? working for real… but it surely would have been our next step.

<<previous  |  next>>

 

WHAT’S COOKING? | More details | How it works? | Safety issues | Graphics | Technology&code | Downloads | Credits