Sunday, July 3, 2011

Sakai CLE mobile application with phoneGap

In my previous post I mentioned how to setup the working environment and useful tools we can use to develop mobile applications using web technologies. Today I am going to present what I learnt during the past few weeks and the status of the CLE mobile application at the moment.
As discussed with my mentor, Steve Swinsberg, the basic requirements of the CLE mobile app. are as follows for the first version also listed here and the UI flows can be found here. (Screens v1.0.1) 

User login
User enters user details to enter the system.

 List of sites
s/he will be directed to a list of sites that they are in (assuming credentials are correct)

 List of tools
User selects a site will navigate them to a tools list of the selected site. Here they can see how many new announcements, assignments and etc are there at a glance.

 Mobile version of each tool
Once they select a particular tool they can view the above details in detail. This will hopefully be a read only tool for the first version of app.

Current status  
List of sites and tools for a selected site done.


















































Both this screens are rendered using JSONP feeds of my local host because JSON feeds did not work due to domain issues. Please find the code here and please add your suggestions.

Try out this in your emulators with phoneGap
If you want to run this in your emulator what you have to do is to create a phoneGap app. following their tutorial and add sites.html to assets/www directory.

To add JSONP support for your local sakai instance you can do the following change to core-providers in entitybroker and deploy *only* it in tomcat.

Checkout entitybroker trunk if you don’t have,

    edit the classes where it says:


    add Formats.JSONP to the end      
    • mvn clean install sakai:deploy (from entitybroker pom level)
    •  re/start Tomcat.
    Yeah that’s it! Now you have JSONP support.

    Here is how to add a customize callback function,


    That's it you should be able to see above screens. :-)

    This is a useful place you can try JS, CSS, HTML http://jsfiddle.net/. Here we don't need to put all code just the snippets work nicely for example http://jsfiddle.net/HQK5w/6/

    Thanks to my mentor, Steve Swinsberg, for the support and directions.

    As always waiting for your comments. 

    Tuesday, May 3, 2011

    MySQL 5.5.X (X=11 for me) installation issue in Ubuntu 10.10

    Recently, while I was trying to install "MySQL community server" from binary distribution I came up with an issue when running the command ,

    terminal> scripts/mysql_install_db --user=mysql

    in INSTALL-BINARY. 


    So the error is about a missing library. To get rid of this install the missing lib which solved the problem for me.

    terminal> apt-get install libaio1 libaio-dev

    This solved the problem I had during the installation. HTH. :-)

    Sunday, May 1, 2011

    Sakai CLE mobile app - GSoC 2011


    My proposal for GSoC 2011 got accepted this time with Sakai project. Idea is to develop a mobile application for Sakai using cross platform javascript library phoneGap which will run on variety of platforms (first instance will run on Android and iOS). My project mentor is Steve Swinsburg. 

    With the progress I hope to post to this blog with the status of the project and things I learnt in the mean time.




    Monday, April 18, 2011

    Using Smart VOIP in Ubuntu

    I was trying to use Smart VOIP to make calls. But as I am on Ubuntu most of the time I was trying to get a solution for it other than logged in from Windows. Here is something I found ultimately.


    Please note that I did this on my Ubuntu 10.10 machine.
    Here we go:
    1) Download and install Linphone from http://www.linphone.org/ or you can simply use Ubuntu Software center.


    2) Open Linphone. You can find this under, Applications --> Internet --> Linphone


    3) Then select, preferences from Linphone menu. Go to "Manage SIP Accounts". Click Add button and enter following details.

    • Your SIP identity: sip:<smart_voip_userName>@.com. eg: yourName@smartvoip.com
    • SIP Proxy address: sip:sip.smartvoip.com
    • Keep other settings as is and click 'OK'
    That's it! We are done! 

    Enjoy your calls to loved or non-loved once! :-)

    Monday, November 8, 2010

    Waving Flag another version

    Young Artists For Haiti - Wavin' Flag Lyrics with Artist

    [All]
    When I get older
    I will be stronger
    They’ll call me freedom
    Just like a wavin flag

    [K'naan]
    Born from a throne
    Older than Rome
    But violent prone
    Poor people zone

    [Nelly Furtado]
    But it’s my home
    All I have known

    [Sam Roberts]
    Where I got grown
    but now its gone

    [Avril Lavigne]
    Out of the darkness
    in came the carnage
    threatening my very survival

    [Pierre Bouvier of Simple]
    Fractured my streets
    and broke all my dreams

    [Tyler Connolly of Theory of a Deadman]
    Feels like defeat to wretched retreat

    [All]
    So we strugglin’

    [Kardinal Offishall]
    Fighting to eat

    [All]
    And we wonderin’

    [Kardinal Offishall]
    If we’ll be free

    [Jully Black]
    We cannot wait for some faithful day
    it’s too far away so right I’ll say

    [All - Chorus]
    When I get older
    I will be stronger
    They’ll call me freedom
    Just like a waving flag
    (And then it goes back x3)

    Ahhho ahhho ahhho

    [Lights]
    So many wars, settling scores
    [Deryck Whibley of Sum 41]
    All that we’ve been through
    and now there is more
    [Serena Ryder]
    I hear them say love is the way
    [Jacob Hoggard of Hedley]
    Love is the answer that’s what they say
    [Emily Haines]
    But were not just dreamers
    of broken down grievers
    [Hawsley Workman]
    Our hand will reach us
    and and weeeeeeee, Buenos Dias
    [Drake]
    This can’t control us
    no it can’t hold us down
    [Chin Injeti]
    We gon pick it up even though we still struggling
    [Pierre Lapointe]
    Au nom de la survie (In the name of survival)
    [all]
    and we wondering
    [Pierre Lapointe]
    Battant pour nos vie (Fighting for our lives)

    [All]
    We patiently wait
    for some other day
    [Fefe Dobson and Esthero]
    thats too far away so right now we say

    [All - Chorus]

    [Drake - Rapping]
    Uhh – well alright
    How come when the media stops covering
    and there’s a little help from the government
    we forget about the people still struggling
    and assume that its really all love again, nahh
    see we don’t have to wait for things to break apart
    if you weren’t involved before it’s never too late to start
    you probably think that it’s too far to even have to care
    well take a look at where you live what if it happened there?
    you have to know the urge to make a change lies within
    and we can be the reason that we see the flag rise again

    [Nikki Yanofsky & Drake]
    When I get older
    I will be stronger
    They’ll call me freedom
    Just like a wavin’ flag

    [15]
    and then it goes back
    [Justin Nozuka]
    and then it goes back
    [Nikki Yanofsky]
    Then it goes back

    [Chorus - All]

    [Justin Bieber]
    When I get older
    When I get older
    I will be stronger
    just like a waving flag.

    Sources
    http://lyricsmusicvideo.blogspot.com/2010/03/young-artists-for-haiti-wavin-flag.html
    http://ca.answers.yahoo.com/question/index?qid=20100312083449AAPgc2b

    Sunday, August 15, 2010

    Google Summer of Code - Final

    As per the timeline of Google Summer of Code 2010 tomorrow (16 th August 2010). Here is my final work for GSoC 2010.


    Although final results is not out yet, I would like to write what I feel at the end of these 3 months period and the Eclipse plug-in I have developed with the invaluable help and guidance from my mentor, Stefan Seelmann, and all the Apache Directory Community members.

    within this period I not only learned technical stuff but also I learned open source way of developing, communicating with others (a lot) and much more.

    Little bit about the project : 

    This is a plug-in for Apache Directory Studio. The product which has been developed up top now is capable of generating a Java Bean class and a DAO class from an existing entry in a LDAP directory tree. The tooling collects all the required information in a wizard to generate the code and the code can be generated to a Eclipse Java project. At the moment it's not generation the pom.xml so that we need to generate the code in to a place where all the dependencies exist (e.g. persistence-example module).

    All the project stuff about 'persistence tooling plug-in for Apache Directory Studio' can be found and download from Downloads section of the project.

    How to install :

    1) Tooling is working with Eclipse 3.5 so you need to have it installed.
    2) Apache Directory Studio 1.5.3 and can be installed via update site
    3) Extract the persistence-tooling.tar.gz to eclipse/dropins folder

    One screen shot of the wizard (Here user can select which attributes of the LDAP directory tree to be generated to bean and Dao classes)


    Yeah, that's it you can try it and improvements are ahead.Your comments will be appreciated.

    Thanks my family, Malinthi, Stefan Seelmann, Google, Apache Software Foundation and all those who encouraged me. 



     

    Tuesday, March 9, 2010

    OpenLDAP installation and configuration.

    In the openLDAP installation and configuration README I followed they were asked to install the latest version of Berkely DB. At the moment I was installing it was 4.8.26 but after installing it I was unable to up the server. [ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) ] error was appeared. Finally I found the reason and it worked for me. In the LDAP release notes it is stated that the most stable version of Berkely DB for openldap_2.4.21 is db-4.7.25. Then I install this version and reconfigure the LDAP server. It worked fine. Here are the full steps that I have followed. I installed it on top of the SSL.


    Installing Berkely db-4.7.25.

    Download the compatible version (for your particular LDAP version) of Berkeley DB f rom http://www.sleepycat.com/download/index.shtml

    1. gzip -d db-4.7.25.tar.gz

    2. tar xvf db-4.7.25.tar

    3. cd db-4.7.25

    4. ../dist/configure –prefix=/usr/local/

    5. make

    6. make install


    Installing TSL(I install openSSL)

    Download the compatible version of OpenSSL from http://www.openssl.org/source/

    1. gzip –d openssl-version.tar.gz

    2. tar xfv openssl-version.tar

    3. cd openssl-version

    4. ./config shared –openssldir=/usr/local

    5. make

    6. make install


    Installating openLDAP

    Download the particular version of openLDAP from http://www.openldap.org/software/download/

    gzip -d openldap-version.tgz

      1. tar xfv openldap-version.tar

      2. cd openldap-version

      3. ./configure

      4. make depend

      5. make

      6. make install


    Now we should be able to up and run the LDAP server successfully.

    Start the server: /usr/local/libexec/slapd

    NOTE: (possible error at this point) :/usr/local/libexec/slapd: error while loading sharedlibraries: libdb-4.8.so: cannot open shared object file: No such file or directory

    If so enter the following command or add it to bash_profile.

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/

    Stop the server: kill -INT `cat /usr/local/var/run/slapd.pid`

    To check whether the server is correctly configured and running use ldapserch as follows.

    ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts