Changes

Jump to: navigation, search

JSON RPC Adapter Project

1,855 bytes removed, 20:34, 26 January 2014
no edit summary
<big><big> JSON_Adapter</big></big>{{NexJ_Express IndexAdmon/obsolete}} [[Category: NexJ_Past_Projects]][[Category: NexJ Express JSON Adapter]] [[Category: NexJ Express Development]][[Category: NexJ Express]]
== Project Goal==
Develope Develop an adapter to expose NexJ Express Server objects using JSON<br/>- [https://docs.google.com/document/d/1z8KfOa7sLD6l3g-1djnm6eU4ErfXDcqRX5v7OR0RJho/edit?hl=en&authkey=CJS3xcQP Final Project Proposal] ===Contributors===* [[User:Gbatumbya|Grace Batumbya]] 
== Current Status==
<big><big>'''Phase 11: Code Review 5Project Completed''' <br/big></big>Ongoing...
<br/>
 
==Project Phases==
{|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 1: Design Proposal (Done)|-|===
* Get requirements from NexJ
* Incorporate requirements from NexJ into Design of JSON Adapater
* Proposal proposal for review, make changes as by NexJ until approved<br/>|}- [https://docs.google.com/document/d/1z8KfOa7sLD6l3g-1djnm6eU4ErfXDcqRX5v7OR0RJho/edit?hl=en&authkey=CJS3xcQP Final Project Proposal]
{|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
** Develop marshaller to transform NexJ Server Objects into JSON representation
** Update Server Objects
** Create Server objects
|}
{|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
|}
{|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
* Optimize marshaling of nested Pair objects
* Rename variables and methods as per NexJ Developer's Guide
|} {|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
|}
{|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
** Removed unnecessary files
** 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>
|}
{|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
|} {|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:
**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.
**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.
|}
{|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
|}
{|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>.
* <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 (Done) ===
* Send code for review

Navigation menu