Question

Imagine a very big gwt project of application. This is just a some form of scientific environment on the web. So for each user it stores the state of app and there is nothing related to browser history or bookmarks. History is something that can't even be applied to application itself (like CAD systems or whatever, having no intuitive "back button"). We are considering whether to use or not modern Activities And Places along with MVP. What are the pro and cons of Activities and Places if history management doesn't have sense? Could this framework give some advantages in code maintaining and code's modularity comparing to traditional MVP+DI without any Places and Activities? Taking in account that app is going to provide and API for some form of plugins

Was it helpful?

Solution

Given that Places are only about navigation within the app (not necessarily tied to browser history, but still very similar), and Activities build on Places a a way to modularize and decouple building blocks of your UI, with a lifecycle tied to the Places, then I don't see any benefit in using them in your case.

N.B.: Activities and Places have absolutely nothing to do with MVP, it's all about navigation, as the official documentation says:

GWT 2.1 introduced a built-in framework for browser history management. The Activities and Places framework allows you to create bookmarkable URLs within your application, thus allowing the browser's back button and bookmarks to work as users expect. It builds on GWT's history mechanism and may be used in conjunction with MVP development, though not required.

Source: https://developers.google.com/web-toolkit/doc/latest/DevGuideMvpActivitiesAndPlaces

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top