Sunday, April 30, 2017
ApexDoc A Salesforce Code Documentation Tool
ApexDoc A Salesforce Code Documentation Tool
Hi All,
Most of you java people may be familar with "javadoc" utility, and who are not from java they must know about good code documentation :).
A good documentation is always a good thing for your project for long term success. A good documentation contains well defined comments, usage, public methods used, their parameters, return types, author, dates etc. Generally documentations used for a open source project or a library projects, so that if any new person is using your library or project then he will get good help about that easily.
A good documentation is always a good thing for your project for long term success. A good documentation contains well defined comments, usage, public methods used, their parameters, return types, author, dates etc. Generally documentations used for a open source project or a library projects, so that if any new person is using your library or project then he will get good help about that easily.
I am working in Salesforce about 3 years with lot of Apex coding. I also created some libraries in Apex also. I wanted something similar documentation for my work using same like javadoc. But i could not found any tool exist for that. So started this utility project in java. My main moto is to make it as simpler as javadoc command. So, here comes my apexdoc.
Go to here http://www.aslambari.com/apexdoc.html and download the "apexdoc" java client. You can also find one screen cast there. Its a zip, so after download, unzip it on your disc, for example D:apexdoc.
Command Syntax:-
apexdoc <source_directory> [<
1) source_directory :- The folder location which contains your apex .cls classes. Ideally it is the folder classes under your Eclipse IDE project setup on disc under "src" subfolder. I think best is that you should first copy that classes folder somewhere on disc for example "D:myprojectclasses", and use this as source folder.
2)
3) homefile :- This option is optional. This is to specify your contents for the home page right panel, Ideally it contains the project information for which you making documentation and it MUST be in html format containing data under tags.
4) authorfile
---------------------
projectname=<project name will be shown on top header>
authorname=<author name will be shown on top header>
email=<email will be shown on top header>
sampleauthor.txt
----------------------
projectname=my project
authorname=Aslam Bari
email=aslam.bari@gmail.com
5) Ideally if you need logo at top of your documentation header, you must put your file under your
Sample commands:-
1) Sample 1:-
apexdoc D:myprojectclasses D:homehtml D:myhome.html D:myauthor.txt
It will generate documentation of all "*.cls" files containing under "D:myprojectclasses" folder and output will be generated under "D:homehtml" folder with name "ApexDocumentation", your home page will contain project info from "D:myhome.html" file, and your header will get contents from D:myauthor.txt file.
It will generate documentation of all "*.cls" files containing under "D:myprojectclasses" folder and output will be generated under "D:homehtml" folder with name "ApexDocumentation", your home page will contain project info from "D:myhome.html" file, and your header will get contents from D:myauthor.txt file.
2) Sample 2:-
apexdoc D:myprojectclasses
It will generate documentation in current folder of given source directory "D:myprojectclasses".
If all goes fine you will get one good documentation of all your classes, public properties and public methods generated. One sample generated output is here:-
Guidelines for comments and code:-
You code must have two types of comments. One for Classes, one for Methods. By default all public properties will be fetched in documentation, no need for comments for them.
Comments must start with /** and ends with */
Following attributes are supported for now:-
@author
@date
@param
@param
---(multiple @param supported)
@description
@return
Some sample code with comments as below:-
/**
* @author Aslam Bari
* @date 25/01/2011
* @description Class calculates some accounting information based on user experience and given methods. Usually user need to make one object of the class and call methods direcly.
*/
public class Accounting{
public string accountNo {get;set;}
public Integer discount {get;set;}
public string bankname {get;set;}
private string balance = 0;
/**
* @author Mark P
* @date 25/01/2011
* @description It accepts one account number and discount from external
user and calculates some info based on user profile and return the total price.
* @param accountNumber Users account number
* @param discount discount applicable for the user
* @return Double Price calculated after calculating based on profile
*/
public double calculatePrice(string accountNumber, integer discount){
-----------------
-----------------
-----------------
return price;
}
}
This
Thanks
Aslam Bari
Blog Archive
-
▼
2017
(1096)
-
▼
April
(212)
- Alright Already
- Android To Case Android App to log Salesforce Case
- Android Wear 1 3 0 2171751
- Android Rabbids Big Bang v2 1 2 Premium APK
- Annoying Myths on the Bailout
- Announcing Upcoming Giveaway!
- Animated Widget Contact Pro v1 6 3 Apk
- ApexDoc A Salesforce Code Documentation Tool
- Alphabakes March 2015
- Angry Birds Go! V1 0 0
- AKVIS HDRFactory v5 5 812 14260 x64 Multilingual P2P
- Another online game platform but this one may be t...
- An All Black Denim Look To Try Now
- Akhil Th Power Of Jua 2017 450MB 720P BRRip Hindi ...
- Andaman 2016 Tamil Watch Online Full Movie Free HD
- Another Victim
- Ancora saldi
- All Four British Members of LulzSec Get Prison Sen...
- Amazon com Gift Card Generator updated
- ALL TIED UP
- Amar Apanjan Bengali Movie Songs Mp3 Download Soha...
- Amma Kanakku 2016 Watch Full Tamil Movie Online
- AlphaBakes S Roundup
- Android Internal and External storage example Stor...
- Angry Birds Rio v1 8 0 2013 FULL Alien iOS ipa HD
- Angry Birds Go! v1 4 3 Mod Unlimited Coins
- Angry Birds POP Bubble Shooter v3 0 2 Mod Gold Liv...
- Am I the Walrus
- Another Nerd Sounds Off About Avatar!
- Albert Woodfox Speaks to the Experts
- AntiVirus Pro Mobile Security v4 1 Apk Download
- AOMEI Partition Assistant Professional 5 6 Free Do...
- apk Crazy Chicken Shooting v3 0 Premium Edition Fr...
- AlphaBakes September 2015
- Ambition but Not the Gravity Kind Derek Cianfrance...
- Angry Birds Star Wars HD v1 4 1 APK Download
- Amazon walk in for ERC Associate
- An Unwanted Visitor… The Flu Bug!
- Amazing Cars HD Wallpapers Free Download Without W...
- Android ListView with EditText Filter Example
- Alien Creeps TD version 1 8 0 Monedas Diamantes y ...
- Altos Adventure v1 1 1 Mod
- ANGREJI WALI MADAM LYRICS Kulwinder Billa Dr Zeus ...
- Anteater Solider WIP
- AMV Karton Bestamvsofalltime Anime MV ♫
- Angel by Ullas Quilt World
- Angry Birds Transformers 1 2 13 APK Mod Unlimited ...
- Angels
- Anushka Sharma on Vogue India Magazines February 2...
- Americas Creativity Crisis
- ANDROID MOBILE KA BATTERY LIFE KAYSE BADAYE à¤à¤...
- Amoeboid architecture
- Angry Gun
- An Admirable Look To Copy This Winter
- Another Pic from the past
- Android EditText Enter key Event example
- AliExpress Shopping App
- Ang Probinsyano December 21 2016 Pinoy TV HD
- Angry Birds Space Android Premium v2 0 0 APK Full ...
- Akinator The Genie APK Download Full Premium versi...
- Alternatives of Open Session In View OSIV
- Aplicaciones Gratuitas para iPhone iPad por Tiempo...
- AlphaBakes G Round up
- Amateur Surgeon 4 v1 1 1 Mod Apk Hack Android
- Another Meme!
- Amazing Spider Man 2 2014 Hindi – Tamil – English ...
- App Locker and App Hider apk 2014
- Amerikan Dış Politikasını Kim Belirliyor
- An Ancient Gesture Edna St Vincent Millay
- Android Spinner Programmatically add remove Items
- Amorth Watch Hes back because hes got himself a TV...
- an awesome presentation on usability testing
- Algorithm 2014
- All In One Toolbox Cleaner v7 2 0 Pro
- Altos adventure 1 3 apk
- Angel Stone 1 1 2 APK
- All Is Forgiven For Now
- Angry Birds Fight! RPG Puzzle v2 3 1 Mega Mods
- Anthropologie the magazine
- any time you need em slice and bake chocolate chip...
- Apologia Journeys of Faithfulness
- Amnesia Memories Premium Apk v1 0 0 For Download
- APLICACIONES DE PAGA GRATIS EN ANDROID ALTERNATIVA...
- Angel scent pouches pattern quilt
- And deep deep in the forest
- Android Nougat coming to Galaxy S7 S7 Edge
- Another American Crime
- Animal Face Full v1 2 Apk
- Alone in Berlin 2016 Watch Online Full Movie Free HD
- Apartment in Leme Elizabeth Bishop
- Android Bluetooth Switch on off programmatically
- Angel quilt tablecloth
- Anomaly Defenders APK 1 0 LATEST VERSION FREE
- Alice in the Cities 1974 Hd 720p Movie Download
- Alzheimer’s Disease Part 1
- Amgen v Hoffman La Roche Checking the Wrong Box Co...
- Alexandra Daddario
- Annual Awards Nerdism is Back! Oscar Predictions
- Another reason to disable performance schema
- Amerikan İstisnacılığı
-
▼
April
(212)