I’ve been maintaining a toolset written in Python for my company for a while now (GIS work, specifically ESRI arcpy) and this week decided to dip my toes into the C# extension world and my god is it a mess lol. I understand the OOP concepts, but trying to get all the xaml and daml stuff to line up with your classes is a pain.

Visual Studio isn’t helping either, I usually use VSCode or Vim, so a full IDE feels clunky and weird to use.

    • invalidusernamelol [he/him]@hexbear.netOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 days ago

      It’s just plugin writing for ArcGIS Pro. They have an SDK and Visual Studio extension. The SDK lets you use C# to write extensions for their desktop mapping software.

      I’m mostly following the C# syntax rules, having the linter on is fun though since everything been be written a half dozen ways so no matter what I write it gives me the option to switch haha.

      The other pain point is daml/xaml bindings, and working with very large, deeply OO frameworks. When I have to rename or remove something Visual Studio will frequently miss a single string in one of the files and break the app.

      Here’s their doc for the daml language

      • makotech222 [he/him]@hexbear.net
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        Ah not familiar with DAML either, never even heard of it lol. VS/C#'s remove/rename functionality has never failed me before, but if the DAML file doesn’t have strong typing, then that would probably miss it.

        • invalidusernamelol [he/him]@hexbear.netOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          7 days ago

          DAML is their own proprietary XAML alternative that lets you write conditional context into the XAML that rewrites it at runtime.

          This means the strings in that file are turned into a generated package at buildtime and a bunch of artifacts are made with strings like Module1_App_Pane1_ViewModel_Selector

          I’m probably just gonna write by business logic normally and keep it as far away from that system as possible lol.

          • makotech222 [he/him]@hexbear.net
            link
            fedilink
            English
            arrow-up
            3
            ·
            7 days ago

            I’m probably just gonna write by business logic normally and keep it as far away from that system as possible lol.

            This is always the correct decision when working with some bespoke standard

            • invalidusernamelol [he/him]@hexbear.netOP
              link
              fedilink
              English
              arrow-up
              3
              ·
              7 days ago

              Of course all their example code is just a pile of files with default names and all the business logic inside the button classes.

              Might try and find stuff other people have shared. A lot of those are just a mess as well, but there might be a good one somewhere lol

  • Snort_Owl [they/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    7 days ago

    It was the goat back when i was churning out winforms slop with DataTable and DataView it was so easy to slap together some crappy desktop app to sell and DataTable let me query data in memory instead of manipulating via code which was fun.

    And i have never used it since. Its ok for when you need to do something specifically Microsoft but I can’t think of any general thing its good at. It does generally look and feel nicer than java though but kotlin beats both.

    Entity framework and linq was a decent orm for sql server but it only had the full feature set for sql server.

  • SubArcticTundra@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    7 days ago

    If you want a nice OOP language, it might be worth considering one of the Java compatibles like Kotlin. Kotlin for example is a bit more ergonomic than C# and the Java ecosystem is a bit more commonplace than .NET