[ossig] FOSS.in (Project Day 1) reports
Ditesh Kumar
ditesh at gathani.org
Sat Dec 8 14:34:50 MYT 2007
(for the full links, please visit:
http://ditesh.gathani.org/blog/2007/12/06/fossin-day-1-project-day-1/ )
So, here is a report of foss.in Project Day 1. Colin, Aizatto and yours
truly decided on attending the Mozilla Project Day. It started off by a
short introduction by Mary Colvig from Mozilla Corporation.
--- Oh the places you’ll go! (things you can do with firefox extensions)
Myk Melez then started off Firefox extensions “Oh the places you’ll go!
(things you can do with firefox extensions)”. He stated that
extensibility (via extensions) wasn’t an accident as Netscape originally
wished to add proprietary functionality to an open source browser. In
that vein, Firefox 1.0’s goal was to simplify browsing experience and
evolve extension capabilities, allow additional hooks, have better
extension management and have an extension directory list.
Firefox 1.5 to Firefox 3.0 goal’s were/are to have an integrated
manager, localizable descriptions, a Firefox user extension library and
a review process for extensions.
Myk then gave an overview of javascript front-end and back-end
functionality and components. Some examples shown were the Stumbleupon
extension (which adds/modifies new functionality within the browser),
the Alexa plugin (to extend websites), a download manager (to enhance
existing functionality), resizeable form fields (hacking web pages) and
showed snap links (being able to open multiple links by dragging links
into tabs, very very nice I must say).
During the audience Q&A, the audience requested a torrent downloading
system, an addon’s manager within the browser and search engine
optimization within Firefox. Based on the discussion, it seems that this
set of functionality should be easily possibly within Firefox.
Personal thoughts: This was a fairly introductory talk, IMHO. Some of
the functionality shown (resizeable form fields, snap links) would
certainly be of interest to web developers and possibly extension
developers.
--- Writing applications with Mozilla Framework
Prasad Sunkari spoke next on application development using the Mozilla
framework. The Mozilla development platform offers user interface
widgets and implementations, XUL, huge collection of widgets, javascript
for implementing the user interface, CSS for skinning and styling. It is
even possible to use templates and bindings (to implement a custom
widget) and that the data source (rdf) can create part of the user
interface). He then covered overlays, components, the utility library
and portability issues. That was followed by a small “Hello World” type
tutorial.
In the Q&A, there were questions on the perceived large runtime (for a
comparatively small application). The feedback to that was that the size
of XULrun is 3 or 4 megabytes and is certainly much smaller then
ActiveX. Futhermore, like Java, the same instance of XULrunner can run
many other software. It was also mentioned that Firefox 3 will run have
a XULrunner-like software installed by default.
Personal thoughts: I’ve done Firefox extension development before, so
there was little new information in this talk for me. However, I would
imagine those wishing to get involved in Firefox development would find
the talk illuminative.
--- An introduction to XPConnect (writing extensions in pure JavaScript)
Anant Narayanan spoke on cross platform application development in
Mozilla using XPconnect. XPConnect has components (network, DOM, mail,
UI, data structures etc) and is basically the the JavaScript interface
to XPcom. As such, any JavaScript that runs in the Mozilla environment
will have access to all XPcom components (although only those components
which have interfaces defined in xpidl will be available).
Anant then outlined some development tools including Firefox itself,
Console Squared, FireBug, JSlib and XPcomviewer and Exten Generator.
Anant described XPcom components being available as native JavaScript
objects, with each component being identified by a contract ID.
Instantiatin a component involves calling the getService() method with
passing an interface along as an argument. Anant showed a code snippet
on a simple logging class and javascript loader. Useful would be in
avoiding namespace clashes by putting stuff into object as there are
some global objects mozilla introduces (for example Components).
jsLib seemed to be particularly interesting, with lots of repetitive
tasks and frequently used components in JavaScript already written.
Personal thoughts: I found jsLib particularly interesting and probably
would be looking into it much deeper soon-ish. The talk was decent
enough although I wish the talk had gone a little deeper into code.
--- Hunting Bugs
We didn’t fancy the other talks in the Mozilla Project Day and decided
to move on to the GNOME Project Day. Ritesh Khadgaray was speaking on
bug hunting so we thought that may be interesting.
Ritesh started off by giving a list of things that can go wrong in the
code, what can be dont (RTFM’s, visiting forums, BugZilla, looking at
the code, looking at release notes and so on). He then outlines the
GNOME session flow and strangely enough, his laptop hangs at this point
(because of none-free NVIDIA driver). Despite calls for him to fix it at
that point, a cold reboot was required and fortunately, things looked
fine at that point. He went on to give an example of ESD hanging using
strace and went on to show the use of GDB.
Personal thoughts: I didn’t find this talk particularly interesting as I
pretty much knew everything mentioned (having being involved in free
software for some time now). Of course, YMMV :)
--- The challenges and opportunities of properly writing multi-threaded
GTK based GNOME programs
Andrew Cowie spoke on how to correctly write multi-threaded GTK based
GNOME programs. He started off by why GTK rocks: fast, flexible,
ubiquitous, multiplatform, many language bindings and LGPL’ed licensed.
In particular, he highlighted that multi-threading is important in
dual-core machines.
At this point, he showed us how to turn off a single cpu in a dual-core
machine (and thus saving 3 watts of power). Apparently, the magic is
in /sys/devices/system/cpu/cpuX. Using the GNOME system monitor, he
showed us a Fibonnaci generator program which clearly showed the use of
a single core in a dual-core machine for a non-threaded application.
Andrew indicated that writing multi-threaded code is hard (no shit!) but
clearly necessary in some types of applications (think GUI
applications). In GTK, the main loop polls sources for events (events
being user activity, I/O, timeouts etc) and events are issued as named
signals. As such, a GTK developer ought to register callbacks for
signals the application should react to.
Andrew showed an example of the GUI blocking (eg when suspended). He
mentioned that one way to solve GUI blocking is to have an idle function
handler but program would still be single threaded. GTK is actually
“thread aware” which is significant given that GTK was originally
written to be singly threaded. He then walked through a multithreaded
GTK application.
Personal thoughts: Good talk, perhaps some discussion on avoiding common
threading pitfalls would useful.
--
May your signals all trap Ditesh Kumar
May your references be bounded ditesh at gathani.org
All memory aligned http://ditesh.gathani.org/blog
Floats to ints rounded http://www.openmalaysiablog.com
More information about the ossig
mailing list