Sei sulla pagina 1di 6

Java Code Review Check List

___________________________________________________

Version 1.0
Place the comment on the line immediately above the property or ruleset it describes. The comment should be
indented the same amount as the property or ruleset it describes.
If the comment is describing a ruleset, place a blank line before the comment.

Shorthand
Shorthands are convenient but sometimes hard to read. The use of shorthands is forbidden, because they are
harder to read.
.text { font: 1em/1.1em bold italic small-caps Verdana, Arial, Helvetica, sans-serif; }
Is the same as
.text { font-size: 10em; line-height: 1.1em; font-weight: bold; font-style: italic; font-variant: small-caps; font-
family: Verdana, Arial, Helvetica, sans-serif; }
The border style is an exception from that rule, because short handing it is so widespread and because (unlike
"font" and others) the order of its properties is not important. For example:
.some-div {
border: 1px #ff0000 solid;
}
...is the same as...
.some-div {
border: solid 1px #ff0000;

and is just as readable.

Font size
Always use em instead of pt, px, cm, ...
<style type="text/css"> .title { font-size:18px; } </style>
This will keep your site more accessible and you can easily resize the entire site's font size if you need it bigger
or smaller.
<style type="text/css"> body { font-size: 80%; } .title { font-size: 2em; } </style>

Classes vs ID Selectors
If you don't have to reference specific object, it is strongly recommended to use class instead of id selectors especially if they
share the same formatting.
Use selectors only if:
1. There will be only one object in the document.
2. You have to reference that object in CSS or JavaScript.
In all other cases use classes.

2
Inline Styles
Avoid using inline styles ad much as possible.
<p style="margin-top: 2em; color:blue;">A paragraph text</p>
Use classes instead
<p class="someClass">A paragraph text</p>
Because if you do so then you don't need CSS file, you can format your document using HTML only. The idea
behind CSS is to have all styles defined in one place, while your HTML code is clear of formatting. In example
above, if you change style for P in your .css file, this won't affect the paragraph with inline tag, it will always
remain with 2em top margin and blue text no matter how you format your css file.

CSS Naming Convention


Selector Names
Use "camelCase" names.
Try to avoid using attributes in the name
Common selector names
Use ID's: header, footer, content, wrapper, inner, outer, container... Names like: html, head, bottom, top, left, right, should not
be used for document layout.

1 XML Structure for a New Screen

1.1 Standard and Simplified xml :

For a transaction, if input and output message area is same in the host, then the xml may be designed to
have only TX. In that case, to obtain the output xml also, TX will be used by the adapter.

TX and RX may contain a set of fields (Each field signifying one functional data field in host) with the
following tags:

Tag Name Purpose Mandatory/Optional

Format Defines the data type of field. Mandatory

ID Defines the name of field. Optional

tagName Defines the name of field. Preferably to be Mandatory


same as ID

label Description of fields Optional

Offset Offset as per applicable in host message Optional. As applicable


area

3
The different formats applicable are :

Data Type Format

Numeric 9(ml) ; ml : Maxlength of field


Ex: 9(17) for account number field

Alphanumeric X(ml) ; ml : Maxlength of field


Ex: X(40) for customer name field

Date ddMMyyyy ; DDMMYYYY format


Ex: Birth Date of customer

Amount 9(bd)V9(ad)S ;
bd : denotes number of digits before decimal
ad : denotes number of digits after decimal
V : decimal
S : Sign (+/_)
Ex: 9(14)V9(3)S

Rate Its definition is same as amount format.

The only difference is the bd and ad parameter for


rate field which depends on the functionality.
Ex: 9(5)V9(4)S

1.2 TagName Naming Conventions


 The tagName must be a logical name defining the field functionality for better clarity. Should prevent
field names like defInteder1,defaultString1 etc.
Ex: accntNumber1 can be used as tagName for a Account Number field.
 The name of the tagName must begin with a Capital Letter and must have corresponding getters and
setters in the message object of the transaction.
 A xml cannot contain a duplicate tagName. Each tagName should be unique within a xml.

4
 The tagName must not be reserved key words of java/javascript. Ex. action, state, function, private,
public etc.
 The tagName cannot contain spaces in the name.

 The tagName should not contain special characters in name like &,<, > , ;,@ etc. It may contain a
underscore (_) to separate long names.
 A valid tagName can contain only alphabets,numbers and underscore(_).

 The length of tagName should be as short and clear as possible.

 In case of dynamic table in screen, the name of tagName for Collection should be strictly Collection.

2 Handling Cash Drawer Screens

2.1 Cash Drawer


Mode Cash Drawer Behaviour

Deposit Mode Cash Drawer Icon will be present on the screen.


User need to fill in the cash drawer before submitting the
transaction.

Withdrawal Mode Cash Drawer Icon will not be present on the screen.
Cash Drawer will pop up after transcation is committed in
host.

.Correction of Deposit Cash Drawer Icon will not be present on the screen.
Cash Drawer will pop up after transcation is committed in
host.

Correction of Withdrawal Cash Drawer Icon will not be present on the screen.
Cash Drawer will pop up after transcation is committed in
host.

2.2 Integration of Cash Drawer Icons

The text highlighted in yellow is to be included for integration of cash drawer icon for a field.
Icon needs to be integrated besides the amount and currency field with which the cash drawer needs to
be updated.

exchgamt and exchgcurr are the tagName of amount and currency fields respectively with which the cash
drawer needs to be updated.

5
2.3 Property File Modifications
Following Property files needs to be modified after the above changes .

 CashInTxn_Mapping.properties (For Deposit Cash Drawer Txns)

All the deposit cash drawer transactions need to be included in this property file as below :

tranNo=D where tranNo = Transaction Number

This property file is read for showing Update Cash Drawer Link in Electronic Journal.

Path : TCSNBLCBSInt\src\com\tcs\channels\nbl\CBSTeller\mapping\CashInTxn_Mapping.properties

 CashOutTxn_Mapping.properties (For Withdrawal Cash Drawer Txns)

All the withdrawal cash drawer transactions need to be included in this property file as below :

tranNo=W where tranNo = Transaction Number

This property file is read for scheduling a Cash Drawer after ITEPS screen for withdrawal type cash
drawer transactions.

Path :TCSNBLCBSInt\src\com\tcs\channels\nbl\CBSTeller\mapping\CashOutTxn_Mapping.properties

 CashDrawerTxn_Mapping.properties (For all Cash Drawer Txns)

All the cash drawer transactions need to be included in this property file as below :

tranNo=mode where

tranNo: Transaction Number

mode : D(Deposit), W(Withdrawal), COD(Correction of Deposit), COD(Correction of Withdrawal)

This property file is read for scheduling a Cash Drawer in mode after the maker commits the
transaction in Electronic Journal (only for cash drawer transactions) and to commit the previously filled
cash drawer with status as A for deposit (mode=D) cash drawer transaction.

Path :

TCSNBLCBSInt\src\com\tcs\channels\nbl\CBSTeller\mapping\CashDrawerTxn_Mapping.properties

Potrebbero piacerti anche