Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

mycoding/Ext-Core-for-NodeJS

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Author is mycoding
Account page on Sencha forum http://www.sencha.com/forum/member.php?135053-Mycoding
email:mycodingqt@gmail.com
icq:395712335
Skype:MycodingExtJS

ExtNodeJS - framework for NodeJS on base of Ext Core and several classes of ExtJS.

It is in developing. 
At the moment it is possible to do Templating of pages, sending mails and some basic tricks.
I will try to do some samples.

Samples with explanation are here (in Russian)
http://javascript.ru/blog/mycoding/Ext-Core-dlya-NodeJS

**Templating**

var Ext = require('./extnodejs.js').Ext;
Ext.init(this);

var data = {
    name: 'Jack Slocum',     
    kids: [{
        name: 'Sara Grace',
        age:3
    },{
        name: 'Zachary',
        age:2
    },{
        name: 'John James',
        age:0
    }]
};

var tpl = new Ext.XTemplate(
    '<p>Name: {name}</p>',
    '<p>Kids: ',
    '<tpl for="kids">',
        '<tpl if="age > 1">',
            '<p>{name}</p>',
            '<p>Dad: {parent.name}</p>',
        '</tpl>',
    '</tpl></p>'
);

var html = tpl.applyTemplate(data);
console.log(html);

**Sending Email**
var Ext = require('./extnodejs.js').Ext;
Ext.init(this);
new Ext.Mail({
	to: "mycoding@mail.ru",
	from: "me@example.com",	
	subject: "Knock knock...",
	body: "Who's there?",
	success:function(){
		console.log('Success');
	},
	failure:function(err){
		console.log('Error:'+err);
	}
}).send();

**Sending responce to url**
//Test
var Ext = require('./extnodejs.js').Ext;
Ext.init(this);
new Ext.Ajax({
	url: 'http://moc-081.ru/json.php',
	method:'GET',
	params: { foo: 'bar' },
	success: function(data){
		var obj = Ext.decode(data);
		console.log(obj);
	},
	failure: function(){
		console.log('failure');
	}
}).request();

About

ExtCoreNodeJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.