Home AMX User Forum AMX General Discussion

Coding Standards for Netlinx programs

catalinocatalino Junior MemberPosts: 25
We currently have more work than I am interested in/can produce on my own at my place of business. I'm looking to develop a set of codified standards with how to create Netlinx and Duet code so that everyone is on the same page. The problem is, I "know" how I create Netlinx/AMX/Java code, but where do I begin putting this in a document to give integrators and other future programmers?

Does anyone have anything they would be willing to share that I could take and modify to our institutional standards?

Thanks,
Catalino

Comments

  • PhreaKPhreaK Posts: 966
    What sort of standards are you chasing? If you want a base for some code format and commenting check out the one that was developed by some members of this forum for the NetLinx Common Libraries. Otherwise if you are chasing some on software architecture there a some pretty good discussions spread across the forums to covering things like device communication buffering, ui interaction etc. I know it's painful, but search is your friend. For UI check out the AMX UI Design Guide.
  • jgreer9514jgreer9514 Junior Member Posts: 23
    Coding Standard

    I had to write a coding standard when we got a new person on our team not following the coding format in our library. The only way I could enforce the standard was to write one. There are some specific things to how we treat Amx modules in the document. All of our modules get an include file that contains polling, queuing, debug levels, tech controls of what is being sent from / to the device. We don't use Duet unless its the only option with an unplished api. The include file supports IR, Serial, and IP controllable devices. This is atleast a starting point for you.

    Once our modules are written they are used on all our projects.

    John Greer

  • rynandorynando Junior Member Posts: 68
    There're many style guides on the internet for various programming languages. You should take a look at a few of those and use the one you like best as a template. You could probably set it up as a Wiki if you want it to be a "living document."
  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    "That's the great thing about standards: there are so many to choose from..." me
  • catalinocatalino Junior Member Posts: 25
    And if you don't like one, just fork it and write your own!
Sign In or Register to comment.