How to comment your apex code (sample templates)


    Commenting your code well is very important for maintenance of your code. In software field it is very common for developers to change jobs very often. So it is very important to keep the code maintainable and understandable with good comments.

Things to Notice

Primary intent of comments is to make your code self documenting

    At a minimum add class and method level comments explaining what is the purpose of the class/method. Additional comments should be added on places where explanation/clarification is required.

 Don't overdo it

    We can see people adding comments every line or every other line. That is also unnecessary. It just makes reading through code more time consuming. Please keep in mind, intent of comment is to make somebody understand what is going on in code. Add granular details only if you feel an average developer might need comments to understand the logic.

Samples

You can use below sample templates as class and method level comments,
Class level comment
Method level comment

These examples follow ApexDoc syntax requirements. ApexDoc is a java application that is used to generate code documentation from code comments. It follows Javadoc style. If you are following the ApexDoc comment pattern, you will be able to generate static HTML documentation from the code by following instructions in ApexDoc documentation. You can find ApexDoc source and instructions in the repo - https://github.com/SalesforceFoundation/ApexDoc

8 comments:

  1. Are you looking for online tuition in Chandigarh for your child so that your child can complete his/her studies sitting at home without any hassle, then you should take online tutoring from Ziyyara because all the kids studying near Ziyyara always get good marks. Don't delay register today.
    Call Us For Free Demo:- +91 9654271931.
    Get Free Demo:- https://ziyyara.in/ad-contact
    Visit Us:- Online Tuition In Chandigarh

    ReplyDelete
  2. Semenjak adanya Paito Warna Hongkong juga sangat mempermudah para pecinta hk pools mencari prediksi Hongkong hari ini.

    Sekarang anda tidak perlu repot untuk mencari bocoran togel hk, sd, sgp. Mengapa demikian? Karena dengan hadirnya situs Prediksi Togel pastinya bisa anda gunakan untuk mencari racikan paito hongkong, singapore, sydney sampai dengan pasaran togel ternama lainnya.

    ReplyDelete
  3. Data HK atau Result Hongkong 4D pastinya sangat dinanti para pecinta TOGEL. Anda bisa dapatkan data hk hari tercepat via situs penyedia Live Draw Hongkong.

    Prediksi Togel adalah info yang sangat dibutuhkan para bettor di bandar togel terpercaya untuk mendapatkan referensi angka keluaran togel hari ini terlengkap dan raih kemenangan secara berkala.

    ReplyDelete
  4. Thanks for sharing this content.

    ReplyDelete
  5. https://nextlevelgamingstore.net/product/the-art-of-game-development-ebook/

    ReplyDelete
  6. 160 creative video ideas for birthday
    161 simple dino coloring page
    162 what are the 3 types of power systems
    163 christmas coloring pages easy
    164 letra para colorear y
    165 sports photography jobs nfl
    166 bilder emotionen alles steht kopf
    167 cost of appliance repair visit
    168 history of the arabic written tradition pdf
    169 banana cake recipe smitten kitchen
    170 cartoon characters color pink
    171 easy easter coloring pages for toddlers
    172 pdf winter coloring pages
    173 free arabic calligraphy generator app
    174 interior design vision
    175 feel example sentence
    176 sportarten mit a
    177 udemy arabic calligraphy course
    178 co to antyteza
    179 health portfolio examples
    180 sports images in hd
    181 colour out of space streaming australia
    182 farm animal coloring pages free printable
    183 ayat arabic & islamic calligraphy wall art kochi kerala
    184 fashion design flat sketch
    185 landbook design
    186 best quran verses with english translation
    187 coloring book age range
    188 drawing tutorials for beginners kids
    189 arabic alphabet examples
    190 arte de paisaje urbano
    191 recipe book app

    ReplyDelete