Object Data Model

About this tag

An object data model is that data or code is composed of modules that combine data and procedures that work on the data

Learn more

 

Subscribe to Object Data Model content with RSS Syndicate content or email

Recently, a partner company started to develop an Angular client for their Cache application. Together, we decided to leverage the power of Caché dynamic objects to exchange JSON encoded data between client and server parts. However, we realized that currently there is a gap in Cache JSON implementation that prevents simple use of traditional registered and persistent classes to exposed their data with the same ease as with XML. I wrote a small JSON adapter, that does the job and bridgers the gap. It's purpose is simple expose data described by a regular Cache class in a one-to-one fashion to a %DynamicObject. On the other hand, when a serialized JSON data comes in, it can be easily deserialized into dynamic object and subsequently bound to regular class by the newly created adapter.

Last comment 3 April 2018
7
6

comments

587

views

+ 12

rating