Boosting community app development

@just Thank you so much for taking the time to pull those reddit posts together!!

Also ended up on IRC and Matrix. Would be worth sharing the link to Mastodon if anyone is on there @JimmyKater

1 Like

Might be worth just checking the issue list of the documentation:

and even some pull requests:
https://github.com/nextcloud/documentation/pulls?q=is%3Apr+is%3Aopen+label%3A"manual%3A+developer"

Even here on the forum, if you have to wait 6 month for a response (\OC_User::getDisplayName($userId) deprecated/ remove), missed follow up answers (Nextcloud Event Debugging), no answer (Change user language from app controller).

If the documentation is great and there is some timely feedback on development questions, you will at least not discourage interested developers.

2 Likes

Which link exactly? @just

This discussion topic (as a shared link) :slight_smile: if you will

Hello Daphne :slight_smile:

Iā€™m Baptiste, alias zak39, and Iā€™m a developer at Arawa.

We have created the Workspace app which is a plug-in for the Groupfolders app.

You can look up the GitHub repository with a presentation on its working : GitHub - arawa/workspace: Create shared workspaces and delegate management of their members and groups .

I donā€™t know if answer your question. But, I motivate to create Nextcloud apps to meet customerā€™s needs of my company.

But on the other side creating Nextcloud app, itā€™s to be able to create extensions for existing apps. For example, with our Workspace app for Groupfolders.

What motivate me to want to create a Nextcloud app, itā€™s if there is an important community and with who can share our skills, knowledge and so on.

Today, Frameworks and technos succeed in creating a community by doing :

  • Tutorial videos : How to do a CRUD (Create, Read, Update and Delete) on folders, users, files, the fileā€™s path, and so on. Via API or API/REST. How to code the front-end side ? How to do the translating of Nextcloud apps or Nextcloud ?

  • A clear documentation and precise, like the Laravelā€™s documentation (Installation - Laravel 9.x - The PHP Framework For Web Artisans)

  • A discord server or equivalent (Mattermost, and so on.) : This allows for efficient exchange and mutual support with different channels. Today, we have Laravel, Vue, React, EsLint, Deno, etc. which use this kind of tool so that their devs and community devs can exchange each other.

  • In the case of Nextcloud, we could have for example, a channel on :

    • #dev-frontend : To exchange/help each other on the front-end (JS, Reat, Vue, CSS and so on.)
    • #dev-backend : Like for the front-end but on the PHP
    • #dev-ci : To exchange on our different CIs to have a quality app
    • #ux : To exchange on the UX-Design of Nextcloud and its apps

Regarding the point on the Documentation, I agree with @dugite-code . The Nextcloud Documentation (Nextcloud developer documentation ā€” Nextcloud latest Developer Manual latest documentation) is really written for developers who already know how Nextcloud works.
It took me a while to find out where is the tutorial page is to start developing a Nextcloud app, how the admin and simple user system works (with the @NoAdminRequired annotation), how to create migration files (create database table), etc.

One more, Nextcloud uses Symfony and I think itā€™s very pity that as a developer of Nextcloud or an application for Nextcloud, we cannot use Doctrine to create migration files to create a databases or seed files to feed those tables to have a dataset. I have to feed the database manually from the interface of my app.

Another reason that motivates me to create apps for Nextcloud, itā€™s to be able to write pretty code in the same way that Laravel or Symfony.

What stops me from publishing my apps in the app store is first of all knowing how to do it ^^

Today, I donā€™t know how to publish my app. I know that it is normally possible to publish our app with the ā€œmake appstoreā€ command after creating the skeleton of my app. But, this command doesnā€™t work, it just creates a .tar.gz archive for me.

This picks up on the points in the first question.

What slows me down in the creating of my Nextcloud app are :

  • The lack of clarity of the documentation (see the point of @dugite-code)

    • How to create migration files ? How to seed our database table ?
    • How does the system of admin and no-admin users work ?
    • How to limit access to apps to groups ?
    • How to use the debugger for Nextcloud whether it be for back-end or front-end code ?
    • Does it is a documentation on the API/REST of Nextcloud ? If yes, where is it ?
    • Etc.
    • The documentation, itā€™s very not readable and understanding. You really need to know how Nextcloud code works to read the documentation. I have the impression that there is a huge gap between the back-end documentation (Nextcloud developer documentation ā€” Nextcloud latest Developer Manual latest documentation ) and the front-end documentation (https://nextcloud-vue-components.netlify.app/).
      The front-end documentation is clearer than back-end documentation.
  • Lacks a server Discord or equivalent (Mattermost, etc.) to exchange between the Nextcloud developers and / or its community dev

  • Lacks tutorial videos to understand how to work this or that library PHP for Nextcloud, how to work on the Front-End, etc.

  • Julius created a docker-compose that looks strong. But, very complicated to use so that we can work on it with Nextcloud in local : GitHub - juliushaertl/nextcloud-docker-dev: Nextcloud development environment using docker-compose . I had trouble getting it to work, to be able to work on my machine locally.
    So, I create my docker-compose simpler than Julius. But, probably less efficient than his own. It should be simplified or git some examples of commands to be able to use it and that serves as a basis for all developers.

VoilĆ , thatā€™s it for me. I will not hesitate to edit my comment if I forgot a few points ^^

9 Likes

Hey :wave:

Thanks everyone for your feedback :+1:

We have a dedicated page for developers: Develop for Nextcloud: App development tutorials

Did you know about it?

https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/publishing.html#getting-an-app-approved

Looking forward to meet your app in the apps store :v:

3 Likes

I certainly didnā€™t because itā€™s not linked in the apps store app developer dropdown, which was my first point of call and embarrassingly it was my last for Nextcloud owned sites as I assumed that would be the only place to find links. Thatā€™s a fair amount more resources than I have found before now through search engines which basically sent me to Github pages. Perhaps adding links to that page would be a good start?

@Daphne the reply by @z4k covers most of what I would have said.

3 Likes

Hi @kesselb :slight_smile:

Yes, I know. But, this page mostly returns to the documentation for developers. And, this documentation itā€™s very complicated to read and to understand :confused:

Yes, I already read and reread this morning. I exchange with Daphne via MP and I donā€™t understand why donā€™t you put the content of this documentation :point_right: App Developer Guide ā€” nextcloudappstore 2.0.0 documentation here :point_right: The Nextcloud app store rules ā€” Nextcloud latest Developer Manual latest documentation ?

I think I didnā€™t read this part, but we may miss this documentation easily.

One more, when I read this part of the documentation :

Therefore we require you to sign your app using a certificate.

I assume itā€™s not necessary to generate a certificate. But, when we register my app in the app store, it becomes necessary.

I found that the Ariadneā€™s thread of the documentation for developers is complicated to read and visibility.

Thanks !! :blush:
Our app it is workspace if you want look at on GitHub :wink:

1 Like

Thanks @dugite-code :wink:

1 Like

What motivates you to create apps?

I maintain two apps and have two very exciting ones in the pipeline, all of them were created from a personal need for the functionality and I try to generalize them so other people can profit from them.

What are your main blockers to get your apps published to the app store?

The process isnā€™t very easy to understand in the beginning, but once you get the hang of it, the signing and uploading process is manageable.

What really slowed you down when you just started developing Nextcloud apps?

Nextcloud has a strong backend API and great vue components for the frontend, but there is a missing link in the chain of the data flow.
There is no library to handle the collection of data from the backend to the frontend, it is all manual axios http calls.
If you want anything more than that, you need to abstract it away yourself.
This is in my opinion a missed opportunity, it would be an awesome time saver, if nextcloud had a library that could automatically map backend entities to frontend entities. As most nextcloud apps already use the vue ecosystem and vuex (which will need to be migrated to its sucessor Pinia) these frontend entities would ideally be mapped into Pinia ORM entities.
This could allow for FAR faster development in my opinion, as data structures could just be defined in the backend and automatically exist in the frontend.

Normally this might not be possible to implement, because the data of the entities in the backend travels through Mappers, Services and Controllers, but thankfully appinfo/routes.php definitions already have the concept of resources, which combine the index, show, create, update and destroy actions which would be all, that is necessary for basic backend entitites to frontend entities mapping.

This is the kind of thing only a fully fledged Ecosystem like nextcloud could deliver and it would open the door to MANY cool features, that are not only good for the developer experience, but also for the user experience.
For example: If many apps used the described library, it would be quite easy to implement a Offline First experience for the nextcloud platform, which would make read-only access to app content possible in the browser, while the device is offline and make content loading FAR faster while online, because at first the stored offline copy of data is presented until the newest online version is downloaded and the state is synchronized. This is clearly the way the web is heading (see any google product) and I would like to see nextcloud modernizing in this direction. All that would be neccessary to implement offline first for apps using the above described library would be the pinia persisted state, a Service Worker to cache static files and small modifications of the apps to disable elements that modify data while the data synchonizes or the device is offline.

I would also like to use the opportunity to answer a question, that wasnā€™t asked :smile: , which is what would make me consider moving my dev efforts from the nextcloud plattform to a different one.

One killer feature of an alternative open source plattform, that would make me switch to developing apps for it basically instantly is, if we could get away from data polling from the frontend.
I want to play with the cool new stuff, or in this case the cool new stuff from 12 years ago: Server Sent Events.

Polling is inefficient on traffic and takes up valuable resources on the backend and is a pain to implement, which is why quite a few nextcloud apps only update their data when a context is switched (calendar: deselecting a calender) or only on page reload (passwords app).
This also ties in to my earlier proposal for automatic entities in the frontend as the library could also listen for changes via a Server Sent Event Stream from the Backend (more complicated to implement, as the resources routes ā€œtrickā€ is not applicable).

SSE in nextcloud is not a new idea, it was partially implemented in 2021 (https://github.com/nextcloud/push/pull/27), but sadly (as far as i can tell) never finished and abandonned (nextcloud/push is archived and I could not find any information, if nextcloud/notify_push is meant to be itā€™s successor).
Collaboration is a huge feature for nextcloud, but sadly only the really big apps have the capabilities to implement it as Realtime Collaboration, often relying on external dependencies (such as the onlyoffice documentserver docker) for the realtime communication part over WebSockets or SSE. Built in SSE could make this available to many more apps.

Generally as a developer I would appreciate more architectual improvements to nextcloud. I know features are what customers are paying for, but the nextcloud architecture has to keep up with the time. I hope nextcloud gmbh can get around to more of them, but I know you are trying, as can be seen with stuff like the sync clients no longer having to poll and sync 2.0.

There have been recent advances in getting more programming languages in the nextcloud backend (MediaDC), but I donā€™t think these implementations can get generalized enough (like a whole framework for creating nextcloud apps with python / JS) without backing from the Nextcloud gmbh, so maybe you can allocate a few resources to that :slight_smile: .

Thanks for this opportunity to get these thoughts out there, I planned on creating a forum thread about them for months, but this is better :slight_smile:

6 Likes

Itā€™s a good idea to link the dedicated page for developers in the app developer dropdown of the apps store. Thank you for sharing.

1 Like

Thank you so much for taking the time to share your thoughts with me, and learning more about what you think of the Nextcloud architecture. THANKS!! :slight_smile:

2 Likes

I think thatā€™s a very important point to boost app development efforts: To have an ā€œeasyā€ to run development environment without the need to go through manual installation of all dependencies. I donā€™t think Iā€™ve seen the nextcloud-docker-dev container mentioned anywhere in the documentation?!

I also like to mention @szaimenā€™s nextcloud-easy-test-container: https://github.com/szaimen/nextcloud-easy-test. Itā€™s intended to test different server branches with different app branches (in contrast to juliusā€™s container where the focus is more on development and ā€œbiggerā€ setups). It greatly helps you to get things up and running to test.

5 Likes

as this was referenced

@Daphne may you want to check out Joplinā€™s community.
Plug-In system was introduced in late 2020 and it is steadily growing joplin/plugins: Joplin official plugin repository. For issues, please use https://github.com/laurent22/joplin/issues. I see good activities in Latest Development topics - Joplin Forum (joplinapp.org) which keeps the project alive through a lot of volunteers.
I might be not as complex as NC but it is the momentum in the community that makes it fun to contribute.
You may get some inspiration there. Documentation is not perfect but GSoC said, that is quite helpful w^cominbed with the in-code documentation.

p.s. Iā€™m a GSoC mentor at Joplin (there was even some exchange with NC two years ago)

2 Likes

See this State of app development topic from 2019, which was linked earlier in this thread from the Joplin dev. Post begins:

Also in 2019, there was the TahoeLAFS plugin developer
There was also the TahoeLAFS plugin dev who was upset after being unable to find developer support
Snippet from that discussion:

I have developed a fairly large new application for Nextcloud with essentially no support from the Nextcloud community.

You have responded to my question with a link to a Nextcloud developer that has not responded to me or this thread.

You have marked this as a ā€œsolutionā€ in your response.

Is there any support in this community for developers? If so, what process should I use to ask questions and actually get a response?

1 Like

there was some direct contact with NC as there was one possible project to develop a NC integration but not enough slots were granted by Google to make it happen and NC did not fill the gap.

2 Likes

Your comment give rise to points very interesting !

I didnā€™t know this library and I have to be attentive in future developments of Vue.js

1 Like

New remarks for the documentation.

I have to create a new section tab from files app on Groupfolders only.

But there is no documentation on this.
I had to search in the existing projects to know how I put a new section here.
Andā€¦ I saw I should use the OCA library JavaScript side.
Butā€¦ there is no documentation on this library.

So, I have to copy the code from existing project. Itā€™s like the SOD (Stack Overflow Driven) for me :confused:

1 Like

Maybe some app dev creates a topic to collect all things what are not in the documentation?

1 Like