Post on 19-May-2015
description
transcript
1
■ How to improve OSS usabilityHow to improve OSS usability
■ How to create GUIs for OSSHow to create GUIs for OSS
Open Source Software (OSS) UsabilityOpen Source Software (OSS) Usability
Giacomo Fazio Giacomo Fazio 20092009
2
What about Open Source Software (OSS) usability?
■ OSS is sometimes software developed from programmers for other programmers, so with emphasis on functionalities and performance, rather than on usability.
■ But something is changing and usability importance grows more and more day after day (ex. OpenOffice)
■ Meetings that focus on OSS usability and on how it can be important to increase adoption of free technologies are more and more frequent
■ However, not so much has been done till now...
Usability?Usability?
Giacomo Fazio - 2009Giacomo Fazio - 2009
3
It's now clear that it's necessary to improve OSS usability aspects, but what we have to work on?The aspects on which it's possible to work to improve usability can be various and on different fields, the choice is up to you, to your skills and to your interests:■ Operating System■ Applications■ Frontends and GUIs for existing ”command line” applications■ Configuration files for existing applications■ Foreign languages translation
You have two possibilities:■ Start a new project: if you think to develop a software that does something
which no other software does (or does but in a bad way), start your project. A new project could also be a GUI for a program which works only from command line.
■ Give your help to an already existent project: since there are already many projects which are still ”work in progress”, or simply which could be improved, maybe it is more worth to help an already existent project than to start a new one
What we have to work on?What we have to work on?
Giacomo Fazio - 2009Giacomo Fazio - 2009
4
■ Some words if you want to develop for the Operating System (you are mad or you have really good skills ;-)):
Simply forget Windows and everything related to Microsoft, since Microsoft != OSS, so all the software is closed-source and you can neither see nor work on it
With Apple Mac OS X, you have some possibilities to work on Darwin, the Operating System on which Mac OS X is based, since it's open source (there are really nice projects, like PureDarwin, GNU-Darwin, Fink and MacPorts)
The best choice could be GNU/Linux, completely free and open-source, so if you want to help development you're welcome
Anyway, working on the Operating System doesn't necessarily mean working on the kernel or on the lowest layers, you could work on higher layers
■ Configuration files and translation in foreign languages don't need any further explanation.
■ Creation of new (and usable) applications, modifications to existing applications, creation of frontends, all of them involve development, not only for the code, but also for the graphical interface.
What we have to work on?What we have to work on?
Giacomo Fazio - 2009Giacomo Fazio - 2009
5
Tools of many types and different difficulties:
■ Text editors + compilers (for example Emacs + gcc), just the things you really need
■ IDEs (for example Eclipse, Anjuta, Kdevelop, Code::Blocks, NetBeans, etc.), they will help you with syntax highliting, auto-completion, automatic indentation and by automatically calling compilers and debuggers
Code DevelopmentCode Development
Giacomo Fazio - 2009Giacomo Fazio - 2009
6
If you want to develop usable applications you have to care about GUI (Graphical User Interface) development:
■ GUI development is crucial for usability■ You can make simple a not user-friendly application by
developing a good GUI■ Usability of your application can change a lot depending
on the GUI■ Some ”difficult” applications with lots of parameters can
present more GUIs, usually with labels ”simple” and ”advanced”.
Importance of GUIsImportance of GUIs
Giacomo Fazio - 2009Giacomo Fazio - 2009
7
How to develop a GUI?
■ You have to use graphical libraries■ They contain functions useful to create the graphical
interface with the widgets present in it (buttons, checkboxes, textboxes, etc.)
■ You can use them while writing your code, some IDEs have a visual approach for GUIs, allowing you to ”design” your GUI and helping you in writing the realted code
■ There are lots of graphical libraries and toolkits■ So we will concentrate on this aspect and see the various
alternatives, of course the open source ones.■ In particular, we will deal with the case in which you
have to develop applications and GUIs for Linux■ Since open-source means also multi-platform, we will
see also some toolkits that make this aspect possible
GUI DevelopmentGUI Development
Giacomo Fazio - 2009Giacomo Fazio - 2009
8
The following part is important in that it presents the various alternatives among which you can choose to develop your program. Remember that:■The choice is completely up to you if you
start a new project■ If you're working on a already existent
project you usually have to follow the maintainer's directions and continue his work using the same tools he used
Before starting...Before starting...
Giacomo Fazio - 2009Giacomo Fazio - 2009
9
■ The most famous graphical libraries are GTK+ and QT, on which are based respectively Gnome and KDE desktop environments.
■ GTK+ are C librairies, while QT are C++ ■ GTK+ or QT? The choice is up to you.
Once many people said QT were simpler to handle and were better documented than GTK, but they were not so free as GTK, since the situation of their license was more complicated
However now Trolltech (QT producer) was bought by Nokia, that released it with LGPL, the same license used by GTK
New QT4 seem to look better if used in a ”non-native” system and seem to have improved their ”cross-platforms” abilities
The question is open on the web, you can look here■ Anyway, you must have the libraries installed in your system, if you
use Gnome you have already Gtk, while if you use KDE you have already QT libraries, but you might have to install other packages for development (on GTK/QT websites you can find the latest sources that have to be compiled on your system, but usually there are packages on your distribution that make this step a lot easier) . For further info, Google is your friend ;-)
GTK+ and QT librariesGTK+ and QT libraries
Giacomo Fazio - 2009Giacomo Fazio - 2009
10
You could write your code using these libraries in different ways:■ Write directly in C/C++: this choice will give you control on
every aspect, but in the same time it could be quite difficult■ Use one of the existent bindings, which allow you to write
your code in other simpler languages, such as Python, Perl, PHP, Java, Ruby on Rails, Ada, etc.
■ Use ”layout designers” (for example Glade for GTK+ libraries or QT designer for QT libraries), which allow you to design easily the GUI of the program
GTK+ and QT librariesGTK+ and QT libraries
Giacomo Fazio - 2009Giacomo Fazio - 2009
11
As example, let's see a little program written by using the GTK without any binding, so using C:
#include <gtk/gtk.h>
int main(int argc, char *argv[] ) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); GtkWidget *label = gtk_label_new("Hello World"); gtk_container_add(GTK_CONTAINER(window), label); gtk_widget_show_all(window);
// The main event loop gtk_main(); return 0;}
You can save it as ”hellogtk.c” and compile it with the command
gcc o hellogtk g O2 std=c99 `pkgconfig cflags libs gtk+2.0` hellogtk.c
Now you can run it with the command
./hellogtk
GTK Example: ”Hello world”GTK Example: ”Hello world”
Giacomo Fazio - 2009Giacomo Fazio - 2009
12
Now, let's see the same program written in Python, thanks to the Python binding, called PyGTK:
#! /usr/bin/env pythonimport pygtkimport gtkclass wnd (gtk.Window): def __init__(self): gtk.Window.__init__(self) l=gtk.Label("Hello World") l.show() self.add(l)w=wnd()w.show_all()gtk.main()
You can save it as ”hellogtk.py” and run it with the command
python hellogtk.py
This is only to show PyGTK in action, for bigger programs you gain a lot from using Python instead of C, you can do the same things but with less and simpler code
GTK Example: ”Hello world”GTK Example: ”Hello world”
Giacomo Fazio - 2009Giacomo Fazio - 2009
13
Now, let's see the same program written in Perl, thanks to the Perl binding:
#!/usr/bin/perluse strict;use warnings;use Gtk2 'init';exit main();sub main { my $window = Gtk2::Window>new(); my $label = Gtk2::Label>new('Hello World'); $window>add($label); $window>show_all(); Gtk2>main(); return 0;}
You can save it as ”hellogtk.pl” and run it with the command
perl hellogtk.pl
Other GTK bindings are present for other languages: for example GTKmm is the one for C++, really well realized.
GTK Example: ”Hello world”GTK Example: ”Hello world”
Giacomo Fazio - 2009Giacomo Fazio - 2009
14
You can see here Glade in action: look at all the controls and functions that Glade provides to the user (window, button, label, radio button, checkbox, textbox, etc.). In the center you can see the GUI while it is created, in this case the project is ”a web browser”.Glade also allows you to define events (for example clicks on buttons) and associate to each of them a signal handler which calls a callback function.
Glade in actionGlade in action
Giacomo Fazio - 2009Giacomo Fazio - 2009
At the end everything is saved as a XML file, which could be imported in your program, which could be written in C or using one of the several bindings described before (ex. PyGTK). So graphical interface and code are separated, and this is usually a good thing.
15
As example, let's see the ”Hello world” little program written by using the QT libraries without any binding, so using C++:
#include <QtGui>int main( int argc, char* argv[] ) { QApplication myapp( argc, argv ); QLabel* mylabel = new QLabel( "Hello world" ); mylabel>show(); return myapp.exec();}
You can save it as ”helloqt.cpp” and compile it with the command
gcc o helloqt `pkgconfig cflags libs QtGui` helloqt.cpp
Now you can run it with the command
./helloqt
QT Example: ”Hello world”QT Example: ”Hello world”
Giacomo Fazio - 2009Giacomo Fazio - 2009
16
■ Like for GTK, for QT there are also bindings for other languages, such as PyQT, which allow you to program in an easier way.
■ And of course there is a ”GUI designer”, QT Designer, released together with the QT libraries by the producer Trolltech:
QT bindings and QT DesignerQT bindings and QT Designer
Giacomo Fazio - 2009Giacomo Fazio - 2009
17
■ What about the execution of the programs written with the GTK/QT libraries on the other Operating Systems? (Of course we are talking about applications which don't use functions strictly related to the operating system)
■ GTK and QT produce applications which are ”quite” cross-platform : it's sufficient that you download the libraries in the version for the operating system in which you want to use the application! (no need to use the version for development, only a lighter one needed for execution, you can find further info in the libraries website)
■ The look-and-feel will be good, but not so similar to native applications (even if QT is better than GTK for this aspect):
■ A solution could be to use wxWidgets (once known as wxWindows)
A step further...wxWidgetsA step further...wxWidgets
Giacomo Fazio - 2009Giacomo Fazio - 2009
18
■ wxWidgets is a free cross-platform toolkit written in C++.■ It lets developers create applications for Win32, Mac OS X, GTK+, X11,
Motif, WinCE, and more, using only one codebase■ Unlike other cross-platform toolkits, wxWidgets applications look and feel
native. This is because wxWidgets use the platform's own native controls rather than emulating them
■ In fact, for developing programs with wxWidgets you have to download the libraries from the website, but you won't find only a file, libraries are different depending on your system (wxGTK for Linux, wxMac for Mac OS, wxMSW for Windows, etc.), each one using the libraries of the system, that of course have to be installed on your system (for example, to use wxGTK you must have GTK installed)
■ It's also extensive, free, open-source, and mature■ Exhaustive documentation■ Other features: debugging facilities, OpenGL integration, database
integration, support for many compilers, network programming, multithreading
■ What about performance? Rare and usually not noticeable performance penalty if compared to use of ”normal” toolkits (GTK, QT, Win32, Cocoa, etc.)
A step further...wxWidgetsA step further...wxWidgets
Giacomo Fazio - 2009Giacomo Fazio - 2009
19
■ wxWidgets don't make you write your programs in C++, since (like for GTK and QT) there are bindings for lots of other languages (wxPython, wxPerl, wxBasic, wxRuby, wxAda, wxJava, even wx.Net!).
■ wxPython seems to be a very mature binding, almost everyone encourages its use instead of the original wxWidgets.
■ There are also several IDEs which include GUI designers (for example wxFormBuilder, Code::Blocks, DialogBlocks, etc.) .
■ There's also a GUI designer like Glade, whose name is, of course... wxGlade :-)
A step further...wxWidgetsA step further...wxWidgets
Giacomo Fazio - 2009Giacomo Fazio - 2009
20
Here you can see what using wxWidgets means:
The same application (BitWise) was developed using wxWidgets, you can see how it looks respectively on Linux, Windows and Mac OS X. Amazing, isn't it?
A step further...wxWidgetsA step further...wxWidgets
Giacomo Fazio - 2009Giacomo Fazio - 2009
21
■ An alternative to wxWidgets is FLTK (Fast Light ToolKit), which does the same things
■ From wxWidgets wiki I found this comparison (is it completely true?):
wxWidgets has a more mature OO design. FLTK is more light-weight, whereas wxWidgets is more full-
featured (wxWidgets supports networking, printing, etc. while FLTK has limited or no support for these things)
FLTK actually has more elaborate, different widget types. FLTK's modified LGPL license is more restricting than
wxWidgets license, although it does provide exceptions for static linking.
Light IDE called FLUID for GUI design■ On the website http://www.atai.org/guitool/ you can find a
comparison among many graphical toolkits
WxWidgets vs FLTKWxWidgets vs FLTK
Giacomo Fazio - 2009Giacomo Fazio - 2009
22
Java could be a good solution for cross-platform applications:■ Powerful object-oriented language■ C-like syntax■ Born with the objective to be cross-platform: programs are
compiled in an intermediate language, called ”bytecode”, which can be executed in every OS through a JVM (Virtual Machine)
■ Graphical toolkits, like Swing, not related to the graphical libraries of the system
■ Good solution...but: usually slower than the alternatives often plain look and feel look and fell different from the OS's one
■ A possible solution: SWT, the latest graphical toolkit that uses native widgets...Java seems to have still much to say :-)
What about Java?What about Java?
Giacomo Fazio - 2009Giacomo Fazio - 2009
23
■ .NET is a technology created by Microsoft with the objective to give a new meaning to programs development.
■ It involves applications and web services.■ This is .NET architecture:
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
Operating SystemOperating System
CLR (Common Language Runtime)CLR (Common Language Runtime)
Base Class LibraryBase Class Library
ADO .NET and XMLADO .NET and XML
ASP .NETASP .NETWeb Forms Web ServicesWeb Forms Web Services
Mobile Internet ToolkitMobile Internet Toolkit
WindowsWindowsFormsForms
CLS (Common Language Specification)CLS (Common Language Specification)
C++C++ C#C# VBVB PerlPerl J#J# ……
Vis
ua
l Stu
dio
.NE
TV
isu
al S
tud
io .N
ET
24
■ The green part represents the .NET Framework, the central part of .NET technology. It provides: Base Class Library: comprehensive set of facilities for
application development that can be used by any .NET language (collections, string, I/O, etc.)
ADO .NET and XML: it's the data access layer, which uses XML. ADO .NET is the technology used to connect to databases
ASP .NET and Windows Forms: used to develop web services and GUIs
■ .NET Framework features can be used by applications, that can be written in many programming languages (C#, C++,VB .NET, Python, Perl, etc.).
■ Different parts of the same application can be written in different languages: CLS is a set of specifications that all languages and libraries need to follow to ensure interoperability among them
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
25
■ The code you write in different languages is compiled in IL (Intermediate Language), similar to Java bytecode, that is executed in a software environment called CLR (Common Language Runtime)
■ CLR doesn't interpret IL, instead each function is compiled at runtime through a JIT (Just In Time) compiler, which generates native code.
■ But why using CLR and so compilation in two steps and not the usual compilation? To have interoperability: a code written in .NET and compiled to IL in a certain platform, can be used in another platform without caring about the CPU differences and the different Operating System (the important is that it implements CLR).
■ Of course, Microsoft released CLR only for the various versions of Windows and for its Xbox 360, so interoperability...but not outside Microsoft!
■ However, Microsoft submitted CLR and IL specifications to both ECMA and ISO for standardization, making them available as open standards, so real interoperability (on Linux for example) is not helped, but not forbidden. We will return on this aspect later.
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
CompilationCompilation
Before installation Before installation or the first time or the first time each method is each method is
calledcalled
ExecutionExecution
JIT JIT CompilerCompiler
NativeNativeCodeCode
MSILMSILCodeCode
MetadataMetadataSource Source CodeCode
Language Language CompilerCompiler
Also called Also called AssemblyAssembly(.EXE or(.EXE or.DLL file).DLL file)
26
■ ASP.NET and Web Services allow you to create web interface to .NET applications, by making application functionalities remotely accessible through standard XML-based protocols
■ So .NET wants to be a platform for development of client-server and distributed applications
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
27
What about Visual Studio .NET ?■ Development tool that contains a rich set of productivity
and debugging features■ Supports managed and unmanaged applications■ Supports C#, C++, VB.NET, etc.■ Many useful tools and wizards■ Windows Forms Designer■ ASP.NET Web Forms Designer■ Web Services support■ SQL Server integration with ADO.NET and XML
Visual Studio .NET is not part of the .NET Framework. It's not necessary to build or run managed code, in fact the .NET Framework SDK includes only command line compilers, but it's the best and the simplest way to develop .NET applications
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
28
Visual Studio .NET in action:What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
29
.NET is without any doubt a great technology, but it's “Windows-centric”:■ .NET Framework and compilers are free, but Microsoft created
them only for Windows■ C#, CLR and IL were standardized and released as open
standards for interoperability, but only among Microsoft Operating Systems
■ Some parts, like ASP .NET, ADO .NET and Windows Forms are closed.
■ Visual Studio .NET is only for Windows, too
Solution: the Mono Project!!!
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
30
Mono:■ Open Source .NET implementation, created to run on different Operating Systems and
architectures■ Has its class library, composed by .NET compatible classes and its own classes■ Has its implementation of CLR (ECMA compatible), C# compiler and JIT compiler■ Runs on various OSs:
Linux, Mac OS X, FreeBSD, Solaris, Windows, Nokia/Maemo■ Runs on various architectures:
32 bit (x86, s390, SPARC, PowerPC, ARM Family) 64 bit (x86-64, s390x, Itanium)
■ Legal, since Microsoft released CLR, IL and C# as open standards■ Supports lots of languages (also C#)■ Supports also:
ADO.NET and XML Windows Forms (not fully, uses graphical toolkits of the system in which it's
executed) ASP.NET (thanks to the webserver XSP or the Apache plugin mod_mono) Web Services
■ Other GUI cross-platform features: Gtk# (bindings for Gtk toolkit, allowing to develop applications using Gtk+ libraries) libglade# (Glade integration, allowing to load Glade output XML files) Cocoa# (for Mac OS) wx.Net (use wxWidgets from Mono, to develop applications that will have native look
and feel on the OS where they will be executed)■ Provides MonoDevelop, Visual Studio .NET counterpart!!!■ Always in active development
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
31
Mono objectives:What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
32
Mono structure:What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
33
Mono compatibility with .NET:■ Runs .NET portable executables on Linux, that
is you can develop your application in .NET, compile it and run the obtained .exe (IL language) on Linux, with the command mono myapp.exe
■ Compiles .NET applications to portable executables, with the command mcs myapp.cs and you can run the obtained .exe both on Linux and on Windows
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
34
MonoDevelop in action:What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
35
So what are the conclusions?■ .NET is a great technology and Mono is a great .NET open source
implementation, since the new version 2.2 supports most of .NET features
But there are some ideological aspects which caused and keep causing flames. In fact, some people think Mono is bad because Microsoft is exploiting it as a ”poor” and limited implementation of .NET, useful to spread .NET technology and make people pass to the original one, enforcing so Microsoft's monopoly instead of breaking it; other people say it's not right to always see Microsoft as evil. I think the truth is in the middle as usual and I don't want to take a position, anyway you can't avoid caring about some aspects:■ Mono tries to implement .NET technology which is spreading more and more
and which Microsoft keeps expanding and improving, so Mono will always offer a subset of functionalities that will work worse or at most the same way as the original ones.
■ Mono is legal in that it's a free implementation of CLR, IL and other things which Microsoft released as open standards but, in order to obtain compatibility with Windows Forms and for other things, Mono contains some parts whose ”freedom” is ambiguous, and ambiguous can become dangerous...
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
36
■ Microsoft encourages Mono and tries helping it, but not so much, its objective seems to be to make Mono as powerful as sufficient, but not as the original .NET.
■ This is proved by the fact that Microsoft made ”open” only some parts of .NET, keeping ”closed” the other parts; if Microsoft really cares about other platforms compatibility, why doesn't it release a version of .NET Framework for them and let Mono be only MonoDevelop and other bindings like GTK# and Cocoa#?
You can make your considerations and choose by yourself...
Anyway, from a practial point of view, .NET/Mono can make the difference especially for distributed applications, but using such an enormous technology for a simple application or a GUI can make it too heavy or slow, so it's better to concentrate on easier (and also less ambiguous ;-)) alternatives, that's why you should consider using the alternatives I proposed before, that is GTK/QT or wxWidgets.
What about .NET / Mono ?What about .NET / Mono ?
Giacomo Fazio - 2009Giacomo Fazio - 2009
37
Now you have to choose a project. If you have no ideas on what to work, you could simply look at your Linux distribution and at your DE (KDE, Gnome, etc.), you'll surely find some programs that could be improved in one or more aspects or some tools that need a GUI or have it but have to be improved.If you don't have ideas yet, here you have some OSS repositories on the web, you could get there an idea for a project on which you might work:■ SourceForge.net (http://sourceforge.net)■ Freshmeat.net (http://freshmeat.net)■ Launchpad (https://launchpad.net) ■ Google Code (http://code.google.com)■ GnomeFiles (http://gnomefiles.org), repository of software which needs
Gnome to work■ GTK-Apps.org (http://gtk-apps.org), repository of software which doesn't
need Gnome to work, but only the GTK+ librairies■ KDE-Apps.org (http://kde-apps.org), repository of software which needs
KDE to work■ QT-Apps.org (http://qt-apps.org), repository of software which doesn't need
KDE to work, but only the QT librairies
No ideas on what to work?No ideas on what to work?
Giacomo Fazio - 2009Giacomo Fazio - 2009
38
■ Follow the usability principles you studied or, if you didn't study them, simply follow logic and good taste :-)
■ There are lots of websites dealing with usability principles to follow while working, on Gnome and KDE websites, for example, you will easily find these sections
■ If you decided to work on an existent project, go to the program's website and download the latest version, of course the sources, since you will have to work on those files; moreover try to contact the project's maintainer and explain your idea (for a big project there's often a group of persons working on it), you might have support and feedbacks on what you do.
■ Even if you're starting a new project, tell about it on the web, you might receive many useful feedbacks
■ Use the force, Luke ;-)
How to work...How to work...
Giacomo Fazio - 2009Giacomo Fazio - 2009
39
■ You can use, as model, a corresponding program which already exists on other operating systems, such as Microsoft Windows, or better, Apple Mac OS X Leopard
■ We all know Windows...unfortunately...■ What about Mac OS X Leopard? How can I have it?
If you own a Mac, your problem is already solved However some people were able to create Mac OS X Leopard
”special distributions” (iPC, iATKOS, Kalyway, JaS, etc.) that are patched to work on ”normal” PCs, they can be installed side by side to your existent operating systems, but don't ask me where to get them!!!
The best alternative is probably to have Mac OS X in a virtual machine, so you can look at it while working on your OS; this is possible through a patched version of KVM (see the ”Projects” section of http://alex.csgraf.de and http://d4wiki.goddamm.it/index.php/Howto:_Mac_OSX_on_KVM) and remember you must own an original copy of Mac OS X ;-)
How to work...How to work...
Giacomo Fazio - 2009Giacomo Fazio - 2009
40
■ Some projects have been done with success from some Computer Engineering students at the University of Catania.
■ Till now, almost all of them worked on already existent projects, but it could be possible to have new ideas and invent other things. Fantasy has no limits! ;-)
■ The projects are related to the following technologies: Cellwriter Mouse Gestures VNC
Some examplesSome examples
Giacomo Fazio - 2009Giacomo Fazio - 2009
41
■ Grid-entry natural handwriting input panel. ■ As you write characters into the cells, your writing is instantly recognized at the
character level. ■ Website: http://risujin.org/cellwriter/■ Graphical interface with a panel divided in cells. ■ In each cell the user can write a character (letter, number, etc.), which will be
recognized by the engine, following the training info stored in memory■ The user has to do a brief training phase before using the program: he has to write
each character some times, so the engine can ”learn” his way of writing it■ Cellwriter has a really impressive accuracy.■ Many languages are supported.■ When the user has entered a text, he can send it to a focused application by pressing
Enter.■ A virtual keyboard with the US layout is present
Some examples: CellwriterSome examples: Cellwriter
Giacomo Fazio - 2009Giacomo Fazio - 2009
42
■ However, no support for different user profiles: if user A uses the program after having done the training phase and then user B wants to use the program, he has to remove user A's info and then do again the training phase.
■ Moving and restoring user's info each time is not a practical solution
■ So the first project is a user profiles manager, that solves the problem in a practical way, allowing each user to create, use, modify and delete his own profile
■ 2 implementations of the project, developed by 2 different groups:
Group 1: Simone Palazzo and Luca Palazzo Group 2: Marco Borzì and Silvio Cirrone
Some examples: CellwriterSome examples: Cellwriter
Giacomo Fazio - 2009Giacomo Fazio - 2009
43
■ In the Group 1's implementation, profiles management is at first hidden and must be called by the user if he wants to use it.
■ This choice is due the fact that the application is often used by only a person, so in that case the program is easier to use, because an unrequested feature is hidden.
■ If the application is instead used by more persons, in such a way it's not practical to use the profiles management.
■ The Group 2 adopts the opposite behavior■ Anyway, in both the implementations, it is possible to choose if hide or show the
profiles management
Some examples: CellwriterSome examples: Cellwriter
Giacomo Fazio - 2009Giacomo Fazio - 2009
44
■ Another limitation of Cellwriter is in the virtual keyboard, since it comes only with a US layout.
■ The 2nd project wants to solve this limitation, by adding the support to the most used layout, such as French, Spanish, Italian, German, etc.
■ Pierpaolo Guglielmino is about to finish working on it.
Some examples: CellwriterSome examples: Cellwriter
Giacomo Fazio - 2009Giacomo Fazio - 2009
Cellwriter is a program that has an existing GUI written using the GTK libraries directly in C, without any RAD application: so the groups that worked on it had to code directly in C. You've been warned ;-)
45
■ A mouse gesture is a way of combining computer mouse movements and clicks which the software recognizes as a specific command
■ Mouse gestures can provide quick access to common functions of a program
■ They can also be useful for people who have difficulties typing on a keyboard
■ For example, in a web browser, the user could navigate to the previously viewed page by pressing the right mouse button, moving the mouse briefly to the left, then releasing the button.
■ Two different scenarios for gestures: Use them into the Operating System, so in almost every
application Use them in the web browser, especially to navigate through the
webpages, to open new tabs, etc.
Some examples: Mouse GesturesSome examples: Mouse Gestures
Giacomo Fazio - 2009Giacomo Fazio - 2009
46
■ About the 1st scenario, for Microsoft Windows there are some commercial programs such as Sensiva Symbol Commander and StrokeIt, which work well and with a good set of useful gestures
■ And what about Linux? The alternatives could be wayV and xgestures, but they have to be well configured...
■ About the 2nd scenario, web browsers already have the support (Opera) for mouse gestures or can have it through extensions (Mozilla Firefox), but work on their configurations could be useful...
■ So the project about Mouse Gestures has 2 targets:1) Choose a program between wayV and xgestures and configure gestures in it to
make it as similar as possible to Sensiva Symbol Commander: so the user who comes to Linux won't have difficulties in using gestures as he did in Windows.
2) Try the extensions for Mozilla Firefox that implement mouse gestures, choose the best and then optimize its configuration by adding new gestures or modifying the ones already present, taking ideas also from the gestures present in the other extensions or in the other browsers like Opera; the target is therefore to optimize as much as possible gestures in the browser Mozilla Firefox
■ 2 implementations of the project, developed by 2 students:
Student 1: Francesco Abate Student 2: Barbara Orto
Some examples: Mouse GesturesSome examples: Mouse Gestures
Giacomo Fazio - 2009Giacomo Fazio - 2009
47
■ Student 1 decided to work on wayV (for the Operating System scenario) and on Mouse Gestures (for the web browser scenario)
■ wayv uses a configuration file called wayv.conf, in which each gesture is defined and a particular action is assigned to it
■ Gestures are defined ”graphically”: each one is a matrix of 0, in which there are some 1 which represent graphically the gesture you have to do with your mouse. Here you have an example:
Some examples: Mouse GesturesSome examples: Mouse Gestures
Giacomo Fazio - 2009Giacomo Fazio - 2009
Look at the picture on the left: a gesture is defined (in the matrix of 0s a N is drawn using 1s) and then the action is defined (play a predefined sound and send the keys to create a New document)
48
This is the result:
Some examples: Mouse GesturesSome examples: Mouse Gestures
Giacomo Fazio - 2009Giacomo Fazio - 2009
Sensiva Symbol Commander wayV
The user coming from Windows can now use gestures in a similar way on Linux, too
49
Work done on the extension ”Mouse Gestures” in Mozilla Firefox, chosen among the others because it allows oblique directions, so possibility to create more gestures if compared to the other extensions.
Some examples: Mouse GesturesSome examples: Mouse Gestures
Giacomo Fazio - 2009Giacomo Fazio - 2009
The drawback of using oblique directions is that the engine sometimes doesn't interpret correctly the direction, for example confuses a / with a |
50
Result:
Some examples: Mouse GesturesSome examples: Mouse Gestures
Giacomo Fazio - 2009Giacomo Fazio - 2009
51
Some examples: Mouse GesturesSome examples: Mouse Gestures
Giacomo Fazio - 2009Giacomo Fazio - 2009
The configuration is
■ Student 2 worked instead on xgestures (for the Operating System scenario) and on All-In-One-Gestures (for the web browser scenario), based both on the same engine, which doesn't allow oblique directions.
■ The idea behind this choice is that it's better to write a more complex gesture using only vertical and horizontal directions, than writing a simpler gesture with oblique directions, but that can be ”misunderstood” by the engine.
■ xgestures uses a configuration file called .gestures, in which each gesture is defined in a simple way: simply writing the directions and the action after them. Here you have an example:
52
Work on the extension ”All-In-One-Gestures” in Mozilla Firefox.Some gestures:
Some examples: Mouse GesturesSome examples: Mouse Gestures
Giacomo Fazio - 2009Giacomo Fazio - 2009
Funzione Gestures
History Back Left
History Forward Right
Reload Document Up-Down
Stop Loading Left-up
Open new tab in Foreground Up
Duplicate Tab Down-Up-Down
Previous Tab Up-left
Next Tab Up-right
Close all other tabs Right-left-down-up-right
Close document Down-right
53
■ Graphical desktop sharing system that uses the RFB protocol to remotely control another computer.
■ The VNC server is the program on the machine that shares its screen, while the VNC client (or viewer) is the program that watches and interacts with the server.
■ VNC by default uses TCP ports 5900 through 5906, each port corresponding to a separate screen (:0 to :6)
■ Platform-independent — a VNC viewer on one operating system may connect to a VNC server on the same or any other operating system.
■ Multiple clients may connect to a VNC server at the same time.■ Many implementations, both commercial and open source. Example:
TightVNC, the most used implementation in Unix OSs.■ Many viewers with good GUIs, but no GUI for servers■ So the project in this case is to develop a GUI for the TightVNC
server■ It was done by Giovanni Altamore and Giuseppe Moscato and it was
called Py-TightVNC
Some examples: VNCSome examples: VNC
Giacomo Fazio - 2009Giacomo Fazio - 2009
54
Since this is a new project and not a modification of an already existent one, the two students could do their choices about the graphical libraries and the programming language to use. So the GUI was created through Glade, which gave a XML file as output, included then in the code used to control the functional aspect. The functional part was coded in Python, thanks to the binding PyGTK.From the following pictures you can see how it is simple to control creation and killing of the desktops.
Some examples: VNCSome examples: VNC
Giacomo Fazio - 2009Giacomo Fazio - 2009
55
Other screenshots showing the options windows:
Some examples: VNCSome examples: VNC
Giacomo Fazio - 2009Giacomo Fazio - 2009
56
Other ideas ?Other ideas ?
And now?And now?
Giacomo Fazio - 2009Giacomo Fazio - 2009