Bachelor thesis 2006-2007 UHasselt Bachelor in Informatica/ICT

secrettownpanamanianMobile - Wireless

Dec 10, 2013 (4 years and 22 days ago)

97 views

Bachelor thesis 2006-2007
UHasselt
Bachelor in Informatica/ICT
Gert Van Gool (0421638)
Promotor:Kris Luyten
Co-promotor:Karin Coninx
Advisors:Jo Vermeulen,Mieke Haessen
July 23,2007
Abstract
Contents
1 Introduction 1
2 High Level User Interface Description Language 2
2.1 What is a declarative language?.................2
2.2 What is UIDL?..........................2
2.3 What is HLUID?.........................3
2.4 Reasons for UIDL or HLUID..................3
2.5 Examples of UIDL/HLUID...................3
3 XAML 4
3.1 What is XAML?.........................4
3.2 Platforms:WPF and Silverlight.................4
3.2.1 WPF...........................4
3.2.2 Silverlight.........................6
3.2.3 Difference between WPF and Silverlight........8
3.2.4 Controls of WPF.....................8
3.3 Tools................................8
3.3.1 XAMLPad........................8
3.3.2 Microsoft Visual Studio 2005..............8
3.3.3 Microsoft Visual Studio 2008..............8
3.3.4 Microsoft Expression Blend...............8
3.4 Comparision to other UI languages...............9
3.4.1 XUL............................9
3.4.2 UIML...........................9
3.4.3 Adobe (Macromedia) Flex................9
4 User interfaces in a database 10
4.1 Defining possible query-able data................10
4.2 Possible queries..........................10
4.3 How do you store an UI?....................10
4.4 Generating meta data......................10
4.5 Practical queries.........................10
A Dutch summary 11
i
B Remarks,to do’s,to check 12
ii
List of Figures
3.1 Silverlight 1.1 Developer Reference...............7
3.2 XAMLpad interface.......................9
iii
Listings
3.1 Example with XML data bindings...............5
iv
Chapter 1
Introduction
1
Chapter 2
High Level User Interface
Description Language
2.1 What is a declarative language?
Adeclarative (programming) language is a high-level programming language
that instead of defining a solution (an algorithm
1
to get a result),describes
the relationships between elements [How04].
A declarative language can be a logic language (like Prolog
2
),a func-
tional language (like Lisp
3
) or a markup language language (like HTML
4
).
XML is considered to be an declarative language.
[Jac05] even considers “declarative language” to be a synonymfor “markup
language”,I prefer to say that markup languages are a subset of declarative
languages.
UIDL and HLUID languages are created as a declarative language,be-
cause it requires less programming knowledge.
TODO Find where I read that?
TODO Declarative programming language and IDL:http://en.wikipedia.org/wiki/Declarative_programming_language.Append something related to that article?
2.2 What is UIDL?
UIDL,or User Interface Description Language,...
TODO What to say about UIDL?
TODO Although most UIDLs are XML,there are others too:...
TODO find none-XML-based UIDLs (should they be included?)
1
a sequence of steps
2
http://en.wikipedia.org/wiki/Prolog_(programming_language)
3
http://en.wikipedia.org/wiki/Lisp_(programming_language)
4
http://en.wikipedia.org/wiki/HTML
2
2.3 What is HLUID?
HLUID,or High Level User Interface Description Languages,give the ability
to the designer to describe
TODO???
2.4 Reasons for UIDL or HLUID
TODO Use full sentences
• GUI toolkit for every programming language (some times more than
one)
• Each GUI toolkit has its own convention/style
• UIDL/HLUID allow components to be mapped to another toolkit
• [Luy04] says:“possibility to create a device-independent and abstract
description of a user interface with a language that is easy to use in
heterogeneous environments”
2.5 Examples of UIDL/HLUID
• XAML:see chapter 3
• UIML:http://www.uiml.org
• XUL:http://www.mozilla.org/projects/xul/and http://www.xulplanet.
com/
• XForms:http://www.w3.org/MarkUp/Forms/#waXForms
• XIML:http://www.ximl.org
Acomparison of several XML baseed UIDL languages can be found in [SV03]
and [Luy04].
3
Chapter 3
XAML
3.1 What is XAML?
XAML,or eXtensible Application Markup Language,is a XML-based declar-
ative language in which you can create UIs
1
.
XAML files,typicly with extension.xaml,contain no code (C#or
other).However they can contain XML data-bindings,this gives the possi-
blity to do repetive actions with the help of XML files,either created inside
the XAML file or linked to as a resource.An example can be seen in listing
3.1,it uses an online RSS feed.
TODO better introduction to XAML
The available controls depends on what platform (XML namespace) is
used,their are 2 available platforms at this moment:WPF (see section
3.2.1) and Silverlight (see section 3.2.2).
3.2 Platforms:WPF and Silverlight
3.2.1 WPF
Microsoft
2
.NET framework 3.0
3
consists of the.NET framework 2.0
4
,Win-
dows Presentation Foundation
5
,Windows Communication Foundation
6
and
Windows Workflow Foundation.
The framework is an integral part of Windows Vista,but can also be in-
stalled on Windows XP and Windows Server 2003.Other operating systems
can use Mono
7
which has a fully functional implementation of the language
1
User Interfaces
2
http://www.microsoft.com
3
http://msdn2.microsoft.com/en-us/netframework/
4
...
5
WPF,“Codename Avalon”
6
WCP,“Codename Indigo”
7
http://www.mono-project.com
4
Listing 3.1:Example with XML data bindings
1 <Window
2 xmlns=” ht t p://schemas.mi cr os of t.com/wi nf x/2006/xaml/
pr es ent at i on ”
3 xml ns:sys=” cl r −namespace:System;assembl y=mscorl i b”
4 xml ns:x=” ht t p://schemas.mi cr os of t.com/wi nf x/2006/xaml ”>
5 <Window.Resources>
6 <XmlDataProvider
7 x:Key=”SVNChanges”
8 Source=” ht t p://t he s i s.s e l e nt i c.net/gvangool/t r ac/i ndex.
f c g i/t i mel i ne?mi l estone=on&amp;t i c ke t=on&amp;
changeset=on&amp;wi ki=on&amp;max=50&amp;daysback=90&
amp;format=r s s ”
9/>
10
11 <DataTemplate x:Key=” I temTi tl e ”>
12 <TextBlock Text=”{Bi ndi ng
XPath=t i t l e }”/>
13 </DataTemplate>
14 </Window.Resources>
15
16 <Window.Ti t l e><Bi ndi ng Source=”{ Stati cResource
SVNChanges}”
XPath=”/r s s/channel/t i t l e ”/></Window.Ti t l e>
17 <Window.Hei ght>400</Window.Hei ght>
18 <Window.Width>300</Window.Width>
19
20 <StackPanel Hei ght=”400”>
21 <Label Content=”{Bi ndi ng
Source={Stati cResource
SVNChanges},
XPath=/r s s/channel/t i t l e }” FontSi ze=”20” FontWeight=”
Bold” Hei ght=”40”/>
22 <Label Content=”{Bi ndi ng
Source={Stati cResource
SVNChanges},
XPath=/r s s/channel/de s c r i pt i on }” FontSi ze=”12” Hei ght=”
25”/>
23 <Li stBox ItemsSource=”{Bi ndi ng
Source={St ati cResource
SVNChanges},
XPath=/r s s/channel/item}” ItemTemplate=”{
Stati cResource
I temTi tl e }” Hei ght=”300”/>
24 </StackPanel>
25 </Window>
5
features of.NET 3.0
8
.According to [dI07b],the Mono Project has only
started to implement the new classes of the.NET 3.0 under a new project
called Olive
9
.At the moment they have already a functional XAML com-
piler,but the rest of the Presentation Framework,the presentationframework.dll
assembly,is not present.[Mon07] mentions a beta of Olive as part of Mono
2.2 which is scheduled to release in Q4 of 2007.
3.2.2 Silverlight
Silverlight
10
is a cross-platform
11
,cross-browser
12
implementation of a select
part of the.NET framework.The Mono Project has started development
to get Silverlight on Linux,the project is named Moonlight
13
.They had a
working preview in just 21 days,which was showcased at MIX07 in Paris.
More information about how Moonlight was created can be found in [dI07a].
Not only the cross-platform,cross-browser part of Silverlight makes it
so special,but it uses instead of the CLR
14
a new DLR
15
.This runtime is
much lighter than the CLR (it doesn’t need to support all the namespaces),
but still enables to use one of the greatest strengths of.NET namely a
developer can use his/her prefered language or even several languages in
the same project.[HL07] showcased the DLR,in which he made it that
objects created in one language (eg Python) could later be used in another
(eg Ruby).
Another strong element in Silverlight is the ability for streaming video
(even in HD quality).
There are 2 versions of Silverlight:Silverlight 1.0 and Silverlight 1.1.
Neither of these versions has been officialy released,however both have had
several public previews.The main difference between those 2 versions lies
in what they support.Silverlight 1.0 contains only the XAML specifications
thus it is possible to use the primitives (lines,rectanlges,...),the animations
and the streaming capabilities.
TODO Check fact
While Silverlight 1.1 adds controls
16
and application logic.Figure 3.1
gives a summary of the supported languages,namespace,platforms and
tools.
8
they are basicly the same as those of.NET framework 2.0
9
http://www.mono-project.com/Olive
10
“Codename WPF/e” (WPF/Everywhere);http://www.microsoft.com/
silverlight/
11
At the moment Mac OS X and Windows are supported
12
Current supported browsers are:Safari 2 (on OS X),Internet Explorer 6 & 7 (on
Windows) and Firefox 1.5 & 2.0 (Windows and OS X).Support for Opera and Safare 3
is coming
13
http://www.mono-project.com/Moonlight
14
Common Language Runtime
15
Dynamic Language Runtime
16
they are scheduled to be included?
6
Figure 3.1:Silverlight 1.1 Developer Reference
7
3.2.3 Difference between WPF and Silverlight
TODO???
3.2.4 Controls of WPF
TODO???
3.3 Tools
There exist several tools that give a better,more advanced way of editing
XAML files.These metioned here,are created by Microsoft and apart from
XAMLPad cost money.
TODO Add screenshots?
3.3.1 XAMLPad
This tool can be best described as an enhanced Notepad
17
.It gives a live
preview of your code,unless you use the <Window> control as your root.
It can still give a preview then,but you have to “start” the application.
XAMLPad does also continiously check the syntax of the XAML file and
gives errors when there are syntax errors.However,it does not auto-close
tags.Neither has it any form of loading or saving files.
XAMLpad is part of the Microsoft Windows SDK
18
.
3.3.2 Microsoft Visual Studio 2005
Visual Studio 2005 is the defacto.NET editor.Althought it was created for
.NET 2.0,it works perfectly with the 3.0 bits.However to add support for
WPF,WCF and WWF,you need to install extra plugins
19
.
The WPF plugin adds a preview version of codename “Cider”.“Cider”
is the visual XAML editor,which will be included into Visual Studio 2008.
The plugin adds also intellisense support for XAML documents.
3.3.3 Microsoft Visual Studio 2008
TODO test Visual Studio 2008
3.3.4 Microsoft Expression Blend
Microsoft Expression
20
Blend is the XAML tool for designers.It works on
the same project files as Visual Studio,this way designers and developers
17
or any other default text editor that can be found in an operating system
18
http://www.microsoft.com/downloads/details.aspx?familyid=
C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en
19
WPF & WCF:http://www.microsoft.com/downloads/details.aspx?
familyid=F54F5537-CC86-4BF5-AE44-F5A1E805680D
WWF:http://www.microsoft.com/downloads/details.aspx?familyid=
5D61409E-1FA3-48CF-8023-E8F38E709BA6
20
http://www.microsoft.com/expression/
8
Figure 3.2:XAMLpad interface
can use the same files in their own tools (Blend and Visual Studio).When
creating interfaces in Blend,it automaticly adds code-behind files.
Microsoft is also working on Blend 2,which will add Silverlight support.
The preview version of May 2007 can be found at http://www.microsoft.
com/expression/products/download.aspx?key=blend2maypreview.
3.4 Comparision to other UI languages
3.4.1 XUL
TODO???
3.4.2 UIML
TODO???
3.4.3 Adobe (Macromedia) Flex
TODO???
9
Chapter 4
User interfaces in a database
4.1 Defining possible query-able data
• Platform:WPF or Silverlight
• Minimum resolution
• Used (external) namespace/libraries
• Functionality (design pattern)
4.2 Possible queries
4.3 How do you store an UI?
4.4 Generating meta data
4.5 Practical queries
10
Appendix A
Dutch summary
11
Appendix B
Remarks,to do’s,to check
• Check the TODO’s in the text (or in paper.TODO)
• Run a spelling checker!I could have made some horrible mistakes:-)
• When citing Wikipedia,use these guidelines:http://en.wikipedia.
org/wiki/Citing_Wikipedia
• Do we classify XAMl as a UIDL or a HLUID?My preference would go
to UIDL,since you speecify absolute positions for the elemens.How-
ever,with the help of an XML parser you could make an interpretation
of the UI on another platform (e.g.voice interface)
12
Bibliography
[dI07a] Miguel de Icaza.Implementing silverlight in 21 days,2007.http:
//tirania.org/blog/archive/2007/Jun-21.html.
[dI07b] Miguel de Icaza.Mono hacking roadmap,2007.http://www.
mono-project.com/Mono_Hacking_Roadmap.
[HL07] Jim Hugunin and John Lam.Dev02 - just glue it!ruby and the
dlr in silverlight,2007.http://sessions.visitmix.com/default.
asp?event=1011&session=2012&pid=DEV02&disc=&id=1511&year=
2007&search=DEV02.
[How04] Denis Howe.declarative language,2004.http://foldoc.org/
?declarative+language.
[Jac05] James Q.Jacobs.Cis 105 – survey of computer information systems
- essential concepts and terminology – study unit 8.,2005.http://
www.jqjacobs.net/edu/cis105/concepts/CIS105_concepts_8.html.
[Luy04] Kris Luyten.Dynamic User Interface Generation for Mobile
and Embedded System with Model-Based User Interface Develop-
ment.PhD thesis,2004.http://research.edm.uhasselt.be/kris/
phd-luyten.pdf.
[Mon07] Mono.Mono project roadmap,2007.http://www.mono-project.
com/Mono_Project_Roadmap.
[SV03] Nathalie Souchon and Jean Vanderdonckt.A review of xml-
compliant user interface description languages,2003.http://www.
isys.ucl.ac.be/bchi/publications/2003/Souchon-DSVIS2003.pdf.
13