[exprla-devel] Some additional advantages of XPL
Status: Pre-Alpha
Brought to you by:
xpl2
From: reid_spencer <ras...@re...> - 2002-01-31 08:25:10
|
--- In xpl-dev@y..., "Alexander Gutman" <gutman@m...> wrote: Hello, friends. Here are some of my thoughts concerning XPL and what it can be useful for. 1. XPL as a source language A program written in XPL can be transformed into programs in different languages. This transformation can be performed by suitable XSLTs: for each destination language, we have a corresponding XSLT, one for Java, another for JavaScript, etc. 2. XPL as a universal programming language Consider the following situation. A developer creates (or designs) an application for the Web. Some fragments of the code correspond to the server part, while other fragments should be executed on the client side. Therefore, these fragments should be written in different languages: for instance, the first in Java and the second in JavaScript. However, at early stages of development, it is rather difficult to predict which fragments of the application will work on a server and which on a client. Moreover, there are different clients. Some of them are thick, other are thin. For thick clients, some fragments of the code will be executed on the client side and, for thin clients, the same fragments will work on the server side. In addition, it is quite possible that, in some time, a need will occur to transforming the application into a different platform which will require a different language, or some fragment will be separated for working on an intermediate server (for instance, in order to make the main server part more lightweight). If the code is written in XPL, all the above problems are easily solved: just transform different parts of the code into different languages. 3. XPL as a program storage format With the help of a special editor/environment, a user can create XPL programs by using his/her favorite programming language. This means that, on the screen, the user sees the code as if it is written in, say, Java, while the code is actually stored as an XPL program. Later, the XPL staff can be transformed into another language, say, C++. The advantage is obvious: a developer creates a C++ code by using Java coding. By the way, such an editor/environment will be very useful even if the destination is XPL: native XPL code is not convenient for everyday programming, it is rather "cryptic", and not so readable and concise as usual programming languages. 4. XPL as a skeleton for a programming environment If an editor/environment stores the code in XPL, it is much easier to provide very smart and powerful service for a user, since the DOM of the hidden XPL source can be effectively used. For instance, with the help of a simple search pattern, the XPL source can be queried to produce the list of methods available for an object under cursor in a very convenient and rich form. Enough for a start, I think. :-) Excuse my English. My native language is Russian, and there are no XPL applications yet which could help me creating messages in English by using my favorite language. :-) -- Alexander E. Gutman --- End forwarded message --- |