Difference between revisions of "JSON RPC Adapter Project"
(→Project Phases) |
(→Project Phases) |
||
Line 22: | Line 22: | ||
|} | |} | ||
− | ===Phase 2: Coding (Done) | + | |
+ | {|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black" | ||
+ | !align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Phase 2: Coding (Done) | ||
+ | |- | ||
+ | | | ||
* JSONMarshaller | * JSONMarshaller | ||
** Develop marshaller to transform NexJ Server Objects into JSON representation | ** Develop marshaller to transform NexJ Server Objects into JSON representation | ||
Line 36: | Line 40: | ||
** Update Server Objects | ** Update Server Objects | ||
** Create Server objects | ** Create Server objects | ||
+ | |} | ||
− | ===Phase 3: Code Review 1 (Done) | + | {|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black" |
+ | !align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Phase 3: Code Review 1 (Done) | ||
+ | |- | ||
+ | | | ||
* Send patch to NexJ for review | * Send patch to NexJ for review | ||
+ | |} | ||
− | ===Phase 4: Make Changes as per Code Review 1 (Done) | + | {|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black" |
+ | !align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Phase 4: Make Changes as per Code Review 1 (Done) | ||
+ | |- | ||
+ | | | ||
* Refactor JSONSever and TextServer to inherit from GenericCharacterStreamHTTPServer | * Refactor JSONSever and TextServer to inherit from GenericCharacterStreamHTTPServer | ||
* Optimize marshaling of nested Pair objects | * Optimize marshaling of nested Pair objects | ||
* Rename variables and methods as per NexJ Developer's Guide | * Rename variables and methods as per NexJ Developer's Guide | ||
− | ===Phase 5: Code Review 2(Done) | + | |} |
+ | |||
+ | {|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black" | ||
+ | !align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Phase 5: Code Review 2(Done) | ||
+ | |- | ||
+ | | | ||
+ | |||
* Send patch to NexJ for review | * Send patch to NexJ for review | ||
+ | |} | ||
+ | |||
+ | {|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black" | ||
+ | !align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Phase 6: Apply Changes per Code Review 2 (Done) | ||
+ | |- | ||
+ | | | ||
− | |||
* Minor Clean Up | * Minor Clean Up | ||
** Removed unnecessary files | ** Removed unnecessary files | ||
Line 70: | Line 93: | ||
** Only TO unmarshaller should use <code>remove()</code> otherwise use <code>get()</code> on m_jsonMap | ** Only TO unmarshaller should use <code>remove()</code> otherwise use <code>get()</code> on m_jsonMap | ||
** Change instances of <code>Collection.toArray()</code> to use <code>toArray(new Object[size])</code> | ** Change instances of <code>Collection.toArray()</code> to use <code>toArray(new Object[size])</code> | ||
+ | |} | ||
+ | |||
+ | {|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black" | ||
+ | !align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Phase 7: Code Review 3 (Done) | ||
+ | |- | ||
+ | | | ||
− | |||
* Send patch to NexJ for review | * Send patch to NexJ for review | ||
− | ===Phase 8: Apply Changes per Code Review 3 (Done) | + | |} |
+ | |||
+ | {|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black" | ||
+ | !align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Phase 8: Apply Changes per Code Review 3 (Done) | ||
+ | |- | ||
+ | | | ||
*JSONWriter.java: | *JSONWriter.java: | ||
**Can a <code>StringBuilder</code> be used instead of a <code>StringBuffer</code>? Maybe the same change can be done in <code>TextMarshaller</code> as well? The member field can still be called <code>m_buffer</code>. Using <code>StringBuilder</code> instead of <code>StringBuffer</code> avoids the synchronization overhead. | **Can a <code>StringBuilder</code> be used instead of a <code>StringBuffer</code>? Maybe the same change can be done in <code>TextMarshaller</code> as well? The member field can still be called <code>m_buffer</code>. Using <code>StringBuilder</code> instead of <code>StringBuffer</code> avoids the synchronization overhead. | ||
Line 94: | Line 127: | ||
**please remove the parts of tests that are duplicated. For example, in <code>testServerObjects()</code> you test the serialization of a Symbol called <code>sym</code>, a <code>PrivilegeSet</code> of “480000”, and a <code>PCodeFunction</code> with <code>code</code> 0, 1, 2. But these have already been tested by the <code>testSerializeRequestCheckJSON</code> which uses the m_request object initialized by the superclass. | **please remove the parts of tests that are duplicated. For example, in <code>testServerObjects()</code> you test the serialization of a Symbol called <code>sym</code>, a <code>PrivilegeSet</code> of “480000”, and a <code>PCodeFunction</code> with <code>code</code> 0, 1, 2. But these have already been tested by the <code>testSerializeRequestCheckJSON</code> which uses the m_request object initialized by the superclass. | ||
**Use <code>Primitive.createInteger</code>, <code>Primitive.createLong</code>, etc. instead of <code>new Integer(…), new Long(…)</code>, etc. where possible. | **Use <code>Primitive.createInteger</code>, <code>Primitive.createLong</code>, etc. instead of <code>new Integer(…), new Long(…)</code>, etc. where possible. | ||
+ | |} | ||
− | ===Phase 9: Code Review 4 (Done) | + | {|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black" |
+ | !align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;" | ||
+ | |Phase 9: Code Review 4 (Done) | ||
+ | |- | ||
+ | | | ||
* Send patch to NexJ for review | * Send patch to NexJ for review | ||
+ | |} | ||
− | ===Phase 10: Apply Changes per Code Review 4 (Done) | + | {|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black" |
+ | !align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Phase 10: Apply Changes per Code Review 4 (Done) | ||
+ | |- | ||
+ | | | ||
*The <code>m_tokenValue</code> used in some of the error messages won’t always be populated. For example, in <code>parseArray()</code>, <code>m_tokenValue</code> is used, but it will only be valid if the current token is <code>TOKEN_ATOM</code>. | *The <code>m_tokenValue</code> used in some of the error messages won’t always be populated. For example, in <code>parseArray()</code>, <code>m_tokenValue</code> is used, but it will only be valid if the current token is <code>TOKEN_ATOM</code>. | ||
Line 104: | Line 146: | ||
* <code>parseObject()</code>: the <code>if (sKey == null)</code> check can never succeed, because <code>instanceof</code> should return false if its argument is <code>null</code>. | * <code>parseObject()</code>: the <code>if (sKey == null)</code> check can never succeed, because <code>instanceof</code> should return false if its argument is <code>null</code>. | ||
+ | |||
+ | |} | ||
===Phase 11: Code Review 5 === | ===Phase 11: Code Review 5 === |
Revision as of 21:40, 4 December 2010
JSON_Adapter
Project Goal
Develope an adapter to expose NexJ Express Server objects using JSON
Current Status
Phase 11: Code Review 5
Ongoing...
Project Phases
Phase 1: Design Proposal (Done) |
---|
|
Phase 2: Coding (Done) |
---|
|
Phase 3: Code Review 1 (Done) |
---|
|
Phase 4: Make Changes as per Code Review 1 (Done) |
---|
|
Phase 5: Code Review 2(Done) |
---|
|
Phase 6: Apply Changes per Code Review 2 (Done) |
---|
|
Phase 7: Code Review 3 (Done) |
---|
|
Phase 8: Apply Changes per Code Review 3 (Done) |
---|
|
align="left" style="background-color:lightSkyBlue;font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;" | Phase 9: Code Review 4 (Done) |
---|---|
|
Phase 10: Apply Changes per Code Review 4 (Done) |
---|
|
Phase 11: Code Review 5
- Send code for review
Links
JSON
http://www.json.org