Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why is it I have to supply interface not the implementation to GWT.create()?

 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I am new to GWT and having many doubts in my mind. I don't know what to answer if anyone asks me. So the questions are

1. Why should I supply an interface to GWT.create() method, instead of supplying the implementation or something else?
2. Why should I create a Async interface again? As of now I am assuming that the async interface tells to the GWT environment that there must be an ajax function in the generated javascript file for all methods declared in the async file.
3. Now the question is, why can't GWT itself create an async interface of its own when all the methods in service and async are same?
4. Why should I make a reference to the async interface like this Async rpc = GWT.create(Service.class);
5. Lastly, what is this pattern/design/architecture or what ever it is?

I can't find the answers on developers.google.com or may be I dint notice them. But I searched hardly and got no answers in the official site.

Can anyone please explain these question? It would be very very useful for me to better understand GWT and not blindly following some set of rules.

Thank you all in advance. Have a good day.
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody there who can help me?
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi al, I am trying to get help from google. But there is no related information there or may be I don't know which key to each for. Can anyone please answer my questions?

Thank you all in advance.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chaitanya karthikk wrote:Hi al, I am trying to get help from google. But there is no related information there or may be I don't know which key to each for. Can anyone please answer my questions?


Given that no one has replied yet, then either no one knows the answer to your questions or they don't understand the question or whatever other reason. Repeatedly bumping the thread isn't going to do much other than annoy some others.
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The questions are straight forward. Can you please tell me you understood or not. Or I will create individual questions or I will explain the question again in the same thread.

How can I know whether someone is able to understand my question or not/don't know what I am asking/not interested in answering.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chaitanya karthikk wrote:The questions are straight forward. Can you please tell me you understood or not.

I have no knowledge of GWT.


chaitanya karthikk wrote:
How can I know whether someone is able to understand my question or not/don't know what I am asking/not interested in answering.

Sometimes others might ask for clarifications if they don't understand the question. But that doesn't happen always. That's how volunteer driven forums are. It's ultimately upto them to decide whether or not they want to answer any questions.
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay Mr. Jai, I think I will have to raise individual threads. Thank you.
 
Jinal Prakas Shah
Ranch Hand
Posts: 39
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's simple. so that it can have a generic object created rather than a specific class object. You can use it for all further uses.
 
Jinal Prakas Shah
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This design pattern is RPC(Remote Procedure Call).
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Mr. Jinal
 
Jinal Prakas Shah
Ranch Hand
Posts: 39
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem Mr. Chaitanya glad I could help.

Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic