Thank you for your reply !
I indeed saw old posts on the old forum (the mooc is new for me) but I still think that , making tutorials or documentation for an app created has it’s benefits like promoting SFOS and making documentation easy of access (although of course, it may lead to not well written code)
Can you please expand a bit on this? Are you talking about SFOS-specific APIs, Qt APIs or third party ones?
For the latter case (which it sounds like you want to use) it doesn’t really make sense to me. Basically all APIs are different in purpose and structure. Maybe it is a problem with my mental model, where i view making an app at all as one part, and then making it interact with whatever external service as another. This second part being quite unique from case to case.
I do however completely agree that (to use an analogy) teaching people to fish definitely should involve showing actually catching a fish.
However, when it comes to third party APIs, is it not like fishing and rowing a boat? Sure there are some tricks to not get your line tangled in the oars, but generally the activities are better taught separately.
Do let me know if/what i misunderstood.
You got it right I’m talking about Third party APIs.
Indeed APIs have different structures. Maybe your mental model is the right one, let me explain the one I have :
- A SFOS user (fisher) wants to make a native app (fishing) for a service (fish) he is using on an Android or iOS phone
- The fisher wants to take it easy on its first app so he will stick to using the SDK and coding in QT , with its nice .qml files and Sailfish Silica (just like the template available in the QT IDE)
- He checks if the service in question has a public API, and it does
- The fisher now wants to know how to handle XML HTTP requests and parse JSONs
- He searches information on how past developers have done it or official documentation/walkthrough
This last step is one I’m struggling with. I’ll search for apps with a public code released on Github and from there try to find the logic the developer had.
Even with APIs changing structures from service to service, a global approach on how to make, for example, HTTP requests (which will of course have different variables names and stuff) will help a newbie (me) to develop it’s own app.
Maybe the mental plan I have is not the best approach for a beginner, but I still lack information on how others did it and how I can adapt what they’ve done to my case scenario. That’s the reason why I ask for blog posts, Youtube videos, mailing lists, etc… on how someone created it’s app because on my mental approach, it helps future developers.
As an example the app could be about retrieving information from the town hall’s public API on waste collection by house block.
Thank you all from your time and please correct me if there is wrong information on what I said
Makes perfect sense. And i would be lying if i said i hadn’t struggled there myself.
However, to put it into more concrete terms, i suggest you do the following:
- Fish from land (make a dummy app just to test out layouting and local APIs)
- Go boating without trying to fish (use the API from a language you already master, or even by just pointing a web browser to it)
I know this is a bit boring, but it definitely does help only having to worry about one thing at a time.
For me it took several years until i actually got started properly, and it was certainly helpful that just by virtue of my day job i kept building skill and experience with interacting with many different services in many different ways, to the level where that part of the problem became trivial. I also dabbled in trying to make SFOS apps, but it really took some (lack of) really tasty fish, i.e. services not working so well through the Android layer any more to get me properly motivated to overcome the last hurdles.
This part involved many stupid questions on #sailfishos on freenode IRC.
I guess one of the reasons for such tutorials not existing is because the leap is actually really really small, and then you are out on the other end into specifics and details.
For web services available in XML over HTTP, you basically don’t have to worry about any of the details to get it in to your app for the basic use case. Just use XmlListModel, and similarly for JSON, there is the less official, but quite good JSONListModel
Throw either of those in as a model in your SilicaListView and you are off to the races.