On Monday, March 12, 2012 10:40:06 PM UTC+1, Colin Eberhardt wrote: > > > - Instead of wrapping everything in a UiBinder, I would have kept > part > > of the template in the HTML host page (I'd have wrapped only the <div > > id=todoapp>, keeping the static instructions and credits sections in > the > > HTML host page) > > I'm not so keen on this based on the goal of this project, to compare > and contrast it with various JavaScript frameworks. Having the markup > in a single place makes this comparison easier. >
On the other hand, people not knowing GWT could think it *cannot* simply enhance an existing HTML layout, as the other implementations do. I see TodoMVC as a way of "advertizing" toolkits/frameworks, and I fear people see GWT as *only* being capable of building "empty window" interfaces [ http://bitworking.org/news/427/js-rest-and-empty-windows] We/you could go even farther as to putting almost everything in the HTML host page, using TextBox.wrap() to handle events on the text box, and RootPanel.get(xxx) to add the CellList and footer. > > - I would have called the ViewEventHandler interface 'Presenter' (as > > many people do it), and use a setter on the view (setPresenter) > rather than > > an observer-like method (addViewEventHandler) > > I'm not so keen on that naming, having an interface for the Presenter, > which is a restricted view onto the presenter for the purposes of > responding to 'events' from the view seems wrong to me. > Well, that's exactly what the ViewEventHandler interface is; you're not forced to use an interface (the view could know the presenter) but helps in decoupling. You're technically allowing multiple handlers to be attached to the same view, but that's not going to happen in practice, or so rarely that it's not worth the runtime cost. See also http://www.google.com/events/io/2010/sessions/gwt-continuous-build-testing.html > > - I wonder if you could have used a CompositeCell to split the "done > > checkbox" and "delete button" handling in their own cells > > I thought about that too, but one of the goals of the TodoMVC project > is to use the same HTML markup and CSS for all the implementations. > Mine already deviates due to CellList using divs rather than ul / li > (it's a great shame this cannot be configured), so I wanted to adhere > to the template as much as I could elsewhere. > I don't see such a "goal" stated in https://github.com/addyosmani/todomvc/wiki/Todo-Application-Specification The stated goal is that the "look and feel" the same. Also, there's nothing wrong not using ul / li provided you communicate the role of elements by other means (ARIA). Maybe CellList should be enhanced with ARIA for better accessibility, I haven't checked, but if that's the case, it's an issue with GWT that I don't think the TodoMVC sample should try to address (at least not at all cost). In trunk, CellTable now has a Builder so I believe you could make one using <ul> as the container, <li> for rows and <span> for cells. Of course, YMMV. If you look at the Ext.js (for instance), it doesn't use ul / li either, and its use of ARIA adds nothing to accessibility (role=presentation everywhere). > > - I would have used AutoBeans for the JSON serialization, instead of > > JSONParser/JSONValue and the like (which are a PITA to use) > > Good idea - I have been meaning to give AutoBeans a go. > Note that because AutoBeans are only about data, you'll be forced to move away from the MVVM-like approach before using AutoBean (unless you use an AutoBean to wrap a ToDoItem, but that'd complicate things for little-to-no added value) -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/iKuXBamPD3AJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
