Call : (+91) 99 8080 3767
Mail : info@EncartaLabs.com
EncartaLabs

Java Coding Standards

( Duration: 2 Days )

The Java Coding Standards training course, covers a collection of standards, conventions and guidelines for writing Java code that is easy to understand, maintain and enhance. Existing standards from the industry are used wherever possible. The reason behind each standard is explained so that developers can understand why they should follow it.

By attending Java Coding Standards workshop, delegates will learn to:

  • Explain the Java architecture
  • List and describe the standard Java packages in various versions
  • Create, build, and debug Java projects
  • Build and release Java applets and applications
  • Store objects using Java’s Collection framework
  • Write robust applications using Exception handling
  • Perform a variety of I/O using Stream and File classes
  • Develop GUI systems using the Abstract Windowing Toolkit (AWT)
  • Develop GUI systems using the Swing classes (JFC)
  • Understand the JavaBeans component architecture
  • Raise and respond to events
  • Create Java programs with concurrent threads
  • Create Network aware applications
  • Access databases using JDBC
  • Deploy applications with Java Web Start

  • Experience with Java Programming

  • This Java Coding Standards class is aimed at anyone who needs to learn how to develop in Java.

COURSE AGENDA

1

General Concepts

  • Why coding Standards are important
  • Good documentation
    • The Three Types of Java Comments
    • A Quick Overview of javadoc
  • AMBLER’S LAW OF Standards
2

Standards FOR MEMBER FUNCTIONS

  • Naming member functions
    • Naming Accessor Member Functions
    • Getters
      • Alternative Naming Convention for Getters - Has and Can
    • Constructors
  • Member function visibility
  • Documenting member functions
    • The Member Function Header
    • Internal Documentation
  • Techniques for writing clean code
    • Document Code
    • Paragraph/Indent Code
    • Paragraph and Punctuate Multi-Line Statements
    • Use Whitespace in Code
    • Follow The Thirty-Second Rule
    • Write Short, Single Command Lines
    • Specify the Order of Operations
  • Java coding tips
    • Organize Code Sensibly
    • Place Constants on the Left Side of Comparisons
3

Standards FOR FIELDS (ATTRIBUTES/PROPERTIES)

  • NAMING FIELDS
    • Use a Full English Descriptor for Field NamesUse a Full English Descriptor for Field Names
      • Alternative - Hungarian Notation
      • Alternative - Leading or Trailing Underscores
    • Naming Components (Widgets)
      • Alternative for Naming Components - Hungarian Notation
      • Alternative for Naming Components - Postfix - Hungarian Notation
    • Naming Constants
    • Naming Collections
      • Alternative for Naming Collections - The ‘Some’ Approach
    • Do Not “Hide” Names
  • Field visibility
  • Documenting a field
  • The use of accessor member functions
    • Naming Accessors
    • Advanced Techniques for Accessors
      • Lazy Initialization
      • Getters for Constants
      • Accessors for Collections
      • Accessing Several Fields Simultaneously
    • Visibility of Accessors
    • Why Use Accessors?
    • Why Shouldn’t Participants Use Accessors?
  • Always initialize static fields
4

Standards FOR LOCAL VARIABLES

  • Naming local variables
    • Naming Streams
    • Naming Loop Counters
    • Naming Exception Objects
    • Bad Ideas for Naming Local Variables
  • Declaring and documenting local variables
    • General Comments about Declaration
5

Standards FOR PARAMETERS (ARGUMENTS) TO MEMBER FUNCTIONS

  • Naming parameters
    • Alternative - Prefix Parameter Names with ‘a’ or ‘an’
    • Alternative - Name Parameters Based on Their Type
    • Alternative - Name Parameters the Same as Their Corresponding Fields (if any)
  • Documenting parameters
6

Standards FOR CLASSES, INTERFACES, PACKAGES, AND COMPILATION UNITS

  • Standards FOR CLASSES
    • Class Visibility
    • Naming Classes
    • Documenting a Class
    • Class Declarations
      • Apply The “final” Keyword Sensibly
      • Ordering Member Functions and Fields
    • Minimize the Public and Protected Interface
  • Standards FOR INTERFACES
    • Naming Interfaces
    • Documenting Interfaces
  • Standards FOR PACKAGES
    • Naming Packages
    • Documenting a Package
  • Standards FOR COMPILATION UNITS
    • Naming a Compilation Unit
    • Documenting a Compilation Unit
7

MISCELLANEOUS Standards/ISSUES

  • Reuse
  • Use wild cards when importing classes
    • class
  • Optimizing code
  • Writing java test harnesses
8

THE SECRETS OF SUCCESS

  • Using these Standards effectively
  • Other factors that lead to successful code
9

Memory management in procedural language

10

Code Complexity

11

Tips for writing clean code - specific to procedural language

Encarta Labs Advantage

  • One Stop Corporate Training Solution Providers for over 6,000 various courses on a variety of subjects
  • All courses are delivered by Industry Veterans
  • Get jumpstarted from newbie to production ready in a matter of few days
  • Trained more than 50,000 Corporate executives across the Globe
  • All our trainings are conducted in workshop mode with more focus on hands-on sessions

View our other course offerings by visiting http://encartalabs.com/course-catalogue-all.php

Contact us for delivering this course as a public/open-house workshop/online training for a group of 10+ candidates.

Top