Skip to content

Future of this project #24

@ahuggins-nhs

Description

@ahuggins-nhs

This EDI X12 library is going to enter maintenance mode. This is for multiple reasons which I'll lay out below. The good news: this will remain in maintenance mode until either js-edi hits a stable version 1.0.0 (more on that later) or the community wishes to carry this library forward.

The reasons I'm not happy with the current state of this library (which is STILL great, thanks TrueCommerce and @DotJoshJohnson, this is still the superior JavaScript library for ASC X12):

  1. The parser in this library depends on utf8, despite some effort to correctly support ascii properly; this can lead to some unusual behavior with "binary" elements
  2. The parser is built around version 4010 with no support for component values or repeated elements
  3. Streaming (that I wrote) depends on extending Node Readable; web standards are moving forward from this
  4. The JSON EDI notation (that I added) is missing some key features and is separate from the object model
  5. The element selector language is based on slow regular expressions and has some features (again, that I added!) which I no longer think should be part of the implementation

It's not that any of this is unmaintainable or wrong (well maybe in a few cases). There just are optimizations that I would like to make and features I think should be a part of handling or parsing EDI that are difficult to add with the current state of the code. Just a few things I want:

  1. Support for X12 version 5010 and up
  2. Support for EDIFACT (! and which is outside the scope of this X12 lib)
  3. Faster and more efficient querying for elements (specifically to speed up transforming to JS objects)
  4. Support for binary elements
  5. Flexibility with emitting different objects and events during parsing and generating
  6. A fully-realized and consistent document object model
  7. Flexible validation using JSON Schema instead of the current custom format or XML Schema (god please no XML)

Given all of this, I started on an experimental parser written in ANTLR4 grammar. Once I had the parser fully functional, I added an (unfinished) EDIFACT parser in ANTLR4 grammar as well. Then, I reimplemented an object model, and rewrote the element selector language in ANTLR4 and...

Now I'm getting somewhere with the project that I'm calling js-edi. The parser appears to be faster, supports more features of EDI X12, and seems very flexible. The element selector implementation (in progress) is blazing fast. Everything is in a state of flux (especially documentation) since the library is immature, but I'm at a point where I would really appreciate community feedback and community contributions, as well.

  • What features are you using daily in this library that should make it to js-edi?
  • What features would you want to see in a "universal" EDI format handler?
  • What would you like to see for the future of node-x12?
    • Should this library live on as-is
    • Adopt the x12 parser
    • Be retired when the new library is mature
    • Other

It's been awesome to have been able to maintain, enhance, and add features for the last 2 years with the community for this library. Thanks again to @fpw23 @DotJoshJohnson @boxfoot and other contributors and users. I look forward to discussion on this issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions