New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More ā†’
Socket
Sign inDemoInstall
Socket

xone

Package Overview
Dependencies
Maintainers
1
Versions
260
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xone

Open source Javascript framework for building modern web applications.

  • 0.0.509
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35
decreased by-33.96%
Maintainers
1
Weekly downloads
Ā 
Created
Source

Xone Javascript Development Environment

Javascript framework for building modern web applications

Xone provides a lightweight full stack environment to develop beautiful applications for every use and enables the optimal integration of an universal codebase into a wide range of systems (e.g. mobile devices, tablets, desktops, browser environments).

Notice: Actually this is an alpha state of this repository. Some breaking changes could possibly be introduced in upcoming versions. Do not use for production until this message has been removed.


Overview

  • Manage and execute production, development and test environments seamlessly at the same time
  • Integrates fast development in a web browser environment (develop > build > deploy)
  • Provides HTML-CSS-friendly templating system with which designers (non-coders) can also work
  • Xone libraries completely compiles with your codebase (only the used code remains in a single javascript binary file)
  • Therefore you will get the most lightweight footprint possible
  • Provides advanced MVC architecture for your app (e.g. persistent models, routes, request controller, event controller, handlers, views, mapper)
  • Incredibly accellerate DOM changes through a performance optimized render engine
  • Simple, fast and natural usage out of the box
  • Targeting products: hybrid apps, progressive web apps, cordova/phonegap/ionic, single-page web apps, browser apps

Xone basically is available in 3 different versions:

  1. Xone Project (Development Environment)
    • initial project created by xone create
    • Provides you a scalable development stack for modern web-based applications on top of Node.js
    • Is intended for a compilation/build
  2. Xone Extern Bundle (Standalone)
    • xone.bundle.js
    • Alternatively use this bundle to add Xone as a dependency to an already existing build/compiler system (compatible with Closure Compiler "Advanced Mode")
    • Is intended for a compilation/build
  3. Xone Extern Library (Standalone)
    • xone.lib.jsā€‚ >ā€‚ xone.lib.min.js
    • Skips the build part completely and make Xone using like a jQuery library in your web-based project
    • Is not intended for a compilation
Xone Comparison: 1. Project, 2. Bundle, 3. Library
Features by defaultXone Project (Environment)Xone Bundle (Standalone)Xone Library (Standalone)
Final project filesizesmallestsmallnormal
Core Library
MVC Framework
Render Engine
Unit Tests--
Debugging Tools-
Environments--
Global App Configuration-
Build/Compile Project-
Manage Platforms--
Dynamic Templates (HTML > JSON)--
Dependency Management--
Initial Codebase--
CLI Tools--
Support Closure Compiler Advanced Mode-
Dead Code Removal-
Not strictly bound by Conventions-
Does not require Node.js-
Use as a Standalone Library (like jQuery/Underscore)-
Use as a Framework (like Bootstrap/Angular)-
Use as a Dev Environment (like Sencha/Meteor)--

Installation (Xone Project)

> npm install -g xone

Note: To make the Xone CLI globally available, you have to install Xone as a global npm module (also in addition to any local installation if you want to keep simple as most as possible). You can also use a local custom versions of Xone as well as using the CLI without any global installations (read further).

Note: Xone Project binaries typically has to be installed via "xone create" or "xone install" and comes with its own pre-defined folder structure (followed by some conventions). You can pick one of the two stand-alone versions optionally to skip as many conventions as possible (e.g. Xone acts like an extern Javascript Plugin).

Windows

Alternatively in the root of your project you can use the local CLI shortcut app instead for xone, e.g.:

my_project> app build

Note: The options create and install both are not available over the shortcut app.

MacOS/Linux

On a linux machine you may use:

sudo npm install -g xone

If the global "xone" identifier is not registered properly try one of these lines:

hash xone
hash -r

Alternatively you can use the local CLI fallback like:

bash xone build

Create New Xone Project

Create a new project inside the directory workspace/my_project:

workspace> xone create my_project

Works, but it is generally not recommended to use whitespaces in a project folder name:

workspace> xone create "my project"

Read further


Update existing Xone project

To update Xone of an already existing project you basically need 2 steps:

  1. Fetch and install latest version via npm:
> npm install -g xone
  1. Install update to a Xone project (automatically fetches sources from npm_modules)
workspace/my_project> xone install

Note: This will not overwrite any of your project files! Only projects xone library files located in app/lib/xone/ are updated.

Read further


Build Xone project

Un-compiled sources located in: workspace/my_project/app/*

my_project> xone build

Production build located in: workspace/my_project/bin/www/*

Note: We recommended to use production builds for any external/public release and use the sources only for developing, testing and may some other internal purposes. To skip the build integration of Xone, you have to use the standalone version instead.

Run Xone project (Local Webserver)
my_project> xone server

Open your preferred webrowser and goto 'http://localhost/app/' or 'http://localhost/bin/www/'

Optionally you can pass custom host and port:

my_project> xone server localhost 8080

Open your preferred webrowser and goto 'http://localhost:8080'

Run Xone project (Local Filesystem)

Open app/index.html from sources or bin/www/index.html from production build in your preferred browser.

Deploy Xone project (Cordova, Web, etc.)

Use production builds located in workspace/my_project/bin/* to move forward into your Cordova-based projects or upload to a webserver.


Manage platforms

Xone provides custom platform injections to perform platform specific production builds. Therefore all those builds only includes necessary code and dependencies for their related platform.

Show currently defined platforms:

my_project> xone platform

Perform platform specific compilation:

my_project> xone compile android

Compiled files remains in: workspace/my_project/app/*

Perform platform specific builds:

my_project> xone build android

Build destination: workspace/my_project/bin/android/*

Add custom platforms

You can add unlimited custom platforms, e.g. create a platform 'webapp':

my_project> xone platform add webapp
my_project> xone build webapp

Build destination: workspace/my_project/bin/webapp/*


Build Xone Standalone

my_project> xone build bundle

Build destination: workspace/my_project/app/lib/xone/dist/xone.bundle.js

my_project> xone build lib

Build destination: workspace/my_project/app/lib/xone/dist/xone.lib.js

my_project> xone build lib min ./app/js/

Build destination: workspace/my_project/app/js/xone.lib.min.js

Note: The order of passed parameters cannot be changed actually.


Configure Build Tool

Xone build uses the Google Closure Compiler. All Xone libraries also supports compilation in "Advanced Mode". The build properties can be configured in xone.json. The Closure Compiler also provides a simple dependency management system (provide/require) you should make use of to improve dead code removal.

Note: Actually Xone supports 2 different versions of closure compiler: 1. requires Java, 2. requires Javascript (Node). It is recommended to have a Java (JRE) properly installed on your machine to unlock some benefits of the Closure Compiler Java version. To change the type of the compiler you need to change the value of the field closure_compiler_lib_type from "js" into "jar" in xone.json accordingly.

Note: If you have less experience with the Closure Compiler you can optionally set the compilation level to "simple" on the field closure_compiler_level within the xone config file.

Comparison: Closure Compiler (Java) VS. Closure Compiler (Javascript)
Features by defaultClosure Compiler (Java)Closure Compiler (Javascript)
Dependency Management
Auto Sort Dependencies-
"Strict" Dependencies (Entry Point)-
"Pretty Print" Compilation-
Build PerformanceNormalSlow
Compression RatioBestGood
Memory ConsumptionNormalExtreme

Generating Docs (JSDoc)

my_project> xone docs

Docs will be generated in 'docs/api/'.


Using Xone Standalone Library

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body>
    <!-- END_OF_BODY -->
    <!-- LOAD XONE: -->
    <script src="js/xone.lib.min.js"></script>
    <!-- YOUR APP CODE: -->
    <script src="js/app.js"></script>
</body>
</html>

Xone Render Engine

The render engine provides an optional "fast mode" to get the most out of performance. All internal processes of Xone takes advantage when "fast mode" is enabled (e.g. render templates, animate elements, toggle views). When it runs in "fast mode" the render engine has a very closed infrastructure you should keep notice:

  1. CSS Styles
    • Change styles
    • Get styles
  2. CSS Classes
    • Change classes
    • Get classes
  3. HTML Content
    • Change contents
    • Get contents

Note: When "fast mode" is enabled it should not be mixed by any other external manipulations of the same category listed above. We recommended to disable the "fast mode" when style issues occurs by any direct style manipulations (e.g. when using an extern library).

Note: The "fast mode" is enabled by default in a Xone Project (may change in future) and is disabled by default in the Xone Extern Library.

Performance Comparison: Native VS. jQuery VS. Xone
Restrictions (when "fast mode" is enabled)

The problem:

var display;

// get style direct:
display = document.getElementById('my_div').style.display;
console.log(display); // -> 'block'

// set style Xone:
CORE.setStyle('my_div', 'display', 'none');

// get style Xone:
display = CORE.getStyle('my_div', 'display');
console.log(display); // -> 'none'

// get style direct:
display = document.getElementById('my_div').style.display;
console.log(display); // -> 'block' !!!

Instead do this:

var display;

// set style Xone:
CORE.setStyle('my_div', 'display', 'none');

// do on next refresh:
CORE.paint(function(){

    // get style direct:
    display = document.getElementById('my_div').style.display;
    console.log(display); // -> 'none'
});


TODO

  • Provide Standalone Version (dependency-less)
  • Create/Install (CLI)
  • Use npm modules for system tasks (supports all platforms)
  • Improve Environment Mappings
  • Improve Worker Integration
  • Provide Plugin Management
  • Replace Closure Dependency Loader
  • Improve Dependency Management
  • Improve Platform Management
  • Support Hooks
  • Support Animations
  • Support Asynchronous Module Definitions
  • Improve Versioning
  • Improve Migration
  • Improve Benchmark Integration Part 1/2
  • Improve Benchmark Integration Part 2/2
  • Refactor API
  • Add Documentation
  • Add Demos / Examples
  • Add JSDoc
  • Add Unit Tets
    • Core Tests
    • AMD Tests
    • Async Tests
    • Paint Tests
    • Model Tests
    • MVC Tests
    • Test Xone Standalone
  • Platform Support
    • MacOS
    • Windows
    • Linux

Features

  • Manage Development Environments:
    • production, development, test, benchmark
  • Manage Process Environments (Rack):
    • webapp, cordova, native, local, browser
  • Manage Platform Environments:
    • Android, iOS, Windows, Webkit, Mozilla, MSIE
  • Model-View-Controller
    • Supports persistent model management
  • Full MVC-managed environment:
    • Routes
    • Events
    • Handlers
    • Controller
    • Interfaces
    • Adapter
    • Models
    • Mapper
    • Views
    • Payloads
    • Threads / Worker
    • Stubs / Mocks
    • Translations
  • Javascript Core Library
  • Codebase Dependency Management
  • Supports DOM pattern in JSON format
  • Template System
    • Static Content
    • Dynamic Content
    • Partials
    • Locales
  • Build System
  • Template Compiler
  • Local Webserver
  • Layout Manager
  • Multi-Platform-Injections
  • Event Delegation
  • NoSQL Persistent Storage
  • GZIP Storage Data Compression
  • FlexiCache (auto-scale, auto-clean)
  • Multi Language Support
  • Unit Test Integration
  • Versioning & Migrations
  • Dev Task Hooks (Compile, Build, Deploy, Process)
  • Xone Library Hooks (MVC, Storage, Handlers, Events)
  • Debug Mode
    • Debugger Tools
    • Performance Tools
    • Analytics/Statistic Tools
  • Benchmark Integration
  • Closure Compiler Integration ("Advanced Mode")
  • Less CSS Integration
  • CSS Compressor Integration
  • JSDoc Integration
  • Provides the most possible performance while ensuring maximum crossplatform support
  • Compatible with almost each library out there (also can be mixed with similar technologies like: Angular or React)

Keywords

FAQs

Package last updated on 23 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc