Thursday, September 9, 2010

Re: dumb / dto domain model

Our model got all the rules for showing elements or not.
So a ui element is observing these changes in the model.
This is done so we can always validate our model (also on sever) to
see if all the needed and calculated values are there.

How to solve that in MVP? Will the model than put his changed values/
properties on the bus?

I'm thinking in a way to make bindings between domain and view. These
binding are than converting and syntax checking the
values from the ui elements to the 'typed' data in the model.

Is this a good way to go, or do you strongly advise to go another way?
I don't want to program my business (showing/not showing fields etc)
in the presenter for the ui logic and on the server for model
validating. Twice.

Regards,

Jeroen Wolff

On Aug 25, 10:46 pm, John Ivens <john.wagner.iv...@gmail.com> wrote:
> Won't the event bus and presenters solve this problem for you?  The
> Model-View-Presenter paradigm?
>
> On Wed, Aug 25, 2010 at 11:51 AM, Jeroen Wolff <jeroen.wo...@gmail.com>wrote:
>
>
>
> > Hi, where are in the middle of designing a big app with a lot off
> > difficult forms.
> > On these forms there will be a lot of questions and based on the
> > results more questions. Also lot of field validation.
> > The current app is a standalone app and the domain model is a big tree
> > with the Observable patterns (property change)
> >  If a user is changing a field a lot of other data will than be
> > trigger to change also.
>
> > Now we want to port is to a web based application, and because with
> > GWT we can write the same model and produce client side
> > the same domain as in the old stand alone app. But.....in Ray Ryan's
> > talk about architecting GWT apps for production he said:
>
> > "When you are in a web app, we've encouraged you to make your model,
> > you're so-called model a very simple object.
> > We don't really think that JavaBeans with property change events and
> > that kind of thing work terribly well.
> > We encourage you instead to use more of a DTO for your model portion.
> > The odds are that the object that embodies the things that the
> > users are thinking about is a dumb little bag of properties."
>
> > Can somebody explain to me why it is not done? Why only DTO's at the
> > client side?
> > The business model lives on the server only than? How can i know and
> > where do i specify what the next step or question or validation is
> > when the user change a value is a form?
>
> > It would be great to get some help on this design issue.
>
> > Regard,
>
> > Jeroen
>
> > --
> > 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<google-web-toolkit%2Bunsubs cribe@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+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