Specript is ...
Specript was developed under the support of the Exploratory Software Project by the Information-technology Promotion Agency, Japan (IPA).
Specript is a language specialized for the description of the business logic in the field of the enterprise system such as the accounting, the stock management, the sales management. Specript is a DSL (Domain Specific Language) with which the specification of the business logic can be described declaratively ("What"-orientedly).
Specript is a language having so high-level descriptivity as it can be said "detail specification description of the business logic" rather than only a programming language for the implementation. It is enough to say that Specript is a language that aims at the "formal specification description" for the business application.
Problems described in below happen frequently in the scene of the development of the business application. That is... "The specification documents" are needed and created in case of the development using Java or other programming languages. But unfortunately, these documents are almost not useful to grasp the most up-to-date specification because documents are not updated effectively after once created in the many scene. Only a person in charge of the system knows the most up-to-date specification. Then, if that person is moved to any place, in these situation, there is nothing but to read and understand the specification from the Java source codes to grasp the presently meaningful specification afterall. Of course, it is difficult and mistakable to understand the complete specification from the Java source code. Actually, any system troubles due to these problems had occurred in some development scene.
So, we developers thought only the source code is needed to grasp the surely presently working specification certainly and easily if the executable source code itself has so high-level abstractivity and descriptivity as it can be said "specification description". Separately created "specification documents" will not be needed anymore.
We consider to introduce the formal specification description in the field of the business application can completely solve that quality problems in the maintenance situation.
Specript is not an object-oriented language. We developers are recognizing that generally, in the field of the business application, it is no need for the system design to be integrated under the object model especially on the level of the *specification description* (although the object model is suited for on the *implementation* level). We are recognizing that for the business functions and the business procedures to be separated from and independent of the data model, and to write down the I/P/O (Input/Process/Output) of the data processing simply, must be a more efficient and realistic design model for the situation of the newly development and particularly for the situation of the maintenance.
In Specript, those business procedures are represented by the language element named function. The body of the function consists of a *expression*, not sequence of the orders.
The data being an input or an output of the function is represented by the language element named spec. The spec is used to define the data model, like class of Java or struct of C language. Furthermore, the spec represents not only data types but also the business rules about the treatment of that data, that is, the rules about the values of the data, again in other words, the constraints about the range or the format of the values or the constraints about the relationship between data elements. These constraints are represented as an evaluation expression named constraint function. constraint functions can be defined declaratively as a part of the spec which defines the data. The definition of the data element and the definition of the rules about the treatment of that data can be united as a spec.
When the function is called, it is evaluated whether the passed input data fulfills constraint functions defined in the spec of the input (that is the argument) of the called function or not. The body of the function is executed only if the passed input data fulfills constraint functions. Otherwise, SpecViolationException is raised, the execution is breaked, function's body is never executed.
As being showed above, business procedure bodies represented as functions and rules about the treatment of the business data represented as constraint functions of the spec are separated clearly, and thus the mechanism both behave cooperatively is working.
Specript has also the langauge element named property. With property, the data such as the code master or the matrix table expressing the pattern of branching of the procedure - these are small and not updatable - can be described in really matrix-styled form on the source code of the Specript. These propertys can be referred from the body of the function.
The runtime environment of Specript is implemeted with Java, designed to work on the JVM cooperating with the Java program. The compiled Specript code is interpreted by the runtime environment built with Java.
Specript code is directly executed on the runtime environment. Generation of the Java code from Specript code is never performed.
The target of the Specript is the middle "Business Logic Layer" under the 3-tier model, "Presentation" - "Business Logic" - "Data Access". The architecture of the web application using Specript is generally formed as showed in below.
Construct the presentaion layer using web application frameworks of Java, such as JSP/Servlet, JSF, Struts, etc. The presentation layer cannot be constructed with Specript because Specript is specialized for the description of the business logic.
The business logic written in Specript is called from that presentation layer written in Java.
The class of SpecriptRuntime is provided by the Specript Runtime Java API. This SpecriptRuntime class makes a bridge between the Java code and the Specript code.
In case of Struts, the Action class requests the execution of the business logic written in Specript language to the instance of the SpecriptRuntime class (that is normaly holded by the ServletContext). In more detail, the caller Action class passes the name of the Specript function to be executed to the SpecriptRuntime class.
Business logics that bear the core of business application should be written in Specript. It will become more easy to read and understand the specification of the business logic directly from the source code, owing to the Specript's high-level descriptivity that can be said "detail specification description".
Specript needs to be supported by Java to access to the external data resources (mainly RDB). Construct the data access layer with Java using DataSource/JDBC or other data access libraries.
These Java code is treated as a language element named extern function from the Specript code's side.
Also, Specript package provides the DataSource/JDBC-based data access library simple but enough for practical use.
The core of the Specript runtime environment is implemeted with the Scheme language. Whole of the runtime environment is implemented with Java and running on the JVM. The compiled Specript program code (really that is a S-expression!) is interpreted on that runtime environment constructed with Java + Scheme.
The Specript runtime is treated as a class of SpecriptRuntime by the Java code side. (See "Architecture of the Application using Specript" again.)
So, Specript runtime environment contains the Scheme interpreter in it. The follwing implementation is used for that Scheme interpreter written in Java.
SISC - Second Interpreter of Scheme Code (http://sisc.sourceforge.net/)
We acknowledge SISC and its developer, Mr. Scott G. Miller.
Specript's program codes such as the compiler or the runtime will be released as open source softwares.
The concrete license statement has not been built yet until now (June 2008). Anyway, it will be never prohibited to install and use the Specript freely for the production environment in the enterprise.
Also, please refer to the documents showed in below to understand the outline of Specript. (Japanese only, however)
In the linked page, refer to "GYOUMU APPLICATION KAIHATSU YOUTO MUKE *WHAT* KIJUTSU SHIKOU GENGO NO KAIHATSU" (The Development of the "What"-Descriptive-Oriented Language for the Development of the Business Applications).
|(c)2007-2008, Specript Development Team||Last Updated: 2008-06-01|