0.7.408 • Published 6 years ago

xone v0.7.408

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
6 years ago

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


Announcement Xone v1.0.0 stable

Xone will get some major changes. This was required to open capabilities for upcoming features we are working now like Xone Native. The plan is to release a final architecture until v.1.0.0 and then also to be done with most of the breaking changes.

v0.9.0 beta (coming in Q1/2018)
  • Xone Native (Cordova-based wrapper)
    • Enables native features without changing anything on your codebase, like:
      • Native Transitions
      • Native Filesystem/Storage
      • Native Image Library
      • Native Media Player
      • Native Device Access (Camera, Photo Library, Statusbar, etc)
      • Native Map
    • Provides default Cordova-based project build configurations (which already including all required plugins as well as platform configurations)
  • Available Source Code of Demo Apps
  • Native Demo App (through App Stores), including:
    • technical demos
    • components demo
    • demo apps
    • xone developer tools
    • documentation
  • > 90% test coverage
v0.8.0 beta (in progress)
  • Xone Non-Blocking UI Processing Model, controllable via:
    • Util.Process.async
    • Util.Process.paint
    • Util.Process.promise
    • Util.Process.queue
    • Util.Process.stack
    • Util.Process.asap
    • Util.Process.run (Pseudo Thread Runner Instance)
  • Fully transfer to Asynchronous Module Definition (replaces the poorly Closure Compiler dependency system)
  • Replace most of global namespaces of the framework to constructors and also changing capitalized style for the new AMD namespacing:
    • Note: By using AMD you can internally customize naming of all references of Xone (conflicts with global namespace is not possible in AMD)
    • APP.CONTROLLER[name]new Controller(name) or Controller.new(name)
    • APP.VIEW[name]new View(name) or View.new(name)
    • APP.EVENT[query]new Event(query) or Event.new(query)
    • APP.ROUTE[route]new Route(route) or Route.new(route)
    • APP.MAPPER[name] → Is now a part of View, Model and/or Route (see: View Mappings, Model Mappings, Payload Mappings)
    • APP.MODEL[name]new Model(name) or Model.new(name)
    • APP.WORKER[name]new Worker(name) or Worker.new(name)
    • APP.HANDLER → you are free to use any style (like before)
    • APP.HELPER → you are free to use any style (like before)
    • APP.SETTING.get(key)Setting.get(key)
    • APP.PLUGIN.FilesystemFilesystem
    • CORE.*Util.{Package}.* (e.g. Util.Array.merge)
    • alternatively of calling the method .new() it is also possible to use .create() as well as .register()
    • Singular naming coding convention is still valid
    • new constructors can either be instantiated via the builtin method .new() or via the classical new keyword
    • the new concept of using constructors opens a lot of nice features, they will coming soon, and also adds some missing OOP styles
  • User Interface Components
    • Slider
    • Side Drawer (Side Menu)
    • Internal App Status Notification
    • Adjustable Statusbar-Visibility and Webview-Overlays-Statusbar per Screen/View
  • Provides package definitions (packages can group or import html-templates, javascript, css styles and assets)
  • Provide dependency management of whole modules/packages through the keyword import("package") and export("package", ...)
  • Worker to de-/compress contents in background (lzip)
  • Xone Development User Interface (Browser replacement for any console commands)
  • Model supports now virtual properties everywhere (not only in views)
  • Model can now define a structural schema to save in storage (this also improves extraction of nested models)
  • New Templating Implementation and Compiler
    • allows inserting Javascript
    • allows nesting of for-loops and if-conditionals
    • better handling of virtual and mapped properties
    • ultra fast through new pre-compilation strategy and usage of model-bind-caching (instead of view-bind cache)
v0.7.0 beta
  • Support for Web Components
  • Support for Web Templates
  • Support for Native Filesystem
  • Implements Web Animation API
  • Virtual DOM Integration (Inferno)
  • Xone Native Adapter for Cordova-based Apps
    • Popups, Alerts, Confirmations, Status
    • Filesystem Storage
    • Native Transition
    • Action Sheet
    • Notifications
    • Reminder
    • Calendar
    • Native Image Library
    • Native Map
  • New View Controller Engine
  • New Layout Controller (the old was completely removed)
  • Simplified Project Structure
  • Build Extensions:
    • CSS Auto-Prefixer
    • Manage Hooks
    • Manage Optional Dependencies
  • Improved persistent storing of models
  • Improved Auto Resizing Layout
  • Improved Dependency Management
  • Lazy image loader (with offline filesystem cache)
  • User Interface Components
    • Navigation Bar
    • Toolbar
    • Scrollpane (vertical, horizontal, split)
    • Lists
    • Tables
    • Grid Layout
    • Pull to refresh
    • Swipe-back views
  • View Manager controls components
  • Render Payloads

Those features will become deprecated for now (unsupported):

  • Using the CONFIG.RACK
  • Layout Controller (any calls to APP.LAYOUT)
  • Old View Helpers (slides, pulls, popups, alerts, ...)
  • Build xone.bundle.js
  • Custom location of xone installation

Features

Basically Xone has an easy to learn high-level interface without forcing you to implement any low-level "framework-cryptofied" code as you would do with Angular or React. That also preserves huge flexibility to your codebase for upcoming technologies, ports or any other major changes.

  • Manage and execute production, development, benchmark and test environments
  • Developing seamlessly in a web browser environment (saves you tons of time!)
  • Provides a dynamic template system which is readable for designers
  • Provides an advanced declarative MVC architecture for your app (e.g. persistent models, routes, controller, events, views, handlers, mapper)
  • Uses Closure Compiler to achieve optimal dead code elimination
  • Xone libraries compiles with your codebase (the used code remains in a single javascript build file)
  • Others: build system, dependency management, environment management, platform management, unit test integration, benchmark integration
  • Simple, fast and natural usage out of the box without loosing any "framework magics"
  • Targeting products: hybrid apps, progressive web apps, apps based on cordova/phonegap/ionic/electron, single-page application, 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-
Is 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/public/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/public/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 public/www/index.html from production build in your preferred browser.

Deploy Xone project (Cordova, Web, etc.)

Use production builds located in workspace/my_project/public/* 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/public/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/public/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.

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>

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/'.


Development Environments

Default environments are:

  • production (live build)
  • development (local)
  • test (local)
  • benchmark (local)

Change environment in app/manifest.js:

"env": "development",
"platform": "www"

Or just adding parameters to the URL:

http://localhost:9000/?env=test&platform=android&debug=true

Note: You are also able to override any CONFIG attribute by passing URL parameters respectively.

Custom Environments

Show currently defined environments:

my_project> xone env

Add custom environments:

my_project> xone env add offline

Build destination: workspace/my_project/app/config/offline.js

0.7.412

6 years ago

0.7.408

6 years ago

0.7.406

6 years ago

0.7.405

6 years ago

0.7.404

6 years ago

0.7.403

6 years ago

0.7.402

6 years ago

0.7.401

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.0.617

6 years ago

0.0.616

6 years ago

0.0.615

7 years ago

0.0.614

7 years ago

0.0.613

7 years ago

0.0.612

7 years ago

0.0.611

7 years ago

0.0.610

7 years ago

0.0.609

7 years ago

0.0.608

7 years ago

0.0.607

7 years ago

0.0.606

7 years ago

0.0.605

7 years ago

0.0.604

7 years ago

0.0.603

7 years ago

0.0.602

7 years ago

0.0.601

7 years ago

0.0.600

7 years ago

0.0.522

7 years ago

0.0.521

7 years ago

0.0.520

7 years ago

0.0.519

7 years ago

0.0.518

7 years ago

0.0.517

7 years ago

0.0.516

7 years ago

0.0.515

7 years ago

0.0.514

7 years ago

0.0.513

7 years ago

0.0.512

7 years ago

0.0.511

7 years ago

0.0.510

7 years ago

0.0.509

7 years ago

0.0.508

7 years ago

0.0.507

7 years ago

0.0.506

7 years ago

0.0.505

7 years ago

0.0.504

7 years ago

0.0.503

7 years ago

0.0.502

7 years ago

0.0.501

7 years ago

0.0.500

7 years ago

0.0.495

7 years ago

0.0.494

7 years ago

0.0.493

7 years ago

0.0.492

7 years ago

0.0.491

7 years ago

0.0.490

7 years ago

0.0.489

7 years ago

0.0.488

7 years ago

0.0.487

7 years ago

0.0.486

7 years ago

0.0.485

7 years ago

0.0.484

7 years ago

0.0.483

7 years ago

0.0.482

7 years ago

0.0.481

7 years ago

0.0.480

7 years ago

0.0.479

7 years ago

0.0.478

7 years ago

0.0.477

7 years ago

0.0.476

7 years ago

0.0.475

7 years ago

0.0.474

7 years ago

0.0.473

7 years ago

0.0.472

7 years ago

0.0.471

7 years ago

0.0.470

7 years ago

0.0.469

7 years ago

0.0.468

7 years ago

0.0.467

7 years ago

0.0.466

7 years ago

0.0.465

7 years ago

0.0.464

7 years ago

0.0.463

7 years ago

0.0.462

7 years ago

0.0.461

7 years ago

0.0.460

7 years ago

0.0.459

7 years ago

0.0.458

7 years ago

0.0.457

7 years ago

0.0.456

7 years ago

0.0.455

7 years ago

0.0.454

7 years ago

0.0.453

7 years ago

0.0.452

7 years ago

0.0.451

7 years ago

0.0.450

7 years ago

0.0.449

7 years ago

0.0.448

7 years ago

0.0.446

7 years ago

0.0.445

7 years ago

0.0.444

7 years ago

0.0.443

7 years ago

0.0.442

7 years ago

0.0.441

7 years ago

0.0.440

7 years ago

0.0.439

7 years ago

0.0.438

7 years ago

0.0.437

7 years ago

0.0.436

7 years ago

0.0.435

7 years ago

0.0.434

7 years ago

0.0.433

7 years ago

0.0.432

7 years ago

0.0.431

7 years ago

0.0.430

7 years ago

0.0.429

7 years ago

0.0.428

7 years ago

0.0.427

7 years ago

0.0.426

7 years ago

0.0.425

7 years ago

0.0.424

7 years ago

0.0.423

7 years ago

0.0.422

7 years ago

0.0.421

7 years ago

0.0.420

7 years ago

0.0.419

7 years ago

0.0.418

7 years ago

0.0.417

7 years ago

0.0.416

7 years ago

0.0.415

7 years ago

0.0.414

7 years ago

0.0.413

7 years ago

0.0.412

7 years ago

0.0.411

7 years ago

0.0.410

7 years ago

0.0.409

7 years ago

0.0.408

7 years ago

0.0.407

7 years ago

0.0.406

7 years ago

0.0.404

7 years ago

0.0.403

7 years ago

0.0.402

7 years ago

0.0.401

7 years ago

0.0.400

7 years ago

0.0.315

7 years ago

0.0.314

7 years ago

0.0.313

7 years ago

0.0.312

7 years ago

0.0.311

7 years ago

0.0.310

7 years ago

0.0.309

7 years ago

0.0.308

7 years ago

0.0.307

7 years ago

0.0.306

7 years ago

0.0.305

7 years ago

0.0.304

7 years ago

0.0.303

7 years ago

0.0.302

7 years ago

0.0.301

7 years ago

0.0.300

7 years ago

0.0.299

7 years ago

0.0.298

7 years ago

0.0.297

7 years ago

0.0.296

7 years ago

0.0.295

7 years ago

0.0.294

7 years ago

0.0.293

7 years ago

0.0.292

7 years ago

0.0.291

7 years ago

0.0.290

7 years ago

0.0.289

7 years ago

0.0.288

7 years ago

0.0.287

7 years ago

0.0.286

7 years ago

0.0.285

7 years ago

0.0.284

7 years ago

0.0.283

7 years ago

0.0.282

7 years ago

0.0.281

7 years ago

0.0.280

7 years ago

0.0.279

7 years ago

0.0.278

7 years ago

0.0.277

7 years ago

0.0.276

7 years ago

0.0.275

7 years ago

0.0.274

7 years ago

0.0.273

7 years ago

0.0.272

7 years ago

0.0.271

7 years ago

0.0.270

7 years ago

0.0.269

7 years ago

0.0.268

7 years ago

0.0.267

7 years ago

0.0.266

7 years ago

0.0.265

7 years ago

0.0.264

7 years ago

0.0.263

7 years ago

0.0.262

7 years ago

0.0.261

7 years ago

0.0.260

7 years ago

0.0.259

7 years ago

0.0.258

7 years ago

0.0.257

7 years ago

0.0.256

7 years ago

0.0.255

7 years ago

0.0.254

7 years ago

0.0.253

7 years ago

0.0.252

7 years ago

0.0.251

7 years ago

0.0.250

7 years ago

0.0.249

7 years ago

0.0.248

7 years ago

0.0.247

7 years ago

0.0.246

7 years ago

0.0.245

7 years ago

0.0.244

7 years ago

0.0.243

7 years ago

0.0.242

7 years ago

0.0.241

7 years ago

0.0.240

7 years ago

0.0.239

7 years ago

0.0.238

7 years ago

0.0.237

7 years ago

0.0.236

7 years ago

0.0.235

7 years ago

0.0.234

7 years ago

0.0.233

7 years ago

0.0.232

7 years ago

0.0.231

7 years ago

0.0.230

7 years ago

0.0.229

7 years ago

0.0.228

7 years ago

0.0.227

7 years ago

0.0.226

7 years ago

0.0.225

7 years ago

0.0.224

7 years ago

0.0.222

7 years ago

0.0.221

7 years ago

0.0.220

7 years ago

0.0.219

7 years ago

0.0.218

7 years ago

0.0.217

7 years ago

0.0.216

7 years ago

0.0.215

7 years ago

0.0.214

7 years ago

0.0.213

7 years ago

0.0.212

7 years ago

0.0.211

7 years ago

0.0.210

7 years ago

0.0.209

7 years ago

0.0.208

7 years ago

0.0.207

7 years ago

0.0.206

7 years ago

0.0.205

7 years ago

0.0.204

7 years ago

0.0.203

7 years ago

0.0.202

7 years ago

0.0.201

7 years ago

0.0.200

7 years ago

0.0.20

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.10

7 years ago