在FreeCAD中,借助于Boost Signals2实现了业务层、显示层的分层,但整个FreeCAD Gui层却采用了Coin3D进行渲染,很难在这方面进行扩展。
相较之下,在SALOME中,可以为不同的Module指定特定的ViewModel,支持OpenGL、OCC、VTK、Plot2D、Qt Graphics View等多种渲染方式。
Ref. from GoF's Design Patterns
Structuring a system into subsystems helps reduce complexity. A Common design goal is to minimize the communication and dependencies between subsystems. One way to achive this goal is to introuduce a facade object that provides a single, simplified interface to the more general facilities of a subsystem.
结合FreeCAD与SALOME的优缺点,在Acise中采用了如下的View Model。
参考资料
- Erich Gamma. Design Patterns:elements of reusable object-oriented software. Addison Wesley, 1994.
- Joseph Ingeno. Software Architect's Handbook. Packt Publishing, 2018.
网络资料
FreeCADhttps://www.freecad.org/
SALOMEhttps://www.salome-platform.org/
Boosthttps://www.boost.org/