API for appcelerator Titanium Desktop

35 views
Skip to first unread message

Peter Turowskij

unread,
Jul 20, 2011, 9:27:11 AM7/20/11
to gwt4air
Hi,

I have just found GWT4Air library reading appcelerator developers
forum. Features currently listed in this library are fantastic,
especially the support of Titanium. I am very interested in writing a
cross-platform desktop/mobile application, and i believe titanium
platform does a great job in this area.
I am wondering if this library allows GWT project compilation into
HTML/CSS/JS Titanium Desktop application and are there some getting
started tutorials on this topic, describing how to compile project in
order to use it in Titanium? (available wiki pages do not consider
this problem)

Any help would be awesome.
Thanks in advance!

nino

unread,
Jul 20, 2011, 1:54:51 PM7/20/11
to gwt...@googlegroups.com
Hello,

first thank you for considering gwt4air for your development. You are right. The Gwt4Air Titanium API will enalble you to write your Titanium(Desktop) application in Java (GWT). 
Unfortunatly the documentation is not where i want it to be. I m working hard to improve that and gwt4air 2.2 will definitly be fully documented.
Neverless a tutorial for  the Titanium  API will be available by the end of the week. 

I hope  this is ok for you.

Regards,

Alain

Peter Turowskij

unread,
Jul 20, 2011, 3:08:59 PM7/20/11
to gwt4air
Hello)
Thank you very much for your quick response and concern!!!
I greatly appreciate your help. I eagerly await tutorial to get
started working!))
Best Regards,
Peter.

nino

unread,
Jul 21, 2011, 7:18:44 PM7/21/11
to gwt...@googlegroups.com
Hello Peter,

here is a small toturial. Hopefully this will help you get started.


gwt4air 2.2 will add more ressources and demos.

If you have any questions please feel free to ask,

cheers,

Alain

Alain Ekambi

unread,
Jul 22, 2011, 8:10:10 AM7/22/11
to gwt...@googlegroups.com


---------- Forwarded message ----------
From: Peter Turovskij <petertu...@gmail.com>
Date: 2011/7/22
Subject: Re: API for appcelerator Titanium Desktop
To: jazzma...@googlemail.com


Hello Alain,

Thank you very much for this getting started tutorial. It seems I already  have a basic understanding of how  titanium project can be built on gwt one.
But it relates only a frontend of application.  As for backend, for instance app engine, i have currently no clue of how to communicate with it from
client side, except of using JSON. In docs related to Adobe AIR is claimed a support for GWT RPC, is it exactly what i mean(capability of communicating with backend located in internet)
or is this something else? If it is not, are there any future plans to enable this feature and what, in your opinion, is the best way to communicate with server at the moment...

Once againg, thank you very-very much!
Best Regards,
Peter.



--


Peter Turowskij

unread,
Jul 22, 2011, 8:19:19 AM7/22/11
to gwt4air
Hello Alain,

Thank you very much for this getting started tutorial. It seems I
already have a basic understanding of how titanium project can be
built on top of the gwt one,
but it relates only a frontend of application. As for backend, for
instance app engine, i have currently no clue of how to communicate
with it from
client side, except of using JSON. In docs related to Adobe AIR is
claimed there is a support for GWT RPC, is it exactly what i
mean(capability of communicating with backend located in internet) or
is this something else? If it is not, are there any future plans to
enable this feature and what, in your opinion, is the best way to
communicate with server at this moment...

nino

unread,
Jul 22, 2011, 3:31:11 PM7/22/11
to gwt...@googlegroups.com
Hello Peter,
to communicate with the server you can use wathever makes more sence to you.
Requestbuilder, RPC. Request Factory all of them will work  in Titanium. And unlike AIR  there are no security restrictions.

I' ll set up a demo soon to illustrate that.


Cheers,

Alain

Peter Turowskij

unread,
Jul 22, 2011, 5:10:36 PM7/22/11
to gwt4air
Hello Alain.
Sorry, I hadn't read carefully previous posts in group...the example
posted by you for the case of using Adobe Air seems to work,
but there is a problem with moduleBaseURL in RemoteServiceServlet.
The MalformedURLException occurs each time I request RPC servlet:

if (moduleBaseURL != null) {
try {
modulePath = new URL(moduleBaseURL).getPath();
} catch (MalformedURLException ex) {
// log the information, we will default
servlet.log("Malformed moduleBaseURL: " + moduleBaseURL, ex);
}
}

hopefully RemoteServiceServlet doesn't stop request procceeding...
Here is the code I use to request RPC servlet:

if(Titanium.isTitaniumRuntime())
{
ServiceDefTarget endPoint = (ServiceDefTarget)
dataService;

String serviceEntryPoint = endPoint.getServiceEntryPoint();

serviceEntryPoint = "http://http://127.0.0.1:8888/titanservice/
login";


endPoint.setServiceEntryPoint(serviceEntryPoint);
}

Servlet logs this kind of message:

javax.servlet.ServletContext log: loginservice: Malformed
moduleBaseURL: app://com.titan/titan/
java.net.MalformedURLException: unknown protocol: app

in gwt.xml I added <inherits name='com.ekambi.gwt.air.core.Gwt4Air'/>
to use patched RequestBuilder

Shurely it is only a warning in app logs, but still.....maybe i am
doing something wrong?

Best Regards,
Peter.

nino

unread,
Jul 23, 2011, 2:05:22 PM7/23/11
to gwt...@googlegroups.com
Hello Peter,
unfortunately you will always get that warning while excecuting RPC calls from Titanium or AIR. 
That wont prevent the call to go through dough. But  the error is absolutely ligitim since the url  from wich you are making the request is not a valid one.
Again Titanium or AIR applications are stand alone applications. Requests coming from them will never be legal in the eyes of the URL class.

The good part is that the GWT team is aware of people using RPC from non webbased applications and only log the error instead of throwing an exception.

So to answer your question : No you are not doing anything wrong.
I d suggest to just be aware of the warning and keep building great things :)

Best,

Alain.

P.S
How do you like the Titanium Module so faar ?

Peter Turowskij

unread,
Jul 24, 2011, 3:40:09 AM7/24/11
to gwt4air
Hello Alain.
Thank you very much for your quick response! Hope there will be no
changes in RemoteServiceServlet implementation...))
Titanium module is really great, thank you very much!) I am currently
playing with DB functionality and browse library source code...
It's fantastic to be able to build web/desktop application in one go
and easily add required and available functionality into desktop
module!

I look forward to the new version of gwt4Air, hope there will be no
lack of documentation)))
Once again thank you very much for your help.
Wish you all best in your work!

Best Regards,
Peter.

nino

unread,
Jul 24, 2011, 8:43:46 AM7/24/11
to gwt...@googlegroups.com
I constantly monitoring  the implementation of  RemoteServiceServlet. If there is any code breaking change in there i ll  try to provide a patch for it.
 I m glad you like the Titanium module.

gwt4air 2.2 will add full documentation  for all modules. the next version will also  introduce some brand new features (more to that very soon) that i hope you guyz will like.
Thank you for the inputs,

Best,

Alain
Reply all
Reply to author
Forward
0 new messages