ApexDoc - A Salesforce Code Documentation Tool

Tuesday, January 25, 2011 by Aslam - The Alexendra
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.

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'.

Guidelines to use 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> [<target_directory?>] [<homefile>] [<authorfile>]

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:\myproject\classes\", and use this as source folder.

2) target_directory :- This option is optional. This is to specify your target folder where documentation will be generated. If not given then it will generates the output documentation into current directory.

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 :- This option is optional. This is a simple text file path containing following info.

---------------------
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 target directory with name logo.jpg with dimension.

Sample commands:-
1) Sample 1:-

apexdoc D:\myproject\classes D:\home\html D:\myhome.html D:\myauthor.txt

It will generate documentation of all "*.cls" files containing under "D:\myproject\classes" folder and output will be generated under "D:\home\html" 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:\myproject\classes

It will generate documentation in current folder of given source directory "D:\myproject\classes".

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 tool is in Beta version and may contains bugs. I would like to get your feedbacks on this and will surely enhance this tool based on your reported bugs and feedback. Reach me at aslam.bari@gmail.com

Thanks
Aslam Bari

243 comments:

«Oldest   ‹Older   201 – 243 of 243   Newer›   Newest»
sobiga J said...

Thank you for useful inoformation!

Iot Training in Chennai
Big data Hadoop Training in chennai

srinivasulu said...

Thanks. Nice blog!! Very useful information is providing by your blog. Great tutorial about
Best digital marketing workshop in chennai

srinivasulu said...

Thanks for such a knowledgeable post.We provide Best SEO services in Chennai
please visit:
digital marketing classes in chennai

dushyant sharma said...

Webtrackker Indirapuram, recognized among the top ten software testing training institute in Indirapuram, has a training module for beginners, intermediates and experts. If you are a university student, I.T professional or a project manager the best software testing training institute in Indirapuram offers the best training environment, veteran software testing trainers and flexible training schedules for complete modules. In addition, the best training institute for software testing training in Indirapuram asks for a value to the students' money rate. Students of all professions can pay the fee structure of the Software Testing courses.
software testing institute in Indirapuram

aashutosh webtrackker said...

Aws online training in india

Salesforce online training in india

aashutosh webtrackker said...

Aws online training in india

Salesforce online training in india

aashutosh webtrackker said...

Salesforce online training in india

Aws online training in india

Hadoop online training in INDIA


Mahesh said...

thanks for sharing this blog. This very important and informative blog for then who do Salesforce
I really loved reading this. Keep it up.!!

Best Salesforce training in Gurgaon

dushyant sharma said...

NEW YEAR OFFERS 2018

Flipkart New Year Offers on Mobile Phones


Ebay New Year Offers On Mobile Phones

srinivasulu said...

Thanks for sharing about digital marketing,your blog always brought some useful information,i hope you will share more article like that...
digital marketing classes in chennai

dushyant sharma said...

SEO Company In Cape Town

SEO company in Durban

SEO Company in india
SEO company in Johannesburg

soukya reddy said...

I really enjoy the blog.Much thanks again. Really Great.
salesforce Online course Hyderabad
salesforce Online course Bangalore
salesforce Online course India
salesforce Online course

dushyant sharma said...

SEO company in new york

SEO Companyin Texas

SEO Company in losangeles

SEO Company in califonia

SEO Company in Florida

SEO Company in Austin

SEO Company in Atlanta

dushyant sharma said...

SEO Company in Ohio

SEO Company in Boston

SEO Company in Birmingham

SEO Company in london

SEO Company in leeds

SEO Company in glasgow

soukya reddy said...

This is one awesome blog article. Much thanks again.
salesforce Online Training Hyderabad
salesforce Online Training Bangalore
salesforce Online Training India
salesforce Online Training

soukya reddy said...

This is one awesome blog article. Much thanks again.
salesforce Online Training Hyderabad
salesforce Online Training Bangalore
salesforce Online Training India
salesforce Online Training

aashu tiwari said...

Vermeer

Iacg said...


IACG with 100% placements record offers best multimedia courses for graduation, post-graduation and diploma seekers. Students can avail educational loans.

multimedia courses


animation courses in Hyderabad


VFX college in Hyderabad



VFX in India



Animation college in Hyderabad



Animation in India





animation institute in hyderabad


animation colleges in hyderabad


animation schools in hyderabad


Multimedia In India





mobile app course in hyderabad


mobile app college in hyderabad


best VFX courses


unity certification


IACG.CO.IN



Diac Noida said...

PLC training DIAC has courses after betch diploma graduates in PLC SCADA Automation Training in Delhi Noida for Career in Automation. Call us @91-9310096831.

Unknown said...

• Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updatingAzure Online Training Bangalore

svr online Training said...

Wonder fullSalesforce Training

Article.....

keerthi dhivi said...

Thank you for such sharing such great information with us.
Online Marketing Services
SEO Company Bangalore
seo pricing india

soukya reddy said...

I have read your blog its very attractive and impressive. I like your blog salesforce Online Training Bangalore

ggwebstudio said...

Excellent Article!
AC Mechanic in Chennai
Auditoriums in Chennai
Automobile Batteries in Chennai
Automobile Spares in Chennai
Money Exchange in Chennai
Soft Skills Academy Chennai
Ceramics Showroom in Chennai
Yoga Class Chennai
Ladies Hostel Chennai
Computer Sales and Service

techvelocity partners said...

Thanks for sharing this valuable information..Keep sharing
Risk management consulting services
ROI consultant minnesota
consulting company minnesota

Gopal Ainavalli said...

Excellent information and such a knowledgeable post.we provide best online training IT courses please visit: Salesforce developer training
Salesforce Admin training

soukya reddy said...

I really enjoy the blog.Much thanks again. Really Great salesforce Online course Bangalore

JobOnCloud said...

Amazing write up! You always cover the best topics in your blog section regarding Salesforce Developer. You describe the entire thing excellently and cover subject completely. I always eagerly wait for your blogs. And keen followers of your blogs.

akhila priya said...

I have read your blog its very attractive and impressive. I like your blog salesforce Online Course Bangalore

Rstrainings said...

such a great article thank you for nice information,it was very useful....
salesforce training in Hyderabad
salesforce training in Madhapur
salesforce online training in india

Rstrainings said...

awesome post,valuable information..salesforce online training in USA!
salesforce training in Hyderabad!
salesforce training in madhapur!

akhila priya said...

I really enjoy the blog.Much thanks again. Really Great salesforce Online Training

ciit noida said...

CIITN Noida provides Best java training in noida based on current industry standards that helps attendees to secure placements in their dream jobs at MNCs.The curriculum of our Java training institute in Noida is designed in a way to make sure that our students are not just able to understand the important concepts of the programming language but are also able to apply the knowledge in a practical way.

Java is inescapable, stopping meters, open transportation passes, ATMs, charge cards and TVs wherever Java is utilized.
What's more, that is the reason Well-prepared, profoundly gifted Java experts are high sought after.

If you wanna best java training, java industrial training, java summer training, core java training in noida, then join CIITN Noida.

ciit noida said...

CIITN Noida provides Best java training in noida based on current industry standards that helps attendees to secure placements in their dream jobs at MNCs.The curriculum of our Java training institute in Noida is designed in a way to make sure that our students are not just able to understand the important concepts of the programming language but are also able to apply the knowledge in a practical way.

Java is inescapable, stopping meters, open transportation passes, ATMs, charge cards and TVs wherever Java is utilized.
What's more, that is the reason Well-prepared, profoundly gifted Java experts are high sought after.

If you wanna best java training, java industrial training, java summer training, core java training in noida, then join CIITN Noida.

sri krishna kumar said...

Very useful content
Hadoop Training In Chennai | Sap MM Training In Chennai | ETL Testing Training In Chennai

Mahesh said...

Really very informative and creative contents. This concept is a good way to enhance the knowledge.thanks for sharing.
please keep it up.
ERP SAP Training in Gurgaon

Shailendra said...

This information you provided in the blog that is really unique I love it!! Thanks for sharing such a great blog. Keep posting..
Salesforce Training
Salesforce Training Institute
Salesforce Course

akhila priya said...

This concept is a good way to enhance the knowledge.thanks for sharing. please keep it up
salesforce Online Training

Kritika said...

Great post. Thank you for sharing such useful information. Please keep sharing
Salesforce Training in Delhi

akhila priya said...

The information which you have provided is very good. It is very useful who is looking for salesforce Online Training Bangalore

ciit noida said...

CIITN is the pioneer of education providing the best PHP training in Noida as per the current industry requirement that enables candidates to land on their dream jobs in companies worldwide. CIITN Provides best PHP training course in Noida. CIITN is a renowned training company providing the best training service and also being the best PHP training institute in Noida rendering practical knowledge through training on projects and a dedicated placement assistance for all. The course curriculum for PHP training course is designed to provide in-depth knowledge that covers all the modules for the training ranging from basic to advanced level. At CIITN PHP training in Noida is supervised and managed by industrial experts having more than 10 years of experience in handling PHP projects. CIITN training comprises of both classroom as well as practical sessions to deliver an ideal environment for students that will enable them to handle difficult and complex situation when they would step into the reality of IT sector.CIITN is an excellent PHP training center in Noida with superior integrated infrastructure and newly designed labs for students to practice and pursue training for multiple courses at Noida. CIITN institute in Noida train thousands of students around the globe every year for the PHP training at an affordable price which is customised as per each candidate’s requirement of modules and content.

PHP training in Noida

CIIT Noida said...

CIITN is the Best Php training institute in Noida and delhi Ncr. You will get Live Project Training on PHP by our PHP expert who have 5+ year industrial experience.Focus on practical and live project training. In our PHP training, we you will learn core PHP, advance PHP, HTML, CSS, JavaScript, jQuery, Bootstrap, Cake PHP and Wordpress.CIITN provides 100% job assistance in PHP training. CIITN is well known PHP coaching center because our 100% PHP students are placed now.


Ciitnoida provides Core and java training institute in noida. We have a team of experienced Java professionals who help our students learn Java with the help of Live Base Projects. The object-oriented, class-based build of Java has made it one of most popular programming languages and the demand of professionals with certification in Advance Java training is at an all-time high not just in India but foreign countries too.

By helping our students understand the fundamentals and Advance concepts of Java, we prepare them for a successful programming career. With over 13 years of sound experience, we have successfully trained hundreds of students in Noida and have been able to turn ourselves into an institute for best Java training in Noida.


java training institute in noida
php training in noida
linux training in noida
linux institute in noida
java course in noida

CIIT Noida said...

CIITN provides Best Linux training in noida based on current industry standards that helps attendees to secure placements in their dream jobs at MNCs. CIITN Provides Best Linux Training in Noida. CIITN is one of the most credible offering hands on practical knowledge and full job assistance with basic as well as advanced level.

best linux training institute in noida

linux training in noida

«Oldest ‹Older   201 – 243 of 243   Newer› Newest»

Post a Comment