Introduction
I am going to introduce the concept behind the Time Machine inside Programming Without Coding Technology (PWCT). The Time Machine is a tool inside PWCT environment with the following features:
- Move backward/forward during the application construction process
- Run programs at a point in the past
- Play program as movie to know how to create the program step by step
- Order time frames on the latest order of steps inside steps tree
- Refresh steps based on the latest components updates
- Generate documentation explains how to construct the program step by step
In this article, I am going to explain the points 1, 2 & 3.
Background
To program, you need a programming language. There are many programming languages around and most of these languages are text-based programming language like ASM, C/C++, Java, Python, Ruby, C#, PHP, ErLang, Harbour,...etc. where the code is text based and the programmer writes the code using a code editor.
Beside textual programming languages, we can use Visual Programming Environments (VPEs) like Visual Studio, Netbeans, Qt Creator,...etc. to get more productivity but we still need to deal with the text based code to complete our applications.
Fig 1. Qt Creator screen shot
Fig. 2 Netbeans screen shot
Fig. 3 Visual Studio screen shot.
Unlink textual programming languages, there are visual programming languages (VPLs) that use graphical representation to create programs instead of writing code by hand. Using visual programming language, the progammer doesn't need to write code by hand at all and the application construction process done through interaction with the GUI.
Most of the famous visual programming languages are domain specific languages like Alice, Scratch, LabView, ...etc
Fig. 4 Scratch Screen shot
Fig. 5 Alice screen shot
There are few general purpose visual programming languages like Limnor, Tersus & PWCT.
Fig. 6 Limnor screen shot
Fig. 7 Tersus screen shot
PWCT is a visual programming languages framework that comes with more than one visual programming languages created to push visual programming languages a step forward to be ready for use by professional and mainstream programmers.
Unlike other visual programming languages that are based on (Drag-And-Drop) method, PWCT is based on a new method called the Coding Simulation Method (CSM).
Using CSM, the application construction is done through continuous interaction with visual components, which itself is a result of interaction generate/update tree of steps which describes the program under development, the steps tree manipulation done through interaction with visual components without the need to deal directly with text based code, the code generation process are managed in the background by the visual components to hide complexity from the user and to provide easy to learn & use programming tool. The visual representation of the programs happen using traditional GUI controls (Tree, labels, textbox, listbox, etc.) to get high performance.
To get more resources about PWCT, you can visit the project home and to test the Time Machine, you can download PWCT (Free-Open Source).
Using the Time Machine
When we run PWCT, we have the default project Start.SSF
.
Fig. 8 PWCT Main Window
Fig. 9 Steps Tree (Graphical representation of programs replacement for text based code)
Fig. 10 Click the button (!) to build and run the application
Fig. 11 The Welcome application during the runtime
Using the slider beside the Time Machine button, we can move backward or forward during the application construction process.
Fig. 12 Using the slider to move forward/backward during the application construction process
Fig. 13 The steps tree at a point in the past before creating the procedure
We can run the program in the past (a point during the application construction process). For example, when we run the application in a point before creating the button event procedure.
We see that clicking the button doesn't close the application !!
Fig. 14 Running the application at a point in the past
Again, we can go forward and return to the present. When we run the application in the present at the last time frame during the application construction process, we find that clicking the button will close the application.
Fig. 15 back to the present and running the application in the present
When you open a project using PWCT, you can play this project as movie to know how to create the visual source step by step.
The playing process will start from the first step and you will see how to create/generate every step in the steps tree starting from selecting the component using components browser window and moving to entering data to the interaction pages.
You will see the results of every interaction process where after each interaction process, new steps are generated to the steps tree.
Fig. 16 Playing the program as movie to know how to create it step by step.
Playing programs as movie (steps only) will hide the construction details from the playing process and will let you concentrate on the steps generation and this is useful when you want to read and revise programs faster instead of knowing how to create the programs.
Fig. 17 Playing the program as movie (steps only without constructions details)
Points of Interest
The Time Machine can be used in education when we introduce visual programming using PWCT to the new programmers. Also, it can be used in PWCT programs debugging where it can aid in discovering bugs.
History
PWCT is a free-open source project started in Dec. 2005 and the first completed version released in 2008. The last release of PWCT is PWCT 1.8 (Smart) released in 2011 and the most advanced new feature in the release was the Time Machine which I have already explained in this article.