Hacking:Technical decisions: Difference between revisions

From Seamly
Content added Content deleted
m (→‎C++ and Qt: I smoothed the wording & fixed grammar where I was sure that I wasn't changing the meaning.)
 
(4 intermediate revisions by 2 users not shown)
Line 11: Line 11:
* First prototype was made on Pascal.
* First prototype was made on Pascal.
* Next try was made on C and GTK+. It was time when we describe a pattern in C, instead of using normal interpreter language like Python for example, and export a pattern to png, pdf and ps.
* Next try was made on C and GTK+. It was time when we describe a pattern in C, instead of using normal interpreter language like Python for example, and export a pattern to png, pdf and ps.
* That prototype than was ported to C++ and GTKMM.
* That prototype then was ported to C++ and GTKMM.
* Next logical conclusion was to separate the data and program. This is where we came up with the idea of a pattern file format based on XML.
* Next logical conclusion was to separate the data and program. This is where we came up with the idea of a pattern file format based on XML.
* Next thing that you usually want is to have a nice GUI, and here is the time for Qt to show up.
* Next thing that you usually want is to have a nice GUI, and here is the time for Qt to show up.
Line 17: Line 17:
== C++ and Qt ==
== C++ and Qt ==


When you decide to use Qt you also want to decide which language to use too. There are several [https://en.wikipedia.org/wiki/List_of_language_bindings_for_Qt_5 bindings], but was decided to use a native one - C++. C++ language itself has a lot problems and some criticize it a lot. But still it is good language if you need speed and your application is very complex (many CAD systems written on C++). Of course, as was mentioned before, Qt itself is also a big reason why we use C++.
When you decide to use Qt you also want to decide which language to use. There are several [https://en.wikipedia.org/wiki/List_of_language_bindings_for_Qt_5 bindings], but we decided to use a native one - C++. The C++ language itself has a lot of problems and some criticize it a lot. But still it is good language if you need speed and your application is very complex, (many CAD systems are written in C++.) Of course, as was mentioned before, Qt itself is also a big reason why we use C++.


Qt's killer feature for us was [https://doc.qt.io/qt-5/graphicsview.html Graphics View Framework]. This set of classes allow us quick build GUI for manipulating objects. A lot developer teams do own research in this area, but we decided not to reinvent a wheel and concentrate on more important things. Of course this is not all. Qt is a standalone cross-platform framework with very good documentation and a lot examples. It brings almost all classes and abstractions we need to build Seamly2D. Almost all because additionally we adopted [http://beltoforion.de/article.php?a=muparser muParser] library for our formula parsing.
Qt's killer feature for us was [https://doc.qt.io/qt-5/graphicsview.html Graphics View Framework]. This set of classes allow us to quick build the GUI for manipulating objects. A lot of developer teams do their own research in this area, but we decided to concentrate on more important things and not reinvent a wheel. Of course this is not all. Qt is a standalone cross-platform framework with very good documentation and a lot of examples. It brings almost all classes and abstractions we need to build Seamly2D. Almost all because, additionally, we adopted [http://beltoforion.de/article.php?a=muparser muParser] library for our formula parsing.


In the end it allows us build project that has only one external dependence Qt itself. And this fact make maintaining very easy. Some users appreciate this fact very much.
In the end it allows us to build a project that has only one external dependence: Qt itself. And this fact makes maintaining very easy, which some users appreciate very much.


== Code Repository Hosting ==
== Code Repository Hosting ==
Line 33: Line 33:
A process called [https://en.wikipedia.org/wiki/Continuous_integration Continuous Integration (CI)] has evolved in recent years. When the Valentina project was hosted on Mercurial, several tools were implemented to support the CI method of releasing code changes and getting those changes into the hands of users quickly. The tools used by the Valentina project for testing software, producing executable packages, and delivering that software are described [[Valentina_original_ci | here ]].
A process called [https://en.wikipedia.org/wiki/Continuous_integration Continuous Integration (CI)] has evolved in recent years. When the Valentina project was hosted on Mercurial, several tools were implemented to support the CI method of releasing code changes and getting those changes into the hands of users quickly. The tools used by the Valentina project for testing software, producing executable packages, and delivering that software are described [[Valentina_original_ci | here ]].


The Seamly2D project split from the Valentina project by the end of 2017. The Seamly2D code has been moved to a separate repository at https://github.com/FashionFreedom/Seamly2D. Incorporating minor software changes was still possible until changes happened to the environment provided by Appveyor in the summer of 2018. A change in the default version of a software tool used to build the windows executable caused the automatic process of builds to fail (for windows executables only). Changes still could be and were being made to the Mac executable and to the Ubuntu version which is hosted at the Seamly2D repository on launchpad.
The Seamly2D project split from the Valentina project by the end of 2017. The Seamly2D code has been moved to a separate repository at https://github.com/FashionFreedom/Seamly2D. The [[Seamly2D_ci | initial Seamly2D CI environment]] was based on the delivery pipeline used by the Valentina project.

Incorporating minor software changes was still possible until changes happened to the environment provided by Appveyor in the summer of 2018. A change in the default version of a software tool used to build the windows executable caused the automatic process of builds to fail (for windows executables only). Changes still could be and were being made to the Mac executable and to the Ubuntu version which is hosted at the Seamly2D repository on launchpad.

Additional changes in the continuous integration tools provided by Github will force the Seamly2D project to update the pipeline process before January 31, 2019. Please check back to this wiki for updates in the process.

Latest revision as of 02:00, 26 December 2019

This page describes technical decisions that stand behind Seamly2D. It will be useful for those who want to know why and which tools we have been using.

The Seamly2D is a standalone project. The reason for such a decision was lack of options. None of projects satisfy our needs: GUI, parametric patterns, support formulas, a pattern format and cross-platform solution. Instead we concentrated on low level blocks.

Historical background[edit | edit source]

Very often the reason of using one tool or another came before actual start developing a project. It based on founders experience and likes.

  • First prototype was made on Pascal.
  • Next try was made on C and GTK+. It was time when we describe a pattern in C, instead of using normal interpreter language like Python for example, and export a pattern to png, pdf and ps.
  • That prototype then was ported to C++ and GTKMM.
  • Next logical conclusion was to separate the data and program. This is where we came up with the idea of a pattern file format based on XML.
  • Next thing that you usually want is to have a nice GUI, and here is the time for Qt to show up.

C++ and Qt[edit | edit source]

When you decide to use Qt you also want to decide which language to use. There are several bindings, but we decided to use a native one - C++. The C++ language itself has a lot of problems and some criticize it a lot. But still it is good language if you need speed and your application is very complex, (many CAD systems are written in C++.) Of course, as was mentioned before, Qt itself is also a big reason why we use C++.

Qt's killer feature for us was Graphics View Framework. This set of classes allow us to quick build the GUI for manipulating objects. A lot of developer teams do their own research in this area, but we decided to concentrate on more important things and not reinvent a wheel. Of course this is not all. Qt is a standalone cross-platform framework with very good documentation and a lot of examples. It brings almost all classes and abstractions we need to build Seamly2D. Almost all because, additionally, we adopted muParser library for our formula parsing.

In the end it allows us to build a project that has only one external dependence: Qt itself. And this fact makes maintaining very easy, which some users appreciate very much.

Code Repository Hosting[edit | edit source]

The Valentina project was originally hosted on Bitbucket using Mercurial. After the fork which created Seamly2D as a separate development path, the main Seamly2D repository was transferred to Github.

From the beginning was done using Mercurial. In the words of the original programmer: Why? No big reasons. It's more matter of tastes. It just work, it cross platform, it has very nice GUI TortoiseHg. And because of mercurial our main repository lived on Bitbucket. u

Continuous Integration[edit | edit source]

A process called Continuous Integration (CI) has evolved in recent years. When the Valentina project was hosted on Mercurial, several tools were implemented to support the CI method of releasing code changes and getting those changes into the hands of users quickly. The tools used by the Valentina project for testing software, producing executable packages, and delivering that software are described here .

The Seamly2D project split from the Valentina project by the end of 2017. The Seamly2D code has been moved to a separate repository at https://github.com/FashionFreedom/Seamly2D. The initial Seamly2D CI environment was based on the delivery pipeline used by the Valentina project.

Incorporating minor software changes was still possible until changes happened to the environment provided by Appveyor in the summer of 2018. A change in the default version of a software tool used to build the windows executable caused the automatic process of builds to fail (for windows executables only). Changes still could be and were being made to the Mac executable and to the Ubuntu version which is hosted at the Seamly2D repository on launchpad.

Additional changes in the continuous integration tools provided by Github will force the Seamly2D project to update the pipeline process before January 31, 2019. Please check back to this wiki for updates in the process.