• 5 Posts
  • 122 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle










  • many2one: so in this relationship you will have more than one record in one table which matches to only one record in another table. something like A <-- B. where (<–) is foreign key relationship. so B will have a column which will be mapped to more than one record of A.

    no, the other way around

    When B has a foreign key to A, many B records may relate to one A record. That’s the many2one part.

    The fact that different B records can point to different A records is irrelevant to that.

    one2many: same as many2one but instead now the foreign key constrain will look something like A --> B.

    It’s the same, mirrored. Or mirrored interpretation / representation to be more specific. (No logical change.)

    If you had B --> A for many2one, then the foreign key relationship is still B --> A. But if you want to represent it from A perspective, you can say one2many - even though A does not hold the foreign keys.

    In relational database schemata, using foreign keys on a column means the definition order is always one to one, and only through querying for the shared id will you identify the many.

    many2many: this one is interesting because this relationship doesn’t make use of foreign key directly. to have this relationship between A and B you have to make a third database something like AB_rel. AB_rel will hold values of primary key of A and also primary key of B. so that way we can map those two using AB_rel table.

    Notably, we still make use of foreign keys. But because one record does not necessarily have only one FK value we don’t store it in a column but have to save it in a separate table.

    This association table AB_rel will then hold the foreign keys to both sides.



  • I don’t have multi-user library maintenance experience in particular, but

    I think a library with multiple users has to have a particular consideration for them.

    1. Make changes in a well-documented and obvious way
      1. Each release has a list of categorized changes (and if the lib has multiple concerns or sections, preferably sectioned by them too)
      2. Each release follows semantic versioning - break existing APIs (specifically obsoletion) only on major
      3. Preferably mark obsoletion one feature or major release before a removal release
      4. Consider timing of feature / major version releases so there’s plannable time frames for users
    2. For internal company use, I would consider users close and small-number enough to think about direct feedback channels of needs and concerns and upgrade support (and maybe even pushing for them [at times])

    I think “keeping all users in sync” is a hard ask that will likely cause conflict and frustration (on both sides). I don’t know your company or project landscape though. Just as a general, most common expectation.

    So between your two alternatives, I guess it’s more of point 1? I don’t think it should be “rapidly develop” though. I’m more thinking doing mindful “isolated” lib development with feedback channels, somewhat predictable planning, and documented release/upgrade changes.

    If you’re not doing mindful thorough release management, the “saved” effort will likely land elsewhere, and may very well be much higher.




  • For a desktop app I would go with none of those.

    If cross platform is the goal, the more important question, and independent of the programming language, is which GUI framework you will use.

    Your best bet, at least if you are looking for a stable GUI framework, the best candidate may be C++ and Qt. But that’s a hassle in its own right - both C++ and Qt.

    TypeScript will have some solutions for you, with web rendering as a desktop app. Golang will have Qt bindings or other more experimental/not thoroughly established+popular GUI frameworks.

    My personal favorite ecosystem is .NET. It has an official cross-platform UI project MAUI, but without an official Linux target. Community extensions probably exist. Personally, I dislike the way the UI is declared and bound though (XAML).

    My current interest, which I have not explored or validate yet, is using .NET but then host a web or Blazor app in it with Webview2. .NET supports cross-boundary programming, crossing web+managed/native development, and crossing web(HTML+JS)+managed.

    Most of the time GUI and the framework technology is a hassle. Your question is too broad and unspecific, so there’s not a good answer.

    If it’s not a “serious” project that you depend on [for your livelihood], pick and start with whatever [looks good or interesting] and go from there. If it is a “serious project” do a bit more GUI framework exploration and assessment, and pick and commit to something. If it’s a big commitment or risk, do prototyping with your candidates for verification and assessment - beyond the most simple examples, and for your specific usage.


  • Depends on what I want or need to “understand”.

    I’ve worked for many years on a project (it’s a whole project ecosystem tbh with multiple projects; desktop winforms app, server app, SQL server, asp.net MVC app, asp.net blazor app, mobile wpf app, sync service app). On the main project (client + server) I haven’t visited one major area, and another I confidently know that it’s not understandable to me without specific deep effort.

    I recently had to work on the latter. I take a localized approach. Explore what I have to do, without opening the full scoped understanding that’d lead me to architecture refacs. I write out the method call stacks to get an overview of who calls what when. To then know what I have to inspect and analyze further.

    I take notes where necessary, or improve and comment code where appropriate for better understanding and obviousness.

    I create documentation - about concepts and architecture as appropriate and necessary.

    Code should be obvious and intuitive. Concept docs should document the broader concepts.

    When those concept docs exist, those are what you look at to understand app intention and behavior. And it should give you an introduction to architecture. From there, exploring the code should be self-explanatory (but may require specific, repeated, and iterative analysis). And I take notes about what’s relevant and I need for understanding or task.

    Afterwards, those notes should have, or should then integrate into the code base or docs, or be determined irrelevant for that. If I had to write them out and down, it’s more likely they should be part of something than not.