nextcloud / build

🏗 App builder for Nextcloud
GNU Affero General Public License v3.0
3 stars 0 forks source link

routes with a bit of boiler plate #1

Closed blizzz closed 4 years ago

blizzz commented 4 years ago

@MorrisJobke @skjnldsv

that's a start with routes and some pseudo code, as discussed. We could actually merge read+export and create+import(+update) by only working with XML files. But that would mean the frontend already generates the XML. How feasible is this? Otherwise we'D transport app data as array forth and back.

blizzz commented 4 years ago

@skjnldsv what about the question in the description?

skjnldsv commented 4 years ago

Should be easily doable :) Ideally we should have a schema to rely on laying around somewhere? Something to validate against?

blizzz commented 4 years ago

Should be easily doable :) Ideally we should have a schema to rely on laying around somewhere? Something to validate against?

That's great :) And having a schema was the plan. Originally @MorrisJobke wanted to do this, but since he was dragged away I started yesterday. Nothing pushable so far.

MorrisJobke commented 4 years ago

That's great :) And having a schema was the plan. Originally @MorrisJobke wanted to do this, but since he was dragged away I started yesterday. Nothing pushable so far.

Sorry :/ I had an XSD in mind, because we have a lot of metadata for given attributes and then XML with attributes on the nodes makes a lot of sense and having a proper XSD makes it easy to validate it across code bases. If JSON reduces the amount of translations needed between frontend and backend, then maybe going for JSON with something like JSON-schema might also be a valid approach. Pick whatever you want.

blizzz commented 4 years ago

That's great :) And having a schema was the plan. Originally @MorrisJobke wanted to do this, but since he was dragged away I started yesterday. Nothing pushable so far.

Sorry :/ I had an XSD in mind, because we have a lot of metadata for given attributes and then XML with attributes on the nodes makes a lot of sense and having a proper XSD makes it easy to validate it across code bases. If JSON reduces the amount of translations needed between frontend and backend, then maybe going for JSON with something like JSON-schema might also be a valid approach. Pick whatever you want.

Barth and I were discussing today mostly the designer. And there it does not make sense to push xml back and forth. It is a different story for exporting and importing – but here the frontend simply passes it on to the backend. So, it is solely an interchange format. I'll continue with the xsd.

… In this regard I was thinking to import the app .xsd for formats and the svg xsd for the icon type, but was lead down by xmllint. It does not support https and my poor mans approach to try to patch it was not successful. I'll stick with simply types or copy them in for now instead.

blizzz commented 4 years ago

rebased