Source Code Control

MrDeeMrDee Member Posts: 48
edited 2004-06-22 in Navision Attain
8) I have a SQL trigger set up on the Object table. (note SQL trigger not C/AL trigger) This records the object number, who changed it, when changed and the VersionList (so I can check that we are documenting changes correctly)

:arrow: Now I would like to record WHAT was changed inside the code (or even check if any code change was made)

To do this I need to parse the object BLOB. Once I have the text of the navision object I can automatically save it in sourcesafe (or similar)

This needs to work without manually having to save the object as a text file first. ( :evil: so please no 'go to export and save as text' replies....)

:?: Can anyone give me an idea of where to start?

TIA

Comments

  • janpieterjanpieter Member Posts: 298
    Mr Dee,

    I'm sorry, you can only automatically export a binary file. You can check this in sourcesafe as well but you will never be able to do a text compare with different versions. What you can do is import a binary sourcesafe object into navision. So it is a 1/2 sollution, but definatly better then nothing.

    I did some research on how the system of the developers toolkit works (update from en to client) but i was unable to discover how it works. It must be one of the DLL's included with Navision. These DLL's contain API's but it is impossible to discover it's interface. There is no documentation of it.

    Only hope that MBS Navision will add some functionality (or explain the functionality as it already exists but not accessible) so we can do our version management properly :x
    In a world without Borders or Fences, who needs Windows and Gates?
  • RobertMoRobertMo Member Posts: 484
    If you colud extract code form binary objects, it would open a big licensing problem. Reverse engineering would be possible... and that is not what MS likes...

    Remember, you can export many objects in binary form, but only licensed ones to txt.
               ®obi           
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  • MrDeeMrDee Member Posts: 48
    :D wow - nice response all

    Surely if I can see the text inside Navision, and save the object as text within navision I must be able to understand the BLOB from an application outside navision.

    ** All we need is the schema. **

    If this is truly a Microsoft product now they MUST be looking at sourcesafe integration... Or maybe they will integrate into Visual Studio Team Foundation http://msdn.microsoft.com/library/defau ... vssmap.asp

    :?: Anyone have access to the 4.0 Beta? (Hint only US people are trusted with this one)

    :!: BTW I posted the source for the SQL triggers - any idea when they become available to all in the downloads section?
  • MrDeeMrDee Member Posts: 48
    I have requested this on VOICE and also tried the Microsoft wish list.
    Does anyone have contacts inside Redmond?
  • MrDeeMrDee Member Posts: 48
    Just spoken to MBS. The answer is no. :( No access to the schema :cry: , no access to the code via C/Front.... :x

    :idea: However a solution may still be possible using MS Server 2003 & Shaodow copy - I will keep you posted.
  • janpieterjanpieter Member Posts: 298
    I have tried breaking the scheme. No luck :cry:

    We are now busy creating a tool that puts binary objects in SourceSafe. The tool responses on a custom trigger that fires whenever the user (programmers) opens an object in designer mode.

    In fact it is almost ready and it works well. The only disadvantage is that you can't do a direct compare of different versions. But what you could do (and takes only a minimum of user actions) is to check out 2 versions of 1 object. Check these objects out in a database under different number and name. Manualy export them to text and compare them with a tool.

    The sollution is not perfect but much better then what we have now ... and we can always see 'who' has 'changed' what 'when'.

    Plus the documentation trigger reading tool may be a nice addition to this system.
    In a world without Borders or Fences, who needs Windows and Gates?
  • MrDeeMrDee Member Posts: 48
    I eagerly await seeing what you have done :)
  • MrDeeMrDee Member Posts: 48
    Source Safe - (Sort of)

    (read to the end - there is a solution)

    so we can't automatically save files to sourcesafe.... :shock:

    We can save .txt files - but to save every object as a txt file would take ages. :(

    If only there was an application that would take a .txt file containing multiple objects and split them into individual files....

    There is - MBS just sent it to me. 8) (mail me if you would like a copy - I will be posting this shortly)

    OK, so I have individual files - so what? If you regularly create .txt files of changed objects (simple filter and export) & save them as individual files (with the application MBS provided) You now have

    :idea: 1) Database wide Text search of Objects
    :idea: 2) Another backup optipon
    :idea: 3) If you have Windows Server2003 you can turn on ShadowCopy for a drive. This makes many sourcesafe like options possible i.e.

    :arrow: Recover files that were accidentally deleted. If you accidentally delete a file, you can open a previous version and copy it to a safe location.
    :arrow: Recover from accidentally overwriting a file. If you accidentally overwrite a file, you can recover a previous version of the file.
    :arrow: Compare versions of file while working. You can use previous versions when you want to check what has changed between two versions of a file.

    for further details on ShaodwCopy see
    http://www.microsoft.com/windowsserver2 ... w/scr.mspx
  • janpieterjanpieter Member Posts: 298
    If i understand what you are saying is that:

    1. you export all objects in a single .txt file manualy.
    2. you split this file with the splitter tool (also downloadable from mibuso i believe).
    3. you check in these individual files into source safe.

    Well i knew about this possibility. I beleive MBS in the Netherlands use the same way to do version management. I think it is a better sollution then nothing but still consider it as a 1/2 sollution. I think it's a huge workload to achieve that.

    I think i stick to the option to check in the binary file wich we can automatically export. How we are going to work now is:

    1. Detect when designer window get's opened and closed (herefor i developed an automation DLL that scans the open windows and sends a trigger to navision when changes are detected).
    2. Do a version compare and inform user (programmer) if there is a version problem (these compares are done with C/AL and automation)
    3. Do a user decided action for example auto import the newest version of an object from source safe.
    In a world without Borders or Fences, who needs Windows and Gates?
  • ronvdwronvdw Member Posts: 16
    I have created a case at MBS several months ago about this. The question was whether it is possible to enahnce functionality of the Object table. If it would be possible to export objects as text from C/AL a integration with a version control system would be easy. The "save as text" function from the Object table could then perform the regular licence check.

    The reaction from MBS was that the sent this idea to product development.
    Connectivity Studio for Microsoft Dynamics NAV - Where Microsoft Dynamics NAV meets the world
  • MrDeeMrDee Member Posts: 48
    > 3. you check in these individual files into source safe
    with shadow copy you do not need to - it becomes the sourcesafe

    If anyone has looked at CVS it could probably do it better

    I agree it is only a 1/2 solution - but it is better than no solution.
  • MrDeeMrDee Member Posts: 48
    :arrow: Some have suggested adding the BLOB size as well - only adding an audit line if this number changes
    The only issue with this is 1 character changes are lost.
    Over the years I have seen many systems fixed by a single punctuation change. Therefore I believe a log of every event is required.

    :arrow: It has also been suggested that NavisionAudit should be a Navision table. Your call - I set it up so that (1) Navision developers are not tempted to 'fix' the results (2) Navision developers are not annoyed by yet another table.

    Change the code to your own ends - your milage may vary :D
Sign In or Register to comment.