4 ms·
What libraries does your Contacts app use under the hood? I'm asking because pretty much every contacts app I've tried had countless bugs – either in CardDav or
by codethief 3y ago
What libraries does your Contacts app use under the hood? I'm asking because pretty much every contacts app I've tried had countless bugs – either in CardDav or the vCard part (when importing/exporting) or both.
- BrunoBernardino 3y agoI specifically didn't want to use any libraries as I'm trying hard to avoid bloat, and I kind of enjoy reverse-engineering the CardDav (and next CalDav) clients, while reading the RFCs. It's likely this will have bugs for the weirdest things, and where I'd appreciate help as long as it's not making things too slow/heavy. It's currently very naive and simple and using https://deno.land/x/xml@2.1.3 https://deno.land/x/xml@2.1.3 for some minor parsing in some of the requests; I drew the line to stop supporting fields and actions as soon as it worked perfectly for me and my wife (Linux and Android + macOS and iOS). That being said, here's the function to build a vCard: https://github.com/bewcloud/bewcloud/blob/b81710a720d7d6afc2d71d1782b13e60941b4d0a/lib/utils.ts#L287 https://github.com/bewcloud/bewcloud/blob/b81710a720d7d6afc2... And the function to parse a vCard: https://github.com/bewcloud/bewcloud/blob/b81710a720d7d6afc2d71d1782b13e60941b4d0a/lib/utils.ts#L340 https://github.com/bewcloud/bewcloud/blob/b81710a720d7d6afc2...
- andrewaylett 3y agoI fear you may be in for a painful time :(. My experience with DAV in general is that there are enough inconsistencies between clients that it's hard to support everyone properly. To be fair, that was well over a decade ago, maybe things are better now -- but it's the sort of spec where it makes sense to put effort into reusable libraries, to amortise the effort across multiple projects. On the other hand, if you're enjoying yourself then great :). I'm looking forward to seeing what the project evolves into.
- BrunoBernardino 3y agoThanks! > I fear you may be in for a painful time :(. Oh, I had some pain with Gnome and iOS already! DavX5 (Android) was pretty easy to debug and "tell me" what was wrong. > On the other hand, if you're enjoying yourself then great Exactly. I don't need bewCloud to replace Nextcloud or ownCloud for everyone, but as long as it does it for me and my family, it's cool. If others benefit, even better!
- mnutt 3y agoI went down a somewhat similar path a while back. I liked some of the functionality OwnCloud/NextCloud offered, but it seemed like there were just more and more php projects bolted on and I was worried about it from a security perspective. Sandstorm.io had just come out at the time and it felt like the "right" way to run a bunch of separate apps, so I built a webdav server/UI[0] as a sandstorm app that could replace OwnCloud and still use the OwnCloud client apps. It was a bit of a mixed bag--it worked, but I quickly discovered that DAV has _tons_ of quirks and the OwnCloud clients had all sorts of interesting/semidocumented behavior. If I had had more time on my hands I would have probably built my own set of clients and had an easier time. [0] https://github.com/mnutt/davros https://github.com/mnutt/davros
- BrunoBernardino 3y agoThanks for sharing!
- ocdtrekkie 3y agoBig respect for this approach. It's hard but there are benefits. You can often build functionality at lower levels than a library would let you. My home automation software implemented POP3 and later IMAP both without a library. And FWIW, it was really fun seeing how those standards actually work under the hood.
- BrunoBernardino 3y agoThanks! For some use cases it's more than enough and it _is_ very fun (or annoying) to see how those standards are implemented differently by everyone.