Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataObject support for Scout JS #1311

Open
wants to merge 1 commit into
base: releases/25.1
Choose a base branch
from

Conversation

mvilliger
Copy link
Member

  • Introduce a DataObjectTransformer which adds annotations during TypeScript compile time to all attributes of DataObjects. These annotations contain the data type of the attribute to be retrieved at runtime.
  • Add a base class for DataObjects: BaseDoEntity
  • Add ID classes in TS (number, string uuid, composite)
  • Add a DoRegistry to retrieve all DataObjects known in TS
  • Migrate existing DOs to the new base class including decorators.
  • Add convenience methods to ajax utility to post and get DataObjects
  • Add a DataObject (De)Serializer for TS. It uses the data type annotations added by the compile time transformer and supports:
    • Arrays
    • Maps
    • Sets
    • Records
    • Dates
    • Ids
  • Enable experimental decorators for Scout JS
  • Allow the unqualified ID deserializer in Java to accept over-qualified instances (a typeName is available event not necessary because the ID is concrete).
  • Migrate from deprecated 'type' jQuery ajax property to the new 'method' property.

389583

@mvilliger mvilliger force-pushed the features/mvi/25.1/dataObjectJs branch from 17dee29 to 5c82fa9 Compare December 20, 2024 12:34
eclipse-scout-core/src/id/IdParser.ts Show resolved Hide resolved
eclipse-scout-core/src/id/NumberId.ts Outdated Show resolved Hide resolved
eclipse-scout-core/src/id/StringId.ts Outdated Show resolved Hide resolved
eclipse-scout-core/src/id/UuId.ts Outdated Show resolved Hide resolved
@mvilliger mvilliger force-pushed the features/mvi/25.1/dataObjectJs branch from 5c82fa9 to ad10175 Compare January 3, 2025 10:50
eclipse-scout-core/src/ObjectFactory.ts Outdated Show resolved Hide resolved
eclipse-scout-core/src/ObjectFactory.ts Show resolved Hide resolved
eclipse-scout-core/src/ObjectFactory.ts Show resolved Hide resolved
eclipse-scout-core/src/ajax/ajax.ts Outdated Show resolved Hide resolved
eclipse-scout-core/src/ajax/ajax.ts Outdated Show resolved Hide resolved
eclipse-scout-core/src/ajax/ajax.ts Show resolved Hide resolved
eclipse-scout-core/src/id/Id.ts Outdated Show resolved Hide resolved
eclipse-scout-core/src/id/Id.ts Outdated Show resolved Hide resolved
eclipse-scout-core/src/id/IdParser.ts Outdated Show resolved Hide resolved
eclipse-scout-core/src/id/Id.ts Show resolved Hide resolved
@mvilliger mvilliger force-pushed the features/mvi/25.1/dataObjectJs branch 8 times, most recently from 3e57d12 to 3566805 Compare January 13, 2025 07:54
@mvilliger mvilliger force-pushed the features/mvi/25.1/dataObjectJs branch from 3566805 to ed70a5e Compare January 14, 2025 14:50
- Introduce a DataObjectTransformer which adds annotations during
  TypeScript compile time to all attributes of DataObjects. These
  annotations contain the data type of the attribute to be retrieved at
  runtime.
- Add a base class for DataObjects: BaseDoEntity
- Add ID classes in TS (number, string uuid, composite)
- Add a DoRegistry to retrieve all DataObjects known in TS
- Migrate existing DOs to the new base class including decorators.
- Add convenience methods to ajax utility to post and get DataObjects
- Add a DataObject (De)Serializer for TS. It uses the data type
  annotations added by the compile time transformer and supports:
  - Arrays
  - Maps
  - Sets
  - Records
  - Dates
  - Ids
- Enable experimental decorators for Scout JS
- Allow the unqualified ID deserializer in Java to accept over-qualified
  instances (a typeName is available event not necessary because the ID
  is concrete).
- Migrate from deprecated 'type' jQuery ajax property to the new
  'method' property.
- Add objects.equals2 and equalsRecursive2. Differences to original:
  - Dates are supported (compared by value)
  - Classes must be same for two objects to be equal
  - empty Sets/Maps are considered equal
- Add objects.equalsSet & objects.equalsMap
  In a future release these new functions will replace the existing
  ones.

389583
@mvilliger mvilliger force-pushed the features/mvi/25.1/dataObjectJs branch from ed70a5e to 15b7447 Compare January 14, 2025 19:58
@mvilliger mvilliger removed the request for review from paolobazzi January 16, 2025 12:16
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