Code Monkey home page Code Monkey logo

abap-file-formats's People

Contributors

abedi30 avatar albertmink avatar apanys avatar beckerwdf avatar burcuka avatar ch-holzer avatar christopher-hermann avatar delucapietro avatar dependabot[bot] avatar ehret-thomas avatar goreraks avatar heichmann avatar helgecd avatar hottek avatar huber-nicolas avatar larshp avatar markus1812 avatar micotto avatar mseich avatar olivia266 avatar schneidermic0 avatar sebastianwolf-sap avatar sepp4me avatar srnawaz avatar thomas-kaltenbach avatar viktoriafreidel avatar wdfyvonne avatar wuehr avatar wurzka avatar xtough avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

abap-file-formats's Issues

INTF vs CLAS abap, common file naming?

https://github.com/SAP/abap-file-formats/blob/main/file-formats/intf/format.md,

zif_aff_example.intf.abap

and https://github.com/SAP/abap-file-formats/blob/main/file-formats/clas/format.md

zcl_aff_example.clas.global.abap

personally I would expect the filename scheme for the main/global ABAP file to be identical for INTF and CLAS objects

When creating and editing in Eclipse, both objects look similar to the developer?

I suggest removing ".global." from the CLAS filename

Branch protection rules?

Shouldn't we have a branch protection rule on main? I cannot configure it due to some central restriction...

Binary file format

If 5 different people writes a serializer, it will be nice if they can come up with identical binary files if based on identical objects.

git uses a checksum of the file, so if the files are not binary identical they are considered different :)

Suggest adding:

  • Codepage, presumably UTF-8
  • Should files have byte order mark or not?
  • Carriage returns for newlines?
  • Newline at end of file(note that the ABAP editor has some logic)
  • JSON indentation(2 spaces?)

Namespaces in object names

a namespace in a ABAP system is eg. /nspc/, having "/" part of filenames will give trouble on most filesystems(?)

so it must be escaped/changed/avoided somehow

JSON, allowing comments?

The .json file format does not allow comments

However, .jsonc and .json5 does allow comments

Consider if the extension of JSON should allow for comments or not

Maintaining JSON schemas

Personally I find it difficult to manually maintain JSON schemas, there will also be some reuse between definitions(eg the language field), so I like to define this semantically instead of manually editing the schemas.

To solve this I like to maintain json schemas as TypeScript, and then use https://github.com/vega/ts-json-schema-generator to generate the JSON schemas.

I can try making a small example?

Folder structure

Example: https://github.com/SAP/abap-file-formats/tree/main/file-formats/chkc

it contains
image

the source is under type and the first file in the folder is the auto generated json schema file

Suggest:
A: Move the ABAP source to the root of the object type folder
B: Move the auto generated json schema to a new folder generated under the object type
C: Change the filename of the auto generated json schema, eg zif_atc_aff_chkc_v1.json to make it easier for users to tell the relationship between files

Move schema references to a non-Github domain?

This is a little nit-picky, but I think Github really doesn't like tooling to reference https://raw.githubusercontent.com. I'd suggest using Github Pages or another system to publish the schema files onto a CDN-backed infrastructure and bake that URL into the schemas so that it doesn't have to change in the future. I'd guess that SAP will eventually want to host these somewhere under sap.com.

.properties files

I dont remember if developers are used to editing .properties in Eclipse?

File formats will keep changing forever, so I do not partially have a favorite. However, I like to stick to as few formats as possible

Can JSON be used instead of .properties? that way there is just one type of metadata format

Also, YAML is popular, TOML etc.

Using ENUMS

Hi,
I have not used enums very much, so I looked into how it works,

https://blogs.sap.com/2016/10/10/abap-news-release-7.51-enumerations/

notably "Normally, you are not interested in the contents of an enumerated object at all."

in abap-file-formats we are interested in the values, eg setting a json value,

TYPES:
  basetype TYPE c LENGTH 1,
  BEGIN OF ENUM ver BASE TYPE basetype,
    standard          VALUE IS INITIAL,
    cloud_development VALUE '5',
  END OF ENUM ver.

DATA: BEGIN OF ls_json,
        ver TYPE basetype,
      END OF ls_json.
ls_json-ver = cloud_development.
WRITE ls_json-ver.

Which outputs "C" when run

As we are interested in values, probably using structured constants is the better approach?

filenames, when to use subobjects?

https://github.com/SAP/abap-file-formats/blob/main/doc/specification.md#file-names

ABAP should go into ABAP files, one file, like its presented to the developer in Eclipse

Metadata for a object(R3TR) should go into a single metadata file per object, having eg. one metadata file per dynpro, per CUA etc. makes it more complex IMHO, more schemas, more things to check on serialization/deserialization time

Translations: something, I've not thought much about these yet, deferred to #106

File Formats for Documentation

We have to define how we represent documentation (especially SAPscript) in ABAP file formats.

Questions are from my point of view:

  1. Technical (using two columns like in classic SAPscript editor) or representation in a dedicated file format which is close to documentation
  2. Is the documentation part of the Json or dedicated files (relates also to #115)

2021.07b Sprint Plan

The SAP team plans to address the following issues in our 2nd iteration (sprint) in July 2021:

The iteration lasts 2 weeks and ends on August 2, 2021.

Let's discuss Indentation

What indentation do we want to use for the JSON files and schema? Suggestion would be 2 or 4 spaces.

abapLanguageVersion

The field abapLanguageVersion is really difficult

In other programming languages, the actual version of the language is rarely(?) part of the actual source code. Instead the author states the version requirements in a README (I'm thinking about Java/JavaScript/TypeScript/C++)

There is also "integrated Steampunk" which will be out sometime and do something ๐Ÿ˜„ Will a 5 year old integrated steampunk have the same languageversion as the latest cloud steampunk? I'm afraid that the list will keep increasing over time unless the purpose of the field is defined very clearly.

CHKO - Metadata

CHKO is in itself "Metadata of ATC Check Object", but "The files don't contain metadata"

I have not encountered a CHKO in the wild, so I'm not really sure what it is. But in the traditional SCI setup, the code inspector check defines the actual metadata, perhaps a CHKO is something that is generated behind the scenes?

Do the developer create the CHKO manually?

Serialized directory/folder structure

Is defining directory/folder structure in scope?

Like in Java, a project typically consists of a folder structure, where each folder contains multiple objects

No need for JSON validation any more

Remove the github action that validates JSON syntax and JSON instances by deleting files

  • json-validator.py
  • requirements.txt
  • .github/py-validation.yml

Language, exact field contents?

masterLanguage is part of multiple files, and it is defined as 2 characters

but what is considered correct, and what is wrong?

In SAP all user formatted languages are 2 characters upper case, but looking at something like ISO its 2 character lower case

Suggest to make an explicit enum list of allowed values

What is an ABAP Object?

from the readme,
"Object Name corresponds to the name of the ABAP object."

what is an ABAP object?

My guess would be the objects defined in TADIR on R3TR level, but the readme also mentions LIMU

LIMU does not guarantee unique naming, so I'd suggest only considering R3TR

README: add notes on collaboration model

Say, I create a JSON schema for the ACID object type, will it as such be accepted into main?

There are 1000+ different object types(?), and each object type has an owner inside SAP(?)

Interface file definitions naming

we currently have:

zif_oo_aff_intf_v1.intf.abap
zif_atc_aff_chkc_v1.intf.abap

INTF and CHKC are the TADIR R3TR names, which are guaranteed to be unique, I suggest leaving out the "_oo" and "_atc" parts

Tooling

we can talk about this in the next call

Let's discuss capitalization

License?

The part of this repo, which is worth copying will be the JSON Schemas, these can then be incorporated in other software for validation.

IMHO it will be a win for @SAP if the adoption of this is as high as possible, to make the adoption high, make it as effortless as possible i.e. a MIT license?

This is not running software, or a library, its foundational work

@SebastianWolf-SAP

INTF bits missing

I think the following are missing in the INTF file definition?

  • Dokumentation long texts
  • Text elements
  • Proxy flags?

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.