0

We have a GWT application specifically designed to handle mobile clients and built with MGWT. Now, we need to build a frontend for classical web clients, probably building it with GWT-Bootstrap and I'm wondering what's the best solution to achieve this. How should we proceed with modules, gwt.xml configuration, client type detection, etc ...

What are your suggestions ?

Anthony Richir
  • 649
  • 2
  • 8
  • 31

2 Answers2

0

Check this question for how to tell what platform the user is on.

Beyond that, GWT uses only HTML and Javascript, so unlike Flash applications, it actually works fine on mobile devices too; most events (such as clicks) are translated by the browser, so a touch becomes a click, you don't need a separate handler or anything.

Basically what I would suggest is you have a single GWT regardless of platform, and only for certain Widgets, add separate options for Mobile and Desktop, as necessary.

Community
  • 1
  • 1
Marconius
  • 683
  • 1
  • 5
  • 13
  • Actually, building an interface specifically for mobile with MGWT creates a web application that really looks like a native mobile app. Therefore, it's not really nice to use it on a desktop browser and this is why we want to create a dedicated frontend. – Anthony Richir Jul 08 '13 at 14:19
  • 1
    What I meant was, you would create a desktop/browser GWT app, then use that as your mobile version too. So you wouldn't have to maintain two separate apps. If you're trying to *convert* your MGWT app for desktop, that may be kind of problematic, you might be better off just starting a separate thing and reusing code where you can. – Marconius Jul 08 '13 at 14:24
0

I don't know the architecture of your app and if you use the MVP pattern but GWTP with its Form-factors feature allows you to share almost all of your business logic (your presenters) across the different platforms. You have just to write the view depending on the platform you want to support.

jdramaix
  • 1,104
  • 6
  • 9
  • Yes, that's exactly what we want to achieve, the business logic is clearly separated from the views but my question was on how to handle 2 different views (desktop and mobile) for one application with GWT and how to detect if it's a desktop or mobile client and handle the request – Anthony Richir Jul 09 '13 at 05:46