Sahana libraries’ limitation of a common interface

Brain dump by nilushan on August 27th 2009

In an attempt to make a reusable component for form handling in Logistics, that supports validation and performs form processing automatically, I went through a few difficulties that are prevailing in the current libraries.

The form library does not use a common interface,

eg. lib_form.inc

function shn_form_button($name, $button_opts = null, $extra_opts = null)
function shn_form_text($label, $name, $text_opts = null, $extra_opts = null )
function shn_form_hidden($hidden_vars)
function shn_form_checkbox($label, $name, $text_opts = null, $extra_opts = null)
function shn_form_select($options,$label, $name,$select_opts = “”, $extra_opts = null)
function shn_form_radio($options, $label, $name, $select_opts = “”, $extra_opts = null)
function shn_form_radio2($options, $label, $name, $checked, $extra_opts = null)
function shn_form_multi_select($name,$options, $label, $select_opts = “”, $extra_opts = null)
function shn_form_opt_checkbox($opt_field,$extra_opts=null)
function shn_form_textarea($label, $name, $text_opts=null, $extra_opts = null)
function shn_form_upload($label, $name, $extra_opts = null)
function shn_form_label($label, $caption, $extra_opts = null)
function shn_form_password($label, $name, $text_opts = null, $extra_opts = null)
function shn_form_date($label, $name, $extra_opts=null)

The function signatures are different in even the same kind of form elements. Since the form elements do not have a common interface, it is hard to use these functions in a generalized way.

I feel that a better approach would be something like in the Zend Framework. The form elements in Zend framework are as below.

class Zend_Form_Element_Button extends Zend_Form_Element_Submit
class Zend_Form_Element_Reset extends Zend_Form_Element_Submit

class Zend_Form_Element_Checkbox extends Zend_Form_Element_Xhtml
class Zend_Form_Element_Captcha extends Zend_Form_Element_Xhtml
class Zend_Form_Element_File extends Zend_Form_Element_Xhtml
class Zend_Form_Element_Hash extends Zend_Form_Element_Xhtml
class Zend_Form_Element_Hidden extends Zend_Form_Element_Xhtml
class Zend_Form_Element_Image extends Zend_Form_Element_Xhtml
class Zend_Form_Element_Text extends Zend_Form_Element_Xhtml
class Zend_Form_Element_Textarea extends Zend_Form_Element_Xhtml
class Zend_Form_Element_Password extends Zend_Form_Element_Xhtml

class Zend_Form_Element_Multiselect extends Zend_Form_Element_Select
class Zend_Form_Element_Select extends Zend_Form_Element_Multi

class Zend_Form_Element_Radio extends Zend_Form_Element_Multi
class Zend_Form_Element_MultiCheckbox extends Zend_Form_Element_Multi

class Zend_Form_Element_Submit extends Zend_Form_Element_Xhtml

abstract class Zend_Form_Element_Multi extends Zend_Form_Element_Xhtml

abstract class Zend_Form_Element_Xhtml extends Zend_Form_Element

They all inherit from the same type, therefore having a common interface.

Zend is a Object Oriented framework whereas Sahana is procedural, therefore it might be hard to enforce the use of a common interface for the same kind of elements in Sahana libraries

Sahana in Google Summer of Code 2009

Brain dump by bitner on March 19th 2009

Sahana has been again selected to participate in the Google Summer of Code (GSoC) for 2009.

A full timeline of important dates for this summer is available.

We were selected as 1 of 150 out of about 400 groups who applied this year.  This is a strong testament to the reputation that Sahana has built up of the last few years and the great success that we have had as part of this program previously.  We still do not know how many students we will be able to involve this year, but it may likely be fewer than we have had in the past as there are fewer spots to go around.  Further information about student allocation can be found here: http://socghop.appspot.com/document/show/program/google/gsoc2009/studentallocations.

Students:
If you are a student who is interested in participating in the GSoC this year, I would encourage you to review our ideas page and our student guidelines on the Sahana Wiki.  Once you have reviewed that information, I would invite you to discuss any ideas that you may have on the Sahana maindev mailing list or via IRC .  Students who take the opportunity to discuss their ideas with the Sahana development team will definitely have an easier time pulling together quality proposals.

Mentors:
If you are an active Sahana Contributor and would still like to be involved in the GSoC as a mentor, it’s not too late.  Please visit http://socghop.appspot.com/org/apply_mentor/google/gsoc2009 to register and we will also get you caught up on all pertinent information you need to know about.

I look forward to seeing all the proposals that come in!

Thank you once again,

David Bitner
Sahana PMC
Sahana Administrator for GSoC 2009

Firefox browser CAP alerting plugin (Sahana idea for GSOC2009)

Brain dump by Gavin Treadgold on March 04th 2009

I haven’t blogged about Sahana for a long time, and I’ve got plenty to write. So much that I can’t decide where to start, so I’m going to pick a nice small piece to start with.

The Concept

Last year, I was involved in a project in New Zealand to produce an investigative report on Public Alerting Systems with the New Zealand Centre for Advanced Engineering. This report will hopefully soon go public, and I’ll provide a link when it does.

This report was looking at the different technological solutions for getting alerts out to people in as timely a manner as possible. At one point in the search for different systems, we started discussing means of injecting HTML in web pages via an ISP, so that a public alert could be sent out to anyone on the Internet. I’ll talk about this and other options later. Let me get to the point of this post.

After starting at the HTML injection idea, and progressing through a few others, I reached a kind of natural conclusion that a more suitable means of alerting users via a web browser would be a browser plugin that can subscribe to Common Alerting Protocol (CAP) feeds, and when a relevant alert comes in via CAP, this is displayed to the user in their browser using the XUL:notificationbox at the top of the webpage.

Draft Requirements

Anyway, a possible idea for a Google Summer of Code 2009 project is that of constructing a browser plugin for Firefox that implements this alerting capability, and expanding Sahana to support full publishing of CAP alerts. Here are some features it could/should support.

Firefox Plugin

  • Bundle publicly available CAP feeds (ideally listed in a nice Country/State taxonomy - this will make it easy to discover and utilise existing CAP services.
  • Allow users to optionally register location in some manner, so as the plugin can identify relevant alerts (by location) and give them higher status than say remote alerts. Users should be able to register multiple locations - whether it has home & work, or multiple cities. Privacy is of course king and this information must be protected.
  • Provide a means of adding additional user provided CAP feeds to the plugin.
  • Provide the ability to open the alert in a new tab and format in a human-readable manner, including niceties such as embedding Google Maps to show geospatial information and links back to the source website of the alert for verification.
  • Implement means of verifying messages that are digital signed, and decrypting encrypted messages.

Sahana

  • Implement a CAP feed in Sahana so that Sahana can act as both a producer (in terms of creating a CAP message) and a publisher (in terms of making it available via a CAP RSS/Atom feed).
  • Implement a CAP proxy or similar, so that say all users of a Sahana server can obtain CAP alerts directly from the Sahana server - rather than going to an external website. This may be useful for distribution of alerts within an organisation or centre without having every client browser connecting to an external server.

What would be very nice, but may be beyond the capabilities of Sahana servers currently, is making the CAP service on a Sahana server easily discoverable on a LAN via zero-conf services such as Bonjour.

Draft Outcomes for Assessment

The outcome of such a project would be to produce a working solution whereby a Firefox Browser plugin is capable of working with public CAP alerts and that CAP within Sahana is capable of fully acting as a CAP server via RSS/Atom feeds to the CAP alerting plugin.

Compulsory

  • Implement the specified requirements
  • The browser plugin works as expected with publicly available CAP feeds.
  • The browser plugin works as expected against the Sahana demo server. (Yes, this means that your modifications to CAP on SahanaPHP need to be implemented).

Optional

  • Implement the Sahana CAP server in SahanaPy
  • Provide one or more standalone CAP clients for a mobile platform e.g. Google Android, Apple iPhone/iPod Touch etc
  • Write an Internet Explorer plugin with similar functionality - it is important that this functionality is also provided for IE given its widespread usage and deployment.

Whilst the plug-in can and should operate completely independently of Sahana, it should also be designed to work well with Sahana servers (e.g. SahanaPHP and SahanaPy).

Anyway, this is just an idea I wanted to float and get out in the community for discussion. I’d welcome any further comment or ideas to build upon this!

Originally posted on my blog, republished to TalkSahana.

Google Summer of Code 2009

Brain dump by Ajay Kumar on February 25th 2009

Sahana are again applying to participate in the Google Summer of Code.
Please help us to develop concrete proposals to ensure a successful application for which students can apply for. We need to have this in by March 13th.

See the Wiki: http://wiki.sahana.lk/doku.php?id=dev:sahana_gsoc09_ideas

Please contact through the mailing list: https://lists.sourceforge.net/lists/listinfo/sahana-maindev

Strategic Plan for the Release of Sahana 1.0

Brain dump by Mark Prutsalis on February 25th 2009

For a while now, the Sahana PMC has been discussing the benefits of fast-tracking a stable public 1.0 release of Sahana.  We’d like to proceed with a plan to publicly release Sahana 1.0 by July 15 of this year.  This will be a stable and proven release of Sahana’s best features and functionality - based on the current 0.6.2.2 release candidate.

This means that Sahana 1.0 will not include the features and functionality planned for Sahana 0.7 and 0.8 as defined on the development wiki.   This does not mean that we are foregoing or bypassing these upgrades at all - rather we will providing a stable main trunk on which to base these new branches for a 1.1 and 1.2 release.

Please visit this page of the wiki to review the strategic plan for the release of Sahana 1.0.  You will also find  a link to this page on the release roadmap in the development wiki.

However, all that said, before we finalize this decision to limit Sahana 1.0 to the feature-set of 0.6.2.2, I wanted to publicly poll Sahana users and developers and the broader humanitarian ICT community for nominations of any features in development, customized for a deployment, part of an experimental branch, GSOC 2008 code, or any other feature request that you feel is absolutely critical to include in a Sahana 1.0 release.  The reason we would consider adding to 0.6.2.2’s features would be only from the perspective of this functionality or feature being mission critical to the disaster management capabilities of Sahana - and not just because the code has been written and is (mostly) bug-free.  (But the code also has be already in a state that it could be reliably tested and integrated into the main branch within the next 2-3 months).  We will take nominations into consideration and adjust the project plan for the release of Sahana 1.0 accordingly.

I’m also looking for volunteers to be a part of the release team.  Details of the two teams and their responsibilities are detailed on the wiki - Green (of disaster management domain experts) and Yellow (developers/coders) are needed that will see Sahana through this process.  If you are willing to participate in this process, please let me know or add your name on the wiki.

Please make any and all nominations for features and functionality not in release candidate 0.6.2.2 that need to be included in Sahana 1.0 by March 15, 2009.  Comments here are welcome, but also please send this information back to the public Sahana lists (maindev or user) for consideration and include:

o  your name,

o  the organization you represent,

o  experience using Sahana,

o  the feature/functionality being requested to include in Sahana 1.0

o  why this feature/functionality is critical to Sahana’s disaster management capabilities

Sahana 2009 - 1st Annual SAHANA Conference

Brain dump by Ajay Kumar on February 25th 2009

The Free and Open Source Software Community of Sri Lanka [FOSS.LK] is hosting the 1st Annual SAHANA Conference on March 24 & 25, 2009. In its inaugural year, the conference will provide opportunities for anyone involved in Disaster/Emergency management to network and share best practices with each other.

The conference is aptly named SAHANA, meaning “Relief” in Sinhala which is an official language of Sri Lanka, and is named after the “SAHANA Disaster Management System“.

The event will also be followed by a BarCamp on March 26, 2009.

More details about the event can be found here: http://sahana2009.foss.lk/index.html

Sahana hackfest at FOSSKriti

Brain dump by Ajay Kumar on February 24th 2009

After conducting the first ever Localization sprint for Sahana sometime back, we had a Hackfest planned at FOSSKriti where I saw awesome collaboration work happening real time for the first time ;) !!

The plan: Coding for Sahana in Python :)

Date/Time: February 14th 2009, 1530 UTC.

Venue: Indian Institute of Technology, Kanpur
and #sahana on irc.freenode.net the official project IRC channel for online collaboration/communication with the team.

Why on a Valentines Day?: Because we love Sahana! :)

Team Sahana at Hackfest:

Special Thanks to Satyakaam Goswaami, who led the “Sahana Testing” track and Massimo Di Pierro, author of Web2Py who led the students on queries related to Web2Py.

What happened there?:

  • We saw around 80+ students initially filled in the labs at the venue.
  • Students were briefed about what Sahana is in the talk delivered by me earlier.
  • Fran Boon, gave a brief outline and introduction on what to expect and what we will be doing over a Video Call on Skype.
  • Introduction of the track leads and tasks we all were to address.
  • Addressing newbie questions right from starting to code in Linux development environment using a text editor to what Open Source or what Sahana is.
  • Since the main channel #sahana got too noisy and bombarded with all sorts of questions from all the students present at the venue, we decided to split the focus.
  • We had #sahana-classroom to deal with total newbie related questions, which Chamindra gracefully handled :).
  • #sahana-testing room was created to handle Testing related discussion which Satyakaam handled.
  • #sahana - For core development on SahanaPy handled by Fran Boon.
  • Whenever a question used to pop-up on IRC, I used to explain it to the student at the venue itself so as to divert attention of the traffic from #sahana :) and let the leads focus on other issues.
  • Massimo, patiently handled local setup issues with the organisers and help setup the development environment for the students, since the IIT K network was not accessible from outside and checking out code etc was a pain.
  • Since it was an overnight event, we had limitations and not all people stayed till the end. We had to shut down the labs at 1 am local India time and we had people working on Sahana till the end :)
  • The organisers, being students themselves, were assisting in the local issues and helping the newbies get started as well.

Overall experience:

This was something happening for the first time on such a large scale, for which we were not really prepared :) since it was not anticipated! We had a great time learning things, showing code, writing code, testing Sahana, getting students started to contribute to Sahana. The whole excitement for me was to see various project leads handling the issues and collaborating with the students on IRC for the first time. I never saw them all at once on IRC so far and we all discussing development :D.

So it was a great experience for me to be a part of such an initiative. This event has had a lasting effect with students asking about Sahana and how to get started with its development who might as well apply for Sahana in Google Summer of Code 2009.

I loved being at FOSSkriti and get an experience of a lifetime, this is a place I would want to visit next year as well ;)

Pictures from the venue here: http://picasaweb.google.com/ajuonline/SahanaPyHackfestFOSSKriti

Complete event log and report including IRC logs located here: https://trac.sahanapy.org/wiki/FOSSkriti

SahanaPy - An experimental branch of Sahana in Python

Brain dump by Ajay Kumar on February 24th 2009

SahanaPy is a ground-up rewrite of Sahana Phase 2 using Web2Py, which is a MVC web application framework for Rapid Application Development based on Python. The SahanaPy code base also introduces distributed version control with Bazaar - with the main repository currently hosted on Launchpad.

SahanaPy is currently an experimental branch, since rewriting a large, working application is not something to be undertaken lightly. It is a lot of work & the payback at this stage isn’t clear. It is a project started by few Sahana developers changing focus from PHP to Python. Surely this attracts a lot of questions, some of them are addressed on the FAQ section here.

Project page & wiki: http://www.sahanapy.org

Project hosted at Launchpad: https://launchpad.net/sahana

Change is good. Choice is even better :) So now we have Sahana available in two flavours: PHP & Python, take your pick :) and ….

Code for Sahana” !! Because, I do! :)

Talking Sahana & HFOSS at GNUnify & FOSSKriti

Brain dump by Ajay Kumar on February 24th 2009

Recently I had planned to attend and present Sahana to the students audience at two events in India where the main agenda of my talk was to make them aware of the HFOSS ideology and Sahana, as a part of the community building efforts I have been doing in India.

Being a student myself, I am highly excited to attend such events and make sure I attend them and spread Sahana :)

First event to attend was GNUnify 09, which was at “Symbiosis Institute of Computer Studies and Research“, Pune. It is an annual gathering of the techies & community organised by the SICR & Pune GNU/Linux Users Group. It was a two day event held from 13th - 14th Feb 2009, I was present for the first day. The best take home, apart from excited students interested in taking up work on Sahana as a part of their academics, was a student volunteer coming up and sharing his thoughts on using Sahana to maintain the database of all people related information for the country starting with his city Pune, which can be used to access information in case such an emergency situation arises. As he pointed out, we don’t have a central identity mechanism in India as a national ID, but have various different IDs like the Voter ID, Ration Card, Passport. The student also mentioned they have a group at their college which works on Social issues who might be willing to take up work on Sahana :). Audience here comprised of FOSS Contributors & Professionals, Students, Teachers.

Second event was FOSSKriti, at Indian Institute of Technology, Kanpur from February 12-15th 2009, where I was for the last 2 days of the event. FOSSKriti is the FOSS component of their annual technical festival called Techkriti which attracts a huge student crowd from across India each year. This place attracted a larger student audience since it was a student only event and the organizers were an awesome bunch :) since they were students as well!

The slides of the talk:

Sahana Mobile application on the Openmoko™ platform

Brain dump by Ajay Kumar on February 24th 2009

I am currently working on developing a client application for Sahana, which can also act as a standalone data collecting tool for field reporters and people working in the process of disaster relief & management.

What is Openmoko™?

1.    Openmoko is a Linux distribution designed for open mobile computing platforms, such as, but not limited to, cellphones.
2.    Openmoko is the company behind the Openmoko Linux distribution. Openmoko also manufactures mobile computing platforms, such as the Neo FreeRunner.”

MAIN OBJECTIVES
•    The primary objective of the project is to make use of touch interface based cellphones with Wi-Fi, GPS, and GPRS as an effective disaster reporting & communication tool which interacts with the Sahana main system, either real time or by synchronization when accessible with the device.
•    The project aims at creating a “new application stack” over mobile devices which can be further expanded to provide all the features of the Sahana system, possible on a mobile device.
•    Having a compact and handy mobile device as an assistive tool and as a replacement for PCs/Laptops at relief camps for use in data reporting and information access from the main Sahana system.

A complete detailed proposal that I have drafted is available here in PDF format.

I am also collecting opinions from various domain experts and experienced people to provide suggestions and inputs in the form of a short questionnaire located here.

Please do provide your inputs and suggestions on the same!

Next Page »

talksahana   © 2007   The Folk that Talk Sahana | Powered by WordPress