Re: GWT Mobile App in Same WAR File
I don't know what server-side technology you use, but I guess there's something similar to Spring Mobile (http://www.springsource.org/spring-mobile) in any framework of your choice. That allows you to detect the user agent on the server side and serve the optimized version of the UI simply rendering the correct view (i.e. a different page, or a page including a different javascript). Mobile and desktop apps are simply included in different pages. The GWT showcase uses a different approach, if I understood it correctly, serving the same javascript (in the same page, of course) to the client in both cases and then switching the view directly on the client (plus, code splitting optimizes performance so only the correct version is really downloaded). This can be used if your app is entirely GWT, but I guess it cannot handle a mobile UI built with a different technology like JQuery. Regards Lorenzo On Thursday, August 30, 2012 1:37:57 AM UTC+2, jduffy wrote: Hi All, We are developing a GWT application for desktop browsers that is deployed to a Tomcat 7 container as a WAR file. We are also developing a companion mobile application that is written in JavaScript and JQuery. We would now like to embed both applications into the same WAR file so that the appropriate version is served based on the user-agent property of the browser. For example, if a user hits 'ourapp.com' from a desktop browser, they should be served the GWT application and if they hit it from mobile Safari on an iPhone, they should get the JavaScript/JQuery application. Can anyone shed some light on how we might be able to accomplish this? We're fairly new to GWT and web programming so I apologize if the question is a bit vague or non GWT specific. Jim -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/qSGeJ4TquLQJ. 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.
Re: GWT Mobile App in Same WAR File
Hi, Take a look at the MobileWeApp sample in the GWT SDK. In particular, FormFactor.gwt.xml and the MobileWeApp.gwt.xml. - gwt-2.4.0\samples\MobileWebApp\src\main\java\com\google\gwt\sample\mobilewebapp And this post re form factor support: http://kiahu.com/tutorial/form-factor-support-with-gin-and-guice/ Cheers Rob Kiahu.com On Thursday, August 30, 2012 9:37:57 AM UTC+10, jduffy wrote: Hi All, We are developing a GWT application for desktop browsers that is deployed to a Tomcat 7 container as a WAR file. We are also developing a companion mobile application that is written in JavaScript and JQuery. We would now like to embed both applications into the same WAR file so that the appropriate version is served based on the user-agent property of the browser. For example, if a user hits 'ourapp.com' from a desktop browser, they should be served the GWT application and if they hit it from mobile Safari on an iPhone, they should get the JavaScript/JQuery application. Can anyone shed some light on how we might be able to accomplish this? We're fairly new to GWT and web programming so I apologize if the question is a bit vague or non GWT specific. Jim -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/17GBjrSwMc8J. 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.
Re: GWT Mobile App in Same WAR File
Dont have a pc here to send links, but look for the gwt sample mobile app. More specifically look for the MobileFactor.gwt.xml, that I think is the file name if my memory serves me right. You will essentially sprinkle some js code in your x.gwt.xml. The js will setup some variables that you can then use in conjunction with defferred binding to load the appropriate view/implementation. This all gets derived from the user agent. In your case, since your mobile view will be jquery based, you upon calling via defferred binding the right implementation can inject the JS for your jquery mobile app programmatically. Best regards, Alfredo On Sep 3, 2012 3:37 PM, jduffy jdu...@vorpalware.com wrote: Hi All, We are developing a GWT application for desktop browsers that is deployed to a Tomcat 7 container as a WAR file. We are also developing a companion mobile application that is written in JavaScript and JQuery. We would now like to embed both applications into the same WAR file so that the appropriate version is served based on the user-agent property of the browser. For example, if a user hits 'ourapp.com' from a desktop browser, they should be served the GWT application and if they hit it from mobile Safari on an iPhone, they should get the JavaScript/JQuery application. Can anyone shed some light on how we might be able to accomplish this? We're fairly new to GWT and web programming so I apologize if the question is a bit vague or non GWT specific. Jim -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/-gZqRrc-EmkJ. 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. -- 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.