I'm right now coding a small website with MVP / Gin / JSON / UiBinder.
Displaying data works fine, but now I wanted to implement some kind of
'Administration UI'. I already have a login system (authentification
via PHP / MySQL) working.
And now comes the (hopefully not so big) problem:
- The normal and the admin UI will look almost the same (a few
buttons / textboxes added here and there).
So in my opinion it doesn't make sense to copy and paste all
presenters and views, and add a few lines of code here and there. I
already tried to do something like 'AdminDisplay extends
NormalDisplay' (both UiBinder) but that seems to be the same crap:
I've to rewrite (nearly) everything...
I've searched the web for now at least 10 hours without finding a
solution. (And I think that's a very common problem, isn't it?!)
A working solution would be:
have a single presenter and a single view. And the presenter tells the
display using a boolean which UI to display. But I expect it to
produce very ugly code. Everywhere:
# if(loggedIn == true)
# show this;
#
# show UI for both;
looks like my PHP beginnings 10 years ago :D
So c'mon guys. Tell me what's the best way to do it :)
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment