total.js v2.3.0 发布,Node.js 的 MVC 框架

局长
 局长
发布于 2016年12月06日
收藏 23

total.js 2.3.0 发布了。total.js 是一个 web 应用框架,使用 JavaScript,HTML,CSS 和 Node.js(MVC) web 应用框架来构建 web 网站和 web 应用。更新如下:

新增

  • added: support for /workflows file (more in documentation)

  • added: ShcemaBuilderEntity.$exec(name, callback) (more in documentation)

  • added: SchemaBuilder supports new types enum and keyvalue

  • added: controller.$exec(name, [options], [callback]) (more in documentation)

  • added: a new argument description to each SchemaBuilder set + add method e.g. .setSave().addWorkflow(), etc..

  • added: SchemaBuilder.meta contains all registered handlers with their descriptions

  • added: a property controller.schema

  • added: F.viewCompile(body, [model], [layout], [repository], [language]) - dynamic views

  • added: controller.viewCompile(body, [model], [headers], [partial]) - dynamic views

  • added: {viewCompile(body, [model])} - dynamic views

  • added: Controller is a global variable for extending prototype

  • added: F.validators with Regular Expressions

  • added: View Engine supports @{continue} and @{break} command for looping

  • added: URLBuilder.make(fn)

  • added: NOSQLMEMORY(dbName, [viewName]) enables in-memory database collection

  • added: NoSQL nosql.upsert(doc) inserts a new document where document doesn't exist in DB

  • added: NoSQL nosql.release() for releasing of in-memory DB (framework clears unused in-memory databases automatically)

  • added: NoSQL nosql.scalar(type, dbName, [view]) performs scalar operation by type: summinmaxavgcount or group

  • added: NoSQL nosql.binary.all(callback) browses all stored files

  • added: NoSQL nosql.binary.clear(callback)removes all stored files

  • added: NoSQL DatabaseBuilder.random()

  • added: NoSQL DatabaseBuilder.join(field, dbName, [view]) returns DatabaseBuilder with updated .where(field_JoinedDB, field_currentdb) method (it supports .fields() too)

  • added: NoSQL DatabaseBuilder.join() supports scalar operation too, e.g. nosql.join(...).scalar('count')

  • added: NoSQL DatabaseBuilder.scalar(type, [field]) - types: summinmaxavgcount or group

  • added: NoSQL DatabaseBuilder.month(field, [operator], value) filters Date fields according its month number

  • added: NoSQL DatabaseBuilder.year(field, [operator], value) filters Date fields according its year number

  • added: NoSQL DatabaseBuilder.day(field, [operator], value) filters Date fields according its day number

  • added: NoSQL events (documents): insertupdatemodify and remove

  • added: NoSQL events (binary): insertremove and clear

  • added: NoSQL events (counter): hitremove and clear

  • added: a new alias NOBIN(dbName) witch it returns NOSQL(dbName).binary (a binary instance)

  • added: a new alias NOCOUNTER(dbName) witch it returns NOSQL(dbName).counter (a counter instance)

  • added: F.kill(signal) for killing an instance of the framework

  • added: I alias for `isomorphic code on server-side and client-side together by hhhaker6@gmail.com https://github.com/Creeplays

  • added: F.script(body, value, callback(err, value)) evaluates script securly in safe scope (more in documentation)

  • added: new alias SCRIPT() for F.script()

  • added: HttpFile.rename(filename, [callback(err)]) moves file to another directory

更新

  • updated: F.on('exit', function(signal) {}) added a signal code

  • updated: SchemaBuilderEntity contains new argument controller, e.g. .setSave(function(error, model, options, callback, controller) { ..

  • updated: removed all validators of email addresses from FrameworkMail

  • updated: GETSCHEMA([group], name, [callback(err, schema)]) can wait for a schema

  • updated: F.localize() supports modificators as static type

  • updated: F.modify() supports a new type static, it's group of .html.txt and .md files

  • updated: U.trim(obj, [clean]) supports a new argument clean (default false) and when it's true and a value is '' then it sets the value to undefined

  • updated: nosql.update(docToUpdate, [docToInsert]) when the document for updating doesn't exist then database performs insert

  • updated: nosql.modify(docToUpdate, [docToInsert]) when the document for updating doesn't exist then database performs insert

  • updated: nosql.binary stores a creation date as meta info

修复

  • fixed: Image.stream()

  • fixed: global variable Image (in a single library)

  • fixed: JavaScript compressor (problem with Regular Expressions)

  • fixed: custom paths in F.model() and F.source()

  • fixed: NoSQL removing documents (problem with different filters in one queue)

  • fixed: fix view compiler error message

  • fixed: String.prototype.capitalize

其他

  • removed: nosql doesn't support cache (DatabaseBuilder.cache is obsolete)

  • removed: F.refresh() the method was useless

  • replaced: Array.randomize() for Array.random()

  • improved: code

发布主页

下载地址:

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
转载请注明:文章转载自 OSCHINA 社区 [http://www.oschina.net]
本文标题:total.js v2.3.0 发布,Node.js 的 MVC 框架
加载中

最新评论(4

ol_O_O_lo
ol_O_O_lo
我觉得phper可以往noder转了!
进击的代码
进击的代码

引用来自“进击的代码”的评论

用纯nodejs开发网站或系统的多吗

引用来自“伟子啊”的评论

现在很多了,不过习惯了PHP,所以我们公司还没开始用纯nodejs做网站
是啊,我也是php开发,公司用的less编译倒是用到了这货
伟子啊
伟子啊

引用来自“进击的代码”的评论

用纯nodejs开发网站或系统的多吗
现在很多了,不过习惯了PHP,所以我们公司还没开始用纯nodejs做网站
进击的代码
进击的代码
用纯nodejs开发网站或系统的多吗
返回顶部
顶部