some news about our compiler (Dragon ring compiler - written using ring)

Skip to first unread message


Feb 19, 2024, 5:02:32 PMFeb 19
to The Ring Programming Language
Hello Mahmoud and all ring family....

we have now a strong code compiler that help to build websites…

This compiler will be shared open source (for learning purposes), when we publish the first version of IT…

the main idea of our compiler is that we divide the file into two parts.

first one is the view of our output …
and second one is for ring code and pre-processing code.

we now have a features that helpful in web development...

we have our specific route system.

documentations is going to be published with the first version.

now I will explain the code in this image...
Screenshot 2024-02-20 000041.png
Hello Dragon Ring

Hello :Mohannad 1
Age :23
Salary : 165
Hello :Mohannad 2
Age :23
Salary : 48
Hello :Mohannad 3
Age :23
Salary : 294

(1) at the top we have normal html heading tag...
(2) <> is fragment that used to print real new line (not <br/>)
(3) inside p tag we have our output as paragraph.
(4) we can use "{%%}" or. "{$$}" for ring code and "{%= %}" or "{$= $}" or "{{}}" for ring expression.
(5) using "<@" for calling sub components at one file and setting their props. (attributes)

(6) ringcode tag is pre processing code era.
(7)  the class name is the name of this object file that we use it for different purposes like accessing the object file and modify its code from other files.

(8) newcomponent() function is used to create a sub components
and it takes 3 parameters:
first one is the component name that we will use when we want to call the component.
second one is a list of "props" properties or attributes ...
third one is a function that will return the shape of output when we set the props…

please note I had just explained this code not all the compiler features ...

finally for SEO we decided to use HTMX library...
So ring doesn't have such library so we will create our OWN…

Note: we expect that the first version will come soon ,may be when the ring1.20 published …

thanks for your time…

Best wishes…

Mahmoud Fayed

Feb 19, 2024, 7:27:44 PMFeb 19
to The Ring Programming Language
Hello Mohannad

>> "we now have a feature that helpful in web development..."

I like that you focus on improving Ring usage in web development.

>> "please note I had just explained this code not all the compiler features".

Proving some basic features then growing the way to go to improve the product based on the feedback.

>> "Note: we expect that the first version will come soon, may be when the ring1.20 published …"

I will be waiting for the release to try it :D


Mansour Ayouni

Feb 20, 2024, 3:35:57 AMFeb 20
to Mahmoud Fayed, The Ring Programming Language
Hello Mohannad,

Good job. It seems that you are implementing a component-oriented framework, like React and cie but for the backend, right?

Regarding HTMX, in my understanding, it's not just about SEO, but a part of a whole vision against the dominance of client-side JS frameworks (React and others). Hence, the old style of developing web applications rendered on the server becomes the norm again.

Ring WebLib fits nicely with this paradigm, and HTMX and the other guidelines of this paradigm (called hyper-media web apps, as explained in this interesting book: can be used in Ring web projects.

I am interested to hear your thoughts on this and what direction your framework will take: the React-like, or HTMX-like direction.

All the best.



You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit


Feb 20, 2024, 7:38:05 AMFeb 20
to The Ring Programming Language

Hello Mansour.

"It seems that you are implementing a component-oriented framework, like React and cie but for the backend, right?  ">> yes it is one of the basic features of dragon framework ....

"Regarding HTMX, in my understanding, it's not just about SEO, but a part of a whole vision against the dominance of client-side JS frameworks (React and others). Hence, the old style of developing web applications rendered on the server becomes the norm again." >> the idea is to divided our project into small parts like any software such as php laravel or flask or django...
but we have a strong point that every file can access other files and modify their output depending on need…
and every file contains its own components …
this is the case when we do not use HTMX:
the page must be reload every time the user click or interact with the page...
we were planning on creating our virtual DOM depending on our need but at the current stage we will use HTMX.
and depending on the developer code the framework can check if request comes from HTMX or normal USER…

react use jsx and virtual DOM to interact with the user so it do not support SEO…
Next Js support it but it still take a lot of memory at server side…
I'm creating a blog and demo project with our implementation of the compiler...

unlike webLib this project designed for those web developers are not familiar with Ring concepts…

WebLib use ring functions and OOP with reflection and meta programming which is so hard for those start learning ring…

of course these concepts are important to be learned for anyone use ring, So if the developer can understand the OOP concepts can easily use this framework...

until now we just use stdlibcore library and I'm still working in core folder at first STAGES…

but some of the features in todo list will not ve done at current stages…
such as : because of the threads library do not work in windows 64x bit we can not make the asynchronous output…

* important note that we consider the windows OS as development environment and Linux as production environment...
So the output speed can be more than 4x in Linux if compared with windows (depending on the tests on my machine)

how compiler work?

we just using loops, OOP concepts ,predestined classes for implement this compiler
then create one object for file and working with at with the reference,
so we support RingVM and compiler from (Ring1.18)…
*we are not need to use tokens at current stage for implementation the classes...

the file class can be containe custom methods such as:  onload and onstart and onend
to be called if defined in class...

every file cam load others files and access to the objects (by reference) as well as they can access the main file and modify its output .

we using some features not present in ring like:  is keyword

{%~ is exp ?
       <h1>if TRUE</h1>
       "if False"
we can use normal html or text in string or variables…

according to route system the project structure would be like:
-index.ring  file
-src   dir
     index   dir
          page.ring  file

so no need to add routes manually …

the index.ring file is empty file work just as run key ...

actually it did not loaded or read by compiler....
we are supporting all request methods post,get,put,update,delete...

also it's important to know that the output compressed without new lines or empty tabs written in the file…

when the user click on url the server will find index.ring which contain shebang line then will search on the required url depending on folder name like in (next Js) then execute page.ring file …
also we can easily execute a specific file without server just using:

dragon filename [options]

after website developed you can build your project as:
html files
text files
ring files (with classes)
one object file

thanks for your reply...

Best wishes...


Mansour Ayouni

Feb 21, 2024, 5:32:33 AMFeb 21
to MOHANNAD ALDULAIMI, The Ring Programming Language
Hello Mohannad,

I see roughly the challenge of your project.

At a design level, you want to help web developers create apps by subdividing the app into modules. Modules are callable through functions that exchange data at the global level. Ring will execute those functions, generate their output, and give the control to the router to decide on the next module to call.

Each module is a file, and this is the implementation choice you opted for.

Now, since I'm concerned to understand the value proposition of your framework, compared to what is proposed by Ring WebLib, let me argue that WebLib gives us all the necessary flexibility to subdivide our app into modules. Those modules can be pure Ring functions or whole HTML files.

In fact, for any developer, not only those mustering Ring, there is a sense of intuitiveness and ease of use WebLib provides that are not found in other frameworks. In particular:
  • Ring WebLib provides us with two ways of developing the web app: by making our HTML files and using Ring as a scripting language inside them (like it is the case for PHP and others), or by writing pure Ring code to design the HTML pages (All HTML elements are abstracted and generated in the background) in a functional, object-oriented, or declarative (HTML-like) style!
As you see, this is a crucial value-proposition that one could build upon to make a powerful web framework, yet coherent with the spirit of Ring. Hence, the idea of proposing something in disruption with WebLib would be nice, but can not be considered as an addition to the Ring project.

I tell you that, not to discourage you going forward with your design decision, on the contrary! But just to share with you one of the principles I personally applied in my SoftanzaLib project, that I can summarize like that:
  • Softanza respects Ring principles and guidelines, in particular, all is based on the simplicity of the Ring type system (four main Ring types --> four main Softanza types).
  • Ring functions and standard features are proprietary in writing any code in Softanza, and an alternative solution is proposed only when the Ring function needs to be fixed or enhanced
  • Even in this case, the name of Ring function is not used by Softanza, so other Ring developers are not confused
  • In any other situation, Softanza can innovate and propose its own semantics and gymnastics.
I hope you have great success with your framework and keep up great work!


Reply all
Reply to author
0 new messages