Hey everyone,

I'm pretty new to Android development, but I'm experienced with Java, C
++, and PHP, so I've been able to pick up a working knowledge pretty
quickly.

I'm looking for feedback on something I've begun to create,
specifically for my needs but definitely with potential for the
general Android development community. It's a simple markup language
that can designate layout and behavior for apps in a way that is very
easy to write but directly uses the native UI. It's a set of template
layout files (in /res/layout) and classes (in /src) that you include
in your project to enable this functionality. The implementation code
you have to write to use it is very, very simple.

My goal is to be able to have an app that is structurally built using
native code, but where the content, layout, and behavior are
controlled by an external source (a web service in my case). That way,
the app behavior will change automatically as the web service is
updated to include new features. I have seen tools like Rhomobile and
Appcelerator, and while they are great for certain needs, they don't
do exactly what I'm looking for.

I've called the code library that I'm working on "AML", for App Markup
Language. It's simple, structured XML that the code parses and
dynamically builds layouts and views from. It's definitely still in
its infancy; there are no specifications or documentation yet, and it
is still missing a lot of important features (specifically, dealing
with events and processing inputted data). But hey, for being only
four days old, I'm really pleased with how it's come out so far.

For a few more details and some example code and screenshots, go here:
http://www.sectorfej.net/2010/07/10/rapid-android-development-with-aml

A sample snippet of AML looks like this: (hopefully the formatting
won't break in the post)

<aml>
  <input type="button">Test Button</input>
  <input type="checkbox">Test CheckBox</input>
  <input type="togglebutton" checked="yes" />
  <input type="imagebutton" image="drawable/icon" />
  <input type="text">Test Text</input>
  <input type="password">Test Password</input>
  <radiogroup>
    <input type="radiobutton" checked="yes">Radio Button 1</input>
    <input type="radiobutton">Radio Button 2</input>
    <input type="radiobutton">Radio Button 3</input>
  </radiogroup>
</aml>

It's WAY simpler than the /res/layout XML you'd have to build (the
linked page shows what it would look like there for comparison). It
feels a lot like HTML, but it isn't quite the same. It is very simple
and straightforward though, and supports features like font size and
color, background colors, tables (with colspan), alignment and
padding. I'm working on more critical features now, like specifying
multiple activities and being able to switch between them.

I'm sure that AML can't solve every problem, and a lot of native code
will still be required for certain kinds of applications. It isn't
going to be able to simply everything you can do with Android (games
come to mind). But for data-centric apps, or especially apps that are
primarily just mobile interfaces to web services, it could be a huge
help, especially as more features are added.

I have two questions for all of you here:

1. Would you use this for your own app?

2. What would it need to do in order to be most useful?

I usually only think of the features I need, but I know I'll be
missing out on a lot if that's all I do. So please, feel free to give
any feedback, comments, suggestions, or otherwise. If you know of
another project that is doing something similar to this, I'd be really
interested in it. I googled for a bit but didn't see anything like it.

Overall, I do have to say that coding for Android is a lot of fun.
Seriously. I was a little worried a first, but not anymore.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to