I love to hear some opinions about how to learn creating mobile apps for SFOS.
This year I have started to learn python. The main reason was that I am interested in how that stuff (coding / creating software) works. Another important reason is that I want to create apps for SFOS - well I want to start with one app first
By now I have a simple quiz app written in python. I thought before I implement more and more features like players, game modes, etc⦠I could start a gui and develop the python and gui part together.
Considering that I want to create an app for SFOS, I tried to start with Qt/qml. But to be honest I didnāt get that far. I have watched several tutorials about the model-view-controller concept and Qt/qml but I never got something working with my python app.
I do understand the basics (variables , loops, functions, lists etcā¦) of python. Nevertheless I am questioning if I am doing it right. Does it make sense to think about creating a mobile app / qt-gui that early or should I go on with python and when I have a well feature python then I move to tkinter first? After that I try again the mvc and after that I learn qt/qml.
Does anyone have an idea how a good roadmap (for me) could be?
For those who learned coding by theselves - how did you do it?
Do you have recommendations for good tutorials/websides to learn?
Learning the basics of python wasnāt that hard. I bought a book, which is well structured. The GUI part, because of the lack of structured information, is much harder - at least for me
Happy to hear you want to get started with app development on SFOS! The initial hurdles (on most platforms as a dev from my experience) sometimes seem to be high, but things clear up once you got the trick.
I can encourage you to check out the Python App Example from here. It is quit a good starting point to understand the mechanics to exchange data in one direction.
Once you got that, you can check out my very small write up on how to send data towards the Python part here in the āSailfish, Python and PyOtherSideā section.
I would suggest you to check out the example and modify things until you got an Idea about most of the mechanisms used there. When you got that, you know how the QML and the Python part could work together. Knowing that you get an idea how to further structure your game to have these two working together well.
Iāve also started to learn Python this year. And I would also like to code an app for Sailfish OS. I donāt know the route to get there, but so far Iām thinking that I want to begin the process by learning the basics in Python, as soon as possible continue with Tkinter (so that I see that itās working and that I can make apps with a GUI), get somewhat familiar with OOP and finally move on and hopefully create an app for SFOS (preferably something with SQLite). Iām still a beginner, slowly making my way towards intermediate, I think. Itās hard to tell There are many good resources on the web, I love Andrei Neagoieās videos on Youtube, and this text on OOP. David Love - TKinter GUI programming by example seems to be a good resource on Tkinter.
Iām trying to wrap my head around OOP: modules, classes, inheritance, etc. I havenāt got it working quiet yet, but Iāll keep trying until I figure it out. Iāve finally understood the āif name == āmainā:ā-thing at the end of OOP-files and what it does. I take one step at the time, doing a lot of errors along the way (I learn little from just doing right) and above all having a lot of fun
Not really.
SFOS uses QML to make the UI. You have to use QML (or qt, but qml is easier) to make a sailfish native app.
The demo QML UI app (name eludes me, and donāt have it on this machine) is a good one to get going, as it has all the UI elements in it, and you can see how to make them.
QML takes a bit of getting your head around, but it is quite an easy way to make a UI.
For simple apps, just use javascript functions inside the QML as QML is/uses a slightly old version JS. (i.e. you will find a few things missing from todayās javascript)
Although they are large, a nice thing about a couple of apps I maintain is that they show a use of python as scripting tied to QML and also using native C transparently. Iām thinking specificially of Imageworks. Itās all just straight functions (no oop, per say) and simple bindings but I think it performs really well. And the QML interfaces are clean. The original work was all done by toby (planetos) Iām just filing the edges: https://github.com/poetaster/harbour-simplecrop
The principle reasons to-do oop (outside of just wanting to implement Design Patterns) is encapsulating and re-use. But even those goals can be achieved without using the languages oop features. I donāt really like python or javascripts object features, but I have 10+ years experience doing system design in java. I also donāt really enjoy the ājava wayā anymore, but it was a good approach for the scope at the time. I was the designer for an application server where strong oop design pattern principles worked well. That had to do, I believe, with the very formal constraints on the system.
For app development in this context, especially for prototyping, I think javascript and python are of great benefit. As long as one considers code reuse (also concepts like inheritance) you can still hack things together to get a feeling for what something should look like. If you need 3D, you probably want to look at c++ And c++ object features are something Iām just re-learning now. Thatās a challenge!