Documentation in XML

Asked

Viewed 260 times

9

I develop a framework in PHP and would not like to comment on the code of the framework directly in the classes, for several reasons.

So I wonder if there is an editor that reads the documentation from an XML or something like that, for example:

  • Repository.php - class used without documentation
  • Repository.php.xml - documented class or only documentation information.

In Visual Studio this functionality is used with the scripts:

  • jquery.js - scripts without documentation
  • jquery.vsdoc.js - scripts with documentation
  • I don’t know, but it’s a great question

  • 2

    I will post on Stackoverflow in English to increase the range of this issue!

  • put the question link in the stack in English so we can follow along

  • No response so far. I’m doing research with some acquaintances in the area as well. Apparently the Komodo IDE supports Intellisense as jquery and PHP frameworks through an XML. Later I will search the xml file and see how this model works!

  • As soon as I get an answer I’ll update this topic in case someone one day searches the same thing!

  • all right, any way the question may be something to be created, tai a good alternative to documentation, q do not "pollute" the code.

  • http://stackoverflow.com/questions/5049861/autocomplete-syntax-for-html-or-php-in-notepad-not-auto-close-autocompelete

  • What does that have to do with William? aehaehauehaue

  • 2

    I’m not allowed to comment yet, so I’ll venture a hint here: Can’t you comment on your classes normally, run Phpdoc to generate the documentation, and then run a script that removes all comments from the code? Scripting would not be difficult and you can include it in the deployment process if you are using some tool like.

  • Did you find a solution? Poste as an answer to help other people.

  • The @Newtonwagner solution seems to me the most plausible without reinventing the wheel.

  • Yes it’s a great idea, I don’t like comments in the code, so keeping those comments in class is out of the question, if the documentation is separated pleases me and I can have a complete documentation and in case of errata or new functionalities I can change the documentation without having to touch the classes that will be used by other developers and not by myself who know the cable system to ass every line... Moderation as I do? I believe there is no answer to this at the moment... the only one I found was an IDE that allows you to use custom DOC files

  • It looks like PHP Tools for Visual Studio can help https://visualstudiogallery.msdn.microsoft.com/6eb51f05-ef01-4513-ac83-4c5f50c95fb5

Show 8 more comments

1 answer

4


There are a few ways to generate php documentation, but most of these API’s generate documentation by analyzing your code. I’ll leave some links here:

There is a question in Stackoverflow in English too that may have the answer to your question here, but I believe that, at least currently, there is no third party tool or plugin that does the documentation via XML (which in my opinion is much easier).

  • Yes, I believe there is no such thing today! The fact is that the separate documentation allows for cleaner classes with fewer significant lines and easier maintenance of all documentation pages. What I needed was to generate initial documentation from the code and complement the textual in this generated documentation!

  • In this case I believe that you can use Phpdoc by the code comment and take the documentation it generates by its source to change, talking is easy rs but I do not know if it allows editing so open

Browser other questions tagged

You are not signed in. Login or sign up in order to post.