09Mar

DataDroid is now deprecated

TL;DR DataDroid is now marked as deprecated

Long story:
Last real commit from me dates back to May 2013 (I’ve done some minor code cleanup since then). So I didn’t touch the code in more than 8 months.

I don’t have the time nor the motivation to work more on this project. There is a lot of other projects on the market with a lot more of people involved and also more recent (the first one popping in my head is Retrofit from Square)

The architecture around DataDroid is “old” in a way. And also it’s not really easy to use. It’s trying to have the “perfect” webservice client layer for Android but in a mobile world, it’s not really necessary.
Retrofit and others are much more easier to use and provide 90% of the features of DataDroid with a much simpler usage. Also you have to write nearly no code with these libraries compared to DataDroid.

So between that and the fact that I don’t have time to work on DataDroid anymore, it is time I think to deprecate this project. By that I mean:

  • I won’t add new features (this was already pretty much the case)
  • I won’t fix the bugs which are reported on it
The code will stay under Beerware license as it always has been which means if somebody wants to take over, you can totally (as long as you give me credit for the original work). The library is open source on GitHub so you just have to fork it.

26Apr

DataDroid on StackOverflow

Thanks to the help of Mark Murphy, I have now created a “datadroid” tag on StackOverflow : http://stackoverflow.com/questions/tagged/datadroid

If you post a question about DataDroid on stackoverflow, remember to tag it with this tag. This way I can see and answer it when I monitor the tag.

Other information, I’ve fixed a good number of bugs recently on GitHub. I want to add a few more features and I’ll then release a new version of the library.

02Feb

ParcelableCodeGenerator

A little post to present a new project of mine.

I just released a new project called ParcelableCodeGenerator which will help you to write your Parcelable classes by just having to fill a JSON file defining your fields.
The project will then generate the corresponding classes.

You can have more information about it on my main Android blog.

27Jan

DataDroid version 2.1.2 is available

Version 2.1.2 is now available on GitHub

What’s new ?

  • Fix some small issues with the Request object
  • Add a delay before stopping the Service so that it doesn’t get recreated multiple times if you send a lot of small requests one after another
  • Fix some comments

You can find the updated sample application on Google Play.

16Jan

DataDroid version 2.1.1 is available

Version 2.1.1 is now available on GitHub

Why another release so soon after the previous one ? One bug with using Parcelable as a parameter for the Request object was found yesterday and as this feature is quite useful, it was worth another release.

2 other small improvements has been also added to this release.

And the sample application on Google Play has been updated as well.

14Jan

DataDroid 2.1 released

I just pushed on GitHub the version 2.1 of DataDroid.

The changes are only small improvements:

  • The support library was included in the project for only one class. So instead of doing that, the class itself is now included
  • Improvement of the documentation in general
  • Some bugfixes in the sample app

The application on Google Play has also been updated with the new version.

25Dec

DataDroid v2 is available !!!

The version 2 of DataDroid is finally available !

What’s new ?

  • A better architecture of the library which reduce a lot the boilerplate the developer has to write (you can check this article to see the difference)
  • A more robust and easier to use API for your network connections based on HTTPUrlConnection.
  • New features in the network connection API : HTTP authentication and possibility to disabled SSL validation.
  • Automatic generation of a valid Android User-Agent for your requests
  • Better management of calling multiple requests at the same time in your Activities (It was possible in v1.0 but not easily enough).
  • The library works with API 8+ now (aka Froyo and future versions) which covers currently 97% of the user base, so it shouldn’t be a problem.
  • A lot more samples available.

For a complete presentation of the library, You can check this page.

The sample application has been updated on Google Play :

And as always the source code is available on GitHub

Utilisation and migration

Whether you are a new user of DataDroid or somebody already using the v1 in your projects, you can find tutorials on how to use it and on how to migrate from v1 to v2 on this page.

30Nov

Update on DataDroid v2 development and some numbers

The development of DataDroid v2 is starting to enter the final stage !!!

What to expect from version 2 of DataDroid ?

  • A better architecture of the library which reduce a lot the boilerplate the developer has to write (more info on that below)
  • A more robust and easier to use API for your network connections based on HTTPUrlConnection.
  • Automatic generation of a valid Android User-Agent for your requests
  • Better management of calling multiple requests at the same time in your Activities. It was possible before but not easily enough
  • The library works with API 8+ now (aka Froyo and future versions) which covers currently 99.6% of the user base, so it shouldn’t be a problem.

Now that this is said, here are some numbers to see why it is going to be interesting as a developer to migrate from version 1 to version 2.

Before I go into detail, some context about the project I extracted the numbers :

  • The project contains 22 Activities
  • It uses 25 different REST webservices
  • It’s going to be the first project on Google Play to use DataDroid v2. It’s my library so not really a surprise here :]

Description of the elements on the table :

  • Workers/Operations :
    • Workers are the v1 classes containing the code which calls the webservice and parses the result. They are now called Operations and are pretty much the same
    • The increase in size is due to the fact that they include now some code which was before in the RequestManager
  • Service : Same as before with less code to write. It’s the service which receives the requests and transfers them to the Workers/Operations.
  • RequestManager/RequestFactory :
    • RequestManager is the entry point for your request. Nothing new here except nearly all the boilerplate is done for you now.
    • RequestFactory is a new class which is going to create the requests to give to the RequestManager.
  • Activities : The code is now a lot cleaner than before but there is still some work to do :D

As you can see at the end of the table, overall there is a lot less code to write !!

In terms of time needed to do the migration, it took me around 5 hours to migrate everything. Yes it is quite some time but keep it mind that we are talking of a very big project here.
Also if you have to add new webservices in the future in your project, it’s going to be a lot more easier.

When can you expect to use it ?

So the library is done and functional. It still needs a bit more testing before releasing it.
Also I need to finish writing some samples, as well as updating the documentation.

I hope to have everything ready in 1 or 2 weeks !

Tags:
25Sep

ContentProviderCodeGenerator and update on DataDroid development

A little post to present a new project of mine and also give you an update on DataDroid development.

I just released a new project called ContentProviderCodeGenerator which will help you to write your ContentProviders but just having to fill a JSON file defining your tables and columns.
The project will then generate all the needed code for your project.
You can have more information about it on my main Android blog.

About DataDroid, the last update on the blog and on GitHub is from last April (which is like forever ago … sorry …)
Since then a lot of changes happened, including the new lint checks than some of you encountered which revealed some errors in the library (mainly in NetworkConnection, with the use of AndroidHttpClient which was existing in 1.6+ but not openly available until 2.2)

Due to that and also the fact that NetworkConnection is kind of a mess with the gigantic number of methods in it, I’m currently rewriting the class to use the Builder pattern (like AlertDialog.Builder works).

When this is done, NetworkConnection will be deprecated and the new NetworkConnection2 will be there to replace it with a better and more robust API.

So that’s the plan. The only missing element is the time to do it currently.
I just changed job to start working at Google in the Android team and it messed a lot my schedule as expected :)

But it starts to look better in term of time and I hope to have a new working version on GitHub soon !!

13Jun

DataDroid usage visible on AppBrain

AppBrain added recently a page on their website showing most of the Android development libraries and the applications using them : Development Tools

After my request, they added DataDroid to the list (at the bottom, for now ^^, as it is sorted by usage) and also to see more information about it on its dedicated page

Only thing missing on the details page is the possibility to see all the apps using it and not only the top 10 but maybe it will be added in the future :)