SlideShare une entreprise Scribd logo
1  sur  56
Télécharger pour lire hors ligne
Open Source Software (OSS) Usability


■   How to improve OSS usability

■   How to create GUIs for OSS


             Giacomo Fazio
                  2009
                                      1
Usability?

  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...




Giacomo Fazio - 2009                                          2
What we have to work on?
 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

Giacomo Fazio - 2009                                                            3
What we have to work on?
 ■   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.
Giacomo Fazio - 2009                                                      4
Code Development

 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




Giacomo Fazio - 2009                                      5
Importance of GUIs

 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”.




Giacomo Fazio - 2009                                         6
GUI Development
 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
Giacomo Fazio - 2009                                         7
Before starting...

 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

Giacomo Fazio - 2009                       8
GTK+ and QT libraries
 ■   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 ;-)
Giacomo Fazio - 2009                                                      9
GTK+ and QT libraries
 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




Giacomo Fazio - 2009                                            10
GTK Example: ”Hello world”
 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 `pkg­config ­­cflags ­­libs gtk+­2.0` hellogtk.c

 Now you can run it with the command

 ./hellogtk


Giacomo Fazio - 2009                                                                11
GTK Example: ”Hello world”
 Now, let's see the same program written in Python, thanks to the
 Python binding, called PyGTK:
 #! /usr/bin/env python
 import pygtk
 import gtk
 class 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
Giacomo Fazio - 2009                                              12
GTK Example: ”Hello world”
 Now, let's see the same program written in Perl, thanks to the Perl
 binding:
 #!/usr/bin/perl
 use 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.
Giacomo Fazio - 2009                                               13
Glade in action
                                                                   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.


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.
Giacomo Fazio - 2009                                                                     14
QT Example: ”Hello world”
 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 `pkg­config ­­cflags ­­libs QtGui` helloqt.cpp

 Now you can run it with the command

 ./helloqt




Giacomo Fazio - 2009                                                          15
QT bindings and QT Designer
 ■   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:




Giacomo Fazio - 2009                                                                16
A step further...wxWidgets
 ■   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)




Giacomo Fazio - 2009                                                  17
A step further...wxWidgets
 ■   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.)


Giacomo Fazio - 2009                                                                   18
A step further...wxWidgets
 ■   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 :-)




Giacomo Fazio - 2009                                          19
A step further...wxWidgets
 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?



Giacomo Fazio - 2009                                                            20
WxWidgets vs FLTK
 ■   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



Giacomo Fazio - 2009                                                 21
What about Java?
 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 :-)




Giacomo Fazio - 2009                                               22
What about .NET / Mono ?
 ■   .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:

          C++     C#       VB     Perl   J#        …

              CLS (Common Language Specification)




                                                             Visual Studio .NET
                                                             Visual Studio .NET
                       ASP .NET                Windows
             Web Forms Web Services
              Mobile Internet Toolkit
                                                Forms

                          ADO .NET and XML

                          Base Class Library

                CLR (Common Language Runtime)

                          Operating System

Giacomo Fazio - 2009                                                              23
What about .NET / Mono ?
 ■   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
Giacomo Fazio - 2009                                            24
What about .NET / Mono ?
 ■   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.

                      Compilation                   Also called
                                      Code          Assembly
          Source         Language
           Code          Compiler    MSIL
                                     Metadata
                                                      (.EXE or
                                                     .DLL file)




                    Execution              Before installation
                                            or the first time
           Native           JIT             each method is
           Code           Compiler               called


Giacomo Fazio - 2009                                                                         25
What about .NET / Mono ?


 ■ 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



Giacomo Fazio - 2009                            26
What about .NET / Mono ?
 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
Giacomo Fazio - 2009                                        27
What about .NET / Mono ?
 Visual Studio .NET in action:




Giacomo Fazio - 2009             28
What about .NET / Mono ?
 .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!!!

Giacomo Fazio - 2009                                            29
What about .NET / Mono ?
 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

Giacomo Fazio - 2009                                                                         30
What about .NET / Mono ?
 Mono objectives:




Giacomo Fazio - 2009            31
What about .NET / Mono ?
 Mono structure:




Giacomo Fazio - 2009            32
What about .NET / Mono ?

 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

Giacomo Fazio - 2009                           33
What about .NET / Mono ?
 MonoDevelop in action:




Giacomo Fazio - 2009            34
What about .NET / Mono ?
 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...

Giacomo Fazio - 2009                                                                  35
What about .NET / Mono ?
 ■   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.


Giacomo Fazio - 2009                                                        36
No ideas on what to work?
 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



Giacomo Fazio - 2009                                                           37
How to work...
 ■   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 ;-)

Giacomo Fazio - 2009                                             38
How to work...
 ■   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 ;-)


Giacomo Fazio - 2009                                                      39
Some examples
 ■   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




Giacomo Fazio - 2009                                       40
Some examples: Cellwriter
 ■   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




Giacomo Fazio - 2009                                                                     41
Some examples: Cellwriter
 ■   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



Giacomo Fazio - 2009                                                42
Some examples: Cellwriter
 ■   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




Giacomo Fazio - 2009                                                                       43
Some examples: Cellwriter
 ■   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.




 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 ;-)


Giacomo Fazio - 2009                                                                44
Some examples: Mouse Gestures
 ■   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.




Giacomo Fazio - 2009                                                    45
Some examples: Mouse Gestures
 ■   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


Giacomo Fazio - 2009                                                                       46
Some examples: Mouse Gestures
 ■   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:

                                                          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)



Giacomo Fazio - 2009                                                                      47
Some examples: Mouse Gestures
 This is the result:




         Sensiva Symbol Commander                wayV


 The user coming from Windows can now use gestures in a similar
 way on Linux, too

Giacomo Fazio - 2009                                          48
Some examples: Mouse Gestures
 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.

                                                              The drawback of using
                                                              oblique directions is that
                                                              the engine sometimes
                                                              doesn't interpret correctly
                                                              the direction, for example
                                                              confuses a / with a |




Giacomo Fazio - 2009                                                                  49
Some examples: Mouse Gestures
 Result:




Giacomo Fazio - 2009            50
Some examples: Mouse Gestures
■   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    The configuration is
    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:




Giacomo Fazio - 2009                                                     51
Some examples: Mouse Gestures
 Work on the extension ”All-In-One-Gestures” in Mozilla Firefox.
 Some gestures:



                  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




Giacomo Fazio - 2009                                                        52
Some examples: VNC
 ■   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


Giacomo Fazio - 2009                                                    53
Some examples: VNC
 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.




Giacomo Fazio - 2009                                                                               54
Some examples: VNC
 Other screenshots showing the options windows:




Giacomo Fazio - 2009                              55
And now?




              Other ideas ?


Giacomo Fazio - 2009          56

Contenu connexe

Tendances

Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...Aniruddha Chakrabarti
 
Understanding pseudo-version and Go1.14+ with notes
Understanding pseudo-version and Go1.14+ with notesUnderstanding pseudo-version and Go1.14+ with notes
Understanding pseudo-version and Go1.14+ with notesMitali Bisht
 
PyQt: rapid application development
PyQt: rapid application developmentPyQt: rapid application development
PyQt: rapid application developmentDeveler S.r.l.
 
Gomobile: gophers in the land of Android
Gomobile: gophers in the land of AndroidGomobile: gophers in the land of Android
Gomobile: gophers in the land of AndroidJovica Popovic
 
PyQt Application Development On Maemo
PyQt Application Development On MaemoPyQt Application Development On Maemo
PyQt Application Development On Maemoachipa
 
BeagleBoard Workshop ESC Boston 2011
BeagleBoard Workshop ESC Boston 2011BeagleBoard Workshop ESC Boston 2011
BeagleBoard Workshop ESC Boston 2011Opersys inc.
 
An introduction to_golang.avi
An introduction to_golang.aviAn introduction to_golang.avi
An introduction to_golang.aviSeongJae Park
 
Python in telecommunications (in 7 minutes)
Python in telecommunications (in 7 minutes)Python in telecommunications (in 7 minutes)
Python in telecommunications (in 7 minutes)iMasters
 
How to write a well-behaved Python command line application
How to write a well-behaved Python command line applicationHow to write a well-behaved Python command line application
How to write a well-behaved Python command line applicationgjcross
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android WorkshopOpersys inc.
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux HeritageOpersys inc.
 
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code MeetupDebug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code MeetupJian-Hong Pan
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageAniruddha Chakrabarti
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.JooinK
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Opersys inc.
 
Golang from Scala developer’s perspective
Golang from Scala developer’s perspectiveGolang from Scala developer’s perspective
Golang from Scala developer’s perspectiveSveta Bozhko
 
Python dev tool introduction
Python dev tool introductionPython dev tool introduction
Python dev tool introductionCody Liu
 
What's unique to Qt
What's unique to QtWhat's unique to Qt
What's unique to QtYikei Lu
 

Tendances (20)

Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
 
Understanding pseudo-version and Go1.14+ with notes
Understanding pseudo-version and Go1.14+ with notesUnderstanding pseudo-version and Go1.14+ with notes
Understanding pseudo-version and Go1.14+ with notes
 
PyQt: rapid application development
PyQt: rapid application developmentPyQt: rapid application development
PyQt: rapid application development
 
Gomobile: gophers in the land of Android
Gomobile: gophers in the land of AndroidGomobile: gophers in the land of Android
Gomobile: gophers in the land of Android
 
PyQt Application Development On Maemo
PyQt Application Development On MaemoPyQt Application Development On Maemo
PyQt Application Development On Maemo
 
BeagleBoard Workshop ESC Boston 2011
BeagleBoard Workshop ESC Boston 2011BeagleBoard Workshop ESC Boston 2011
BeagleBoard Workshop ESC Boston 2011
 
An introduction to_golang.avi
An introduction to_golang.aviAn introduction to_golang.avi
An introduction to_golang.avi
 
Python in telecommunications (in 7 minutes)
Python in telecommunications (in 7 minutes)Python in telecommunications (in 7 minutes)
Python in telecommunications (in 7 minutes)
 
How to write a well-behaved Python command line application
How to write a well-behaved Python command line applicationHow to write a well-behaved Python command line application
How to write a well-behaved Python command line application
 
Embedded Android Workshop
Embedded Android WorkshopEmbedded Android Workshop
Embedded Android Workshop
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux Heritage
 
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code MeetupDebug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
 
Go Lang
Go LangGo Lang
Go Lang
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
 
Headless Android
Headless AndroidHeadless Android
Headless Android
 
Golang from Scala developer’s perspective
Golang from Scala developer’s perspectiveGolang from Scala developer’s perspective
Golang from Scala developer’s perspective
 
Python dev tool introduction
Python dev tool introductionPython dev tool introduction
Python dev tool introduction
 
What's unique to Qt
What's unique to QtWhat's unique to Qt
What's unique to Qt
 

Similaire à Opensource Software usability

Programming In Linux Presentation
Programming In Linux PresentationProgramming In Linux Presentation
Programming In Linux Presentationdanyal.khashabi
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to GoSimon Hewitt
 
GUI toolkits comparison for python
GUI toolkits comparison for pythonGUI toolkits comparison for python
GUI toolkits comparison for pythonDarren Su
 
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Amanda Lam
 
Cross Platform Objective C Development Using Gn Ustep
Cross Platform Objective C Development Using Gn UstepCross Platform Objective C Development Using Gn Ustep
Cross Platform Objective C Development Using Gn Ustepwangii
 
Autotools, Design Patterns and more
Autotools, Design Patterns and moreAutotools, Design Patterns and more
Autotools, Design Patterns and moreVicente Bolea
 
C plus plus for hackers it security
C plus plus for hackers it securityC plus plus for hackers it security
C plus plus for hackers it securityCESAR A. RUIZ C
 
Advantages of golang development services &amp; 10 most used go frameworks
Advantages of golang development services &amp; 10 most used go frameworksAdvantages of golang development services &amp; 10 most used go frameworks
Advantages of golang development services &amp; 10 most used go frameworksKaty Slemon
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01Getachew Ganfur
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textToma Velev
 
Introducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betaIntroducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betadigitalzombie
 
Volunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportYouSee
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go langAmal Mohan N
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Runwesley chun
 
Different types of Editors in Linux
Different types of Editors in LinuxDifferent types of Editors in Linux
Different types of Editors in LinuxBhavik Trivedi
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?LOGINPHP360
 

Similaire à Opensource Software usability (20)

Programming In Linux Presentation
Programming In Linux PresentationProgramming In Linux Presentation
Programming In Linux Presentation
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
GUI toolkits comparison for python
GUI toolkits comparison for pythonGUI toolkits comparison for python
GUI toolkits comparison for python
 
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
 
Cross Platform Objective C Development Using Gn Ustep
Cross Platform Objective C Development Using Gn UstepCross Platform Objective C Development Using Gn Ustep
Cross Platform Objective C Development Using Gn Ustep
 
Autotools, Design Patterns and more
Autotools, Design Patterns and moreAutotools, Design Patterns and more
Autotools, Design Patterns and more
 
C plus plus for hackers it security
C plus plus for hackers it securityC plus plus for hackers it security
C plus plus for hackers it security
 
Advantages of golang development services &amp; 10 most used go frameworks
Advantages of golang development services &amp; 10 most used go frameworksAdvantages of golang development services &amp; 10 most used go frameworks
Advantages of golang development services &amp; 10 most used go frameworks
 
C++ for hackers
C++ for hackersC++ for hackers
C++ for hackers
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - text
 
Introducing Yeoman 1.0 beta
Introducing Yeoman 1.0 betaIntroducing Yeoman 1.0 beta
Introducing Yeoman 1.0 beta
 
Volunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology Support
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
 
Linux monitoring
Linux monitoringLinux monitoring
Linux monitoring
 
Beginning development in go
Beginning development in goBeginning development in go
Beginning development in go
 
Different types of Editors in Linux
Different types of Editors in LinuxDifferent types of Editors in Linux
Different types of Editors in Linux
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?
 
Why Go Lang?
Why Go Lang?Why Go Lang?
Why Go Lang?
 

Plus de Giacomo Antonino Fazio

Accesso remoto al proprio computer in una rete eterogenea
Accesso remoto al proprio computer in una rete eterogeneaAccesso remoto al proprio computer in una rete eterogenea
Accesso remoto al proprio computer in una rete eterogeneaGiacomo Antonino Fazio
 
Using Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross DevelopmentUsing Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross DevelopmentGiacomo Antonino Fazio
 
Attacchi alle applicazioni basati su buffer overflow
Attacchi alle applicazioni basati su buffer overflowAttacchi alle applicazioni basati su buffer overflow
Attacchi alle applicazioni basati su buffer overflowGiacomo Antonino Fazio
 
Attacchi alle applicazioni basati su buffer overflow
Attacchi alle applicazioni basati su buffer overflowAttacchi alle applicazioni basati su buffer overflow
Attacchi alle applicazioni basati su buffer overflowGiacomo Antonino Fazio
 

Plus de Giacomo Antonino Fazio (6)

Il software open-source
Il software open-sourceIl software open-source
Il software open-source
 
Accesso remoto al proprio computer in una rete eterogenea
Accesso remoto al proprio computer in una rete eterogeneaAccesso remoto al proprio computer in una rete eterogenea
Accesso remoto al proprio computer in una rete eterogenea
 
Using Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross DevelopmentUsing Open Source Tools For STR7XX Cross Development
Using Open Source Tools For STR7XX Cross Development
 
Attacchi alle applicazioni basati su buffer overflow
Attacchi alle applicazioni basati su buffer overflowAttacchi alle applicazioni basati su buffer overflow
Attacchi alle applicazioni basati su buffer overflow
 
Attacchi alle applicazioni basati su buffer overflow
Attacchi alle applicazioni basati su buffer overflowAttacchi alle applicazioni basati su buffer overflow
Attacchi alle applicazioni basati su buffer overflow
 
Webdevelopment
WebdevelopmentWebdevelopment
Webdevelopment
 

Dernier

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Opensource Software usability

  • 1. Open Source Software (OSS) Usability ■ How to improve OSS usability ■ How to create GUIs for OSS Giacomo Fazio 2009 1
  • 2. Usability? 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... Giacomo Fazio - 2009 2
  • 3. What we have to work on? 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 Giacomo Fazio - 2009 3
  • 4. What we have to work on? ■ 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. Giacomo Fazio - 2009 4
  • 5. Code Development 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 Giacomo Fazio - 2009 5
  • 6. Importance of GUIs 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”. Giacomo Fazio - 2009 6
  • 7. GUI Development 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 Giacomo Fazio - 2009 7
  • 8. Before starting... 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 Giacomo Fazio - 2009 8
  • 9. GTK+ and QT libraries ■ 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 ;-) Giacomo Fazio - 2009 9
  • 10. GTK+ and QT libraries 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 Giacomo Fazio - 2009 10
  • 11. GTK Example: ”Hello world” 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 `pkg­config ­­cflags ­­libs gtk+­2.0` hellogtk.c Now you can run it with the command ./hellogtk Giacomo Fazio - 2009 11
  • 12. GTK Example: ”Hello world” Now, let's see the same program written in Python, thanks to the Python binding, called PyGTK: #! /usr/bin/env python import pygtk import gtk class 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 Giacomo Fazio - 2009 12
  • 13. GTK Example: ”Hello world” Now, let's see the same program written in Perl, thanks to the Perl binding: #!/usr/bin/perl use 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. Giacomo Fazio - 2009 13
  • 14. Glade in action 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. 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. Giacomo Fazio - 2009 14
  • 15. QT Example: ”Hello world” 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 `pkg­config ­­cflags ­­libs QtGui` helloqt.cpp Now you can run it with the command ./helloqt Giacomo Fazio - 2009 15
  • 16. QT bindings and QT Designer ■ 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: Giacomo Fazio - 2009 16
  • 17. A step further...wxWidgets ■ 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) Giacomo Fazio - 2009 17
  • 18. A step further...wxWidgets ■ 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.) Giacomo Fazio - 2009 18
  • 19. A step further...wxWidgets ■ 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 :-) Giacomo Fazio - 2009 19
  • 20. A step further...wxWidgets 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? Giacomo Fazio - 2009 20
  • 21. WxWidgets vs FLTK ■ 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 Giacomo Fazio - 2009 21
  • 22. What about Java? 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 :-) Giacomo Fazio - 2009 22
  • 23. What about .NET / Mono ? ■ .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: C++ C# VB Perl J# … CLS (Common Language Specification) Visual Studio .NET Visual Studio .NET ASP .NET Windows Web Forms Web Services Mobile Internet Toolkit Forms ADO .NET and XML Base Class Library CLR (Common Language Runtime) Operating System Giacomo Fazio - 2009 23
  • 24. What about .NET / Mono ? ■ 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 Giacomo Fazio - 2009 24
  • 25. What about .NET / Mono ? ■ 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. Compilation Also called Code Assembly Source Language Code Compiler MSIL Metadata (.EXE or .DLL file) Execution Before installation or the first time Native JIT each method is Code Compiler called Giacomo Fazio - 2009 25
  • 26. What about .NET / Mono ? ■ 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 Giacomo Fazio - 2009 26
  • 27. What about .NET / Mono ? 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 Giacomo Fazio - 2009 27
  • 28. What about .NET / Mono ? Visual Studio .NET in action: Giacomo Fazio - 2009 28
  • 29. What about .NET / Mono ? .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!!! Giacomo Fazio - 2009 29
  • 30. What about .NET / Mono ? 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 Giacomo Fazio - 2009 30
  • 31. What about .NET / Mono ? Mono objectives: Giacomo Fazio - 2009 31
  • 32. What about .NET / Mono ? Mono structure: Giacomo Fazio - 2009 32
  • 33. What about .NET / Mono ? 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 Giacomo Fazio - 2009 33
  • 34. What about .NET / Mono ? MonoDevelop in action: Giacomo Fazio - 2009 34
  • 35. What about .NET / Mono ? 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... Giacomo Fazio - 2009 35
  • 36. What about .NET / Mono ? ■ 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. Giacomo Fazio - 2009 36
  • 37. No ideas on what to work? 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 Giacomo Fazio - 2009 37
  • 38. How to work... ■ 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 ;-) Giacomo Fazio - 2009 38
  • 39. How to work... ■ 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 ;-) Giacomo Fazio - 2009 39
  • 40. Some examples ■ 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 Giacomo Fazio - 2009 40
  • 41. Some examples: Cellwriter ■ 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 Giacomo Fazio - 2009 41
  • 42. Some examples: Cellwriter ■ 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 Giacomo Fazio - 2009 42
  • 43. Some examples: Cellwriter ■ 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 Giacomo Fazio - 2009 43
  • 44. Some examples: Cellwriter ■ 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. 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 ;-) Giacomo Fazio - 2009 44
  • 45. Some examples: Mouse Gestures ■ 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. Giacomo Fazio - 2009 45
  • 46. Some examples: Mouse Gestures ■ 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 Giacomo Fazio - 2009 46
  • 47. Some examples: Mouse Gestures ■ 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: 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) Giacomo Fazio - 2009 47
  • 48. Some examples: Mouse Gestures This is the result: Sensiva Symbol Commander wayV The user coming from Windows can now use gestures in a similar way on Linux, too Giacomo Fazio - 2009 48
  • 49. Some examples: Mouse Gestures 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. The drawback of using oblique directions is that the engine sometimes doesn't interpret correctly the direction, for example confuses a / with a | Giacomo Fazio - 2009 49
  • 50. Some examples: Mouse Gestures Result: Giacomo Fazio - 2009 50
  • 51. Some examples: Mouse Gestures ■ 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 The configuration is 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: Giacomo Fazio - 2009 51
  • 52. Some examples: Mouse Gestures Work on the extension ”All-In-One-Gestures” in Mozilla Firefox. Some gestures: 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 Giacomo Fazio - 2009 52
  • 53. Some examples: VNC ■ 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 Giacomo Fazio - 2009 53
  • 54. Some examples: VNC 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. Giacomo Fazio - 2009 54
  • 55. Some examples: VNC Other screenshots showing the options windows: Giacomo Fazio - 2009 55
  • 56. And now? Other ideas ? Giacomo Fazio - 2009 56