1,234
edits
Changes
no edit summary
{{Admon/obsolete}} [[category: NexJ Current Past Projects]]
[[category: NexJ Express JSON Message Adapter]]
== Project Goal==
To create an adapter for the NexJ Core similar in methodology and design of existing message adapters (XML, Fixed, CSV etc.) but using the JSON format
* [[User:Gbatumbya|Grace Batumbya]]
* [[User:Brianlim | Brian Lim]]
== Current Status==
* '''Completed''' (February 02, 2012)
==Project PhasesRepository == JSON Integration Adapter Phases ===Phase IBitBucket : https://bitbucket. Research (DONE)=== # Complete Fundamentals of NexJ Studio tutorial# Complete NexJ Integration tutorial# Install NexJ Studio Express from sourceorg/gbatumbya/nexjexpress-jsonintergrationadapter/===Phase II<br/>Deprecated: <del>https://bitbucket. Planning and Approval (DONE)=== # Receive general approval for project# Receive approval for JSON encoding options# Receive approval for JSON formatting options ===Phase III. Message Formatter (80% DONE)=== # Add JSON to .XSD base types# Create sample JSON .message # Parse sample JSON .message with JUnit Test# Create first set of unit tests for Message Formatter# Code Message Formatter first draft# Resolve issues with first set of unit tests# Create second set of unit tests# Resolve issues with second set of unit tests# Refactor and code message formatter ===Phase IV. Message Parser === # Discover how to connect JSON RPC parser with Message Parser# Create first set of trivial unit tests for Message Parser# Code Message Parser skeleton# Pass first set of trivial unit tests# Create second set of unit tests (nonorg/b_lim/nexj-express-json-trivial) for Message Parser# Code Message Formatter first draft# Resolve issues with second set of unit tests# Refactor ===Phase V. Integration and Stress Tests=== # Test Message Formatter and Message Parser with integration and stress tests# Test through NexJ Studio Express GUI (manual testing) ===Phase VI. Internal Code Review=== # Internally review code at CDOT ===Phase VII. Optimization=== # Find more code optimizations relevant to Enterprise environments ===Phase VIII. First Code Review at NexJ=== # Date TBA ===Phase IX. Code Rewrite=== # Rewrite code to conform with NexJ suggestions and standards-adapter/</del>
{| class="wikitable" border==Phase XI"1"|-! Term! Description|-| Formatter| Turns data into JSON|-| Parser| Turns JSON into data|-| Message| The metadata to be used when formatting and parsing a message. The grammar. It is a tree-like structure. Project Completion===|-| MessageInstance| The information to be parsed or formatted|}
==== Message Fundamentals ====
Message - Messages can contain values or other messages. The red nodes are messages, the green nodes are values.
{
part = (MessagePart)it.next());
if (isCompositeMessagePartInstance(part)instanceof CompositeMessagePartInstance)
{
// This part is a message
}
else if (isPrimitiveMessagePart(part)instanceof PrimitiveMessagePart)
{
// This part is a value
NOTE: THE MESSAGE PARAMETER DOES NOT CONTAIN THE MESSAGE VALUES. THE MESSAGE PARAMETER CONTAINS THE MESSAGE METADATA. THE TRANSFER OBJECT CONTAINS THE MESSAGE VALUES WHICH MUST BE VALIDATED AGAINST THE MESSAGE TO ENSURE CORRECT FORMAT.
; MessagePart.java - :Parts of a message. Messages can contain values or other messages. NexJ Express has two types of message parts, ''CompositeMessagePart'' and ''PrimitiveMessagePart''.
== Resources ==