Skip to content

Code Review 1#1

Draft
georg-schwarz wants to merge 29 commits intodiff1from
diff2
Draft

Code Review 1#1
georg-schwarz wants to merge 29 commits intodiff1from
diff2

Conversation

@georg-schwarz
Copy link
Copy Markdown
Collaborator

Don't merge, just for code feedback...

@@ -0,0 +1,6 @@
export class DataImportResponse {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no logic => make it an interface

@@ -0,0 +1,22 @@
import { Format } from './enum/Format';

export class FormatConfig {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be pulled up to AdapterConfig => removes Java file clutter

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably an interface since no logic?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean with could be pulled up? we are not sure

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean moving it to the AdapterConfig file since it is only a very small interface definition.

export interface ProtocolConfig {

protocol:Protocol;
parameters: Map<string, any> | undefined;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably make it a Record<string, unknown>. Maybe makes sense to model the concrete values in the inheriting interfaces explicitly..

import { XmlInterpreter } from "../../interpreter/XmlInterpreter";


export class Format {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No class required I think... Just

export const JsonInterpreter = new JsonInterpreter(); 
...

Import then the following way in other files:

import * as Format from '...'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is beeing used as parameter in FormatConfig.ts, needs to be a class i think. Unless we dont dont need it there later on

// To Implement
static getAllFormats(): Array<Interpreter> {
try {
// TODO implement interpreter
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simplify the old very generic implementation by just listing all interpreters / importers I think...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants