wiki:JCopSamples
close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

JCop Sample Programs

This site describes some JCop sample programs and provides download links.


Addressbook

Environment
JVM 1.5
JCop
Downloads
zip archive
browse source code

A simple COP example. An addressbook contains persons. By default, a person's name will be returned by the toString method.
Depending on context information, persons can also reveal their address. Data will be either rendered as plain string, with Wiki syntax, or in HTML format.

Last update: 2012-02-07
Author: Malte Appeltauer



Bank Transfer System

Environment
JVM 1.5
JCop
Downloads
zip archive
browse source code

A simple COP application. Money can be transferred from one Account to another using an InterAccountTransferSystem. Encryption and Logging is implemented by Layers. Partial methods for Encryption are implemented using JCop's open layer declaration feature within the business classes. Logging methods are defined within the top level layer.

Last update: 2012-02-07
Author: Malte Appeltauer



Body Mass Index Calculator

Environment
JVM 1.5
JCop
'Qt Jambi'
win32/64 vers. included
Downloads
zip archive
browse source code

The calculator was developed as a JCop demonstration for a bachelor seminar on approaches of multi-dimensional separation of concerns at HPI. The GUI-based application calculates a body mass index depending on the user's context. The application considers two kinds of context information:

Location.
A user can be either from Germany or the U.S., affecting the expectations to the metric system (pound vs. kilograms, feet vs. meters) that are used in BMI value calculation.

Background Knowledge.
The actual BMI result is presented according to the user's knowledge of BMI. We roughly distinguish between heals professionals and user's without any knowledge. The former will be provided with the concrete BMI, while the latter will be informed by a happy or unhappy smiley.

For demonstration purposes, context information can be controlled by a button panel. The user interface was developed using the 'Qt Jambi' graphical user interface toolkit. To refine base methods according to the user's context, the implementation makes use JCop's context objects and their ability of declarative layer activation.

Author: Lauritz Thamsen (lauritz.thamsen@…...)



Simulation of a Mobile Community

Environment
JVM 1.5
JCop
Downloads
zip archive
browse source code

Mobile community applications allow users to share information about their mood, activities, location, and more. This application focuses on the location representation of buddies on mobile devices for scenarios like the following.

Two students, Lucy and Tim have an appointment at University at 12:00.

  • At 11:50, Lucy arrives at the campus. She checks her mobile device to inform herself about Tim’s current whereabouts. The graphical representation of this information depends on Lucy’s context: If Lucy’s device is currently connected to the Internet at high-bandwidth, a map image service is requested to render Tim’s location on a map. Contrary, if the bandwidth is low, Tim’s representation depends on Lucy’s need for active information. This information is stored in Lucy’s user profile and is accessible for applications. In the case that Lucy prefers a smart representation over the refresh period, a map with Tim’s outdated location is shown. The map is labeled with the time stamp of the last update. Alternatively, when Lucy insists on up-to-date information, while the bandwidth is too low for updating the map image, Tim’s position data is simply shown as a text.
  • At the same time, Tim arrives at the underground station, where his GPS device is unable to receive data and more. Thus, his mobile device switches to cell-based location detection. The new location data is calculated based on the position of the current mobile cell. The change of the location provider is propagated to Lucy’s device. Depending on its current context, the device has to decide how it renders this additional location information.

The application allows to navigate Lucy's and Tim's cellphones over a map of Berlin. Changes to the rendering of the cellphone displays are implemented by layers.


Last Update: 2012-02-07
Author: Malte Appeltauer

CJEdit

see JCopCJEdit

Last modified 9 years ago Last modified on 02/07/2012 09:28:59 PM

Attachments (3)

Download all attachments as: .zip