npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

objectum-ee

v3.8.49

Published

Objectum Enterprise Edition - Javascript app platform

Downloads

60

Readme

Objectum Enterprise Edition - javascript app platform

Deprecated.

Русская версия

Objectum platform makes it easy to create realtime single page applications that run in both Node.js and browsers.
Objectum includes a powerful user interface constructor called Visual Objectum that creates grids, tree grids, forms, etc. Automatically generates source code for CRUD (create, read, update, delete) functions.

Learn by Example project "To-Do list"

Complete project https://github.com/objectum/todo

Create directories:

mkdir /opt/objectum/node
mkdir /opt/objectum/projects
mkdir /opt/objectum/projects/todo
mkdir /opt/objectum/projects/todo/bin

Install:

cd /opt/objectum/node
npm install objectum-ee

You must have installed PostgreSQL 9.x (datestyle = dmy)

Add project configuration (postgres password: 12345):

cat > /opt/objectum/projects/todo/config.json
{
	"rootDir": "/opt/objectum/projects/todo",
	"adminPassword": "D033E22AE348AEB5660FC2140AEC35850C4DA997",
	"database": "postgres",
	"host": "localhost",
	"port": 5432,
	"db": "todo",
	"dbUser": "todo",
	"dbPassword": "1",
	"dbaUser": "postgres",
	"dbaPassword": "12345",
	"dbEngine": {
		"enabled": 1
	},
	"visualObjectum": {
		"menuConstructor": 1,
		"accessConstructor": 1,
		"projectConstructor": 1
	}
}

Add platform configuration:

cat > /opt/objectum/node/config.js
module.exports = {
	"rootDir": "/opt/objectum/node",
	"projectsDir": "/opt/objectum/projects",
	"port": 8100,
	"storages": {
		"todo": require ("/opt/objectum/projects/todo/config.json")
	}
}

Add script:

cat > /opt/objectum/node/objectum.js
var objectum = require ("objectum-ee");
var config = require ("./config");
module.exports = new objectum.Objectum (config);

Add script:

cat > /opt/objectum/node/index.js
var objectum = require ("objectum-ee");
objectum.start (require ("./config"));

Add script:

cat > /opt/objectum/projects/todo/bin/init.js
var $o = require ("/opt/objectum/node/objectum");
$o.db.execute ({
	code: "todo",
	fn: "init",
	name: "To-Do list",
	locale: "en" // en, ru
});

Init project folder:

cd /opt/objectum/projects/todo/bin
node init.js

Prepare tablespace folder:

mkdir /opt/objectum/projects/todo/db
chown postgres:postgres /opt/objectum/projects/todo/db

Add script:

cat > /opt/objectum/projects/todo/bin/create.js
var $o = require ("/opt/objectum/node/objectum");
$o.db.execute ({
	code: "todo",
	fn: "create",
	path: "/opt/objectum/projects/todo/db"
});

Create storage:

cd /opt/objectum/projects/todo/bin
node create.js

Add script:

cat > /opt/objectum/projects/todo/bin/import.js
var $o = require ("/opt/objectum/node/objectum");
$o.db.execute ({
	code: "todo",
	fn: "import",
	file: "/opt/objectum/projects/todo/schema/schema-app.js" // parent storage
});

Import storage structure:

cd /opt/objectum/projects/todo/bin
node import.js

Start platform:

cd /opt/objectum/node
node index.js:

Start platform with forever:

forever start -a -l /opt/objectum/node/objectum.log -o /dev/null -e /opt/objectum/node/objectum-error.log --sourceDir /opt/objectum/node index.js

Stop platform with forever:

forever stop index.js

Open URL: http://localhost:8100/projects/todo/ Login: admin
Password: admin

Add script:

cat > /opt/objectum/projects/todo/bin/remove.js
var $o = require ("/opt/objectum/node/objectum");
$o.db.execute ({
	code: "todo",
	fn: "remove"
});

You can remove storage (drop tablespace, role, user from PostgreSQL):

cd /opt/objectum/projects/todo/bin
node remove.js

Export storage:

cd /opt/objectum/projects/todo/bin
node export.js

Add script:

cat > /opt/objectum/projects/todo_my/bin/import.js
var $o = require ("/opt/objectum/node/objectum");
$o.db.execute ({
	code: "todo_my",
	fn: "import",
	file: "/opt/objectum/projects/todo/schema/schema-todo.js" // parent storage
});

Import your storage "todo" to new created storage "todo_my":

cd /opt/objectum/projects/todo_my/bin
node import.js

Just export "todo" and import "todo" to "todo_my" for update to new version of storage "todo". Stop platform before import storage.

startTransaction - start transaction. Only one transaction for one session allowed.
commitTransaction - commit transaction.
rollbackTransaction - rollback transaction.
createObject - create object
getObject - get object
set - set attribute value
sync - save object changes to storage
remove - remove object
execute - execute SQL query (only SELECT)

storage.commitTransaction (function (err) {
});
storage.rollbackTransaction (function (err) {
});
storage.createObject ("class", function (err, object) {
	var id = object.get ("id");
});
storage.getObject (id, function (err, object) {
	object.set ("text", "Changed text");
	object.sync (function (err) {
	});
});
object.remove ();
object.sync (function (err) {
});
storage.execute ({
	asArray: true,
	select: [
		{"a": "id"}, "id",
		{"a": "name"}, "name",
		{"b": "name"}, "status"
	],
	from: [
		{"a": "task"},
		"left-join", {"b": "spr.status"}, "on", [{"a": "status"}, "=", {"b": "id"}]
	],
	where: [
		{"a": "name"}, "like", "Buy%", "and", {"a": "id"}, "in", [1000, 1002, 1003, 1004, 1005].join (".,.").split (".")
	],
	order: [
		{"a": "name"}
	]
}, function (err, recs) {
	_.each (recs, function (rec) {
		console.log (rec.id, rec.name, rec.status);
	});
});

Change index.js for start in cluster mode:

var objectum = require ("objectum-ee");
objectum.startCluster (require ("./config"));

Cluster architecture: alt tag

Author

Dmitriy Samortsev

  • http://github.com/objectum

Copyright and license

GPLv3