Difference between revisions of "JSON Integration Adapter Code Review 1 Changes"
(→General) |
|||
Line 4: | Line 4: | ||
{| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;" | {| border="1" cellpadding="4" cellspacing="2" style="border: 1px solid black;border-collapse:collapse;" | ||
|- | |- | ||
− | ! | + | ! Tasks |
− | |||
! Status | ! Status | ||
|- | |- | ||
− | | Exception | + | | Exception |
− | + | * Create localization strings in en.strings | |
+ | * Use message part as argument to exceptions and not the whole message | ||
| | | | ||
|- | |- | ||
− | | | + | | Documentation |
− | + | * Add documentation to all methods and members | |
+ | * Use full English sentences | ||
| | | | ||
|- | |- | ||
− | | | + | |Code Style |
− | + | * Apply NexJ Code Style | |
− | + | * Lines that create new Objects should be between newlines | |
− | + | * Add newline before break | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
===== Design Document ===== | ===== Design Document ===== |
Revision as of 13:47, 10 August 2011
Contents
General
Tasks | Status |
---|---|
Exception
|
|
Documentation
|
|
Code Style
|
Design Document
Issue | Description | Status |
---|---|---|
Update design | Design document should reflect all special settings of JSON parser and formatter. Specifically, any normally standard features which are not implemented by the JSON parser/formatter should be noted. |
JSONMessagePartMapping
Issue | Description | Status |
---|---|---|
Use Hashholder instead of HashSet | Use HashHolder in the XMLJSONMessagePartLoader instead of HashSet and whenever appropriate replace HashSet with HashHolder | |
Change 0x000 for byte | For root modes, change 0xXXX to a cast to byte. Also do not use leading zeroes. | |
Remove StringParsre from JSONMessagePartMapping | Either remove StringParser from the mapping, or use it in formatting primitives. Do not leave it in if it is not used. | |
Create class called RootJSONMessagePartMapping | Create a class called RootJSONMessagePartMapping for each CompositeMessagePart. This root JSON mapping will handle the "mode" for each CompositeMessagePart. | |
Allow root modes for each CompositeMessagePart | Rename root mode to mode, so that each CompositeMessagePart can use every type of mode. | |
Rename m_sFormat | Rename the variable m_sFormat if not used (or use it and keep the name). |
JSONMessageParser
Issue | Description | Status |
---|---|---|
Remove/Use InvocationContextAware | Do not implement the invocation context aware interface if not used by the class. Or, use the interface for formatting of primitives. | |
Name methods XXXPart, not XXXNode | Rename methods to be XXXPart, for example as writeCompositeMessagePart, instead of writeCompositeMessageNode. | |
Wrap fail | Wrap all instances of fail with IntegrationException. | |
Override JSONParse | Override parse method of JSONParser in the JSONMessageParser class. Do this to avoid changing JSONParser. | |
Use primitive formatter when reading. | When reading information in from a stream in the formatter, use primitive formatter to determine the correct format of a primitive. |
JSONMessageFormatter
Issue | Description | Status |
---|---|---|
Format primitive values before outputting to writers. | Use the StringFormatter to format primitive values before outputting to the writer. For example, timestamps must be formatted before outputting to the writer. | |
Pass enumerations into formatMessageRoot | Do not use member/class variables for storing information unless absolutely necessary. Prefer to pass parameters around so that objects do not grow large as the parser/formatter iterates. |