elena-lang icon indicating copy to clipboard operation
elena-lang copied to clipboard

ELENA on Rails

Open bencz opened this issue 7 years ago • 6 comments

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

bencz avatar Jun 27 '17 20:06 bencz

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

arakov avatar Jun 27 '17 20:06 arakov

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 %}

bencz avatar Jun 27 '17 20:06 bencz

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

arakov avatar Jun 27 '17 20:06 arakov

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

bencz avatar Sep 14 '17 20:09 bencz

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

bencz avatar Nov 09 '17 12:11 bencz

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

  • https://github.com/ncave/dna-redux
  • https://becominghuman.ai/passing-and-returning-webassembly-array-parameters-a0f572c65d97
  • https://medium.com/@tdeniffel/c-to-webassembly-pass-and-arrays-to-c-86e0cb0464f5
  • https://livebook.manning.com/book/webassembly-in-action/c-emscripten-macros/v-7/36

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

bencz avatar Nov 22 '20 19:11 bencz