[Yanel-dev] GWT usage for AJAX features in Yanel

simon litwan simon.litwan at wyona.com
Fri Jan 11 11:14:42 CET 2008


Evaldas Taroza schrieb:
> Hi,
> We were discussing that with Simon. One should know that GWT allows 
> both server and client side development. I don't know how to deal with 
> the server side, I can only tell you that it allows you to create 
> "servlets" with methods that you can call via RPC. I am not sure how 
> and where to put it in Yanel.
>
> Client side is pretty straightforward:
> 1. You develop the JS library as a separate JAVA (GWT) project, then 
> you need to put the compiled JS files where appropriate
> 2. You develop in JAVA and then build everything together with the Yanel.
after i had a closer look at gwt i really like it.
i think the benefit of writing ajax stuff without the need of having 
knowledge of javascript is huge for a a java based cms.

what i don't like so far is the workflow as evaldas proposed it. develop 
your widget, generate js from java via gwt, copy the js over to your 
resource or content. i would appreciate if the ajax source is also 
located in the resource and gets compiled by the build of the resource 
using gwt. the yanel build process would need to have access to the gwt 
which probably could be downloaded via maven.

not sure someone agrees but i like if things are together if they belong 
together. i think it's very time consuming and increases the learning 
curve if one wants to modify a resource-type which uses ajax and first 
has to find out where the source of the ajax widget used by this 
resource is located, then download gwt to generate the new js files and 
then copy them to the resource.

cheers
simon
>
> If we decide to put GWT, and make content management more 
> AJAX-oriented, I think it is a good idea that we all sit together, I 
> show you how it works and we think on how to put it into Yanel. I 
> think not more than 2 hours would be needed for that, and another hour 
> for documenting this.
>
> Evaldas
>
> Michael Wechner wrote:
>> Evaldas Taroza wrote:
>>
>>> Hi everyone,
>>> I played with Google Web Toolkit (GWT) a bit (I used it before and 
>>> really loved it) and tried to use it in Yanel. And I liked the outcome.
>>>
>>> As you might know GWT enables AJAX development in JAVA: you develop 
>>> in JAVA, then translate everything into JavaScript. To my mind this 
>>> is valuable, because you don't need to search and learn new JS 
>>> libraries that usually don't work the way you want (modifying JS 
>>> libraries is really error prone). For instance, I find it easier to 
>>> program your own AJAXy table with GWT than learning LiveGrid and 
>>> similar JS libraries. Moreover, many widgets are already developed 
>>> and available, and everything is in JAVA! All you need is simply to 
>>> run it through a tool to get corresponding JavaScript. Well, you can 
>>> read about GWT in http://code.google.com/webtoolkit/overview.html
>>>
>>> Now a bit on how to integrate GWT into Yanel. There is at least one 
>>> way: develop a widget with GWT, compile it into JavaScript and use 
>>> it as any other JS library inside Web pages. So you can develop Web 
>>> page UI almost like Swing. For instance:
>>> <html>
>>> <body>
>>>   <script language="javascript" src="$path$/widget.for.panel1.js">
>>>   </script>
>>>   <div id="panel1">
>>>   </div>
>>>   <script language="javascript" src="$path$/widget.for.panel2.js">
>>>   </script>
>>>   <div id="panel2">
>>>   </div>
>>> </body>
>>> </html>
>>>
>>> In this example I have two panels that would have the contents 
>>> generated by respective JS. Each of them is developed with GWT (in 
>>> pure JAVA, like Swing).
>>>
>>> As far as the server side is concerned, GWT is also quite developer 
>>> friendly as it provides a fully fledged RPC API, hence the servlets 
>>> may be made more fine grained.
>>>
>>> In general, I think, that Yanel users will always want AJAXy 
>>> features, so having a nice framework for it is a step forward, and 
>>> for that I suggest GWT. 
>>
>>
>> sounds great resp. what would be the next steps to get this going?
>>
>> WDOT?
>>
>> Cheers
>>
>> Michi
>>
>>> Maybe there other alternatives?
>>>
>>> Evaldas
>>>
>>> ------------------------------------------------------------------------ 
>>>
>>>
>>> _______________________________________________
>>> Yanel-development mailing list
>>> Yanel-development at wyona.com
>>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>>  
>>>
>>
>>
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development



More information about the Yanel-development mailing list