Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using GWTP without PlaceManager and creating Presenter instances programmatically #756

Open
kyr0 opened this issue Feb 1, 2016 · 2 comments

Comments

@kyr0
Copy link

kyr0 commented Feb 1, 2016

Hi all :)

I would like to replace my own MVP impl. with GWTP. My requirements for the projects front-end architecture are a bit more complex than whats seen in most projects. You can imagine it a Liferay portal and it's "Portlets" (only the front-end part): We have so called "Weblets" that manage one or more MVP-bundles, fully isolated from each other and we care for History and Viewport management on our own. Everything is fully dynamic -- the Place names, the Page configuration, what Views are available to what users etc. pp.

So here is what we have:

  • "Place tokens" are assigned to a Pages (config in database, places and pages dynamic)
  • Our own History manager that loads a Page once a Place token matches
  • A Page has several layouts (one for each dimension (XS; SM; MD, LG), we are fully responsive)
  • Layouts have several "Slots" (pointing to an element in the HTML markup of a layout)
  • For each Slot of a layout, a Weblet can be assigned
  • A Viewport manager creates all the instances and puts the Weblet inside of the slot of a layout. When the browsers dimension changes, it changes the layout dynamically and re-assigns the Weblets to it's slots.
  • Last but not least each Weblet contains one top level MVP bundle (but can be in hierarchy too)

Currently the MVP bundle's architecture is our own implementation. But we would like to switch to GWTP for that part -- because it's just awesome what you guys created! :)

My question is:

Is it possible to use GWTP fully isolated and only for the MVP part, leaving all the History and PlaceManager and all the automatic ViewImpl rendering aside?

I still want to use the nice Gin injection and most of the annotations but:

  • I would like to create the Presenter instance myself, programmatically -- my Weblet impl. should do it
  • There should be no need for @nameToken etc. pp. / PlaceManager
  • No automatic rendering of a ViewImpl in the DOM -- my Viewport impl. should do that

It would be great if you could come up with some idea how to implement that. I already worked on a prototype impl. -- it looks very nice from a architectural point of view, but all the automatism collides with our own impl. :-))

I would love to switch to GWTP for the MVP part only! :)

Thanks in advance and best,
Aron

@olafleur
Copy link
Member

olafleur commented Feb 1, 2016

Hi @kyr0 !

Thanks a lot for your kind words !

I'm not sure, but I think that for the moment, this decoupling isn't possible. Maybe we should ask @Chris-V what he thinks about that.

However, you are more than welcome to submit a pull request with that feature. It would certainly help you, but also members of the community that would have the same type of needs as you have.

Don't hesitate to ping us if you need help !

@sameepsinghania
Copy link

Any latest updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants