Monday, August 29, 2011

Droidcon, London Oct 6-7

There is an event that every european Android developer should try to attend: Droidcon. Even though I'm an Android developer, I won't be attending this event, because my master program starts the same week the conference begins. Nevertheless here's more about the Droidcon if you're interested:

Droidcon London 2011 is Europe's largest conference that exclusively covers Android development and applications. The conference will take place in London on 6th-7th October 2011.

Droidcon London 2011 has grown tremendously since last year, in line with the exponential interest in the Android platform. This year, upward of 600 Android enthusiasts will rub shoulders with the premier experts in the field to dig into every aspect of Android and its ever-growing ecosystem. High on the agenda this time around are Android for the Tablet, Android in the Enterprise, Android for Games, Android for business, Augmented Reality, multi-mobile and a whole lot more.

The first day will be community led with a full-day Barcamp and Democamp. The second day will be conference day, with presentations from some of the world's foremost Android experts, including two Google Developer Advocates for Android in Richard Hyndman and Nick Butcher, CommonsWare's Mark Murphy (author of the Busy Coder's Guide to Android Development), Mustafa Isik aka CodeSurgeon( and Yosi Taguri (programmer on the fantastic game, Ahhh-Pah) with many more top class speakers still to be announced.
You can register via the Droidcon London 2011 site.

They also have a twitter account (hashtags: #droidconUK #droidcon) and a Facebook page.

Labels: , , , ,

Tuesday, August 23, 2011

The end of webOS - or is it?

Last week, HP announced that they would discontinue their webOS hardware, which shocked all webOS developers because it makes no sense to develop for an OS where no new devices exist. Of course HP also announced that they plan licensing webOS to other companies. That's good, but will certainly take a while until the next device based on webOS will be release. Of course many developers were pretty confused and angry because they/we invested our time to develop apps for HP.

After the announcement, the prices for the HP TouchPad dropped dramatically, to only $99. Looks like it wasn't the end of webOS after all and developers can relax a bit, because now it seems as if there are quite a lot of devices out there. After a few hours the TouchPad was sold out. Interesting strategy ;)
But let's be honest: it wasn't a good idea that HP announced the end of the TouchPad (even though it increased sales), because it frustrated developers.

But there's another winner: Microsoft. Brandon Watson, who is Director for Windows Phone 7 announced on twitter, that Microsoft would be happy to help out all those frustrated webOS developers and provide them with free dev tools, phones and everything they need to be successful on WP7. That certainly could increase their market share.
And of course, this is definitively something I'm interested in. Not because I'm a fan of WP7 (don't really know it yet), but because I'm a mobile enthusiast – that's why I'm studying Mobile Computing ;)
Looking forward to porting my Geocaching Helper for WP7 – because last time I tried, the emulator didn't start :(

Labels: , , ,

Monday, August 15, 2011

Working with custom metadata in Flex

Flex logo by Adam Betts
If you ever developed using Adobe Flex you know that it's an easy to use and powerful framework to develop rich Internet applications (RIAs). I especially like the markup language MXML that allows you to separate design from implementation. Of course not everything about Flex is good. Even though ActionScript is a very nice programming language, there are many things you can't do or can only do using silly workarounds. For example abstract classes or private constructors – things you often use when developing complex applications.

But that's not what I want to write about. The core topic of this entry is about working with custom metadata:
Metadata is a very easy and powerful way to extend a programming language and that's exactly how it is using Flex: easy. But even though creating and using metadata in Flex is very easy, it's not well documented – at least I couldn't find all that I needed, so here's a short guide.

Applying metadata:
Applying metadata is very easy, just write the metadata tag surrounded by box brackets in front of the construct it should be applied to:
[Bindable] public var foo:Bar;
If the tag supports attributes, just add them inside the brackets so it looks like a constructor/function call:
[Event(name="name",type="")] public class CustomClass extends EventDispatcher { }
Custom metadata:
For custom metadata tags it's just the same as with the built in tags: Just write them in from of any construct – you don't even have to create a special class like in C# or a special interface like in Java. If you want to read the metadata during runtime you also have to tell the compiler to include the custom tags in the resulting SWC. For this you have to add them via the compiler flag or the file flex-config.xml:
Compiler flag: -keep-as3-metadata+=TagName,TagName2,TagName3
flex-config.xml: <?xml version="1.0"?>
When using the compiler flag, please remember to use += to append the specified tags. Otherwise the built in tags (Bindable, Event, ...) won't be recognized any more.
The flex-config.xml has to be in the src folder of your project.

Reading metadata during runtime:
Reading metadata during runtime is very easy too. There's a built in function that allows you to get a XML based description of a given datatype: describeType().
When using this function you'll get something like the following XML. I highlighted the parts where you can find the information about your metadata:

<type name="CustomClass" base="Class" isDynamic="true" isFinal="true" isStatic="true">
    <extendsClass type="Class"/>
    <extendsClass type="Object"/>
    <accessor name="prototype" access="readonly" type="*" declaredBy="Class"/>
    <factory type="CustomClass">
        <metadata name="TagName">
            <arg key="param1" value="value"/>

        <extendsClass type="Object"/>
        <method name="someMethod" declaredBy="CustomClass" returnType="void">
            <metadata name="TagName2">
                <arg key="param1" value="value"/>

        <variable name="varOne" type="String">
            <metadata name="TagName3">
                <arg key="param1" value="value"/>
                <arg key="param2" value="value"/>

        <accessor name="varTwo" access="readwrite" type="String" declaredBy="CustomClass">
            <metadata name="TagName2"/>
Now you can use E4X to retrieve the values of your (and all the other) metadata.

Until now everything was quite well documented (flex-config.xml and Custom metadata) but now there's something that bothered me: Flash Builder doesn't know about all those custom metadata and won't autocomplete those tags. I found an article by Adobe that mentions something about a metadata.xml but doesn't describe the syntax of that file.

Autocompletion for custom metadata in Flash Builder:
This task is very easy too: just create a file called metadata.xml in the src folder of your project. The syntax of the file seems to be straight forward:

<?xml version="1.0" encoding="utf-8"?>
<annotations version="1.0">
    <metadata name="TagName" description="Does something.">

        <context name="class" />
        <attribute name="param1" type="String" required="false" />
    <metadata name="TagName2" description="Another one.">
        <context name="getter" />

        <context name="setter" />
        <attribute name="param1" type="int" required="false" />
As with the flex-config.xml you can find an 'example' file in the Adobe Flex Open Source project's source.

I hope this quick tutorial helped and I didn't forget anything or got my facts wrong ;)

Labels: , , ,

Monday, August 8, 2011

Bachelor of Science in Engineering

Found on Flickr
Four weeks ago – as announced – I had my final bachelor exam. It went very well and now, after my graduation ceremony, I'm officially allowed to use the title ;)

As promised, I'm uploading my bachelor thesis, so that everyone can read it. For those of you who don't speak German: I'm sorry, but there will not be an English version – I have neither the time nor the patience to translate it. If you really want to read it, please use a translator and try to understand those awful translations.
I don't expect anyone to read it, but if you do, please leave me a comment about it – even though you hated it ;)

The bachelor thesis consists of two parts and I'm going to try and find a good translation for the titles.
The first one is the theory about "Integrating a Cloud-Computing-service into an Android-App" ("Integration eines Cloud-Computing-Diensts in eine Android-Applikation"). The second part is about the project I worked on during my internship: "Interactive, Web-based visualization of complex networks of individuals/company networks for an existing CRM system " ("Interaktive, Web-basierte Visualisierung komplexer Personen/Firmen-Netzwerke eines bestehenden CRM-Systems").

Download and enjoy. Please remember: it's alright to quote but plagiarism just won't do you any good. Please don't just share the link to the file with everyone but link to this blog entry if you tell someone else about it ;)

For those who want to know under which license I published this document: it's definitively not an open source or creative commons license – just plain old copyright with the right to download, read and quote, but not modify it in any way or share it without my explicit permission.
I like open source but sometimes you have to be bitchy ;)

Labels: , ,

Friday, August 5, 2011

Coming: blabber for BlackBerry PlayBook

Today I'd like to introduce another project I just started: blabber for BlackBerry PlayBook. If you hear just the name you maybe won't know what it does, but once you know you won't forget ;)

The idea itself came up some weeks ago, when I chilled in bed and wanted to chat using my PlayBook. I realized that there is no instant messenger for the PlayBook except the BlackBerry Messenger (BBM) when you own a BlackBerry smartphone and are connected through the BlackBerry Bridge – which I don't. So last week I decided to start this new project and my first thought was, how to name it (because I needed one for the project directory ;) and I came up with blabber. Because blabber means something like "talk without thinking" it's a good name for an instant messenger. In addition the most important messaging protocol for me is Jabber (XMPP) which sounds similar.

What's the current project status?
I already implemented a lot. It's possible to manage Jabber, Google Talk and Facebook Chat accounts (all three are based on XMPP) and connect to them. After connecting blabber will load and display your contact list with your contact's statuses and inform you about status updates (at least online, away, ...). The core component, sending and receiving messages, also works – with storing of all those messages. You can also change your online status, but for now only one global status.
I tested those features using my Google Talk account only, so even if I connected to Jabber and Facebook once, I didn't yet test all those other features.

Here's a first screenshot to give you a first impression!

Behind the scenes!
Just a little look behind the scenes, because I didn't implement all by my self, of course. Blabber uses two external frameworks:

  1. XIFF for interacting with XMPP-servers and
  2. FlexORM for easier access to the database.
Of course there's a wrapper around XIFF for an easy implementation of additional protocols. Unfortunately the object relational mapping framework FlexORM isn't perfect and not maintained any more. That's a small problem, but fortunately I'm a developer so I can fix bugs and add features myself ;)

What's next?
The next things I'm going to do, are improving the usability and design, implementing new features and of course testing.
I hope the project will reach a beta status soon because then I'm going to start a private beta test. I hope you're interested in that because I need every tester I can get! If you're interested you can show me your interest right now and contact me. I'll get back to you when blabber's ready.
Also, I'm looking for icons and sounds that were released under a creative commons license, because I don't know how to product beautiful images and I know that there are some people out there that do.

There's one thing that will be missing from the app: the possibility to switch to another PlayBook app and be notified about new messages. That's because the PlayBook doesn't allow it (yet?) to run background services – only if the user changes the multitasking mode to showcase blabber will be able to run in the background. I hope this will change, because background services are something very important and without those you can't implement many handy features (I don't want the user to be disconnected each time he switches between apps).

Labels: , , , , , , ,

Wednesday, August 3, 2011

Global ignorefile for Git and SVN

Some years ago I started using SVN. I really liked it, because of the whole history and collaboration thing. But once I tried Git, I knew that I didn't want to use SVN anymore ;)
Maybe there are other reasons why to love Git (don't hesitate in telling me via comments), but what I really love is the part "distributed" in it's description. It's much more comfortable to commit to the local repository and later push it to a remote one, than having to commit it directly to a remote repository.

Now what you always need when using a version control system – whatever product you use – is a way to ignore files. I came across this problem after starting a new project some days ago (yes, a new project I'll soon announce). Using command line tools is fine but when using version control, I prefer a GUI, so I installed the Eclipse EGit plugin and wanted to make my first commit. But wait: MacOS X has the quirk to create .DS_Store files and Git wanted to add them. Of course that's not what I wanted, so I decided to add it to the .gitignore-file.
But then I remembered that I'll probably start other projects where I don't want to track those files.
Now everybody who uses Git knows, that there is one place for Git: GitHub or more specifically Help.GitHub.
There I found out, that when they developed Git they already know about my problem and implemented it: with Git it's possible to create a global .gitignore to get rid of those annoying .DS_Store-files!

Before writing this blog entry, I didn't know if this is possible with SVN because for some reason I never had this problem with SVN or at least didn't think about it. After a little research, I found out that you can add ignore-patterns to the global SVN config too. Read the SVN book and find out how.

Labels: , , , , , ,