Thursday, May 26, 2011

Re: using GWT with flex?

Well one the selling argument of most  GWT-based framework  is "no plug in required" or "based on open standard"
And i think it s a good one.
Flex needs Flash and since Steve Jobs was so nice to Flash the popularity of Flash is schrinking a bit :)

Also because there is no way around MXML/AS3 to build Flex applications(atleast until gwt4air), The UI of your application and  the backend will be implemented in different languages, meaning you will need a middleware like Blase DS  to  pass objects from and to the UI .
Blase DS is great but no middleware at all is even greater. With GWT no need of a middleware. And if  the backend is implemented in Java, GWT becomes superrocket :)

And if you want to integrate a Flex UI Element in an existing HTML/JS/CSS  based application you get into serious troubles(for the reasons i said in one of my post). One of our customer wanted to have a grid component like this one : http://www.gwt4air.appspot.com/#com.iwobanas.controls.MDataGrid
with live search and PDF and Excel export. We could not  find a good GWT-based solution for that. So we found ourself embedding the Flex compoment in the GWT application and having some nightmares maintaining that. Then i thought "man if i could just do this using a single GWT API :) "


Personally i think Flex is more powerfull then any GWT library out there.(And i ve tried them all)
The richness and  the features of Flex are just not matched(yet)
But because of MXML/AS3 flex was kind of a no go for Java projects.
Hopefully gwt4air will bring more GWT developer to discover the power of Flex.


2011/5/26 Jay Roy <jaggernat@gmail.com>
>>> If i  understand what you mean,  you want to repopulate the grid everytime the data are updated in the backend right ?
 
exactly. yes i think u r right i can do it using timer object. so i am guessing flex does provide asynchronous support in its own way :)
I would be curious to see what an AJAX framework like GWT can do which flex cant.
 
thanks for your input.


 
On Wed, May 25, 2011 at 9:34 PM, Alain Ekambi <jazzmatadazz@googlemail.com> wrote:
 If i  understand what you mean,  you want to repopulate the grid everytime the data are updated in the backend right ?

I think Blase DS does not support pushing Data to the client. Atleast not the  free version.

A solution could be to set up a timer that will  poll data from the backend every 5s ?
I think  you can do that  in as3

Dont get me wrong i dont want to keep you from using GWT, i just think that in your case there is a solution that is more effcient and esay to maintain then using GWT. But if you dont mind having some overhead  plus a  language explosion (MXML/AS3, JS, Java)  and architecture problem in your project. I can tell you what our first solution to solve this type of problem was

2011/5/26 Jay Roy <jaggernat@gmail.com>

let me explain with a simple example
We have a flex screen with a data grid. The data in data grid is populated with java collection. The java collection contains stock data which comes from backend.  In the backend every 0.5 second the stock data in collection is updated(we get market feed of data).

so every 0.5 second we need to refresh the flex data grid and update it with the backend data.

So the question now is we need to make a asynch call every 0.5 sec to fetch the updated data.

I am using blazeds to get the java collection but i dont think blazeds can be used to make asynchronous calls. That is where we want to use ajax to make the asynchronous call every 0.5 sec.

thanks.

On Wed, May 25, 2011 at 8:32 PM, Alain Ekambi <jazzmatadazz@googlemail.com> wrote:
What exactly  do you mean  with "incorporate ajax" ? 
Do you mean making async  call to the server ? 
If  yes cant you do that with Blase DS ?

Like i said before i dont know  if the road mxml/as ->External Interface -> js ->  gwt -> backend  and  back is effective
because  you are adding  a lot of overhead just to call methods in the backend.



2011/5/26 Jay <jaggernat@gmail.com>
Thanks for response. We are already using blazeds to communicate with our remote spring services. Our present architecture:
Flex talks to backend java objects using spring blazeds.

I want to incorporate ajax so What I had in mind is
Flex mxml/as screen invokes JavaScript invokes java backend?
Would that be correct?

Thanks

On May 25, 2011, at 5:58 PM, Alain Ekambi <jazzmatadazz@googlemail.com> wrote:

Well the suggestion  was for the "Integrating Flex with GWT part". 

If you come from Flex learning GWT should not  be a  big problem because the development model is very similar.
The official GWT Documentation is always a good point to start: http://code.google.com/webtoolkit/doc/latest/DevGuide.html
And if you are really really stucked there is a guy called Thomas Broyer here in the community. You cant miss him :)

Making a GWT RPC call from an AS3/MXML based  Flex application is not that easy and adds a lot of  overhead to your application.

We had the same issue with one of our Flex applications. This is one of the reasons that motivated me to create a GWT API for Flex, so one could use Java everywhere instead of mixing MXML/AS3(Flex UI), JavaScript(External Interface to communicate with the GWT ) and Java(GWT +  backend)

If your Flex application is MXML/AS3 based the best way should be to use something like Blase DS.

If you want to use a GWT API to build a Flex application  you can  have a look at gwt4air.

Best,

Alain




2011/5/25 Alain Ekambi <jazzmatadazz@googlemail.com>
May i suggest you Gwt4Air ? :)
http://code.google.com/p/gwt4air/


2011/5/25 Jaggernat <jaggernat@gmail.com>
hi guys

I need to learn GWT and impliment a simple solution using GWT. I come
from flex background.
can anyone point me what the important concepts in GWT is? and in what
order do i learn?

Goal:
we are currently developeing a trading app using flex screens but we
want to use ajax framework GWT to make the asynchronous backend calls
to our spring-java backend.
(Is using flex  Fabridge an option to integrate GWT with flex?)

any help greatly appreciated
thanks.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--





--


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment