Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Generate Javascript (as an alternative to C)

Anonymous
2009-11-27
2013-05-28

  • Anonymous
    2009-11-27

    Hello,

    I'd like to suggest that you consider to also generate Javascript code, so that one can run Eiffel applications on the web browser, just like one can use Java to develop GWT applications.

    The browser is the new OS :)

    Realize that one can use other Eiffel compilers today to generate C code, but this would be the only option to run on a web browser.

    - Quenio

     
  • This indeed one of my ideas as well.

    But I wanted to go even one step further. Web applications have usually one part which runs on the browser (javascript) and one part which runs on the server (php, perl, etc. to make database connections etc.).

    My idea is to provide a library for writing the browser and the server code all in Eiffel and the browser server communication as well and let the compiler generate javascript for the browser part and php (or another common scripting language for the server) for the server part.

    With that scenario, Eiffel could play a unifying role for web applications. However the idea is not yet thought through completely. But I am quite sure that this could be done without a lot of problems.

    Helmut

     

  • Anonymous
    2009-12-03

    That's very interesting! I would definitely be interested in using such a product.

    I don't know if you have followed my thread in the Eiffel Software mailing list, but I am actually interested in creating an Eiffel compiler that generates Java source instead of C.

    That would allow me to run Eiffel code on:
    - Java application servers
    - Web Browsers via GWT.
    - Mobile phones, such as Android.

    Java is joining C as the new "lingua franca"

    I am wondering if I could use tecomp as a starting point?

     

  • Anonymous
    2009-12-03

    Also, I just realized that you have implemented the compiler in C. I am wondering why you took that route instead of implementing it in Eiffel with EiffelStudio GPL?

     
  • Helmut Brandl
    Helmut Brandl
    2009-12-03

    I have followed your thread in the Eiffel Software mailing list. I just don't understand why you want to generate Java Source code? But in general an Eiffel compiler must have access to either the source code or the class-files of the used java libraries, because it has to validate the interfaces. I would prefer the class files, because class files are easier to parse than java source code.

    I am still very interested in that discussion.

    Currently I am working to make tecomp accept the full Eiffel language. There are still some details missing.

    After that the work on the backend will start. I am still in the concept phase. But in general the interface to the backend must be made in a way that it is easy to add different backends (C source code, gcc, llvm, java, javascript etc.)

    Why is tecomp written in C and not in Eiffel using Eiffelstudio? I have chosen that approach for 2 reasons.

    1. Distribution: On nearly all development machines there is a C compiler installed. With that in mind I can distribute the source dode and each interested person is able to compile the compiler. If the requirement is to have another Eiffel compiler installed, the threshold for potential users of tecomp might be too high.
    2. EiffelStudio: I don't like to work with EiffelStudio. It is a huge system and on a moderatlly powered pc (< 1 GHz) the turnaround cycle is much too slow for me.

    Regards
    Helmut

     
  • Hi, Objective-J is a good example, they port Objective-C to run on the browser.

    Capuccino http://cappuccino.org/ is the web framework, that uses Objective-J.

    I think that many people could help and make something similar with Eiffel. I'm glad to help in that project.

    Thx
    Javier

     
  • If you want to contribute, please contact me by mail (helmut.brandl@gmx.net).