this post was submitted on 17 Jun 2023
13 points (100.0% liked)

Programming

13362 readers
1 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS
 

I looked into the lemmy src, and what is supposed to be a CRUD API has several layers of abstraction. Same at work, where we have hexagonally structured apps where following any sort of logic is literally impossible. What are your thoughts?

you are viewing a single comment's thread
view the rest of the comments
[–] Stumblinbear@pawb.social 2 points 1 year ago (1 children)

I just had a look at the Lemmy source and it seems pretty straightforward, what exactly are you having issues with?

[–] CinnamonTheCat@beehaw.org 1 points 1 year ago (1 children)

the fact that there are CRUD COMMON and API crates?????

[–] key@lemmy.keychat.org 5 points 1 year ago (1 children)

I don't see the problem with modularizing code. Any proper IDE will make following through the crates as transparent as if it were all in the main src folder. It's not like there's some complicated indirection at play or anything, it's direct references and invocations.

[–] CinnamonTheCat@beehaw.org 1 points 1 year ago (2 children)

is it kinda early for them to modularize their code?

[–] recursed@lemmy.recursed.net 3 points 1 year ago (1 children)

Given this project has been around for many years, (looking at their releases), I wouldn’t say it’s “early” to modularize their code. It’s very common practice to abstract out / move commonly executed code into their own packages and modules to allow ease of reuse across the app. This way if an entire subpackage needs to be moved or deleted, all related code could be affected at once and code which references it, simply needs to be edited. Typically these places to edit are much easier to handle since most of “calling code” wouldn’t touch the modularized / abstracted code, only their callables.

[–] shadowolf@lemmy.ca 1 points 1 year ago

Is that a problem though?