On Wed, Jan 28, 2009 at 8:10 AM, asdf_asdf <denis.ergashb...@gmail.com> wrote: > I am new to GWT and evaluate it currently. Just happily went through > the official tutorial and full of questions taunting my mind. > Just a quick background (should my question seem a bit messy): I am > coming from php field and have in past have been using a mvc framework > (CodeIgniter) where links/forms on a single webpage are mapped to > methods of a controller responsible for calling buisiness logic and > putting together view components. So... > > * Is MVC the recommended design pattern to develop GWT applications? I > see then the class implementing EntryPoint interface as being a > "controller", but what would be a view in that case? I am struggling > to understand the relationship between html-page and the controller > that gets called: does each controller get called by the html-page > that loads the appropriate javascript file and how could a controller > have methods mapped to specific a user actions. For instance, after a > specific link is clicked a new widget is shown (in the tutorial this > is achieved through listeners, but can there be a url to method > mapping as well)? > > * In respect to tutorial, what does the attribute path="/stockPrices" > in <servlet> xml tag mean and the identical annotation > @RemoteServiceRelativePath("stockPrices") in service interface? I > assume that the server-side method gets called when under that url, > but how is the client aware of the mapping? > > * So far I have only seen tutorials on implementing relatively easy > projects. Does anyone know if there a more powerful sample application > with open source available: something where there is a need for more > than one html-page and controller exist?
It seems you're missing a pretty fundamental difference between GWT apps and apps built with almost any other major web platform: with GWT it's all client side. Now, nothing's ever as simple as that, but it's a good first approximation in this case. With server-side frameworks like anything that depends on PHP, Ruby, Python, Perl, or Java (besides GWT), there's comparitively little in the way of smarts on the client side. With GWT, you can build an entire app that has absolutely zero smarts on the server side. If you want to build a client app in GWT that interacts with a RESTful server, you can definitely map client-side events to URLs, but that's not the only way to do things with GWT. You can put all your business logic on the client, you can access server-side business logic with GWT-RPC or other RPC-over-HTTP mechanisms, or you can strike a balance and split the business logic across both client and server. One advantage of GWT is that, with GWT-RPC and a Java-language server-side, you can encode business logic in a set of Java classes and run the same code on both the client and the server (with the caveat that you have to limit yourself to those parts of the JRE that GWT supports). As far as examples go, you probably want to look at the other example apps in the GWT documentation. If I remember right, the mail app is pretty comprehensive, and the doc for GWT-RPC is pretty good, too. There's also a frequent poster on this list with an entire site dedicated to GWT example code. I can't remember his name right now, but his website is "roughian", or something like that. His name might also be Ian, as a matter of fact. Anyway, search the list's history for examples and I'm sure you'll find it. Ian --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---