NOTE: This version is not compatible with version 0.5.x
- Documentation
- Introduce
Klass
- lightweight Javascript OO implementation - Introduce
Core
- the plugin/middleware system - Introduce
Site
- to avoid global shared object in
lib/genji.js
- setting management namespaced by environment
- coporate with
Core
and map routes to apps
- to avoid global shared object in
- Replace
Handler
withContext
, convert some handlers to plugins - Refactor
router
- allow routing without middleware
- overwrite routes which has same url pattern and http method
- Rewrite
App
- use
Klass
- separate routing from App logic
- remove support of static properties
- use
- Rewrite
Model
- use
Klass
- remove support of static properties
- use
- Remove
Role
- Remove
Base
- Remove file plugin and lib/mime.js
- Refactor
view
App
clone routes object before useHandler
keep parsed and raw http request data
View#minify
json
,html
,text
shortcuts forApp#routeResults
handler#sendAsFile
- allow customize response headers
- detect Buffer when calculate data length
util#expose
export sub modules- remove
client.js
Model
toData
andtoDoc
accept array as argument to indicate the fields you need to get.App#routePreHook
support bulk set prehook for array of routes
crypto#decipher
handle exception 'TypeError: DecipherFinal fail' when decipher string with different key ciphered
control
defer().defer(otherDeferrable)
defer().callback(cb)
- set default context for layout
- batch attache prehook to routes
- allow set cookie during redirection
- default options for
Role
- node 0.8.x compatibility
- Bug fix for
Model
- Bug fix for
App
Model
- new field type and type validator:
array
,regexp
,date
,bool
- dynamic fields validation status
- instance function accepts callback function as last argument,
call
this.emit()
as usual will call the callback and event won't be emitted. - use
toDoc()
instead oftoData('alias')
- bug fix for type validation
- new field type and type validator:
App
- bug fix for instance function not return result
View
- add script loader support (head.js)
- change
addViewPath
tosetViewPath
- add support for default context (e.g. var view = new View(engine, {context: {title: 'Title'}});)
- merge
BaseView
withViewWithCompiler
- basic
layout
manager
Model
model.attr([key1, key2])
get group of attributes as hash object- Bi-direction aliased field name
App
support application level and route levelroutePreHook
- Introduce
Role
- external app loader
- New
App
module genji.app
renamed togenji.route
- expose submodules by default,
genji.short
andgenji.require
are deprecated - rewrite
lib/model.js
, added test - support multi-root path for view template (with namespace)
- add
Model#changed
, return object which contains changed fields/values after initialized. - add
util#byteLength
- improve
view
andmodel
- improve
view
partial - introduce
model
- introduce
view
for working with template engine like hogan.js- render files
- simple caching support
- preregister partial files in the
rootViewPath
- add
send
,sendJSON
andsendHTML
to thebase#BaseHandler
- introduce
event
incontrol#defer
- Upgraded
expresso
for node 0.6.x support
- Cleaned code follow default jshint rules
- Rewrited
client.js#Client
and added some tests
- Add timeout support for
control#parallel
- bug fix for handler#Simple#sendJson
- new event for handler with method
POST
/PUT
:data
for raw dataparams
for http query string, parsed as plain javascript objectjson
for json string, parsed as plain javascript object
- Changed the way how we define sub url for
App#[get, post, put, del, head]
control#defer
- put flow control object as the first argument of
and
callback - callbacks of
and
,then
now will be called in registered orderdefer(fs.readFile, fs).and(fn1, fn2, fn3).then(fn4, fn5).and(fn6, fn7)
functions will be called in the following order: fn1->fn2->fn3->(fn4&fn5)->fn6->fn7
- put flow control object as the first argument of
util#extend
takes unlimited argumentsextend(obj, props1, props2, ..., propsN)
- Add
crypto#hmac
handler#Simple
parses url parameters by default- Add context for
control#parallel
- Remove a lots of functionalities, keep small and focus.
- Introduce
App
control#parallel
set done/fail callbacks byparallel.done(fn)
andparallel.fail(fn)
- add
genji.short
: extends thegenji
namespace withutil
base
control
submodules - Simplified
handler
,- the default handler is
genji.require('handler').Handler
which can handle normal http request, parse cookies and send files - you can use
genji.require('handler').BaseHandler
to include features you only need
- the default handler is
- etag for sending file-like contents
- util
- crypto
- new shorthand functions for cipher/decipher
- enable to select the digest encoding for
md5
,sha1
,hmac_sha1
- crypto
- web
- middleware
- now the middleware does not care about application settings
- new style middleware config format
secure-cookie
new middleware to encrypt/decrypt cookie
- router, new url routing system, supports declarative and programmatic style of defining url rules.
- move
createServer
/startServer
into submoduleweb.server
,web/index.js
only use to export submodules
- middleware
- pattern
- control
- promise: call the original async function in next tick
- math, new pattern group, add
random
- control