You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ryan How <ry...@zbit.net.au> on 2013/05/28 05:24:52 UTC

Can tapestry run on Android

Hi,

I was just wondering before I look too closely if anyone knows if a 
Tapestry webapp can run on Android?

I see there is an Android port of Jetty.

Thanks, Ryan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Muhammad Gelbana <m....@gmail.com>.
OT: Why would you want to host a web application on android ? Why not just
linux ?
Also tapestry IoC can be used independently from a servlet container. I've
done it on windows but not on android though.


On Tue, May 28, 2013 at 11:19 AM, Massimo Lusetti <ml...@gmail.com>wrote:

> On Tue, May 28, 2013 at 10:27 AM, Lance Java <lance.java@googlemail.com
> >wrote:
>
>
> >
> >
> https://github.com/apache/tapestry-5/tree/master/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm
> >
> >
> Didn't mean to hijack the thread, just a note to say the github mirror is
> ways behind the current repo, the github one is based on the old  git://
> git.apache.org/tapestry-5.git and it should be modified to reflect the
> current settings.
>
> Cheers
> --
> Massimo Lusetti
>

Re: Can tapestry run on Android

Posted by Massimo Lusetti <ml...@gmail.com>.
On Tue, May 28, 2013 at 10:27 AM, Lance Java <la...@googlemail.com>wrote:


>
> https://github.com/apache/tapestry-5/tree/master/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm
>
>
Didn't mean to hijack the thread, just a note to say the github mirror is
ways behind the current repo, the github one is based on the old  git://
git.apache.org/tapestry-5.git and it should be modified to reflect the
current settings.

Cheers
-- 
Massimo Lusetti

Re: Can tapestry run on Android

Posted by Lance Java <la...@googlemail.com>.
I see that there is an ASMDEX project, this is probably the easiest option
to get plastic working on dalvik

http://asm.ow2.org/doc/tutorial-asmdex.html

You must be note that the tapestry build includes a repackaged copy of the
ASM libraries

https://github.com/apache/tapestry-5/tree/master/plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm

I think that the only difference is the package name so that tapestry's
version of ASM does not clash with hibernate etc. Best to check with the
tapestry team if you plan to go down this route.

Good luck!

Re: Can tapestry run on Android

Posted by Ryan How <ry...@zbit.net.au>.
That's true. I didn't think of that.

I'm running tapestry 5.1 for this particular app (I'm wanting to port an 
app over to android), I think it uses something else for byte code 
manipulation, but it is still byte code and hence not dalvik compatible :(

And byte code manipulation is pretty core to Tapestry, so I guess there 
isn't really much hope of getting it going, not unless there is an 
Android version of ASM (or whatever it is using, javassist?, I can't 
remember) ?

Or would it be possible to get Tapestry to pre-generate the byte code 
rather than at runtime?

Thanks, Ryan


On 28/05/2013 3:52 PM, Lance Java wrote:
> Tapestry uses ASM under the hood for it's runtime byte code manipulation
> magic. I'm pretty sure that this would fail on dalvik.
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Lance Java <la...@googlemail.com>.
Tapestry uses ASM under the hood for it's runtime byte code manipulation
magic. I'm pretty sure that this would fail on dalvik.

Re: Can tapestry run on Android

Posted by Ryan How <ry...@zbit.net.au>.
On 28/05/2013 8:44 PM, Thiago H de Paula Figueiredo wrote:
> On Tue, 28 May 2013 09:11:56 -0300, Ryan How <ry...@zbit.net.au> wrote:
>
>> Yes, but the bytecode enhancement that tapestry does, it wouldn't be 
>> able to be understood by the Dalvik JVM? As is my understanding. I 
>> just don't want to spend a lot of time getting it set up, then have 
>> no possibility of it working :)
>
> Hmm, I forgot about the bytecode enhancement, but I was thinking about 
> running it in a JVM anyway. If you can root an Android installation, 
> you can access the Linux underneath it.
True, but it lacks most of the linux core libraries (eg. glibc), so you 
can't install Java SE Embedded on there, or most other things, without 
porting it.
>
>> Just to satisfy curiosity :).
>
> Curiosity rules! :)
>
>> We have a web app built with tapestry and a mobile app that goes 
>> along with it. The mobile app runs offline then syncs with the main 
>> app. It shares a lot of code, including the tapestry interface. So it 
>> runs it's own tapestry server, and uses an embedded web browser 
>> (xulrunner) to connect to it. It was a lot simpler in development 
>> doing it this way than re-writing all the user interface for offline 
>> support.
>
> Ah, now everything makes sense. :)
>
>> But this was before arm tablets were readily available. So we ran it 
>> on Windows tablets. But these days a decent rugged windows tablet 
>> (doesn't actually exist haha) is about $4000, whereas I can get a 
>> galaxy note and a waterproof case for $500 which will do the job.
>
> Interesting. :) Now I'm curious on what the application is. :D
Custom built app for a lab that does environmental monitoring. So it 
isn't widespread, hence why I don't want to spend lots of money :). 
Usually with custom built software it is the software cost that gets out 
of control, in this case it is the hardware cost (If we can easily port 
it over)
>
>> So we are looking at the cheapest way to port it over to android, but 
>> I guess an alternative would be linux.
>
> So I guess my next question would be answered: does it need to run or 
> Android specifically or in ARM devices? For Android, I'm not sure, but 
> for ARM devices, the answer is a huge yes. :)
>
> If you need it for Android, I'm almost sure there's some way to 
> precompile the page and components transformations so you could use 
> JVM-bytecode-to-Dalvik bytecode converter, just that it wasn't done yet.
>
Ideally android, because the manufacturers don't usually support 
anything else for the majority of ARM tablets. But I might try running 
linux first on an ARM tablet and see how it goes. Might be missing some 
drivers I suspect. But I can live with that as long wifi and the screen 
work and battery life remains decent.

Then tapestry modifications can be secondary :)

I guess last off would be to re-write the user interface to not use 
tapestry, but it works really well at the moment and would cost a bit to 
rewrite it all. Also then we've have to maintain 2 UIs, one mobile and 
one for the main system.

Thanks, Ryan




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 28 May 2013 09:11:56 -0300, Ryan How <ry...@zbit.net.au> wrote:

> Yes, but the bytecode enhancement that tapestry does, it wouldn't be  
> able to be understood by the Dalvik JVM? As is my understanding. I just  
> don't want to spend a lot of time getting it set up, then have no  
> possibility of it working :)

Hmm, I forgot about the bytecode enhancement, but I was thinking about  
running it in a JVM anyway. If you can root an Android installation, you  
can access the Linux underneath it.

> Just to satisfy curiosity :).

Curiosity rules! :)

> We have a web app built with tapestry and a mobile app that goes along  
> with it. The mobile app runs offline then syncs with the main app. It  
> shares a lot of code, including the tapestry interface. So it runs it's  
> own tapestry server, and uses an embedded web browser (xulrunner) to  
> connect to it. It was a lot simpler in development doing it this way  
> than re-writing all the user interface for offline support.

Ah, now everything makes sense. :)

> But this was before arm tablets were readily available. So we ran it on  
> Windows tablets. But these days a decent rugged windows tablet (doesn't  
> actually exist haha) is about $4000, whereas I can get a galaxy note and  
> a waterproof case for $500 which will do the job.

Interesting. :) Now I'm curious on what the application is. :D

> So we are looking at the cheapest way to port it over to android, but I  
> guess an alternative would be linux.

So I guess my next question would be answered: does it need to run or  
Android specifically or in ARM devices? For Android, I'm not sure, but for  
ARM devices, the answer is a huge yes. :)

If you need it for Android, I'm almost sure there's some way to precompile  
the page and components transformations so you could use  
JVM-bytecode-to-Dalvik bytecode converter, just that it wasn't done yet.

-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Ryan How <ry...@zbit.net.au>.
On 28/05/2013 7:48 PM, Thiago H de Paula Figueiredo wrote:
> On Tue, 28 May 2013 00:39:22 -0300, Chris Cureau <cm...@gmail.com> 
> wrote:
>
>> Tapestry itself runs on a web container, like tomcat. The served 
>> pages will operate in chrome in android and probably firefox as well, 
>> though I haven't tested it there.
>
> You're mixing apples and oranges here. First you talked about where 
> Tapestry can run, then, in the second sentence, talked about where 
> Tapestry pages can be viewed.
>
> Answer to the original question: as long there's a servlet container 
> running in Android, you can run Tapestry on it just fine.
>
Yes, but the bytecode enhancement that tapestry does, it wouldn't be 
able to be understood by the Dalvik JVM? As is my understanding. I just 
don't want to spend a lot of time getting it set up, then have no 
possibility of it working :)

> Question to the original question: why?
>

Just to satisfy curiosity :). We have a web app built with tapestry and 
a mobile app that goes along with it. The mobile app runs offline then 
syncs with the main app. It shares a lot of code, including the tapestry 
interface. So it runs it's own tapestry server, and uses an embedded web 
browser (xulrunner) to connect to it. It was a lot simpler in 
development doing it this way than re-writing all the user interface for 
offline support.

But this was before arm tablets were readily available. So we ran it on 
Windows tablets. But these days a decent rugged windows tablet (doesn't 
actually exist haha) is about $4000, whereas I can get a galaxy note and 
a waterproof case for $500 which will do the job.

So we are looking at the cheapest way to port it over to android, but I 
guess an alternative would be linux.






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 28 May 2013 00:39:22 -0300, Chris Cureau <cm...@gmail.com>  
wrote:

> Tapestry itself runs on a web container, like tomcat. The served pages  
> will operate in chrome in android and probably firefox as well, though I  
> haven't tested it there.

You're mixing apples and oranges here. First you talked about where  
Tapestry can run, then, in the second sentence, talked about where  
Tapestry pages can be viewed.

Answer to the original question: as long there's a servlet container  
running in Android, you can run Tapestry on it just fine.

Question to the original question: why?

-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Ryan How <ry...@zbit.net.au>.
On 28/05/2013 7:49 PM, Thiago H de Paula Figueiredo wrote:
> On Tue, 28 May 2013 00:44:02 -0300, Ryan How <ry...@zbit.net.au> wrote:
>
>> Sorry, just to clarify a bit I mean hosting it on Android. There is a 
>> port of Jetty for Android, so will it run in that, but does Tapestry 
>> require some libs that aren't on android?
>
> No. Tapestry only needs Java libraries, so, if you have a servlet 
> container running, you have a JVM and you can run Tapestry on it.
>

We were thinking the bytecode enhancement that tapestry does wouldn't 
work because android runs on Dalvik. I guess I'll try it?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 28 May 2013 00:44:02 -0300, Ryan How <ry...@zbit.net.au> wrote:

> Sorry, just to clarify a bit I mean hosting it on Android. There is a  
> port of Jetty for Android, so will it run in that, but does Tapestry  
> require some libs that aren't on android?

No. Tapestry only needs Java libraries, so, if you have a servlet  
container running, you have a JVM and you can run Tapestry on it.

-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Ryan How <ry...@zbit.net.au>.
Thanks. I will try it, just doing some preliminary investigation before 
investing some time. I haven't done any android development before, so I 
only know the basic theory.

Thanks, Ryan

On 28/05/2013 11:53 AM, Kalle Korhonen wrote:
> On Mon, May 27, 2013 at 8:44 PM, Ryan How <ry...@zbit.net.au> wrote:
>
>> Sorry, just to clarify a bit I mean hosting it on Android. There is a port
>> of Jetty for Android, so will it run in that, but does Tapestry require
>> some libs that aren't on android?
>>
> The bare bones Tapestry should run fine. It's very simple to test, why
> don't you just try it? Depending on the target version of Android, you may
> have some issues with libraries trying to use unsupported operations of the
> VM but on recent versions it should all just work.
>
> Kalle
>
>
>
>> On 28/05/2013 11:39 AM, Chris Cureau wrote:
>>
>>> Tapestry itself runs on a web container, like tomcat. The served pages
>>> will
>>> operate in chrome in android and probably firefox as well, though I
>>> haven't
>>> tested it there.
>>>
>>> You can also use jQuery mobile for added capabilities, but a dedicated
>>> project like tapestry-jQuery doesn't exist yet as far as I know.
>>> On May 27, 2013 10:25 PM, "Ryan How" <ry...@zbit.net.au> wrote:
>>>
>>>   Hi,
>>>> I was just wondering before I look too closely if anyone knows if a
>>>> Tapestry webapp can run on Android?
>>>>
>>>> I see there is an Android port of Jetty.
>>>>
>>>> Thanks, Ryan
>>>>
>>>>
>>>> ------------------------------****----------------------------**
>>>> --**---------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>>> <us...@tapestry.apache.org>
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
>>
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Kalle Korhonen <ka...@gmail.com>.
On Mon, May 27, 2013 at 8:44 PM, Ryan How <ry...@zbit.net.au> wrote:

> Sorry, just to clarify a bit I mean hosting it on Android. There is a port
> of Jetty for Android, so will it run in that, but does Tapestry require
> some libs that aren't on android?
>

The bare bones Tapestry should run fine. It's very simple to test, why
don't you just try it? Depending on the target version of Android, you may
have some issues with libraries trying to use unsupported operations of the
VM but on recent versions it should all just work.

Kalle



> On 28/05/2013 11:39 AM, Chris Cureau wrote:
>
>> Tapestry itself runs on a web container, like tomcat. The served pages
>> will
>> operate in chrome in android and probably firefox as well, though I
>> haven't
>> tested it there.
>>
>> You can also use jQuery mobile for added capabilities, but a dedicated
>> project like tapestry-jQuery doesn't exist yet as far as I know.
>> On May 27, 2013 10:25 PM, "Ryan How" <ry...@zbit.net.au> wrote:
>>
>>  Hi,
>>>
>>> I was just wondering before I look too closely if anyone knows if a
>>> Tapestry webapp can run on Android?
>>>
>>> I see there is an Android port of Jetty.
>>>
>>> Thanks, Ryan
>>>
>>>
>>> ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>> <us...@tapestry.apache.org>
>>> >
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Can tapestry run on Android

Posted by Ryan How <ry...@zbit.net.au>.
Sorry, just to clarify a bit I mean hosting it on Android. There is a 
port of Jetty for Android, so will it run in that, but does Tapestry 
require some libs that aren't on android?

Thanks, Ryan

On 28/05/2013 11:39 AM, Chris Cureau wrote:
> Tapestry itself runs on a web container, like tomcat. The served pages will
> operate in chrome in android and probably firefox as well, though I haven't
> tested it there.
>
> You can also use jQuery mobile for added capabilities, but a dedicated
> project like tapestry-jQuery doesn't exist yet as far as I know.
> On May 27, 2013 10:25 PM, "Ryan How" <ry...@zbit.net.au> wrote:
>
>> Hi,
>>
>> I was just wondering before I look too closely if anyone knows if a
>> Tapestry webapp can run on Android?
>>
>> I see there is an Android port of Jetty.
>>
>> Thanks, Ryan
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Can tapestry run on Android

Posted by Chris Cureau <cm...@gmail.com>.
Tapestry itself runs on a web container, like tomcat. The served pages will
operate in chrome in android and probably firefox as well, though I haven't
tested it there.

You can also use jQuery mobile for added capabilities, but a dedicated
project like tapestry-jQuery doesn't exist yet as far as I know.
On May 27, 2013 10:25 PM, "Ryan How" <ry...@zbit.net.au> wrote:

> Hi,
>
> I was just wondering before I look too closely if anyone knows if a
> Tapestry webapp can run on Android?
>
> I see there is an Android port of Jetty.
>
> Thanks, Ryan
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>