Caché ObjectScript
   HOME

TheInfoList



OR:

Caché ObjectScript is a part of the Caché database system sold by
InterSystems InterSystems Corporation is a privately held vendor of software systems and technology for high-performance database management, rapid application development, integration, and healthcare information systems. The vendor's products includInterSy ...
. The language is a functional superset of the ANSI-standard
MUMPS MUMPS ("Massachusetts General Hospital Utility Multi-Programming System"), or M, is an imperative, high-level programming language with an integrated transaction processing key–value database. It was originally developed at Massachusetts Gener ...
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
. Since Caché is at its core a MUMPS implementation, it can run ANSI MUMPS routines with no change. To appeal as a commercial product, Caché implements support for
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pr ...
, a macro preprocessing language,
embedded SQL Embedded SQL is a method of combining the computing power of a programming language and the database Data Manipulation Language, manipulation capabilities of SQL. Embedded SQL statement (programming), statements are SQL statements written inline wi ...
for ANSI-standard SQL access to M's built-in database, procedure and control blocks using C-like brace syntax, procedure-scoped variables, and relaxed whitespace syntax limitations. The language has private and public variables and globals. Global has a different meaning in this language than in most; such variables are global across routines, processes, and sessions. Thus, editing a global variable is making permanent and immediate changes to a system-universal database (which survives reboots, etc.). The scope of a private variable is the local function, the scope of a public variable is the entire process. Variables, private and public, may be single elements or complete multi-dimensional arrays. The great majority of Caché's feature-set is inherited from the ANSI
MUMPS MUMPS ("Massachusetts General Hospital Utility Multi-Programming System"), or M, is an imperative, high-level programming language with an integrated transaction processing key–value database. It was originally developed at Massachusetts Gener ...
standard. See that article for details on how data is represented and the different ways a programmer can think about the data during development.


Caché programming examples


Hello world program as a routine

hello // hello world routine write "hello world" end quit // end Then in Caché Terminal (assuming you wrote the hello routine to the SAMPLE namespace): SAMPLE> DO ^hello


Hello world program as a ClassMethod

Class User.Helloworld Then in Caché Terminal (assuming you wrote the User.Helloworld Class to the SAMPLE namespace): SAMPLE> DO ##class(User.Helloworld).HelloWorld()


See also

*
GT.M GT.M is a high-throughput key–value database engine optimized for transaction processing. (It is a type also referred to as "schema-less", "schema-free", or " NoSQL".) GT.M is also an application development platform and a compiler for the ISO ...
, an implementation of MUMPS *
Profile Scripting Language Profile Scripting Language (PSL) is a superset of the MUMPS programming language that adds object-oriented language features. It is currently developed by Fidelity National Information Services (hereafter FIS). History PSL is a language that ...
, an extension to MUMPS


References


External links

* http://www.intersystems.com/cache Persistent programming languages {{compu-lang-stub