#Object Data Model

0 Followers · 499 Posts

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.

Question Eduard Lebedyuk · Mar 28, 2016

Hello.

For debugging purposes I  sometimes need to display stack information to the current device or save it (to a global for example).

There is this snippet offered in documentation:

ClassMethod StackToDisplay()
{
    For loop = 0:1:$Stack(-1) {
        Write !, "Context level:", loop, ?25, "Context type: ", $Stack(loop)
        Write !, ?5, "Current place: ", $Stack(loop, "PLACE")
        Write !, ?5, "Current source: ", $Stack(loop, "MCODE")
        Write !
    }
}

And to save stack to a global there's always an exception method:

11
0 1722
Article Alberto Fuentes · Feb 19, 2016 2m read

The attached file contains two $system.Event examples that processes work asynchronously using persistent queues:

Events_Simple

This is a very basic example that creates some worker processes and then enqueue messages to them using $system.Event.

6
1 1296
Article John Murray · Mar 15, 2016 1m read

Among the outputs of our Yuzinji tool are two code metrics that it can be interesting to track over time as a development project proceeds. These are Size and XS. The first is fairly straightforward. As you write more code the size of your codebase increases. The XS metric (pronounced "excess") aims to quantify excessive structural complexity. XS is explained in some detail in this 2006 whitepaper from Headway Software, whose Structure101 toolset Yuzinji leverages.

3
0 421
Question Jochen Roese · Mar 14, 2016

[SOLVED]

added 

>/tmp/compilew.log &>/tmp/compilew.log ; tail /tmp/compilew.log

to redirect the output to the stdout. Somehow the javac has wierd behavior with the output on errors and verbose information.

Hi,

i want the JAVA-Projections and wrappers to compile after Caché created the files. The creation of the files works 100%.

My addition to createProjection in our Projectionclass is following:

2
0 415
Question Tiago Ribeiro · Feb 25, 2016

Good morning people.
The use of TDD is currently being reference for software delivery more confiabilitade and quality.

At the company I work developing web applications , we create tests for method class in a deteminado package and running the steps that the documentation recommends:

1 export the tests classes to a predefined folder.
2- And running the test ( D ## class (% UnitTest.Manager ) .RunTest (,"/nodelete" )

It is a lot of work to do the export and run these tests would have a resource that we could only run the tests without the need for export ?

5
0 827
Article Dmitry Maslennikov · Feb 23, 2016 14m read

Developing an idea with RuleEngine in XData, we could even refuse from editing full class and edit only valuable xml. Sometime ago I have already written an article(in russian) about such possibility, even more, in that article I wrote about compilable JavaScript to Caché. 

Opening File

This possible with %Studio.AbstractDocument. While extending this class, developer should add a Projection.

2
0 1105
Article Dmitry Maslennikov · Feb 21, 2016 6m read

Some days ago Alberto has written a very interesting article about the usefulness of ObjectGenerators available in Caché.

In this article, Alberto shows an example RuleEngine based on XData, and how it is possible to improve the process of filling such rules. Caché Studio has a Studio Asist for XData; you may have already seen examples of it if you use ZEN or %Installer.Manifest.

2
0 963
Article Alberto Fuentes · Feb 19, 2016 3m read

The attached file contains an example of code generation using ObjectGenerators which builds a very simple homemade RuleEngine. 

Code generation is an excellent way of increasing performance moving run-time calculations to compile-time.

We could generate code creating routines or implemeting methods using ObjectGenerators. In this example we are using ObjectGenerators.

Update: Rule Engine is now on GitHub https://github.com/intersystems-ib/cache-iat-ruleengine

A very simple code generated method

For starters, let's begin with a very basic code generated method:

0
0 938
Question Joel Solon · Feb 18, 2016

This morning on the old Caché Google Group, someone posed the following question, which I've decided to answer here, because it's interesting!

Is there a way to iterate ClassMethod's params, and get param's names and values?

The first answer I can come up with is: it's not easy! In any method, you could try to write code like this (where methodName is the name of your method):

1
0 1896
Announcement Janine Perkins · Feb 16, 2016

Do you need to build an object-oriented application using Caché? Take this course to learn how to create, retrieve, update and delete objects in Caché.

Caché Objects Introduction

Learn the basics of Caché objects. This course will provide an overview of Caché Classes, Methods, and interaction with the Caché database by creating, saving, loading and deleting objects. The lessons in this course assume that you have some previous object-oriented programming experience. Learn More.

0
0 303
Question Timothy Leavitt · Feb 9, 2016

Looking at a property defined as follows:

Property SystemTime As %Library.TimeStamp [ SqlComputeCode = {Set {*}=$ZDATETIME($NOW(),3,1,0)}, SqlComputed ];

The documentation talks about using SqlComputed and SqlComputeCode with SqlComputeOnChange (specifying which events will trigger computation), and about using them with the Calculated keyword (so it's always computed). I don't see any specific explanation of the case above, though, when neither SqlComputeOnChange nor Calculated is specified.

From a bit of testing, it seems that the behavior is:

4
0 817
Article Kyle Baxter · Feb 2, 2016 1m read

What do you do if you want to have the ID field have a meaningful name for your application? 

Sometimes it comes to pass that when you're making a new table that you want to have the unique row identifier (a.k.a. IDKEY) to be a field that has a name that is meaningful for your data.  Moreover, sometimes you want to set this value directly.  Caché fully supports this functionality and it works   Suppose you have a class Test.Kyle.  The data will be stored like so:

^Test.Kyle(IDKEY)=$LB("",Field1,Field2,...,Fieldn)

2
0 511
Article Alexander Koblov · Jan 29, 2016 9m read

The object and relational data models of the Caché database support three types of indexes, which are standard, bitmap, and bitslice. In addition to these three native types, developers can declare their own custom types of indexes and use them in any classes since version 2013.1. For example, iFind text indexes use that mechanism.

1
1 2253