ELENA-LANG / elena-lang

ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. Rich set of tools are provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers, run-time interfaces
https://elena-lang.github.io/
MIT License
236 stars 26 forks source link

ELENA on Rails #322

Open bencz opened 7 years ago

bencz commented 7 years ago

We need to start thinking of a way to implement a way to develop websites in ELENA.

For the HTML response, we can get an idea from Ruby on Rails, it use a HAML as html format, maybe we can use it too, so, implementing a HAML processor/compiler that generates the HTML code at request time.

( probably, the more conniving way... ) as @arakov said, use the elena script with html to generate the pages.

My question is, how about mix the html code with ecode, I mean.... use elena code inside of html code in page generation... for example:

%import system.
%import extensions.

<p>Some numbers:</p>
<ul>
   %%
            0 to:10 runEach:( :o)
            [
               @<li>%%(o literal)%%</li>
            ].
   %%
</ul>

What is the possibility of developing this? Is it more simpler to implement the Elena Script for this case ?

Issue references: #34 #35

arakov commented 7 years ago

Yes, I'm planning to use a script engine for these type of operations

bencz commented 7 years ago

Ok! Maybe something like Python+Django can be did...

                    {% for usrs in users_formset %}
                        <div class="users-forms form-group">
                            {{ usrs.as_p }}
                        </div>
                    {% endfor %}
arakov commented 7 years ago

What's why I'm developing a script engine. Potentially you may support a lot of different scripts 😄

bencz commented 7 years ago

https://bitbucket.org/syncfusiontech/web-servers-succinctly/src 1452.pdf

bencz commented 6 years ago

https://diamondmvc.github.io/Diamond/

bencz commented 3 years ago

Maybe, we can start to think about use the WebAssembly... Look good resources

So, building the script interpreter in for W.A and use it to interpret the ELENA Script, thus reducing the need to use JS