App development frustration

Ahoj,

i know i do get frustrated quickly but i also do not stop then, so i do continue, it just is now fun then …

so i am in my personal lockdown so i thought lets use to 2-3 days to rewrite my app from scratch.

the last logic was in typescript which i converted to js that was consumeable by qml, now i ve chosen python.
the goal is to have my app also in an android version for my wife so…

python alone was fun and quick, i definately do not do everything correct, but i have my classes, my tests, what is tested works
it took me less then a day for a first version and 1.5 for the current one, max

then i’ve started with the ui and qml part and here it starts:

  • including pyotherside, wrapper classes etc. maybe half a day with a lot of stupid bugs, is still okish, the documentation could really be better.

  • and now for the rest: currently i have spent like 60hrs on this. the app is 50% done only, not talking about localization and the final finalization effort.
    but featurewise i am like 50% done, only

where do i permanently loose time ?

  • file deployment, yaml, rpm … took hrs
    you can find the qml dir names, but the rpm constants … beside bindir ?
  • fucking js typos,
  • the ide usability, like useless text prediction
  • debugger can not connect to vm, so just using console for debugging etc
  • no tests cause no docu online,
    i would love to have some test for the js / qml side to speed up, again nothing on the official pages, the example test does not work out of the box. finallly found that link today: Development for Sailfish OS: Unit Testing Qt / C ++ for Sailfish OS / Sudo Null IT News.
  • manual test effort due to see above

so lets stop here

how does an efficient setup look like ? i can not imagine that the nice apps were written like that. i know there is sfdk and i used it once for okboard but where is documentation ?

i would really love to have either a working project boiler template with tests that work
or stupid git repo to clone from or a step by step recipe

thanks
P

1 Like

Wouldn’t it be good start to look for a python (Sailfish-) app you may like and try to get an idea how it works?
There must be some out there i think?

hi unmaintained,
thank you. i had look into the sample and into one suggested by poetester.

i think what would have been good to know before, and i could have if i would dig first, then implement, that the wrapper can only work like:

object.method().method().lastmethodmayhaveparams(arg1,arg2)

if you think about it, it is understandable, but is it something that one would expect ?
not sure.
so, my python classes might have been slightly different.
nothing that couldnt be fixed in the wrapper. so that is done
also pythin testing is solved for me

testing qml currently not yet
also a ide less development not (if faster)

i have now switched from simulator to volla10 and can debug on that one.
also operation is quicker on that. one should not underestimate that too.
so use device rather then simu is lessons learned 2

update:
just an example: Разработка для Sailfish OS: Тестирование QML-компонентов / Habr
let google translate it and try to follow that.
at the point where he discuss that my-app needs to be called MyApp in test, what is it ?
do i need to create .qml file ? will it be generated automatically ?
who knows, me not. and yes, the test is not visible, so i screwed somethign

trying to copy the boilerplate from here:

i end up here:
https://together.jolla.com/question/107510/unknown-modules-in-qt-testlib/

RPM macros are all defined in /usr/lib/rpm/.
These values can be listed with rpm --showrc

thank you leon
i did that
the list is pretty long, still i did not find the folder for this instruction:

put the file into $HOME/.local/share/my-domain/my-awesome fuck

this is exactly my problem statement here:
the internet is full of hints, but:

  • that does not help a lot always
  • the learning curve is often uneeded steep

basically i just wanted to tell packager to do:
put those file where ever that is:
QStandardPaths::AppLocalDataLocation

internet did not told me how.

this is a good one to understand the above russian link:

but while i can now 2 hrs later start a test, if fails due to a cpp class that is part of my package

QWARN : qmltestrunner::tst_one::compile() [W] unknown:0 -
/usr/share/olive-goes-shopping/tests/tst_one.qml produced 2 error(s):
/usr/share/olive-goes-shopping/tests/tst_one.qml:4,1: Type OliveGoesShopping unavailable
/usr/share/olive-goes-shopping/qml/OliveGoesShopping.qml:4,1: module “oarg.pawelspoon.olivegoesshopping.ogssettings” is not installed
Working directory: /usr/share/olive-goes-shopping

and it is registered and it works in the app, but in test unknown …

A few points worth mentioning in this context.

If you spend enough time on Sailfish OS app development (or any other sort of development) you eventually come up with a template of your own. Your own template is such a nice thing because it’s written just the way you like it!

WRT stupid QML typos and JS/QML inefficiency, I tend to solve that sort of problems by moving as much logic as possible to compilable native code (i.e. C/C++). And even then it sometimes takes considerable amount of efforts to make things run smoothly, especially on slower hardware. Optimization requires experience.

And yes, Jolla clearly doesn’t have and has never had enough resources to produce and maintain development tools on par with the ones produced by the likes of Apple and Google. Unfortunately, there’s no reason to expect significant changes to the better any time soon.

Cheers!

hello,

the question is of course if one needs apps from hobbyists at all :smiley:
but if you do that just as hobby, you might not have enough apps that do make worth it or you are too lazy to refactor after you have one

without covid i would never have touched Olive significantly again

c++: i did it for 2 years, twenty years back and while i do not hate it, i try to avoid that.

i am in IT, not as dev any longer, but i see code at least weekly, write some c# and ts nowadays and now and then playing with helm and devops

I am by far not the fastest, but i get my stuff done.
when i look at sfos apps, i have the feeeling that without good c++, qt, linux knowledge your do get nowhere quickly

If we talk about apps, in the end it is some stupid lists of some data created locally or loaded from somewhere, no rocket science and it seems to me that with wrong background its way too complex to do anything quickly.

i would appreciate a repo with a qml + js app that includes a working unit test in c++ and qml for example !

regarding python: i just did extend the existing one with a bit more of meat here: https://github.com/PawelSpoon/python-sample

I suffer the exact same Problems

1 Like

Testing is a realy pain - because it is not really smoothly integrated (as for example with all the Java IDEs) - as far as i can tell you have to create a subproject which you then have to open in another QtCreator instance to be able to run the tests and develop stuff in parallel (you even need a dummy c++ configuration to run the JS stuff). I finally have a workflow now that is ok for me. I have tests in plain JavaScript and C++ - no QML test however, since you will most likely be only able to run them on a VM that provides the Silica dependencies:

Here the links to my c++ and JS tests:

Which i have finally been able to integrate into github actions so they will be executed with each build there. I can even view the test results on the github page. It was a pain to get this far, but now it works.
Feed free to get inspired by my stuff (i am sure there is room for improvement).

2 Likes

i will try to copy your test_qml approach.