Coder Social home page Coder Social logo

joe's Introduction

Java Objects Executor: a polymorphic script environment.alt tag

Many applications in the real world are constituted by a mix of programs and scripts: programs communicate with the user and make the calculations while the scripts do the administrative tasks communicating mainly with the OS.

When you port a legacy application in a Java environment, you want only one environment, therefore you have to migrate the scripts to Java: this can be an hard and lengthy task and the result is in many cases less flexible than the starting point because interpreted procedures are now compiled and because administrative tasks are now handled using a general purpose language.

So you can find useful to have a script language whose features are:

  • ability to access any Java resource: Java is operating system independent therefore the JVM is its virtual operating system;
  • easy to change in order to get similar to any script language in terms of capability and readability;
  • easy to customize in order to get frequently used operations at hand;
  • easy to extend in order to be useful also for future applications’ enhancements, not only for the migration process;
  • easy to understand and use;
  • 100% compatible with Java.

The Java Objects Executor (JOE for short) can be the answer to the above requests.

JOE only task is to execute methods of Java objects in sequence on the fly, however it can be used to mimic any scripting language, with encapsulation, inheritance, nested functions and closures.

The syntax can be summarized in the following 2 lines:

message: [var {:=|<-} ] obj [ method1 { ; | obj-arg1-1 [,obj-arg1-2] ... } [ method2 { ; | obj-arg2-1 [,obj-arg2-2] ...}] ... ].
block: { [[name]:[arg1 [,arg2] ...].] [message] ... }

block is an object itself therefore it can be put wherever an object can. Parenthesis can be used to alter the default left-to-right evaluation order.

I also developed a C language version that could be used in small devices (automation, robotics, Internet of Things) in order to allow the use of an object oriented interpreter with garbage collection and a small memory footprint. It retains almost all the features of the Java version however it miss the Java objects library. It is compiled on Linux and Windows, but it should be easy to compile on any other platform.

Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. This product is not produced nor endorsed by Oracle.

joe's People

Contributors

mbertacca avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.