lawrancej / logisim

Git fork of Logisim code base
http://www.cburch.com/logisim/
GNU General Public License v3.0
211 stars 104 forks source link

File format #9

Open lawrancej opened 10 years ago

lawrancej commented 10 years ago

Logisim's file format (and code to handle it) sucks.

The format seems to represent the layout of toolbars on the screen in addition to the circuit. The toolbar layout does not belong in the file (although any libraries it references obviously should be part of the format).

The format as currently implemented exclusively focuses on the layout of components. As in, we can't know if two components are connected to each other without laying out every component and wire first. While layout is important, the logical connection among components is necessary to save in the file, because otherwise there's no way to merge changes among collaborators on a circuit. Each component deserves an identifier and every port on a component deserves an identifier, that way wires connecting components can be clearly identified semantically and then layout is a separate concern.

Using SVG as the layout format with a custom xml vocabulary for describing component connectivity would be ideal, as we could save the layout and only worry about changes to connectivity during merges. XStream would be a much better option. Ideally, the format could be merged with existing merge tools.