[Android Software/Hacking General [Developers Only]] Avid Droidery:
I managed to wrestle my old workstation out of storage. ;)

Some stats

Pentium D 975 Dual Core 3.0 GHz. EM64T

4GB Ram

175 GB HITACHI SATA Gen II HD on Intel RAID Controller

FOXCONN 975X7AB MOBO

I built it back in '07 but she still runs like a champ!

Anyway just wanted to gloat a little... If you were stuck working on an android you might be as happy about your situation! Heck, I'd be happier with a knock off Chinese netbook running Windows CE 5.0. @ 255 MHz.

So what does flow? It isn't the Android API! Let's compare some code on the topic of User Interface Design and Implementation.

An application with a single button the android way:

public class MyActivity extends Activity {
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);

setContentView(R.layout.content_layout_id);

final Button button = (Button) findViewById(R.id.button_id);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// Perform action on click
}
});
}
}

Oh wait a second were not done yet! The following code belongs in a separate file:

// .... some of this document was removed to improve clarity.
<Button
android:id="button_id"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/self_destruct"
android:onClick="selfDestruct" />

Seriously all that for one f*%#&n button? :eek: It doesn't even do anything when you push it..

Ok that's uh... hmm interesting to say the least. :barf:

Let's look at the same thing in HTML+JS:

<FORM>
<INPUT TYPE="button" NAME="button" Value="Push Me" onClick="alert('I am not a killer, but don't push me!');">
</FORM>

Simpleton you say? Try this on for size:

;---------- [Create the Button Control] ----------
INVOKE CreateWindowEx, 0, addr ButtonClass, addr szButText,\
WS_CHILD or WS_VISIBLE or BS_PUSHBUTTON or BS_ICON or \
BS_LEFT or BS_VCENTER or BS_TEXT,\
100, 50, 100, 40, hWnd, 702, hInstance, 0
mov hButCtrl, eax

;---------- [Load the Image] ----------
invoke LoadIcon, hInstance, 901
mov hImage, eax
invoke SendMessage, hButCtrl, BM_SETIMAGE, IMAGE_ICON, hImage

The code above is actually just a snippet from a source file for a 32-Bit Program for Windows written in assembler. But the concept is the same. There is no code here for a click action. To make the example more interesting, this button has an icon drawn onto it.

Sure, I could provide more examples in different languages, but I believe my point is clear here.

Am I the only person here who realizes somebody screwed up when they thought of the API for this platform? I don't understand the reasoning behind this. The programmer spends more time implementing than creating under this platform. When I look at the more complicated apps that are available in the market I have to say well done! But I also have to say "I am sorry about your losses."

Honestly I don't know what to say other than "I wish I was head of R&D for Google over in Mountain View Ca." These guys obviously have no idea what they are doing.

Point and case made by example.

Who wants to collab. with me on an all HTML based GUI framework for the android? Honestly I would love to. Google says this platform is all about code reuse... Hmm... how come there is no /usr/lib directory? You can use their platform to make libraries! but they are for private use only unless you write a 12 chapter book (in code) explaining to the android what people can do with it. Of course then you have to write a real 12 chapter book for the developers on how to use the API you exposed. :barf: :barf: :barf:

Anyway to make matters worse... It is actually easier to program their platform using javascript, but in my honest opinion... It isn't worth the [bad language] trouble... Here's another code excerpt for android in JavaScript:

// a plethora of code removed to improve clarity....
var buttonRun = new Button(Activity);
buttonRun.setLayoutParams(new LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, 1));
buttonRun.setText(Droid.translate("RUN"));
buttonRun.setOnClickListener(function () {
// code to do some stuff here
});
// even more code removed to improve clarity...

If you are used to reading my posts you will have to excuse my malformed paragraphing. I am used to composing all my posts by voice recognition ;)

So what does all this mean? In regard to the thread topic, this means that you have your work cut out for you. Just look at the JavaScript code above and see how ridiculously close it is to writing a program that must be compiled. Mind you that is only the code to create ONE button. Looking back even further, it was easier in ASSEMBLER.

Ok, Android Scripting. Its more than a great Idea... It's the best Idea anyone ever created for this platform. Its too bad that an entire platform API has to be written nearly from scratch before we can take full use of it. Well, I am working on an implementation of rhino. Everything compiles smoothly from eclipse but I can't really test anything or come up with any ideas because I know I'm headed down the wrong path.

Well I brought you here for your interest so let me boost your interest.

You want GUI programming in script? Visit the following link and click on:

http://droidscript.blogspot.com/2010/03/droidscript-getting-started.html

I wonder why that project 'died' in its infancy :rolleyes: He certainly accomplished quite a bit!

LOL I was right about this platform before I ever opened the IDE! LOL