Task Oriented Programming in using Rinus Plasmeijer – Bas Lijnse - Peter Achten Pieter Koopman - Steffen Michels - Jurriën Stutterheim Jan Martin Jansen.

Slides:



Advertisements
Similar presentations
Introduction to Macromedia Director 8.5 – Lingo
Advertisements

© 2011 Delmar, Cengage Learning Chapter 1 Getting Started with Dreamweaver.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Java Coding 8 David Davenport Computer Eng. Dept., Bilkent University Ankara - Turkey. Object-Oriented Design Example - The.
1. Objective 1 Overview of the Linux Desktop  X Server  Controls Graphical Interface  Manages Input Devices  Transmits Input actions to the client.
A complete citation, notecard, and outlining tool
Lesson 10: Starting Windows Applications start an application program move between open application programs start an application using the Run command.
Congratulations! You have just installed the Presentation Game Add-In.
Coloring Randomly: Random Selection in Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University July 2008.
Task Oriented Programming in using Rinus Plasmeijer – Bas Lijnse - Peter Achten Pieter Koopman - Steffen Michels - Jurriën Stutterheim Jan Martin Jansen.
Microsoft Access 4 Database Creation and Management.
Task Oriented Programming in using Rinus Plasmeijer – Bas Lijnse - Peter Achten Pieter Koopman - Steffen Michels - Jurriën Stutterheim Jan Martin Jansen.
Managing Grades with Excel Viewing Help To view Help 1.Open Excel on your computer. 2.In the top right hand corner of the Excel Screen type in the.
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
Java Coding 8 David Davenport Computer Eng. Dept., Bilkent University Ankara - Turkey. Object-Oriented Design Examples.
XP New Perspectives on Microsoft Office Excel 2003, Second Edition- Tutorial 11 1 Microsoft Office Excel 2003 Tutorial 11 – Importing Data Into Excel.
Introductory CMS Training Welcome to the new Montana State University Content Management System!
Administrator’s Guide
WebReport/400 TCP/IP Configuration Presented by Kisco Information Systems.
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
Label production Solution with Label Gallery programs Label Gallery is used for general label design and print GalleryForm is used to create data entry.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
The basics of the Online Portal
PHP : Hypertext Preprocessor
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Task Oriented Programming in using Rinus Plasmeijer – Bas Lijnse - Peter Achten Pieter Koopman - Steffen Michels - Jurriën Stutterheim Jan Martin Jansen.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
CS378 - Mobile Computing App Project Overview. App Project Teams of 2 or 3 students Develop an Android application of your choosing subject to instructor.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Create Database Tables
Spreadsheet-Based Decision Support Systems Chapter 22:
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Creating a Web Site to Gather Data and Conduct Research.
Introduction to Matlab & Data Analysis
Lecture 3 Web Design What makes a "good" website? Getting started on your website. Planning the layout. Picking a theme. Effective Design Tips.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Chapter 4 Initial Configuration Tasks. Understanding the Initial Configuration Tasks window Microsoft now provides a new feature, the Initial Configuration.
Instructional Guide. How does EasyBib make research easier? Citation Generation Easily create a bibliography in MLA, APA, and Chicago styles Export to.
© 2010 Delmar, Cengage Learning Chapter 8 Collecting Data with Forms.
Changing Color, Using Text Objects, and Random Selection in Alice By Jenna Hayes Under the direction of Professor Susan Rodger Duke University, July 2008.
The DSpace Course Module – An introduction to users and groups.
Key Applications Module Lesson 21 — Access Essentials
1 NORMA Lab. 7 Generating Reports More Display Options File: NORMA_Lab6.ppt. Author: T. Halpin. Last updated: 2009 June 9.
An Introduction to CCP4i The CCP4 Graphical User Interface Peter Briggs CCP4.
USING XML AS A DATA SOURCE. Data binding is a process by which information in a data source is stored as an object in computer memory. In this presentation,
TOP Rinus Plasmeijer – Bas Lijnse - Peter Achten Pieter Koopman - Steffen Michels - Jurrien Slutterheim (TNO-RU) Jan Martin Jansen (NLDA) - Laszlo Domoszlai.
1 What to do before class starts??? Download the sample database from the k: drive to the u: drive or to your flash drive. The database is named “FormBelmont.accdb”
SOML Large Optics Daily Reporting Guide to using the new ETSEDMS server for Large Optics Daily Reporting.
Adobe Flash CS4 – Illustrated Unit A: Getting Started with Adobe Flash.
XP Tutorial 8 Adding Interactivity with ActionScript.
Registration Solutions for your Event Management.
Chapter 1 Getting Started With Dreamweaver. Exploring the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
Introduction to Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
1 Terminology. 2 Requirements for Network Printing Print server Sufficient RAM to process documents Sufficient disk space on the print server.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
Key Applications Module Lesson 22 — Managing and Reporting Database Information Computer Literacy BASICS.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Easy Access with templates I: Create a database Lesson 16 By the end of this lesson you will be able to complete the following: Find the best database.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
Adobe Flash Professional CS5 – Illustrated Unit A: Getting Started with Adobe Flash Professional.
POKER-6S ooA, OOD, OOP.
Development Environment
Click through this presentation at your own pace.
Learning the Basics – Lesson 1
Bomgar Remote support software
Tutorial 7 – Integrating Access With the Web and With Other Programs
Presentation transcript:

Task Oriented Programming in using Rinus Plasmeijer – Bas Lijnse - Peter Achten Pieter Koopman - Steffen Michels - Jurriën Stutterheim Jan Martin Jansen (NLDA) - Laszlo Domoszlai (ELTE) ASSIGNMENTS Radboud University Nijmegen 1

1. Getting started  Start the CleanIDE and open (‘File:Open… (Ctrl+O)’) the project at: iTasks-SDK/Examples/BasicAPIExamples.prj  Create and launch (‘Project:Update and Run (Ctrl+R)’) the server application  Open your favorite web browser and navigate to:   Log in anonymously by pressing the ‘Continue’ button giving  2 

2. Tasks panel Determine the relation between the tasks panel  and the definition of basicAPIExamples in the main module BasicAPIExamples.icl 3 

3. Persistent tasks Start  ‘Interaction with basic types’ tasks from the tasks panel The work view panel  displays the tasks assigned to you The task view panel  displays the current state of these tasks In the task view panel, manipulate tasks At any stage, close  a task in the task view panel and reopen it  4     

4. Custom types 5 Study the relationship between the type of the task ‘Enter a person’ and the rendered interactive task Do the same for the ‘Enter multiple persons’ task Add a task named viewPerson to ‘Interaction with custom types’ that merely views a person using viewInformation with an empty list ([ ]) of ViewOption-s.

5. Customized view 6 In the task viewPerson, add a ViewOption element that limits the view to the current name and gender of the person. What is the effect of this change? In the task enterPerson, add an EnterOption element that limits entering information to a name and gender only. The dateOfBirth field is always set to Nothing. What is the effect of this change?

Intermezzo At: download Ligretto_framework.ziphttps://wiki.clean.cs.ru.nl/ITasks#Snapshot_for_CEFP_2013_Course Unzip it in the same directory as BasicAPIExamples. This adds the following modules: ligretto.dcl and ligretto.icl: a fairly complete logic model for the Ligretto case study ligrettoTOP.dcl and ligrettoTOP.icl: an incomplete start-up module in which you can create your cool version of Ligretto In module BasicAPIExamples.icl add the following line: import ligrettoTOP and in function basicAPIExamples add an entry to play Ligretto:,workflow "Ligretto" "Play Ligretto" play_ligretto 7

6. Play with HTML In module ligrettoTOP.icl you find a suggestion to render a single card of the Ligretto game, view_card. This rendering creates a … that can be used in an HTML-table. Study this function. Use view_card to create three new functions: view_row:: Row-> HtmlTag view_ligretto:: Pile-> HtmlTag view_hand:: Hand-> HtmlTag with the following properties: view_row displays the front side of all cards in the row view_ligretto displays only the front side of the card on top of the pile view_hand displays the back side of the card on top of the conceal pile and the front side of the card on top of the discard pile 8

7. Viewing a Player Extend module ligrettoTOP.icl with a new task: view_player :: Player -> Task Player that uses the rendering functions defined in exercise 6. to show the current row, ligretto, and hand of the player. 9

8. Viewing the middle piles Extend module ligrettoTOP.icl with a new task: view_piles :: [Pile] -> Task [Pile] that uses the rendering functions to show the currently played piles of cards in the middle of the table. 10

9. Add people In the browser, start the task 'Manage users'. In the opened task, choose the menu 'Import & export' command 'Import demo users'. This adds the following users to your system: Alice, Bob, Carol, Dave, Eve, and Fred. 11

10. Invite friends A game of Ligretto is played with 2, 3, or 4 people. Add the following task function to ligrettoTOP.icl: invite_friends :: Task [User] invite_friends = enterSharedMultipleChoice "Select friends to play with" [] users >>= \friends ->  Finish  in such a way that only selections with the correct number of players are accepted 12

11. Shared data source It is natural to model the 'middle' cards by means of a shared data source because all players have access to the middle cards. Add the following shared data source to ligrettoTOP.icl: middle_state :: Shared Middle middle_state = sharedStore  Finish  with an appropriate initial value for the middle cards. It is convenient to model each individual player also by means of a shared data source because this gives you easy access to updates. Add the following shared data source to ligrettoTOP.icl: player_state :: Color -> Shared Player player_state color = sharedStore ("player " <+++ color)  Finish  with an appropriate initial value for a player with the given color. 13

12. Viewing the middle piles, now as shared view Alter the task of assignment 8. (viewing the middle piles) to a viewSharedInformation task that displays the middle_state shared data source. Alter the task of assignment 7. (viewing a player) to a viewSharedInformation task that displays the player_state of a player of some color. 14

13. One player plays a game of Ligretto It is about time to learn a player how to play a game of Ligretto. Create for this purpose a new task function, game. This task function encompasses the following steps: obtain a random integer necessary to shuffle the initial cards of the player (get randomInt task) create an initial player (initial_player function from ligretto.dcl) store the initial player in the corresponding player_state (assignment 11.) create a shared view on the middle piles and the player (assignment 12.) step into a new task, play_cards. (assignment 14.) 15

14. Playing the cards play_cards keeps an eye on the middle cards and the player state, and uses that information to decide possible future actions. Add the following task function to ligrettoTOP.icl: play_cards color = watch (player_state color >+< middle_state) >>*  Study the new functions in this suggested structure: watch >+< >>* Finish  with appropriate actions (OnAction): the player can put a row card on a (new) pile in the middle the player can put a discard hand card on a (new) pile in the middle the player can take the next three cards of the concealed pile the player can shuffle all hand cards to restart with the concealed pile Finish  with an appropriate predicate (OnValue): immediately when the ligretto pile is empty, return the color of the player 16

15. All players play a game of Ligretto You now have all ingredients to finish the main task: play_ligretto. This task encompasses the following steps: invite friends to a game of Ligretto (assignment 10.) clearing the middle_state pile to a correct value (assignment 11.) use anyTask to let all players play a game of Ligretto (assignment 13.) at the same time. The first player with an empty ligretto pile terminates this anyTask. congratulate the winner! 17

16. Suggestions for improvements… There are a quite some options to extend this little case study: create better looking cards, e.g. by means of jpeg files currently the final score is not computed, this can be added a player who makes an illegal move can be given a small time penalty try to make a task that plays Ligretto itself (probably with some random timer to make it fair…) … 18