Giter VIP home page Giter VIP logo

JSAPPSugar

JSAppSugar is a Syntactic Sugar for JavaScript. It enables App(iOS/Android) developers to develop cross platform business logic in JavaScript language. The primary goal of this project is to make the application development process simple, cheap, and of high quality.

QuickStart

Use JS Object In Objective-C

//initialize JSA4Cocoa
JSA4Cocoa* jsa = [[JSA4Cocoa alloc]init];
[jsa startEngine];

//create a JS Object
id<JSAObject> jsObject = [jsa newClass:@"JSObject"];

//invoke methods on the object
NSString* text = [jsObject invokeMethod:@"getText"];

Use JS Object In Java

//initialize JSA4Java
JSA4Java jsa = new JSA4Java();
jsa.startEngine();

//create a JS Object
JSAObject jsObject = jsa.newClass("JSObject");

//invoke methods on the object
String text = (String)jsObject.invokeMethod("getText");

Use Native Object In JavaScript

//define the interface for native class
$class("NativeObject",{
  $implementation:{
    $java : "JavaObject",//the name of a java class
    $oc : "OCObject"//the name of a OC class
  },
  getText:{
    $java : "getText",
    $oc : "getText:"
  }
});

//define a js class. Then you can use this class in JavaScript, Java and objective-c
$class("JSObject",{
  getText:function(){
    //create a native object
    var nativeObject = new NativeObject();
    //invoke methods on the object
    var text = nativeObject.getText("Hello");
    return text;
  }
});

Installation

iOS and Mac

JSA4Cocoa

Android

JSA4Java

Document

δΈ­ζ–‡

JSAUIKitCocoa

JSAUIKitCocoa is a MVC framework for building iOS Apps using JavaScript and Objective-C.

It means that you can write presentation logic by using JavaScript.

Get Started

jsappsugar's Projects

jsa4java icon jsa4java

The implementation of JSAppSugar for Java

jsa4js icon jsa4js

The JavaScript Module for the implementation of JSAppSugar

jsappsugar icon jsappsugar

JSAppSugar is a Syntactic Sugar for JavaScript. It enables App(iOS/Android) developers to develop cross platform business logic in JavaScript language. The primary goal of this project is to make the application development process simple, cheap, and of high quality.

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.