We have been working on a tutorial on how to set up a Nextcloud development environment using the docker of juliusheartl. As the steps differ quite a bit depending on the operating system, we made a tutorial for Ubuntu and Mac users.
How difficult is it?
Well, it depends on your environment. If you have a fresh install, the tutorials should be reliable and straightforward. We also tested the tutorials with some people who already had other environments running on their computer, but those conflicted.
Tutorials for other operating systems
We are hoping for contributions of tutorials of a similar structure for other operating systems!
Edit: A windows tutorial is available too. See here for more information.
Hey! Thanks for the tutorials. I downloaded the skeleton-app from here but there is no simple example app - the skeleton-app is the note-example-app from the docs. I think this is not correct and the skeleton-app should be a simple vue-example-NC-App and not a complete writen app. Pls fix it…thx! And btw: It is so hard to dive into app-dev for NC! Old docs and the new tutorials are not well developed. Pls update to make it easier to follow. A simple app-video-course with Vue.js and the new designpatterns of NC would be very helpful.
I must say that I did the tutorials and they were extremely easy to follow. You literally just have to do what they instruct you to do, and each step is explained fairly well and so on. Perhaps you need to give them a fair chance. There are also videos in them, but I haven’t looked at those.
Once you did those tutorials and thereby got a feel for how you build the basics of an app, you can make use of the NC API documentation at https://nextcloud-server.netlify.app/ (in there, you should be looking specifically at the interfaces listed in Nextcloud PHP API (master) - since NC uses dependency injection, these interfaces are what you can use at the end of the day). Also, the search box at the top right is highly recommended!
At the same time you will reference the developer documentation at Nextcloud developer documentation — Nextcloud latest Developer Manual latest documentation to learn more about a lot of different features and how to do stuff, e.g. background jobs, database migrations if you need to create your own tables, authentication and routing, etc, etc. Make sure to really noodle around in here, and don’t miss the “Digging deeper” section, as all of this documentation might seem daunting and somewhat unorganized at first, but once you noodled around a bit it is not that bad.
Of course another thing to do is to look at how other apps does their job, there’s plenty of code examples there.
Regardless, you probably just need to give it a bit more time and systematic approach.
He! Thx for the reply. The tutorials does not explain the code-content. Its just something like “do this and do that”. But the detailed why? isn’t explained. To read the docs should never be the first point to start with a complete new content, because you do not know what to look for. I’am teaching programming for twelve years and if i would start my lessons with: Look at the django-Docs, you find everything there! - which student would and could follow me?
There should be a tutorial like “Let’s create a basic Navigation in NC with Vue.js and switch between three sides” or something like that. A next step: “how we can store data to the database”. Yes, it could be learned with the Note-Example on a very hard way (also missing code-explanations!) but there are a lot of ways to make the start much easier. I love the work of the NC-Team so pls do not missunterstand my critics, but after tons of hours try and error there is no success either. With the “New Tutorials”-move nothing is better than before, maybe a little bit but the starting point is very, very hard…
Which tutorials did you try? Could you outline in detail which parts you felt were under explained?
I have been an educator before Nextcloud and please note that the learning goals are in the first two tutorials are only about having a general overview of the app skeleton structure. Not to explain the code in detail. That would be a potential info dump. To still provide some content, in some pieces we did include inline code comments for more details where we felt this was useful if people want to reuse the code for something else in the future.
Also please note that these tutorials are not finished yet, there will be more tutorials in the future, explaining each concept people need 1 by 1. So I am aware we did not touch upon all concepts yet. For example, the database part certainly still needs a tutorial on its own, but I don’t want to include that in the very first tutorial. The knowledge needs to be built up in a more digestible way.
I would be interested in a rewrite of you containing more explanations if you feel that would be valuable. We could include your explanations or find a place for it.
Edit: are you doing the tutorial of the notes app in the docs.nextcloud.com developer documentation or the new tutorials that are linked on Develop for Nextcloud? Because I only worked on the last ones, which will replace the notes tutorial. We might be talking across each other and not talking about the same tutorials?
Hi Daphne! Thx for the reply. I understand that the first tutorials only give the basics, but the content of the tutorial ist only copy-paste. There is no part of explanation, why for example the skeleton-app need to paste in this dir or something like that. I did the tutorials of “Develop for Nextcloud” and the tutorial in the docs. Booth of them are ok, but after doing them it is hard to find a way.
I honestly think you are exaggerating this. The tutorials, developer documentation and API documentation complement each other. If you are a programmer, you should have no problem learning Nextcloud app development from these resources. There is indeed parts which are not explained by these resources and where you have to go and read the Nextcloud source code, but those parts are not in the context of what you need to get started, at all.
I am trying to set up the development environment on ubuntu again. Opening http://nextcloud.local/ I get the following error message:
Es sieht so aus, als ob du Nextcloud erneut installieren möchtest. Es fehlt jedoch die Datei CAN_INSTALL in deinem Konfigurationsordner. Bitte erstelle die Datei CAN_INSTALL im Konfigurationsordner um fortzufahren.
I am requested to generate CAN_INSTALL, but it already exists in $HOME/nextcloud-docker-dev/workspace/server/config/ What can I do?