Lively kernel - Tampereen Teknillinen Korkeakoulu

Download Report

Transcript Lively kernel - Tampereen Teknillinen Korkeakoulu

1
Tutorial
1.
2.
3.
4.
Play with Lively Kernel
Example application
Creating MyProject.js
Grouping
Institute of Software Systems/Janne Lautamäki
2
Play with Lively Kernel
•
•
•
Use safari web browser to open page:
http://livelykernel.cs.tut.fi/
Open resources
Go thru next steps:
– Go thru Lively Kernel tutorial
– Play with Lively Kernel
– Read the Technical Overview
Institute of Software Systems/Janne Lautamäki
3
Example application
• Download the Lively Kernel as a zip archive
(http://livelykernel.cs.tut.fi/)
• Use Safari web browser to open index.xhtml
• Open Examples.js with an editor
• Find ClockMorph (begins from line 100)
• Read it thru and ask questions
• Modify it a little bit and save
• Refresh the web browser
Institute of Software Systems/Janne Lautamäki
4
How to create a new lively kernel project
• Create MyProject.js –file
• Copy one of the projects from
Examples.js to MyProject.js -file (and
modify it a little bit)
• You should have something like:
Morph.subclass(scope, "MyMorph", {
… example morph…
});
Institute of Software Systems/Janne Lautamäki
5
Link your file with Lively Kernel
• Add MyProject.js to index.xhtml –file
<script type="text/ecmascript"
xlink:href="MyProject.js"/>
• Add MyMorph to defaultconfigs.js -file to Applications
list.
• It should be something like that (depends on example
morph selected):
["Example: MyMorph", function(){
var m = WorldMorph.current().addMorph(
new MyMorph(pt(100, 100),50));
} , {openAtStartUp: true}],
Institute of Software Systems/Janne Lautamäki
6
Using Aptana
• Open Aptana
• Create a new general project (file->new>General->Project)
• Import lively kernel (import->file system->)
Institute of Software Systems/Janne Lautamäki
7
Enabling develop menu in Safari
• Edit -> preferences ->Advanced -> Show
Develop menu in menu bar
• Develop -> show error console
Institute of Software Systems/Janne Lautamäki
8
Presentations
• PowerPoint presentation (10 minutes)
• Application demo (10 minutes)
• Conversation (10 minutes)
• PPT-presentation and full source for demo
Institute of Software Systems/Janne Lautamäki
9
Final report
• Proposed Outline
–Idea description
–Non-Technical Description
–Technical Details
Institute of Software Systems/Janne Lautamäki