Archive

Posts Tagged ‘prototype’

Announcing Dycapo 0.0.2

January 10th, 2010 bodom_lx 1 comment

As promised, Dycapo 0.0.2 is out.

Dycapo will be an open client (mobile)/server system that will improve travel experiences of users in a city. The system will let people to define a destination on their mobile phone. DyCaPo will suggest and arrange trips by either using the Public Transport Service or Carpooling volunteers.
That is, DyCaPo will implement full Dynamic Carpooling functionalities as well as static approaches.

More information and download on the official page.

Here are the release notes and the changes since 0.0.1:

RELEASE NOTES
***************
2010-01-10 Daniel Graziotin 
Dycapo 0.0.2 is just for _showing_out_some_functionalities_ of the system and testing the underlying technologies. Dycapo 0.0.2 incorporates and shows:
* OpenTrip Core adoption and OpenTrip Dynamic data structures proposal (in Django Model format)
* Use of XML-RPC with Django (rpc4django over HTTP and HTTPS)
* (Sort of) integration of Dycapo models with Django and rpc4django
* Authentication
* Insertion of a trip by a driver
* Start of a trip by a driver
* Search of a trip by a rider
* Send a ride request to a driver
* Let the driver accept the ride request
No one exported XML-RPC function will surely be included in the final API! No one exported XML-RPC function is either optimized or completely working!
Code is (somewhat) documented. Expect a completely better work for 0.1.0 :)
CHANGES SINCE 0.0.1
***************
Some refactoring to make the code cleaner.
Lots of bugs fixed.
Test suite rewritten and (finally) fully working.

models.py:
- added utility methods (i.e. __unicode__ and to_xmlrpc)
- use of OpenTrip id proposal instead of Django id
- addition of fields to Participation model, regarding a ride request and a request accepted

trip.py:
this module has been splitted in four files:
- driver.py - holds all the XML-RPC methods that a Driver needs.
- rider.py - holds all the XML-RPC methods that a Rider needs.
- commin.py - will hold all the XML-RPC methods shared by Rider and Driver
- utils.py - holds some utility functions.

driver.py (formerly trip.py):
- added check_ride_requests(trip) - checks for ride requests
- added accept_ride_request(trip, person) - for accepting a Rider

rider.py (formerly trip.py):
- added request_ride(trip) - sends a ride request to a trip

tests/:
- Cleaner code and better organization
- Added test_all_simple.py - creates a Driver and a Rider with the same destination as target
- test_all.py - creates 3 drivers and 5 riders with random locations as target

Related posts

Some systems analyzed, thinking about protocols

October 22nd, 2009 bodom_lx No comments

My second physical meeting at SoNET – FBK is about to end. Today we discussed about applications that implements Dynamic Carpooling Systems on mobile phones. The list is hosted on the following Wiki page: http://www.opensocialcapital.com/dynamic_carpooling/wiki/index.php?title=Systems_Analyzed.
We also discussed about a protocol to be adopted for defining rides, to be used by the system in message passing. We took a look at the draft of OpenTrip Core, which currently defines the data structure only. There is also a tiny proposal of Dan Kirshner at his dynamicridesharing.org Wiki, called OpenDRS. We are also looking at Google Transit, because there is also the idea of starting a prototype that offers public transport rides, to help us reaching a critical mass.
An idea could be a merge of those proposals into a fork of OpenTrip Core, that is currently stopped and misses lots of features.
Next time we will discuss about our system, called temporary Dycapo, and I will prepare some software engineering documents.

Related posts

Internship: Dynamic Carpooling

October 2nd, 2009 bodom_lx No comments

I’ve just started an internship for my University. I’m working at the Fondazione Bruno Kessler, a research organization of the Autonomous Province of Trento that promotes research in the areas of science, technology, and humanities. In particular, I’m at the Center for Information Technology – Irst, in the SoNET explorative unit.
My research activity will last until the end of January and hopefully continue during the second semester, if the collaboration will be fruitful enough for a thesis.
The internship activities will focus on Dynamic Carpooling. I’m going to use my blog and the new category /carpooling-research to publish updates about the status of my research. We are going to purchase a domain that will also contain the outcomes of the research activities, available to the general public.
Here is a quick overview of the contents of my internship:

1. Dynamic Ridesharing Reviews

  • Review of existing papers
  • Review of existing web and mobile applications
  • Review of protocols
  • Research about the motivations of failure/success of existing realities

2. Release of Prototypes

  • API definition for Dynamic Carpooling
  • Implementation of a web application for Dynamic Carpooling
  • Implementation of a mobile application for Dynamic Carpooling
  • Possible integration with FBK systems

Related posts

How to limit a field with javascript-prototype and display the counter

December 3rd, 2008 bodom_lx No comments

For job purposes I had to learn a lot of JavaScript, including AJAX related stuffs. Like every lazy (but intelligent) developer, I looked around for frameworks that could help me doing my work. I knew that prototype existed, but I never looked at it because of lack of interest. Well it’s great, it’s really great! Nowadays everybody should use frameworks, as their abstraction permits a rapid development without worrying about things like platform compatibility, in our case browsers. Prototype also has a very nice and clean syntax that overtakes functions not compatible with every browser.

In this post I’m going to report a very nice function I implemented for limiting Form input fields, like textarea and input of type text. You have to call it via onkeyup and onkeydown events. The function accepts 3 parameters: field, limit and counterDesired.
The first is the field object, you should use the keyword this for a value.
The second parameter is a limit value, the number of characters that the field should contain at maximum.
The third parameter is optional, false as default. It permits to add a visual counter after the field, like the one you see on YouTube, for example. You can either tell to the function to add the counter for you (put inside a <span> block) or to put it inside another block you’ve already defined. In the second case, the block must have an id of the form ‘fieldID_counter’

This is the compact version, see below for some examples and the expanded, explained version:

<script type="text/javascript">
// < ![CDATA[
function limit_text(field, limit, counterDesired) {
    if (counterDesired == null)
        counterDesired = false;
    var length = $F(field).length;
    if (length > limit)
        $(field).value = $(field).value.substring(0, limit);
    if (counterDesired) {
        if ($($(field).id + '_counter')) {
            $($(field).id + '_counter').update($F(field).length + " / " + limit);
        } else {
            var counterText = new Element('span', {'id': $(field).id + '_counter'});
            counterText.update($F(field).length + " / " + limit);
            $(field).insert({'after': counterText});
        }
    }
}
// ]]>
</script>
 

Read more…

Related posts