GSoC 2014: Akonadi Commandline Interface Project

Hello everyone :)

I know it’s a little late to introduce myself and my GSoC project. But better late than never I guess :)

I am Bhaskar Kandiyal a student pursuing masters in Computer Applications and I have been accepted as a student to work for KDE as a part of GSoC this year! My mentors are Jonathan Marten and Kevin Krammer and I would like to thank them for giving me an opportunity to work on this project.

My project is titled Akonadi Commandline Interface Project. As evident from the name it’s an application that will act as a commandline interface to Akonadi so advanced users and system administrators can access and modify Akonadi’s data from shell scripts etc.

A demo project that I extended from the early prototype made by Kevin Krammer and Jonathan Marten is available here: https://github.com/gastly/akonadiclient

As of now I have implemented the –dryrun option for all the commands that modify the Akonadi datastore. And currently I’m working on adding basic filesystem and data commands (delete, edit etc.) to the client.

More details about the project and my progress will be posted on this blog :)

Cheers!

[GSOC 2012] Weekly Report – 13

Hi everyone :)

Finally, last week of GSOC finished! Time flies!

This week I had to do documentation for the web interface. For documenting the JavaScript functions and classes, I used the awesome YUIDoc. It works just like JavaDoc, except it’s language independent and can be used to create a temporary server to serve the HTML documentations on-the-fly i.e as you edit the documentation you can see how it all looks by running YUIDoc in server mode.

I also wrote a small wiki page mentioning how one can extend the web interface and what guidelines to follow when adding a new application or a new theme to the interface. It also contains steps on how to generate documentation for the JavaScript files using YUIDoc.

I didn’t add a ‘doc’ directory to the repository since the WiFiServer and CloudSync server use the web interface ‘as is’ directly from the repository and we wouldn’t want the server to serve contents of the doc directory to the user do we? :P

Also, some last minute bugs reported by Aaron were also fixed. They were mostly CSS related. Aaron also suggested quite a lot of improvements to the UI of Shopping List as well, but since we don’t have time in GSOC left now, I’d love to work on those after GSOC :)

So, that’s that, it’s a wrap folks! I’ll continue to work on the web interface after GSOC as well and post new improvements on this blog. Now awaiting the final evaluations! :)

Cheers!

[GSOC 2012] Weekly Report – 12

Hi guys!

Week 12 is finished and we have the official ‘pencils down’ date of today, so no developing after today, bummer :P

So, let’s start off with the usual, TODO from the last week:

  • REST API on App Engine for CloudSync (I’ll need to talk to Stanley first about some details of the API): DONE
  • Implementing the full REST API for OI Shopping List: DONE* (Read Below)
  • Documentation for how to add new modules or apps support to the interface: WIP
  • Code cleanup: DONE
  • As usual bug fixes and minor improvements (I’ll try to improve IE9 support as well): DONE

I fixed quite a lot of small and big bugs and since my college started this week, I had to work extra hard and manage my time. Most of the time spent this week was on bug fixes and organizing the code with a bit of UI improvements like the toggle sidebar button has been improved.

A new thing for mobile browsers is that the OI Shopping List for mobile browsers follows exactly the same layout of items as the application itself. Since a table of the different columns would not fit in a small screen, I had to make this change, which in my opinion looks pretty good :)

And for low end device or for those who don’t like fancy animations, there’s also a setting to disable animations now :)

Next up I had to fix some problems with how I handled the shopping list data sent by the server. The price was sent in cents (took me a while to understand when Stanley told me :P) so I convert the price from cents to dollars now.

I also wrote a stub for the REST calls API for shopping list on the CloudSync project. Also, Vettukal told me the shopping list sync is not ready yet. So, if I  added my own support for shopping list (only on the App Engine) would mean to modify the Task structure (at least that’s what I think needs to be done since imho there’s currently no way to differentiate between a shopping list and a shopping list item if we follow the current structure of the Task) which could possibly lead to breakage in syncing with OI Notepad (This is from my own understanding and could all be wrong :P)

Therefore, I simply implemented a stub for the REST calls as documented by Stanley which sends a 501 Not Implemented error code that tells the interface that the app is not yet available and therefore it doesn’t get displayed in the app engine interface.

As a part of cleaning up the code, I included all the shopping list and notepad functions inside a namespace which I should have done earlier since there’s no real reason to add those functions to the global namespace. Now we have all the helper functions in global namespace and all the application specific stuff in the application’s own namespace.

Next up I also added quite a bit of documentation to the source JavaScript files. I’ll be using YUIDoc to parse the files and generate the documentation for functions :)

Now that the coding period is finished I will solely focus on documenting the interface which would contain mostly how to add support for new applications and documentation for existing functions.

Cheers! :)

[GSOC 2012] Weekly Report – 11

Hi guys :)

Last week I said I’d do only bug fixes to the interface but since on the OpenIntents mailing list I got quite a lot of suggestions from Aaron and Friedger so I implemented those as well and fixed some bugs.

Here’s a list of improvements I’ve made based on suggestions given in the OpenIntents mailing list:

  • Made the landing page for OI Cloud Sync more responsive, I do this by hiding the slideshow on mobile devices since it’s really meant for large screen devices and fixing a bug where the navbar and footer were not aligned well with the page.
  • Made the table in OI Shopping List responsive as well so it resizes well on small screen devices
  • Ability to sort the shopping list items based on their status (completed / not completed or checked / unchecked)
  • I’ve removed the ‘inline edit’ for shopping list items and now a full edit window aka add window with edit functionality is shown to the user as suggested by Aaron.
  • A major improvement is that the OI Shopping List’s table is now scrollable. This was done because Aaron suggested we have the ‘quick add’ input box at the bottom of the page so that it’s more in line with the actual OI Shopping List’s interface. To accomplish that I had to make the table scrollable with overflow: auto but it’s not supported on some mobile devices so it didn’t scroll therefore I used some JavaScript to make it scrollable on touch. Now it’s all fine and dandy :)
  • Also a change that Friedger requested to close the settings dialog when we click the settings button again has been added as well.
  • Apart from that quite a lot of small bug fixes

Long awaited icons are now done :P I had a bunch of ideas on making these so I implemented quite a few of these (especially for the Cloud Sync Server). I also changed the arrows so they don’t resemble the Skype logo’s ‘S’. Here’s the icons (I’ll post them to the mailing list as well).

As for the next week, I’ll be working on some important things:

  • REST API on App Engine for CloudSync (I’ll need to talk to Stanley first about some details of the API)
  • Implementing the full REST API for OI Shopping List
  • Documentation for how to add new modules or apps support to the interface
  • Code cleanup
  • As usual bug fixes and minor improvements (I’ll try to improve IE9 support as well)

You’re free to test the interface here and report any bugs :)

[GSOC 2012] Weekly Report – 10

Hi everyone! :)

Week 10 of GSOC done! Wow, time flies :D

Last Week’s TODO

  • Improvements to the home page for both OI Cloud Sync and the web interface: DONE
  • The usual bug fixes and code cleanup: DONE
  • Add a tabbed settings page (If it looks good that is ;) ): ND (Details below)
  • Some more stuff that I can’t think of right now :P

Improvements To the Home Page

The home page of the web interface has been improved. As usual they’re subtle changes to the colors and CSS fixes. The ‘Toggle Sidebar’ button to the left now has an opacity which increases on hover so it looks like it glows. Also the color of the launcher icons in the home page has been tweaked a bit.

As for the OI Cloud Sync home page, I didn’t get enough time to improve it a lot but I’ll surely do it next week :)

Tabbed Settings

This, as of now is a no-go. Why? Because right now we don’t have many settings to change so categorizing the settings into tabs would be a headache to navigate for the user :) Maybe we can add it later once we have a number of settings.

Sorted Tables

A noticeable improvement this week is the ability to sort the data. Both in OI Notepad and OI Shopping List you can click the table headers to sort the column this is a nice feature for people who have a lot of notes or shopping list items and want to sort them :)

Other Improvements

OK, so these were not planned by me in my TODO last week but these suggestions / bug reports were given by my mentor Al Sutton and Aaron and Friedger on OpenIntents mailing list.

Here are the things that they suggested and I implemented:

  • Fixed the duplicate empty message bug
  • Fixed a bug where previous note contents were left in the ‘Add New Note’ dialog.
  • Changed the Back button to Home button
  • Added functionality to focus on the input of a dialog box
  • Add support for ‘quick add’ (as I like to call it). This adds functionality to quickly add an item to the shopping list where you just want an item name in the list. There’s a new textbox for that which does this. The old AddItem button is still there if you wish to enter details of the item as well.
  • Added a Logout button to the interface

Here’s a screenshot:

So, that’s pretty much it for this week! :)

As always you can test the interface at bkandiyal.appspot.com

The ‘pencils down’ date is closing in fast and I have to get all the bugs ironed out next week, so there won’t be a set TODO for next week but only bug fixes and minor enhancements :)

[GSOC 2012] Weekly Report 9

Hi guys! Week 9 done! :)

 Last Week’s TODO:

  • Finish the OI Shopping List interface design: DONE
  • Add REST calls for OI Shopping List to the interface: WIP
  • Improve the OI Cloud Sync welcome page / landing page: DONE
  • Improve the Home page (I have some ideas in my head ;) ): DONE
  • And the usual bug fixes, optimizations and code cleanup :): DONE

Shopping List Interface and REST calls

OK, so at the start of the week I worked on the OI Shopping List interface design, mainly on the UI for managing lists. I figured a simple drop-down div way for managing the lists would be best so in the list selection drop-down box there’s a<Manage> option which when selected displays options to manage lists. I haven’t yet added the javascript to edit and or delete the lists because I was focusing more on the design. But this should be a few lines of code and won’t take more than 5 minutes :)

As for the REST calls, I didn’t have the time to implement them and also we have not finalized the REST calls for the shopping list so maybe we should first discuss on the calls and then implement them. Therefore, I’m skipping this for now.

OI Cloud Sync Welcome Page

As per last week, I did some initial design of the welcome page for OI Cloud Sync which will be hosted on the App Engine. Since it will be the first page the user will see, I thought it would be good to introduce the user to the features of OI Cloud Sync and it’s web interface. This is done by the tried and tested way of sideshow’s! As of now, I quickly made the slides and they don’t look quite professional but I’ll eventually add some good looking ones ;)

The page also has a Login with your Google Account button as a BFB (Big Friggin Button) in the middle, so there’s no way to miss it ;)

At the bottom there are a couple of small text blocks describing OI Cloud Sync.

Improve the interface Home page

Now coming back to my own project :P I’ve made some subtle changes to the home page. Most of them won’t be noticeable unless you have an eye for details but the most noticeable is the Toggle Sidebar button on the left side which allows an easy way to toggle the sidebar so you don’t have to goto the menu to do it and the other thing is the small pencil icon when hovering over the app icons. The pencil icon is an Edit button that leads to the settings page which allows easy way of enabling and disabling applications.

Another subtle change, apart from others, is that the sidebar now slides to the left instead of fading to the top-left before. This gives a bit more ‘toggling-the-sidebar’ effect :P

Here’s a screenshot:

And the usual bug fixes….

I also fixed some bugs in the JavaScript and migrated some anchor tags to buttons since anchors are usually used to link externally but we only have internal links here so we don’t need anchors at all times ;)

Give it a whirl!

I’ve set up my own app-engine project to test stuff so I don’t mess up with Vettukal’s work. Here’s the link where you can test everything I talked about: http://bkandiyal.appspot.com/

So, yup that’s pretty much it for this week :)

Now, for next week….

Next Week’s TODO

  • Improvements to the home page for both OI Cloud Sync and the web interface
  • The usual bug fixes and code cleanup
  • Add a tabbed settings page (If it looks good that is ;))
  • Some more stuff that I can’t think of right now :P

[GSOC 2012] Weekly Report – 8

Yup, I’m posting this report because….I passed the midterm evaluation yay :D Thanks to my mentor Al Sutton for the support and guidance :)

OK, back to business ;)

Next Week’s TODO

  • Improve upon the OI Shopping List interface: WIP (Almost done, just needs support for managing lists)
  • Add some more API and functionality for modules: DONE (I’ll add more API functions in the future as well)
  • Fix bugs in the interface: DONE (Fixed all the bugs I could find)
  • Clean up code: DONE

OK, so this week doesn’t have anything big, just some minor fixes here and there and some code improvements and cleanup.

I fixed some bugs in the JavaScript which led to event bubbling which in-turn triggered some unexpected events.

A noticeable improvement in the code is that I now use jQuery.on instead of jQuery.live to add event listeners since jQuery.live is now deprecated and had some drawbacks to it. This could make triggering of events much faster and therefore should speed up the whole interface, although I don’t have any statistics right now as to how much it has improved.

Next, I improved the look of the progressbar that shows ‘Loading’ when the interface is, well, loading :P The progressbar now uses bootstrap’s CSS classes which should make it look just like the rest of the interface (previously it was ugly :P)

OI Shopping Lists’s web interface has also been worked upon now. I’ve added event handlers for almost all the events (except lists). OI Shopping List is a very complex application, well at least it’s interface was hard to convert to a web-friendly one. Now, I’ll be working on the lists which should be tricky as I don’t want to clutter the interface with more buttons like it is now with the ‘Add New List’ and ‘Delete List’ buttons.

I’m thinking of adding drop-down or a ‘Manage Lists’ button which would open up a dialog to manage lists.

Alright….saving the best for last. In my last week’s report I talked about asking Vettukal to push the App-Engine app with the interface to app-engine. He was facing some problems with it as well. But, I managed it push it to the App-Engine now. All’s well and sorted and it works fine :)

You can check it out here: http://oisafecloud.appspot.com/

NOTE: The main welcome page is buggy (it doesn’t slide the text). I just noticed it that it, for some reason, didn’t work on the app-engine. Strange, it worked locally. So, I guess I’ll add it in the TODO for next week.

You will need to sync some data first, so Vettukal’s Cloud Sync app is needed. Feel free to test and leave feedback and bug reports :)

I also worked on new icons for OI WiFi Server and Cloud Sync Server, I’ll be putting them on the list this week once I sort the minor stuff out.

OK, that’s all for this week, I know not much stuff, just some optimizations and cleanup. But making the code stable is more important than adding bells and whistles :)

Now, for next week….

Next Week’s TODO

  • Finish the OI Shopping List interface design
  • Add REST calls for OI Shopping List to the interface
  • Improve the OI Cloud Sync welcome page / landing page
  • Improve the Home page (I have some ideas in my head ;))
  • And the usual bug fixes, optimizations and code cleanup :)

[GSOC 2012] Weekly Report – 7

Week 7 of GSOC done!

This week, I did a lot, well, as per my expectations at least. I tried to make up for the less time I had spent on GSOC last week. Alright, so, let’s look at the TODO:

Last Week’s TODO:

  • Split the JavaScript into sub-parts: DONE
  • Organize the webinterface git repo for git submodule support (Need to discuss on the list first): DONE
  • Try and get a live CloudSync app-engine app working on some live data (ready for use :) ): WIP (Well, I couldn’t push it to the App Engine as it had problems authenticating on Linux x64 with Eclipse 32-bit. I’ve asked Vettukal to deploy it though, so, WIP since it’s done, I’ll update when it’s done :))
  • Properly design the web interface for OI Shopping List (Don’t know if we will support it or not, but it won’t hurt to plan ahead a little): DONE
  • And some more, stay tuned!

Now, going into more details….

Splitting the JavaScript

I started off by splitting JavaScript into sub-modules / sub-parts which would give the interface a modular design. I’m all up for a great modular design although I don’t think what I came up with is great but it does it’s job :)

The web interface is now divided into parts by ‘application’ i.e each application has it’s own directory (inside the ‘apps’ directory) with it’s own stylesheet and JavaScript file. The main script file ‘scripts.js’ contains global functions / API that an application can use.

I chose this approach as it makes it easy to add new applications, easy to manage existing ones and the code looks much much cleaner!

To display an application in the interface it has to register itself with the interface by calling the ‘addApplication()’ function and passing some parameters. The scripts of the application and the stylesheet is automatically added to the interface by the main scripts file. Right now, it needs improvement but it works well.

A cool thing about jQuery is that it allows triggers which are superb for this kind of a modular scenario. So, the interface can ‘trigger’ events which the applications can respond to, for example refreshing of a page etc.

I also included a ‘head.js’ script (can be found here) which allows parallel loading of JavaScript files to improve loading times.

Organizing the Repository

Next up, I decided to organize the repository so that it can be used properly as a git submodule. I removed the WebInterfaceTest folder which had a pre-alpha interface for testing that I made very early when the development started, it was now obsolete though.

I also moved all the contents of theWebInterface folder, one level up to the root of the repository.

 Live CloudSync App-Engine Testing

I tested the app-engine project of Vettukal, made some changes, integrated the interface with it (something I did last week) and it worked flawlessly. Vettukal was nice enough to grant me developer access to the app-engine :)

But I had a bunch of problems deploying the app to the App-Engine, the major problem was I couldn’t authenticate with Google as it didn’t show any authentication dialog or opened up a browser window. Then I found out that there was a bug with Eclipse 32-bit on Linux x64 so I asked Vettukal to deploy it for me today. I’ll update you guys when it’s done :) As for the bug, I believe cleaning up my Eclipse or reinstalling may fix it but I didn’t have much time to do it and I don’t want to break anything :)

Design a Web Interface for OI Shopping List

OK, this was difficult. OI Shopping List is a complex app (as far as I understand) and it has a lot of different options for the user to give like the quantity / price of the item. It was a challenge implementing it as a web interface since a web browser has it’s limitations. So I stuck with the tried and tested, tabular approach which displays everything neatly in a table. Here’s a screenshot:

If only you could buy brains with money :P

Well, moving on….

This is only an initial design, the main JavaScript and implementation is yet to be done.

Icons for OI WiFi Server and OI Cloud Sync Server

I also designed icons for OI WiFi Server and OI Cloud Sync Server. Here are the two:

OI CloudSync ServerOI WiFi Server

There’s a discussion going on here about the icons, feel free to participate or leave a comment down below :)

UPDATE: OI Cloud Sync Landing Page

OK, I forgot to add this before. But here’s it now. I also made a landing page for OI Cloud Sync’s app-engine. It’s not much as of now, but it contains a login button and right now only some text telling what OI Cloud Sync can do. I’ll be adding slideshows as well to make it look more good. Here’s a screenshot:

All of the changes can be found in my own repository github.com/gastly

Next Week’s TODO

This is if I pass the mid-term evaluation this week lol :)

  • Improve upon the OI Shopping List interface
  • Add some more API and functionality for modules
  • Fix bugs in the interface
  • Clean up code

[GSOC 2012] Weekly Report – 6

Another week done, time for another weekly report.

Last Week’s TODO

  • Fix bugs in the interface: DONE
  • Get a REST interface up and running in App Engine for CloudSync: DONE
  • Organize the code of the web interface (Includes splitting of JavaScript files as right now I only have one big file which I’ll split up according to the OI applications that they represent): WIP
  • Some more stuff that I can’t think of now :P

This week, I started off with fixing bugs that Stanley reported which included a bug in the authentication mechanism where the salt was appeneded after hashing the password. The correct way was to hash the password and the salt combined. This was fixed easily.

Another bug reported by Stanley was that if a note contained some HTML tags or broken tags it would make some functions to not work since the HTML would be invalid, so now I strip and convert the symbols like < and > into HTML notation before displaying it on the page.

Also, I added the ‘Delete Selected’ notes functionality to the interface.

I delayed the splitting of javascript file for this week since I was focusing more on the REST implementation and splitting of javascript was causing breakages. I will focus on that this week.

REST Interface

After quite a while (since GSOC started) I got the chance to do some Java programming :P

I finished the REST interface for OI Notepad for the CloudSync app-engine application using GSON for JSON and Jersey for serving the REST calls. You can find the project on my github (I didn’t commit it to the OpenIntents repo as I think it wouldn’t be appropriate to mess with Vettukal’s repository and some changes might conflict with his).

That’s pretty much it for this week, there were some minor bug fixes to the interface. The REST implementation took the most of my time (I had little time this week) but next week I’ll compensate for it :)

Next Week’s TODO

  • Split the JavaScript into sub-parts
  • Organize the webinterface git repo for git submodule support (Need to discuss on the list first)
  • Try and get a live CloudSync app-engine app working on some live data (ready for use :))
  • Properly design the web interface for OI Shopping List (Don’t know if we will support it or not, but it won’t hurt to plan ahead a little)
  • And some more, stay tuned!

[GSOC 2012] Weekly Report – 5

Hi everyone!

Another week done, time for another weekly report :)

Last Week’s TODO

  • Improve upon the Clean theme: DONE
  • Focus on integration with Cloud Sync Server:WIP
  • Add some more themes: ND (As my mentor, Al Sutton suggested, I should focus on the integration. I’ll add the bells and whistles later :))
  • Fix integration issues with OI Server: DONE (Not completely done though, the authentication still remains and I’m discussing this with Stanley)

This week, I started off by fixing theClean theme which is a white version of the default ICS like theme. There were quite a bit of CSS bugs and colorscheme issues so I took care of that first.

Next up, I fixed some integration issues with OI Server. Mainly, I had to fix the login page where I asked for the username and password but the server only wanted a password. So, I removed the username field. After fixing some more issues I decided to upload an APK up for testing which can be found here. Also, I fixed a bug in OI Server where in Ice Cream Sandwich the server app displayed an IPv6 address instead on an IPv4. I changed the implementation of getting the device’s IP address in OI Server and sent a pull request to Stanley. Although we need to discuss on this a bit.

This week, I managed to serve the web interface from the App Engine which  was easy as pie but it took me a while to get it going since I didn’t have any previous App Engine development experience so it took quite a bit of reading to accomplish that. Also, I managed to develop a REST implementation which is still in a very early stage for the Cloudsync app engine project. I’ll be focusing on this implementation this week.

So, that’s that. No screenshots this time since there are no major changes to ‘show off’ :P

Also, the online demo of the interface is a bit out of date with the current development version. I’ll have to update that :)

Stanley sent me a couple of bug reports for bugs he found in the interface. So, I’ll be fixing them at the earliest.

Next Week’s TODO

  • Fix bugs in the interface
  • Get a REST interface up and running in App Engine for CloudSync
  • Organize the code of the web interface (Includes splitting of JavaScript files as right now I only have one big file which I’ll split up according to the OI applications that they represent)
  • Some more stuff that I can’t think of now :P