Aria and HECL

3 views
Skip to first unread message

Erik

unread,
Oct 14, 2009, 3:40:49 AM10/14/09
to Aria
Hello,

currently I am evaluating Aria. I came across Aria this way: Thinlet
technology > XUI > Aria.
I will describe what I want to accomplish, state some general
questions and mention some small
things that I recognized. I would appreciate any comments.
(I already read parts of the user documentation.)


Goal
----------
The goal is to develop a MIDP/Midlet application, using a GUI-
abstraction, probably Aria, and a script engine, probably HECL (http://
hecl.org). I got inspired by these guys:
http://netgroup.uniroma2.it/twiki/pub/SMS/TechnicalReports/tr-move-thinlet-hecl.pdf

It is my assumption that the view and the model of application can be
described with Aria Page-XML.
HECL would be the code that implements business logic.
HECL would be added to Aria by its extension points/framework, say by
introducing an XML-tag:
<script language="hecl" id="uniqueID">...</script>
HECL would get a back-reference to Aria and hence be able to
manipulate the view and the model.
Aria would call HECL script on user generated events or actions.

This way, it should be possible to write a generic application
"framework" consisting of only a few classes
and the Aria + HECL libraries, which is able to load a whole
application via HTTP.
The application it should load is defined in Aria XML, which now also
contains HECL script.
(Of course Aria XML and HECL code could be defined in separate files
and cached later on.)
One HTTP call of the generic application framework would be sufficient
to
reload the whole application, including model, data and controller.

Can you tell me if this can be accomplished with Aria?
Or would it be extremely difficult to do this with Aria?
Is it a b/mad idea in general?


MIDP
---------------------------
Is there documentation for developing Aria-Midlets?


GUI definition
---------------------------
Is there a way to create a GUI on the fly by loading an XML file from
the server?


AriaBuilder.addValidations()
---------------------------
All code inside method is a comment. Is there a plan to add validation
for Midlets, say for whole forms
(since Midlet-Elements do not have Focus.LOST events)?


SVN-Checkout: AriaMobileMidp
---------------------------
Compilation error:
org.formaria.aria.Page
Line 55
Compilation error: field ARIA_MIDP_PApCKAGE should be
ARIA_MIDP_PACKAGE


Your Website
---------------------------
http://www.formaria.org/aria/user-guide/in-depth/package-deployment
Link on website not available:
http://www.izforge.com/izpack/
It moved to:
http://izpack.org/



Thanks!
Erik

Luan O'Carroll

unread,
Oct 14, 2009, 6:56:25 AM10/14/09
to aria-fr...@googlegroups.com
Hi Erik,

I'll need to look into the source to give you a proper answer on all
of the questions (which will take a little time). The Aria MIDP stuff
was really a prototype - hence the limited documentation, but it
should be able to support what you want.

Aria supports various scripting engine, dynamic page loading etc...
Not all the stuff, like validations was refactored for the MIDP
platform as the JVM lacked some required support as far as I recall.

Regards

Luan


2009/10/14 Erik <er...@presentec.de>:

Erik Schmitt

unread,
Oct 15, 2009, 10:01:10 AM10/15/09
to aria-fr...@googlegroups.com
Hello Luan,

I found the XML element "Scripts" beneath "XPage" inside the AriaBuilder.
I am not sure what it is meant for. Would this be the place / a good place to
add scripting support in the sense I described below?

Also, I am wondering if you plan to add scripting support in general,
say some Javascript implementation in Java or other scripting languages.
If this is the case or if others are interested in embedded scripting ability,
I would start with a HECL script add-on for Aria.

Thanks!
Erik



Luan O'Carroll schrieb:

Luan O'Carroll

unread,
Oct 15, 2009, 4:37:24 PM10/15/09
to aria-fr...@googlegroups.com
Hi Erik,

The full version of Aria supports scripting and various script engines
at various levels. On the mobile platform it was just a pronlem of
getting a suitable engine, but it there wasn't any show stopper - so
in short it should be possible.

It shouldn't be a big deal to add the support, but I would like to
bring the code back in line with the trunk of Aria so that it moves
forward with Arai and so it can make use of the normal tools (it is a
little behind at present).

If you want to try it out I'll provide whatever support I can.

Regards

Luan



2009/10/15 Erik Schmitt <er...@presentec.de>:

Luan O'Carroll

unread,
Oct 18, 2009, 11:19:21 AM10/18/09
to aria-fr...@googlegroups.com
BTW You can look at the groovy subproject to see how scripting can be
accomodated. It uses the JDKs plugin support, but something similar
should be possible for HECl (in fact the scripting support pre-dates
the JDKs support)

Erik Schmitt

unread,
Oct 23, 2009, 8:24:06 AM10/23/09
to aria-fr...@googlegroups.com
Hello Luan,

yesterday and today I added scripting support to AriaMidp
by copying a few classes from the main project and tweaking
some code. I state the two demo XML files below, which should
give an impression about my results.

It works well with WTK2.5.2/DefaultPhone. I have to test it
on a real phone yet.


Requesting a Page
-----------------
Additionally, I added support for the prefix "page:" to the
Events "method" attribute, to be able to show another page:
<Event method="page:Welcome" args="next" type="OK"/>
I assume, that you will have a different point of view regarding this,
probably by introducing a new attribute named "page". I somehow feel,
that I abused the attribute "method".


Script Execution
----------------
Calls an procedure given in the Script-tag, by loading the content
of the Script tag and simply adding the procedure call. Then the
whole script gets executed:
<Event method="${script.myProcdureCall}" args="next" type="OK"/>

Executes some script directly, this one writes "Let's exit ...":
<Event method="${script:puts {Let's exit ...}}" args="next" type="EXIT"/>


My next steps
-------------
- Add mobile specific HECL commands, like sending SMS or whatever.
- Add a HECL command to access the variables/elements of a Page from
HECL script.
- Check out NetBeans, I converted the project to Eclipse and
played around with ant/antenna. I prefer custom ant scripts.

My questions
------------
- You wrote that you wanted to refactor the AriaMidp source and update
it with the main trunk of Aria. Does it at make sense to you my source
code over in the near future?
- The license for AriaMidp is GPL. Aria itself is GPS/LGPL.
Is this done deliberately?
HECL is under license Apache 2.0.


Thanks!
Erik

-----------------------------------------------------------------
Welcome.xml
-----------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<XPage class="test.project.Welcome">
<Components>
<Ticker content="Hello World, Welcome to MIDP Aria"/>
<DateField label="Date:" date="1198368000000"/>
<Image name="myImg" label="Image:" content="/aria_icon.png"/>
<TextField label="Text Field:" content="Testing 1,2,3"/>
<Label label="A Label:" content="How did I get here?"/>
</Components>
<Events>
<Event method="${script.myProcdureCall}" args="next" type="OK"/>
<Event method="${script:puts {Let's exit ...}}" args="next" type="EXIT"/>
</Events>
<Scripts>
# Simple Procedure Call
proc myProcdureCall {} {
puts {Hello, world! From inside of the procedure in the Script tag.}
return PageTwo
}
</Scripts>
</XPage>

-----------------------------------------------------------------
PageTwo.xml
-----------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<XPage class="test.project.Welcome">
<Components>
<Ticker content="This is page TWO 2 TWO 2"/>
<TextField name="speciesField" label="Data bound value:" content="THIS SHOULD BE REPLACED!"/>
</Components>
<Events>
<Event method="page:Welcome" args="next" type="OK"/>
</Events>
<Data>
<Bind target="speciesField" source="coffee/species/1"/>
</Data>
</XPage>

Luan O'Carroll

unread,
Oct 23, 2009, 11:47:46 AM10/23/09
to aria-fr...@googlegroups.com
Hi Erik,

I can give you developer access if you like and that way you can
update the source. Let me know if that suits you (I will need you
SourceForge handle).

With regard to navigation, Aria supports method calls in the method
specification e.g.

<Event method="showPage(Welcome)" args="next" type="OK"/>

I'm not sure if this works on MIDP but see also
http://www.xoetrope.com/blog/luano/midp.

So, the syntax change may not be necessary.

One idea that might also be interesting would be to support LCDUI and
allow switch of the UI so that the same XML can be renderer on both
platforms.

I'm looking at some stuff in relation to bindings and I still have
some way to go with that before I do any significant refactoring, so
let's not let that stop you. Mostly it would be the case of adding
functionality anyhow and not so much by way of interface changes.

There are multiple licenses and one of them is MPL, which is Apache
compatibly as far as I know. I've also discussed moving to APL with
the Apache guys

Hope that helps, good to hear you made progress.

Regards

Luan



2009/10/23 Erik Schmitt <er...@presentec.de>:

Erik Schmitt

unread,
Oct 28, 2009, 12:04:30 PM10/28/09
to aria-fr...@googlegroups.com
Hello Luan,

my handle is erik987.

Building the Project in NetBeans did not work for me (sometimes I work
on a Mac and there is no complete/good WTK yet).
I prefer a more generic approach and and use an Ant/Antenna script
and will commit this inside a subdirectory.

I agree, that the syntax should be the same if possible and will
see to it.

Regards
Erik


Luan O'Carroll schrieb:

Luan O'Carroll

unread,
Oct 28, 2009, 5:51:55 PM10/28/09
to aria-fr...@googlegroups.com
Hi Erik

I've added you now, so you should have SVN access. Please keep all
changes to the AriaMobileMidp project.

Looking forward to the addition :-)

Regards

Luan

Erik Schmitt

unread,
Oct 30, 2009, 10:49:41 AM10/30/09
to aria-fr...@googlegroups.com
Hello Luan,

I changed my environment to NetBeans, to keep the change set minimal, though
I had to change the WTK version of the project from WTK2.5.2 to WTK2.5.2_01.

The committed sources provide basic Hecl support (proof-of-concept).
Have a look at HeclPage.xml and HeclPageTwo.xml.
Hecl output is written to the console inside "WILL EXECUTE HECL SCRIPT" blocks.

README.txt states how to compile Hecl.jar for Aria
(Though Hecl.jar is already included in the change set in the folder lib.)

- Hecl is able to read values from the view like TextFields or Labels.
- Hecl can be executed with soft-key events (OK, EXIT) as inline script
or it may call a Hecl procedure.

I hope, I did not break too many things in your code, which is quite extensive
... I concentrated on getting Hecl to work and will commit as I go on.

Regards,
Erik


Luan O'Carroll schrieb:

Luan O'Carroll

unread,
Oct 30, 2009, 3:50:47 PM10/30/09
to aria-fr...@googlegroups.com
Hi Erik,

I'll take a look over the weekend.

Thanks for the contribution :-)

Reagards

Luan

2009/10/30 Erik Schmitt <er...@presentec.de>:

Luan O'Carroll

unread,
Nov 1, 2009, 12:08:42 PM11/1/09
to aria-fr...@googlegroups.com
Hi Erik,

Looks like you did a good job there... well done :-)

One next step would be to separate the example from the library code,
putting it under the samples folder. Is that something you can do?

Some documentation or intro would be nice too (with screenshots). I
can give you access to formaria.org if you want to post there
directly, or cross post.

Regards

Luan

2009/10/30 Luan O'Carroll <luan.o...@gmail.com>:
>> --~--~---------~--~----~------------~-------~--~----~
>> You received this message because you are subscribed to the Google Groups "Aria" group.
>> To post to this group, send email to aria-fr...@googlegroups.com
>> To unsubscribe from this group, send email to aria-framewor...@googlegroups.com
>> For more options, visit this group at http://groups.google.com/group/aria-framework?hl=en
>> -~----------~----~----~----~------~----~------~--~---
>>
>>
>

Erik Schmitt

unread,
Nov 5, 2009, 10:26:53 AM11/5/09
to aria-fr...@googlegroups.com
Hello Luan,

I am not sure what you mean by example, as I added "only"
two XML files and no further Java code (new Aria Page or new MIDlet)
is needed to execute them. I can move them into a new top level
folder "samples/hecl", of course.

I could write a short introduction to AriaMobileMidp at the
weekend and add a basic screenshot. I already have an account at
formaria.org (Erik), you could assign write-rights to this account.

Next step would be the data binding, I have to read the Aria manual
regarding this.
> --
>
> You received this message because you are subscribed to the Google Groups "Aria" group.
> To post to this group, send email to aria-fr...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/aria-framework?hl=en.
>
>

Luan O'Carroll

unread,
Nov 5, 2009, 2:13:13 PM11/5/09
to aria-fr...@googlegroups.com
2009/11/5 Erik Schmitt <er...@presentec.de>:
> Hello Luan,
>
> I am not sure what you mean by example, as I added "only"
> two XML files and no further Java code (new Aria Page or new MIDlet)
> is needed to execute them. I can move them into a new top level
> folder "samples/hecl", of course.
>

Yes, that's what I was thinking of.

> I could write a short introduction to AriaMobileMidp at the
> weekend and add a basic screenshot. I already have an account at
> formaria.org (Erik), you could assign write-rights to this account.
>
Ok, what is your logon there?

> Next step would be the data binding, I have to read the Aria manual
> regarding this.

Let me know if I can help

>
> Regards,
>
> Erik
>

Erik Schmitt

unread,
Nov 6, 2009, 4:37:20 AM11/6/09
to aria-fr...@googlegroups.com
My handle is "Erik" :-)


Luan O'Carroll schrieb:

Erik Schmitt

unread,
Nov 9, 2009, 6:03:15 AM11/9/09
to aria-fr...@googlegroups.com
Hello Luan,

I played with the code this weekend and realized that
I need WBXML and a good loging facility for my project.

1. Aria uses nanoXML. As I need WBXML, I will use kXML2 for XML parsing.
I am not sure if kXML2 would be a good addition for Aria in general.
http://kxml.sourceforge.net/

2. I will use Microlog and again, I am not sure if this would be a good
replacement for the DebugLogger class. Microlog can log to many targets
like a socket server or the RMS storage.
http://microlog.sourceforge.net/site/

Regards,
Erik

Luan O'Carroll

unread,
Nov 9, 2009, 1:27:40 PM11/9/09
to aria-fr...@googlegroups.com
Hi Erik,

NanoXML isn't used on the MIDP project - I hand rolled a parser.
NanoXML doesn't seem to be active anymore so it's probably not a great
choice anymore. kXML doesn't look active either.

Aria on the desktop has pluggable XML support and something like that
would be ideal on the mobile platform if at all possible, but no
library seemed to stand out.

The same goes for the logging... give Microlog a try, it sounds good.

Regards

Luan

2009/11/9 Erik Schmitt <er...@presentec.de>:
Reply all
Reply to author
Forward
0 new messages