Navision Programming Standards Book

Dave_CintronDave_Cintron Member Posts: 189
In 1998 I was in possession of a printed book with Navision coding standards. This was NOT the C/SIDE Reference Guide. It was NOT lessons on how to develop. It was about 40 pages of instructions on how to write code to conform to Navision standards. This information does NOT appear in any other PDF manual I have seen.

So, excluding the CSIDE and Programming and Development manuals and courses, does anyone have a copy of this?
Dave Cintron
Dynamics West
http://www.dynamicswest.com

Comments

  • DenSterDenSter Member Posts: 8,305
    I know what you mean, it came in the box of blue manuals. I'm pretty sure I've seen it as a PDF somewhere. I checked my collection of old manuals but could not find it. Have you checked old version product CD's?
  • Dave_CintronDave_Cintron Member Posts: 189
    Yes, I've even checked my 1.20!
    Dave Cintron
    Dynamics West
    http://www.dynamicswest.com
  • aseigleaseigle Member Posts: 207
    I believe this is what you are looking for

    http://download.microsoft.com/download/ ... 0Guide.pdf

    If not, let me know, I might still be able to help.
  • Dave_CintronDave_Cintron Member Posts: 189
    This is not the exact same one (having Microsoft's name on it) but looks like an updated version of the original.
    I believe this will do, thank you.

    Every developer should be required to read this guide!
    And if anyone one has an older copy, I'd be happy to have it too!!
    Dave Cintron
    Dynamics West
    http://www.dynamicswest.com
  • lvanvugtlvanvugt Member Posts: 774
    Hi David,

    I know I have an old copy of it. Can send you by mail. But the new (MS) version and the old do not differ.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • Dave_CintronDave_Cintron Member Posts: 189
    Thank you Luc, but if they are the same it's just nostalgia :)
    Dave Cintron
    Dynamics West
    http://www.dynamicswest.com
  • BeliasBelias Member Posts: 2,998
    Cool manual!It can help a lot when naming tables, fields etc. (one of the hardest works, sometimes) :-$
    thanks for the link aseigle and thanks dave to put it in evidence!
    EDIT: after a brief look at the pdf, i noticed this
    To use a parameter as an option field, define it in the function. When you call the function, use an integer as parameter in the call.
    what a relief!I always thought that i needed to make the option both in the caller and in the function...it was crappy but i thought it was the right way...
    this is a "MUST READ" book for everyone :!:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • DenSterDenSter Member Posts: 8,305
    Belias wrote:
    this is a "MUST READ" book for everyone :!:
    Yes it sure is
  • David_SingletonDavid_Singleton Member Posts: 5,479
    =D> Thanks dave for bringing up this topic.

    There is nothing worse than a self proclaimed "programmer" that thinks they can do it better. The idea of a standard, is that it may not be perfect, but so long as everyone does it the same way, it will be easy to work as a part of a team and deliver reliable code.

    The worst thing to try and work on is code where someone does not follow the standards.

    This is a great book, and it really should be mandatory for all NAV developers to follow this and stop inventing their own "better" development styles.

    Sadly once these developers go off the beaten track, its often impossible to bring them back in line, so in the end sacking them is the only option. The key is to read this book BEFORE you start developing.

    PS they do need to work on deciding the standard for CASE indentation and it attached ELSE. That is often used inconsistently in the BAD code.
    David Singleton
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Oh... good old days! This was one of my first reference guides. I don't know if it's the official name but it was called "style guide". But I lost it somehow.
    Some years later someone told me that it's no longer valid because after takeover of Navision by MS they didn't follow this way. I was very astonished because standard still looked (and even looks) like they did.
    Again after a while MS implemented the Tab feature for code lines. That gives you the possibility to shift blocks of code to the right alignment. Two blank spaces forward with Tab and back with Shift+Tab. My first thought was, why should they insert two blank spaces by one hit of Tab when the "style guide" isn't valid? But then I saw what will happen when you hit Shift+Tab. I was a little bit confused.
    But I never stopped working this way and I always tell junior developers they need to format their code like in standard. Sometimes they don't heed my advice but then I let them do the task twice if it's not well formatted and named. So, they learned it the hard way. :wink:

    Btw, weren't there plannings for some kind of auto-format like in Visual Studio?
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • BeliasBelias Member Posts: 2,998
    Btw, weren't there plannings for some kind of auto-format like in Visual Studio?
    we can hope for it when the IDE will be moved on a page-like style [-o<
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Again after a while MS implemented the Tab feature for code lines. That gives you the possibility to shift blocks of code to the right alignment.

    I think you made a typo there. Didn't you mean to say "Again after a while MS returned the Tab feature for code lines."

    This was a feature of Navision from the very beginning but was removed at some stage and just took a long time to come back. :-#
    David Singleton
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    I think you made a typo there. Didn't you mean to say "Again after a while MS returned the Tab feature for code lines."

    This was a feature of Navision from the very beginning but was removed at some stage and just took a long time to come back. :-#
    No, it's not a typo. It's just ignorance. :wink: I didn't know about this feature before. Maybe I just didn't mention it or I didn't work with those early versions of NAV. But it's good to know to have someone here who knows about those good old days. :D
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • BeliasBelias Member Posts: 2,998
    A little question...in the book they've written this
    IF NOT
       SETCURRENTKEY(
         aaaaaaaaaa,bbbbbbbbbb,cccccccccc, dddddddddd,eeeeeeeeee) 
    THEN 
      SETCURRENTKEY(bbbbbbbbbb,aaaaaaaaaa);
    

    so, am i supposed to indent my code like this?
    if not 
         TBFASerialNo.get(
           ptbcreatefabatch."fixed asset no.",ptbcreatefabatch."Serial No. Summary",ptbcreatefabatch."posting date")
      then begin
        TBFASerialNo.validate("Fixed Asset No.",ptbcreatefabatch."fixed asset no.");
        TBFASerialNo.validate("Serial No. Summary",ptbcreatefabatch."Serial No. Summary");
        TBFASerialNo.validate("Starting Date",ptbcreatefabatch."posting date");
        TBFASerialNo.insert(true);
      end;
    
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • David_SingletonDavid_Singleton Member Posts: 5,479
    How else would you do it?

    By the way those variable names need to be looked at, they don;t seem to conform to the standards. Makes the code hard to read.
    David Singleton
  • BeliasBelias Member Posts: 2,998
    By the way those variable names need to be looked at, they don;t seem to conform to the standards. Makes the code hard to read.
    I know, but unfortunately it's our company policy and i've to respect it (thought i don't want to). I am fighting to remove this crap from our standards since one year ago...i hope i'll win one day or another...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • lvanvugtlvanvugt Member Posts: 774
    What makes you wonder about this?
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • BeliasBelias Member Posts: 2,998
    lvanvugt wrote:
    What makes you wonder about this?
    :-k what do you mean with "this"?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • lvanvugtlvanvugt Member Posts: 774
    Belias wrote:
    :-k what do you mean with "this"?
    :shock:
    Honestly, I do not know. I recall I wrote this answer to another post, but I cannot find the post anymore. So just disregard my previous entry on this thread.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • BeliasBelias Member Posts: 2,998
    from the manual:
    FlowFields are calculated even when they are hidden.
    I hope this is an old "feature"...is this still true for forms/pages?i guess not :-k
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Belias wrote:
    from the manual:
    FlowFields are calculated even when they are hidden.
    I hope this is an old "feature"...is this still true for forms/pages?i guess not :-k

    This depends on the version. Its something that happens in various versions.
    David Singleton
Sign In or Register to comment.