3 ms·
There are two issues here. One is doing layout with a constraint solver. The other is the user interface for the person doing the page layout. A constraint sol
by Animats 12y ago
There are two issues here. One is doing layout with a constraint solver. The other is the user interface for the person doing the page layout.
A constraint solver interface is a good match to a GUI. It's not a good match to a textual interface. Web designers should be using a layout tool like Dreamweaver, not hand-coding constraint expressions.
For an example of a constraint-based tool for a much harder problem, see Autodesk Inventor, which is a 3D CAD system. It has 2D sketches, and those are controlled by constraints. You can draw rectangles, and if they have coincident points or edges when drawn, those are constrained to stay together. You can explicitly dimension something, and it becomes that length. If you try to apply inconsistent constraints, the system rejects them. You can make all constraints visible as icons, then delete any you don't want. Web designers would probably love the power of Inventor sketch mode, because it's not restricted to horizontal and vertical lines, or even to straight lines. That might be overkill for web design, although being able to wrap text around a curved image would make some people happy. Inventor demonstrates that a much harder constraint problem than web design has been successfully solved with a good GUI.
Asking visual designers to write constraint expressions by hand is pounding a screw with a hammer. Use the right tool for the job.