You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alexander Beening <al...@sta.ad> on 2004/07/20 10:27:19 UTC
Cocoon and Midlets
Good morning,
My name is Alexander Beening, R&D director of the Telecommunications
Service of the Principality of Andorra (STA).
Three weeks ago, I began exploring Cocoon with the intention to present
this framework as an effective tool for realizing web-based applications.
So far, I am very enthousiast and was able to find the solutions and
answers, using the Apache Cocoon web sites and a lot of contributing
people.
But now, I have a doubt, which I would present you in this mail:
To create Midlet Suites (Applications in the J2ME platform for mobile
devices), we used servlets on the server site, which send information to
the mobile device using a DataOutputStream object, obtained from the
request.getOutputStream() method in the servlet. The methods
"writeUTF(<some string>), writeInt(<some integer>) and related methods
send the information to the midlet, reading it with readUTF()... etc. at
the mobile device.
This method requires servlets, calling business logic (in our case: J2EE
/ RMI to a JBoss application server) and doing the send action to the
midlet, requesting the servlet.
I wonder if it is possible to put this in the Cocoon framework. After
studying the framework , I arrived at the following option:
In a pipeline, configuring the following:
An Action, fetching the information from the business logic (realized
and working)
A generator, taking an XSP, presenting the elements, the mobile phone
needs to feed the midlet and to present te results there (Works fine)
A transformer, creating XML (using an XSL stylesheet) with some kind of
standard tags (ex: <WriteUTF>...content...</WriteUTF>
<WriteInt>...some integer...</WriteInt>)
A serializer, taking the sax events, detecting the standard tags and
generating writeUTF() and writeInt() actions to be sent to the midlet on
the mobile phone.
My questions:
Is the presented scenario feasable or do I misunderstand the Cocoon
framework? Could somebody validate this way of working? If not, what is
the right way to create output for a Midlet?
Has somebody already done something similar?
If not. Where to find an example for writing a Serializer, doing the job?
Thank you for any response I may receive. I would be happy to share any
future development with the memebers of this community.
Alexander Beening
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon and Midlets
Posted by Upayavira <uv...@upaya.co.uk>.
Alexander Beening wrote:
> Hi, Matthew and Upayavira
>
> Thanks for the feedback. Matthew is right. A midlet sits in the mobile
> phone and uses the J2ME platform, which is a very thin JRE when you
> only have kilobytes of memory available.
>
> I could send the data as XML, but how to receive it in the phone? With
> writeUTFin the server, you have readUTF at J2ME and all works fine!
> Anyhow, let me study again the J2ME APIs to see if another format
> (XML?) can be processed in J2ME.
>
Or, depending upon how this WriteUTF and readUTF work, you could try
just using the TextSerializer. Presumably readUTF just reads one line of
UTF8 encoded text? Surely the TextSerializer can handle that?
Regards, Upayavira
> I'll keep you informed!
> Thanks again and good luck,
> Alexander
>
>> I think Alexander is talking more about sending the midlet data.
>> Midlets are
>> small Java programs that run on/inside your mobile phone. I guess
>> Alexander
>> wants them to communicate with a Cocoon based server - whereby Cocoon
>> recieves data from the midlet, processes it and then sends new data
>> back to
>> the midlet.
>>
>> Alexander: Why not send the midlet data in an XML format?
>>
>> Matthew Langham
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon and Midlets
Posted by Alexander Beening <al...@sta.ad>.
Hi, Matthew and Upayavira
Thanks for the feedback. Matthew is right. A midlet sits in the mobile
phone and uses the J2ME platform, which is a very thin JRE when you only
have kilobytes of memory available.
I could send the data as XML, but how to receive it in the phone? With
writeUTFin the server, you have readUTF at J2ME and all works fine!
Anyhow, let me study again the J2ME APIs to see if another format (XML?)
can be processed in J2ME.
I'll keep you informed!
Thanks again and good luck,
Alexander
>I think Alexander is talking more about sending the midlet data. Midlets are
>small Java programs that run on/inside your mobile phone. I guess Alexander
>wants them to communicate with a Cocoon based server - whereby Cocoon
>recieves data from the midlet, processes it and then sends new data back to
>the midlet.
>
>Alexander: Why not send the midlet data in an XML format?
>
>Matthew Langham
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Cocoon and Midlets
Posted by Matthew Langham <ml...@s-und-n.de>.
>
> But aren't midlets java code? How would you generate a midlet
> from an XML stream?
>
I think Alexander is talking more about sending the midlet data. Midlets are
small Java programs that run on/inside your mobile phone. I guess Alexander
wants them to communicate with a Cocoon based server - whereby Cocoon
recieves data from the midlet, processes it and then sends new data back to
the midlet.
Alexander: Why not send the midlet data in an XML format?
Matthew Langham
> Regards, Upayavira
>
> Alexander Beening wrote:
>
> > Good morning,
> >
> > My name is Alexander Beening, R&D director of the
> Telecommunications
> > Service of the Principality of Andorra (STA).
> > Three weeks ago, I began exploring Cocoon with the intention to
> > present this framework as an effective tool for realizing web-based
> > applications.
> >
> > So far, I am very enthousiast and was able to find the
> solutions and
> > answers, using the Apache Cocoon web sites and a lot of
> contributing
> > people.
> >
> > But now, I have a doubt, which I would present you in this mail:
> >
> > To create Midlet Suites (Applications in the J2ME platform
> for mobile
> > devices), we used servlets on the server site, which send
> information
> > to the mobile device using a DataOutputStream object, obtained from
> > the request.getOutputStream() method in the servlet. The methods
> > "writeUTF(<some string>), writeInt(<some integer>) and related
> > methods send the information to the midlet, reading it with
> > readUTF()... etc. at the mobile device.
> >
> > This method requires servlets, calling business logic (in our case:
> > J2EE / RMI to a JBoss application server) and doing the
> send action to
> > the midlet, requesting the servlet.
> >
> > I wonder if it is possible to put this in the Cocoon
> framework. After
> > studying the framework , I arrived at the following option:
> >
> > In a pipeline, configuring the following:
> >
> > An Action, fetching the information from the business logic
> (realized
> > and working) A generator, taking an XSP, presenting the
> elements, the
> > mobile phone needs to feed the midlet and to present te
> results there
> > (Works fine) A transformer, creating XML (using an XSL stylesheet)
> > with some kind
> > of standard tags (ex: <WriteUTF>...content...</WriteUTF>
> > <WriteInt>...some integer...</WriteInt>) A serializer,
> taking the sax
> > events, detecting the standard tags and generating writeUTF() and
> > writeInt() actions to be sent to the midlet on the mobile phone.
> >
> > My questions:
> > Is the presented scenario feasable or do I misunderstand the Cocoon
> > framework? Could somebody validate this way of working? If
> not, what
> > is the right way to create output for a Midlet?
> > Has somebody already done something similar?
> > If not. Where to find an example for writing a Serializer,
> doing the job?
> >
> > Thank you for any response I may receive. I would be happy to share
> > any future development with the memebers of this community.
> >
> > Alexander Beening
> >
> >
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon and Midlets
Posted by Upayavira <uv...@upaya.co.uk>.
Alexander,
From a cursory reading of your requirements, creating a serialiser
seems sensible. If you can happily generate a midlet from a SAX stream,
then this seems like a perfectly reasonable thing to do, and may well
even make a good addition to Cocoon itself.
But aren't midlets java code? How would you generate a midlet from an
XML stream?
Regards, Upayavira
Alexander Beening wrote:
> Good morning,
>
> My name is Alexander Beening, R&D director of the Telecommunications
> Service of the Principality of Andorra (STA).
> Three weeks ago, I began exploring Cocoon with the intention to
> present this framework as an effective tool for realizing web-based
> applications.
>
> So far, I am very enthousiast and was able to find the solutions and
> answers, using the Apache Cocoon web sites and a lot of contributing
> people.
>
> But now, I have a doubt, which I would present you in this mail:
>
> To create Midlet Suites (Applications in the J2ME platform for mobile
> devices), we used servlets on the server site, which send information
> to the mobile device using a DataOutputStream object, obtained from
> the request.getOutputStream() method in the servlet. The methods
> "writeUTF(<some string>), writeInt(<some integer>) and related
> methods send the information to the midlet, reading it with
> readUTF()... etc. at the mobile device.
>
> This method requires servlets, calling business logic (in our case:
> J2EE / RMI to a JBoss application server) and doing the send action to
> the midlet, requesting the servlet.
>
> I wonder if it is possible to put this in the Cocoon framework. After
> studying the framework , I arrived at the following option:
>
> In a pipeline, configuring the following:
>
> An Action, fetching the information from the business logic (realized
> and working)
> A generator, taking an XSP, presenting the elements, the mobile phone
> needs to feed the midlet and to present te results there (Works fine)
> A transformer, creating XML (using an XSL stylesheet) with some kind
> of standard tags (ex: <WriteUTF>...content...</WriteUTF>
> <WriteInt>...some integer...</WriteInt>)
> A serializer, taking the sax events, detecting the standard tags and
> generating writeUTF() and writeInt() actions to be sent to the midlet
> on the mobile phone.
>
> My questions:
> Is the presented scenario feasable or do I misunderstand the Cocoon
> framework? Could somebody validate this way of working? If not, what
> is the right way to create output for a Midlet?
> Has somebody already done something similar?
> If not. Where to find an example for writing a Serializer, doing the job?
>
> Thank you for any response I may receive. I would be happy to share
> any future development with the memebers of this community.
>
> Alexander Beening
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org