Contact, Questions, Discussion
All contents and concepts
©Webware nach Maß
The Readable Programming Language - Handbook
Lisilogic, its development environment, and tutorials are not yet available online, but a presentation including a live demonstration can be organized. Please send an email to firstname.lastname@example.org!
The development environment of Lisilogic is programmed in Java and needs a JRE to execute.
If it isn't yet installed on your computer, you can download and install it from here.
The purpose of Lisilogic is to program web applications, so you'll need a web server installed locally on your development machine to test what you've programmed.
As for now, the only available translator (see Translators) generates applications in PHP + MySQL, so it is required that your web server supports PHP and MySQL. Xampp is recommended, you can download it from here.
During the installation of your web server, please remember the following informations:
In the future, Lisilogic will support further execution environments.
A Lisilogic plugin for Eclipse is planned too.
The development environment shows
Saving and Loading
Lisilogic saves each project in a single, zip-compressed file.
It is recommended to associate Lisilogic and its development environment with a filename extension in order to be able to double-click on a project to open it. The recommended filename extension is .lisilo. Please refer to the manual of your system to find out how to achieve this association.
A Lisilogic application is made up of chapters.
You find the list of chapters at the left of the development environment. Click on
Double-click on a chapter in the list to open it for edition.
A Lisilogic chapter is made up of sentences.
There are two kinds of sentence editors: a free text editor and a guided editor.
Once a sentence is created, it can be displayed either in its editor or as a normalized text for easier reading. Click in the margin at the left of the sentence and choose "edit" or "stop edit" to toggle.
The normalized display shows how the sentence will look for non-programmers. The aim of Lisilogic is to make code readable even by non-programmers, remember? The normalized display happens to be better readable even for programmers, so you'll probably leave the sentences in this form as long as you don't need to edit them.
The guided editor helps building sentences down to the level of an expression (see Expressions). It prevents many typos, indents automatically, and gives more detailed information about eventual syntax errors, but it might be unusual and it is not as readable as the others, because it displays clickable and editable areas with different background colors (white for editable areas, light gray for clickable ones).
The free text editor is more usual, but it won't indent automatically, it won't make suggestions and it won't
help you find eventual syntax errors. It has the advantage that it allows copy and paste (in the future, the guided editor will
allow copy and paste too), and a series of variations in the way you write the sentences, for instance:
You can convert a sentence from the guided editor to the text editor at any time (click in the margin at its left, choose "edit as text" and confim). A sentence edited as free text can only be converted to a guided editor if it doesn't contain any syntax errors. The "guided edit" choice appears in its margin menu after parsing, see below.
It is strongly recommended to use the guided editor at least until you are able to write error free.
Parsing and Compiling
Once you have added sentences and filled in their editors, click on "save, parse, compile" at the top left of the development environment to save, check the syntax of the sentences and create the pages, structures, roles, etc. that they define. Syntax errors appear in red and the created elements appear in the tables at the right of the programming environment.
Clicking on an error will select the concerned part of the sentence.
Selecting a created object will display its content at the bottom right of the development environment: the values of an enumeration, the attributes of a structure, the UI elements of a page, the actions a role can take. Double-clicking on them will open their definition.
Lisilogic tries to calculate automatically and associate plurals and singulars, for instance, the sentence
Once you've parsed and compiled your application, you may deploy it to your test web server.
Click on "configurations" at the top left of the development environment to open the deployment configuration editor.
This is also the place where you define the title of your application, that will appear on each page.
Click on "create configuration" to define a new deployment target. You'll be prompted to select the kind of execution environment; for now only "PHP + MySQL" is available.
Fill in the new configuration. For PHP + MySQL, you'll have to select:
After choosing the deployment directory, please check that the URL of your application is correct. Lisilogic tries to guess it from the deployment directory - there might be cases where this guess fails. Lisilogic and your application will work even in this case, only the "browse"-buttons of the development environment won't (see below).
Click on "generate" in the configuration editor or on the corresponding "gen" button that has been created just under "save, parse, compile" at the top left of the development environment. Lisilogic generates the files of your application into the directory you've configured, and deletes any other content of it.
Note that for now, this will also delete any files or images that have been uploaded during previous tests.
Note that deploying doesn't reset or change the database: Lisilogic doesn't access it directly, only the init script does.
Initializing the Application
Now open a browser and navigate to the init script of your application:
The init script resets the database, creates the tables of your application, and inserts a test user for each role (see Roles).
Note that the init script deletes (drops) every table of the database whose name starts with the prefix chosen in the configuration.
If you have left empty the prefix, all tables of the database will be deleted. Any data saved during previous tests is lost.
During development, the init script must be executed only if the changes in the code lead to modifications of the database structure (if an attribute has been added or removed, a new type defined, etc.), not if only the user interface and business logic (procedures) have been modified.
When the application goes productive, it is highly recommended not to upload the "admin" directory to the final server, or at least not the init script (init.php), or at least to protect it with a .htaccess. Lisilogic will soon do the latter automatically.
In a browser, navigate to your application:
You'll see a login form along with what you have programmed on the "Home" page for the "visitor" role, corresponding to somebody who looks at the application without being logged in (see Roles and User Interface).
The init script has created a test user for each role, with username, password and role all identical. So you can log in with "user" as username and "user" as password, or with "admin" as username and "admin" as password.
If you have omitted to provide the user with a possibility to log out, you'll ave to close your browser or
to run the init script again to log out. It is recommended to add a sentence like
Along with the application, Lisilogic generates its code in HTML for documentation purposes. It comes in the
"doc" directory in the application's main directory:
Tools to explore the documentation (search, additional summary pages corresponding to the lists at the right of the development environment, ...) are in development.