Giter VIP home page Giter VIP logo

alobjectparser's Introduction

AL Object Parser - .NET Core

This is a DLL helper intended to help Unit Test generation and synchronization for ATDD.TestScriptor project.

Features

  • Read AL Codeunit: parse file content into an ALObject object.
  • Write ALObject object to file.
  • Test Features/Scenarios:
    • Read: Parse metadata from file content into TestFeature object
    • Write: Update Codeunit methods using metadata
  • Generate AL object files using C# contructs

TODO

  • Preserve Test method contents if TestScenario was updated.

alobjectparser's People

Contributors

davidfeldhoff avatar martonsagi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

alobjectparser's Issues

Is this project no longer actively pursued?

I was very happy to see this project here, and have been following it for some time now. Unfortunately, I had to realize that it seems to be stuck here and does not continue properly. One could almost give the impression that nothing more is happening here.

Therefore I wanted to inform myself about the state of affairs and if there are plans to reoccupy and complete the project.

Separate parser from objects

Can I suggest that we make the ALObjectParser a separate, static and stateless class (ALObjectParser)? The only thing it should do, as far as I'm concerned, is something like this:

static IEnumerable<ALObject> Read(string path)

I chose an IEnumerable as the return value type since a file could contain >1 object. For writing, I think we need the mirrored version, again in a separate, static and stateless class (ALObjectWriter?)

static void Write(IEnumerable<ALObject> objects, string path)

AL Table Parser

Placeholder task for discussion

New class: ALTableParser: ALObjectParser
Function: Parse AL Table objects into SymbolReference stucture

Don't mix ALObjectParser and ATDD concepts?

Let's keep ALCodeunit clean; implement ATDD-related stuff in C# extension methods, e.g.

// only retrieve names (cheap and sometimes all you want to know)
static IEnumerable<string> GetFeatureNames(this ALCodeunit codeunit) 

// retrieve feature details
static ALFeature GetFeature(this ALCodeunit codeunit, string featureName) 

// add new feature
static ALCodeunit AddFeature(this ALCodeunit codeunit, ALFeature feature)

// remove feature
static ALCodeunit RemoveFeature(this ALCodeunit codeunit, string featureName)

In ALObjectParser, allow objects and subobjects to have comments associated with them, e.g.:

  • codeunits: the comment lines that preceed the properties of the codeunit, e.g. our features
  • methods: the comment lines between the procedure signature and begin/var
  • code lines: the comment lines immediately preceding them (?)
    That way, the comments that differentiate ATDD codeunits from normal codeunits can easily be retrieved and interpreted.

Ideally, perhaps, to make sure we don't mix ALObjectParser and ATDD concepts, implement the ATDD features as separate library (with a dependency on ALObjectParser). That way, ALObjectParser cannot know about ATDD, but ATDD knows about ALObjectParser.

Invest in keeping the object model consistent

Should we perhaps invest more in keeping the object model consistent, e.g. give TestFeature a constructor that requires a valid name? In that case, I think I would consider making the Name property read-only.

There is a lot to be said for entirely immutable objects, i.e. objects that receive their "state"
as constructor parameters and cannot be modified after construction, especially if you
plan to later parallelize (parts of) the parsing.

AL Page Parser

Placeholder task for discussion

New class: ALPageParser: ALObjectParser
Function: Parse AL Page objects into SymbolReference stucture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.