November 22, 2008

Back to work

Posted in GSoC tagged , , , , , , , , at 4:38 pm by fadinlight

It’s been a long time since the last post. After successfully passed my exam I took a little holiday trip camping around Europe with my girlfriend Claudia (thanks to Frederik Ramm who took us around for a morning in Karlsruhe :)) and then I was a little buried in everyday stuff and everyday work. Now I’ve managed to have more spare time to return back working on Osmarender Frontend!

I was not totally outside OSM however, when I had a little time I’ve managed to remain in touch with the community and doing some little works:

  • I’ve given a talk @ Linux Day 2008 in Rome about OpenStreetMap on October 25th (thanks to LS-Lug for hosting, Simone Cortesi for slides and Martin Koppenhoefer, his girlfriend and their friend for coming there! :))
  • I’ve started to get in touch a little bit with OSMTracker devs because of lack of compatibility with my Samsung Omnia i900. I spent an evening with Rubke and Ldp in chat talking about Marco Polci’s cool work (Pollicino), which already had some compatibility with WM internal GPSes. Now, however, an Intermediate driver for internal GPSes has been developed independently and OSMTracker is fully compatible with my cell phone. Furthermore, I’ve subscribed OSMTracker mailing list.
  • Learnt to use a really great software to use in sync with OSMTracker for mapping, called JTileDownloader
  • Thanks to Virtual Tiles@Home, I’ve managed to get Tiles@Home working on my old Windows box and begun helping actively. However now it’s not working anymore, hope to find a solution when I’ll have more time ๐Ÿ˜ฆ As I’ve seen one mail talking about Osmarender Frontend, I’ve subscribed TaH mailing list to not miss possible future mails.
  • In the meantime I was starting to study for developing a little Firefox extension to monitor user’s Tiles@Home activity. I’ve already written some lines of code, but stay tuned for updates ๐Ÿ˜‰
  • I’ve changed Osmarender wiki to link to my Osmarender Frontend wiki page
  • I’ve subscribed the Openstreetmap Italy Facebook group
  • Replied to Jiri Klement (hope to reply again soon) about his new Osmarender rules file format proposal
  • Last but not least… managed to read thousands of emails coming from OSM mailing lists ๐Ÿ™‚

Yesterday I’ve done some commits to keep Osmarender Frontend in sync with bobkare’s work on Osmarender’s SVN reorganization. I need however to work to get Osmarender Frontend fully compatible with the new SVN layout, and that means:

  • Using always the latest Osmarender XSLT and latest rule files.
  • Keep dojotoolkit outside the svn (no more svn:externals, so I need other solutions to link to the library) and write some shell scripts to download it (and jsdoctoolkit, and jsunit for developing).
  • Let Osmarender Frontend be fully compatible again with symbols, that are now again outside the rule file.

Before starting to code Osmarender Frontend again, however, today I’m working on a little, very beautiful (to me) surprise for all devs that I’m planning to release tomorrowStay tuned!


September 10, 2008

What’s going on

Posted in GSoC tagged , , at 11:16 am by fadinlight

Just a little post to let you all folks know, as most of you already know, that Osmarender Frontend has not come to an end with the end of Google Summer of Code 2008. I’ve a need for a little stop for a University exam on September 18th. These are however my plans for the next future

  • Refactor the blog, for a smooth transition from Summer of Code to “normal project life” announcements (weekly report and gsoc feeds are not meaningful anymore, as the GSoC category).
  • Refactor CMYK rule model as soon as possible to obtain the full power of reading/writing rules
  • Change the wiki to describe better the architecture of Osmarender Frontend, CMYK library and JUICE widget.
  • Dig further in the upcoming 1.2 release of Dojotoolkit. There are some interesting new features that I was looking for in the past for Osmarender Frontend, like the CheckableMenuItem (that is, a checkable item in drop-down menus). Furthermore, I think that the new will be very useful for xAPI communication. Some other facilities like dojox.lang.observable, dojox.lang.aspect, dojox.json.schema and are very interesting to me, too, and I wanna explore them further to see if they can be really useful to me for better coding.
  • If I’ll manage to get it work (I didn’t during GSoC) and is satisfying to me, I would like to change my unit tests to DOH (if it’s likely to be powerful as JSUnit), to reduce the dependence of Osmarender Frontend from other projects. The new doh.robot thingie seems to be very very interesting for UI testing too, need to compare its power with Selenium IDE‘s.

Osmarender frontend story continues… ๐Ÿ™‚

September 2, 2008


Posted in GSoC tagged , at 1:26 am by fadinlight

No, it’s not a duplicate post! For all talk-it folks, I’ve just released the italian version of the manual. There are also some changes in the English version. So, here the links:

Italian version (20080901)

ODT or PDF format

English version (20080901)

ODT or PDF format (there is also an ODT with all revisions till 20080901… basically yesterday’s version for the moment).

August 31, 2008


Posted in GSoC tagged , at 5:21 pm by fadinlight

Following some requests in OSM’s talk-it list, I’ve just released a manual for Osmarender Frontend 0.2 version (sorry folks, only English for the moment, hope to translate it soon!). The manual (24 pages long) is available in ODT or PDF format and released under CC-by-SA license. Hope you’ll find it useful!

August 26, 2008

Trac component open

Posted in GSoC tagged , at 11:59 pm by fadinlight

After a question in the talk-de list (thanks to Martin for the announcement… and for having replied in German for me ๐Ÿ™‚ ), and after fixing the reported bug (even if it’s not a completely clean solution atm), replying to AndreR in the wiki, I’ve thought about opening a component in Openstreetmap’s trac.

Thanks to TomH, now everyone can submit a bug report or an enhancement suggestion for Osmarender Frontend in OSM’s trac! (you need to use your OSM account to submit a new ticket).

August 21, 2008

New 0.2 (SoC) release, JUICE is born – aka the longest title and the longest post in history

Posted in GSoC tagged , , , , , , , , at 2:56 am by fadinlight

Relevant links:

“Dojoizing” OsmaFrontend

Following what I’ve said before, also this last week (while doing a MAJOR blog posts updating) has been full of interest for code developing, even if not so full of new features. What I’ve been doing is “Dojoizing” OsmaFrontend, to take the most advantage from Dojo toolkit and to have a cleaner code design (separating HTML code from Javascript, using Dojo’s xhrGet). Here the last days timeline:

August 11: TagTrunk

While “Dojoizing” Osmafrontend, I’ve started to separate the trunk code from the tags (thanks to TomH and spaetz that helped me in the #osm channel, also helping me not to do tens and tons of commits ๐Ÿ™‚ !)

August 12: Widgets and blog

A long day of studying to learn how to write Dojo widgets, and to write some of the past posts for the blog

August 13: Tags, Blog, Rule tree

Finally I’ve separated the tags from the trunk, while updating the blog with the new posts. A little interesting new Osmarender Frontend feature developed: a raw tree view of the rules. This is what is going to be, after the major refactoring I want to do for CMYK library.

August 14-15: Django template in Dojo (Dojox DTL)

I’ve started to learn how to use DTL in Dojo, but even after spending the whole day on various tries, I didn’t manage to have it do what I wanted to do to separate some HTML from the code. For example, I couldn’t manage to do a {% for key,value in store %}. Really don’t know why, because with other tags everything worked smoothly.

August 16: Widgets and i18n

After doing all the refactoring to separate HTML content from Javascript, I started to refactor all the code that concerned the CSS editing part of Osmarender Frontend. Then, I’ve started to learn how to do i18n with Dojo, while learning that Dojo’s i18n have some issues with Firefox 3.

August 17: Externalising CSS editor and publish/subscribe

This day I’ve finally externalised all CSS editor code from osmarender_frontend.js file, with some tricks to keep it really separate. As Osmarender Frontend takes the styles and handles them (add, modify, delete) only with the help of CMYK library, and as I wanted to keep the CSS editing widget and CMYK library really separate, I didn’t want to pass the CMYK instance to the CSS editor, nor I wanted to let Osmarender Frontend handle the CSS section of the rule file. This is where dojo publish/subscribe came to help! In this way, the CSS editor will publish a topic, which Osmarender Frontend have to subscribe to pass the parameters to CMYK library. That’s cool!

August 18: JUICE

I’ve spent the last GSoC days to do some minor changes to the code, and to definitely keep the CSS editor widget separate from the rest of the code, with its own i18n. This is how JUICE (Javascript User Interface CSS Editor) project was born!

Three projects in one!

At the end of my GSoC adventure, and at the beginning of a new adventure, I’m very happy to say that three projects have started at the same time:

  • CMYK library: When the refactoring will come to an end, the library will be completely independent from Osmarender Frontend, thus allowing every Javascript-speaking code to handle Osmarender’s rule file smoothly.
  • Osmarender Frontend: A Dojo-powered GUI interface for WYSIWYG handling of Osmarender’s great power.
  • JUICE dojox based widget: Without even knowing or wanting, the CSS editor has now its own life, so, sooner or later (at the end, when it will have more features and handling power), it will be a separate project, perhaps with some integration with Trevor McCauley’s great CSS parser… Who knows… Fantasy is the limit…!

August 10, 2008

Refactoring and UML models

Posted in GSoC tagged , , , at 11:46 pm by fadinlight

(This post has been published after the original date)

Now that all is ready, I know that probably the time is not enough for GSoC deadline to complete all that I would like to complete (even if I’ll try to do my best), that would be:

  • Externalise data model from cmyk.js
  • Create and package a better data model for rules handling (with some GUI hacking I could let it work in few time after creating it)
  • Refactor Osmarender Frontend (the GUI section) code
  • Externalise and dynamic loading some GUI resources (like the various panels)
  • Refactor some controls (mainly those that edit CSS properties) as Dojo widgets
  • If time permits, start using Dojo templating system for some GUI resources
  • Create all packages ready for release

The hardest thing to do would be to write and get to work the refined data model for rules handling. This is because, after a quick refresh of my Osmarender rules knowledge, I’ve produced the rough sort-of-UML model shown above (thank to argouml), which represents needed classes, inheritances, attributes and types. That explains clearly how difficult will be a proper refactoring, at least to get it to work for GSoC deadline without too much loose ends. Obviously I don’t want to risk to break something now. ๐Ÿ™‚

So, what I’m doing now? I’m using a mixed “top-down/bottom-up” stategy. I’ve already refactored some data models used by cmyk.js (1st point) and I’m just starting to externalise and dynamic loading GUI resources for Osmarender Frontend (4th point). This is going to be a step by step process, refactoring the code and re-testing the GUI any time, for every bit, to see if some regression bug appears. It would be quite slow, but, IMO, too much needed to have a maintainable and more flexible code for future improvements.

In the meantime, I’ll begin to prepare Osmarender Frontend’s directory in SVN for release.

August 9, 2008

Unit testing, unit testing…

Posted in GSoC tagged , at 1:31 pm by fadinlight

(This post has been published after the original date)

As said before, I was going to use JSUnit for unit testing while refactoring CMYK library’s code. After failing many times, I’ve found that latest Firefox 3 security policies seems to break JSUnit, so I needed to download it from the JSUnit code trunk and create “security.fileuri.origin_policy=3” key in about:config.

Now it finally works smoothly, and, after some learning, I’ve started to produce some unit tests for the first refactored library modules.

A very interesting thing I’ve found is that, before this version, JSUnit Firefox’s version seemed to support a client-side functionality to browse through local files to open a test suite. This functionality no longer works for Firefox 3. I need to find if really there is no hope to get a Firefox 3 browse feature.

August 6, 2008

Refactoring, refactoring… Documenting, documenting…

Posted in GSoC tagged , , at 4:12 pm by fadinlight

(This post has been published after the original date)

During the last week, I’ve managed to learn and beginning to use Dojo packaging features. So I’ve started splitting my cmyk.js file into model and controller chunks, exporting all functions that refers to models into different Dojo class files. After some little issues with relative paths, and after learning how variable and function scope works in Dojo classes, now it works!

I was starting to get worried, because JSDoc Toolkit seemed not to work in my PC at all, founding no suitable solution in the Net. Even switching from open-jdk to sun-jdk didn’t help. But, even in an unlucky period like this, sometimes a little bit of luck comes out… yesterday JSDoc Toolkit version 2.0.2 has been released… and all begun to work very very smoothly!

I’ve had some issues to let JSDoc Toolkit document properly Dojo classes, but, in the end, I’ve managed to let it work, even if it documents some functions as statics even if they’re not, and even if I needed to create some .js mock files just to document the various namespaces of the packages. Probably there could be a way to do all better, but I think I’ve to defer this research. ๐Ÿ™‚

July 30, 2008

The bus factor

Posted in GSoC tagged , , , , at 12:05 am by fadinlight

(This post has been published after the original date)

After talking with Frederik, also regarding what’s happened during the last days (and what’s happening now, and what will happen), we decided to change the scope of the project, aiming at a full refactoring and documenting of all that I’ve done. This has been chosen to reduce Osmarender frontend’s “bus factor” (in my case, the “sheep factor” ™! ๐Ÿ™‚ ). I’m agree on doing this, also because, to have a proper handling of the rule section (as it is very complicated), IMO a better data model is needed.

What’s Osmarender Frontend now

Now Osmarender Frontend is split into two JavaScript files: cmyk.js and osmarender_frontend.js. cmyk.js file is the osmarender’s rule handling library, while osmarender_frontend.js is the gui (sometimes they’re not really separate, to be honest). As I was a very newbie on using Dojo when I’ve started the project, I wasn’t using any Dojo feature at all. At the end, I was very reluctant on using it. Then, after I’ve done a total revision of the GUI, I’ve started to know Dojo better, and I see it would be a proper choice to use its features, beside for the GUI, also for the CMYK (“Customize Maps: Your Key”, or “Cmyk Maps Your Kingdom”) rules handling library itself, using only Dojo core features. Better, using Dojo’s scopeMap feature, I can distribute a fixed version of dojo with the library that doesn’t break anything if, sometimes in the future, another dojo version will be used when calling the library.

What Osmarender Frontend will be

Why Dojo is so attractive? Here I need to speak frankly: I don’t want to reinvent the wheel. If dojo can take care of browser quirks, class declaring/handling, package structuring (the thing I was missing the most!), i18n, querying the DOM, dynamic loading of panels, etc… well, why shouldn’t I use it? ๐Ÿ™‚

Beyond that, as Frederik asked, I’m going to start documenting the code, so I need to use JSDoc Toolkit. Furthermore, even if not really asked for, I want, at least, to refactor the library while using an unit test framework like JSUnit.

So, next steps:

  • Learn how to use Dojo packaging features
  • Learn JSDoc Toolkit
  • Learn how to use JSDoc Toolkit with Dojo
  • Start doing some documentation to test my knowledge of JSDoc Toolkit
  • Learn JSUnit
  • Learn how to use JSUnit
  • Start doing some unit testing to test my knowledge ofย  JSUnit
  • Start code refactoring

In the meantime, Simone Cortesi is coming to my summer house here in Montesilvano on August 4, while doing his sort of “Summer Italian OSM Tour“, to get in touch with the community all over Italy!

Next page