victorteokw / CocoaBean

Write a single code base in javaScript, and deploy everywhere.
MIT License
27 stars 10 forks source link

CocoaBean

Thanks for paying attention.

CocoaBean is not developing anymore. It's core concepts are antiquated. Please consider functional programming, react and react native, flux architecture for similar stuff.

However, this project is interesting. Feel free to try it out.

Original Description

Logo

CocoaBean is a multi-platform javaScript framework. It uses real OOP and MVC. It tries to mimic local app development just like Android and iOS. Currently, the api structure is nearly the same as Apple's Cocoa and Cocoa Touch framework. In the future, it may change or may not change. It depends. However and always, one native style code base can generate multiple apps with javaScript.

How to try it out?

Clone the framework to your local directory

git clone https://github.com/cheunghy/CocoaBean.git

And then cd to the framework

cd path/to/cocoabean

Run this command, you may need sudo if gems are installed to system directory

rake install

If bash tells you -bash: rake: command not found, you may need to install ruby.

See instructions here.

Now CocoaBean framework should be installed as a gem.

To create an app, using cocoabean new APP_PATH.

To preview it in the browser, using cocoabean preview web.

To unit test it, using cocoabean test web.

To distribute the app, using cocoabean dist web.

To change default app setting, modify Beanfile.

You may customize cocoabean behavior through ~/.cocoabeanrc.

For the documentation, just refer to Apple's Cocoa Touch and Cocoa documentation for now. Notice there is some mappings, CB.View is equivalent to UIView or NSView, CB.ViewController is equivalent to UIViewController or NSViewController, CB.Rect, CB.Size, CB.Point are equivalents of CGRect, CGSize and CGPoint.

Implementation status

Platform Status
Web browser done a lot
iOS will start
Android will start
OS X will start
Windows in the discussion

Development

This framework is under development.

Any contribution is welcome.

Usage of this framework and contribution is in the wiki.

If you find any bugs or if you have feature request, welcome to fire an issue here.

Need your help!

There are a lot of works should be done, just take it freely!

Command line interface:

Web platform implementation:

You may join the discussion at anytime!