Opened 11 years ago
Closed 5 years ago
#11367 closed enhancement (invalid)
Demo of using dojo.Stateful API for MVC patterns and property-driven programming style
Reported by: | cwiecha | Owned by: | cwiecha |
---|---|---|---|
Priority: | high | Milestone: | 1.13 |
Component: | Demos | Version: | 1.5.0rc1 |
Keywords: | Demo | Cc: | [email protected]…, [email protected]… |
Blocked By: | Blocking: |
Description
As discussed in dojo team meeting 6/23/2010, here's a demo showing the use of the new dojo.Stateful APIs in 1.5 as applied to an image resize dialog. The demo is packaged according to Dustin's template at http://github.com/dmachi/DemoExample and has been checked into github as well at http://github.com/cwiecha/DemoImageResize
Adding here as requested IIRC...Thanks, Charlie Wiecha
from the package README:
Quick demo showing the use of dojo.Stateful APIs for derived values in a data model,and binding between model and form dijits in the view. The goal is to show a simple means to conform to MVC patterns in UI design and also to emulate constraint-based "derived" values in the data model using an image resize dialog.
Try changing either the absolute or relative image sizes and observe the effects on the derived values. Changes can be made in either direction (absolute->relative or vice versa), and also with the aspect ratio pegged or not.
While the demo does not actually implement a constraint-based dependency graph between the values, the dojo.Stateful API along with simple checks to detect and break cycles are sufficient to get pretty close...
The dojo.Stateful watch() fn is used both in the model for derived values and to watch changes on both sides of the Model-View split to resync values as they change in either place. Check out layer.js for details...
Attachments (1)
Change History (6)
comment:1 Changed 11 years ago by
Owner: | changed from anonymous to Dustin Machi |
---|
Changed 11 years ago by
Attachment: | DemoImageResize.zip added |
---|
comment:2 Changed 11 years ago by
Milestone: | 1.5 → 1.6 |
---|
1.5 is released, moving remaining tickets to 1.6
comment:3 Changed 10 years ago by
Milestone: | 1.6 → future |
---|
(sadly) punting seemingly abandoned ticket and meta tickets to future
comment:4 Changed 5 years ago by
Component: | General → Demos |
---|---|
Milestone: | future → 1.12 |
Owner: | changed from Dustin Machi to cwiecha |
Status: | new → pending |
We would love to revisit this and add to the demos site, if there's interest in revisiting this.
comment:5 Changed 5 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
I think dmachi said he would look at this.