Tag Archives: Activity Hours Comment Development

Simple QML vs EFL comparison

Recently I found

QmlMiner

elemines

Surprisingly, the QML implementation didn’t take much time:

Activity Hours Comment
Development time spent on JavaScript code
8
I have never written any minesweeper engine
Development time spent on QML code
12
Dialogs, button, animations(explosions) etc.

I should also mention my experience with related technologies:

  1. Intermediate Qt knowledge (3 years)
  2. A few months of QML development
  3. Basic Javascript knowledge (only used with QML code)

Plain Qt knowledge was not a requirement in this case because the QmlMiner contains no C/C++ code at all. Understanding QML and simple JS was just enough. The QmlMiner can be executed with the qmlviewer tool but afterwards I added simple main.cpp for memory and startup performance tests to make “lightness” of the QML app possibly similar to elemines. Basically, qmlviewer has many features that are not needed for the task.
After creating the QmlMiner I reviewed some source code of elemines to spot similarities and noticed that both applications have corresponding game engines and default.edc (*.edc) file has syntax similar to JSON. It has programs section which I believe is somewhat similar to QML states.
Another observation is that the edc file is a resource of data used in C code. The C code creates objects, imperatively defines interactions between them and lays out the UI. Please note these are only my guesses – guesses of developer neither much experienced in plain C nor in EFL.


2. Source code size and used languages

I measured size of source code with the wc command and SLOCCount tool. SLOCCount was used to count lines of elemines C code and QmlMiner’s C++ code (it skipped comments). wc (with -l option) was used to count lines of QML files and eliemines’s deafult.edc file. The QML file didn’t have any comments and the edc file had only 20, which I excluded. I assumed that the whole QmlMinerModel.qml file contains JS code – it is the ,,game engine”. Other files describe the GUI (look and behavior). I didn’t analysed the build system files (Makefiles in elemines and a pro file in QmlMiner) because they are not very relevant.

The results are as follows:

lines of code
purpose
QmlMiner
EFL elemines
Business logic jacascript <div …read more
Source: FULL ARTICLE at Planet KDE