It's perfect for creating interactive, user-friendly and single-page browser apps.
Tested and working with Google Chrome, Safari 4+, IE 7+ and Firefox 3+.
Inspired by Ruby on Rails.
Features:
- Stateful MVC architecture
- Powerful binding system
- Routable controller actions
- Pure HTML views
- Toolchain support built on Node.js and Cake
What is new in this release:
- Added:
- App.shouldAllowEvent.[event]. Callbacks in this hash will be called whenever the corresponding data-event is fired from anywhere within the app. Return false to prevent app-level propagation. For example: coffeescript class MyApp extends Batman.App @shouldAllowEvent.click = (event) -> return false
- Fixed:
- Prevent additional history items from being created if the users navigates to the page they are already on.
- Fixed:
- Nested resource routing names.
What is new in version v0.12.0:
- Add Model.createFromJSON as a shortcut for booting models from JSON and sticking them in the identity map
- Add the as option to Model.encode which allows serialization into a key other than the key mentioned in encode
- Add Rails style optional route segments with ()
- Add a trim filter
- Give most validations the allowBlank option to force them to pass if the value is undefined or the empty string
- Add an AssociatedValidator added by calling Model.validate 'name', associated: true
- Make Controllers stop executing the rest of the action when a redirect occurs in a beforeFilter.
- Add a Proxy class for proxying an object
What is new in version v0.8.0:
- Add Batman.StateHistory for pushState navigation support
- View source html can be prefetched via View.viewSourceCache.prefetch
- Major refactoring of view bindings into class based hierarchy
- Add data-defineview to allow view sources to be declared inline
- Add Association support to Model via Model.hasOne, Model.hasMany, Model.belongsTo
- Add smart AssociationProxy objects which support reloading
- Add support for loading associations with inline JSON
- Add support for ? and ! in property names and keypaths
- Store the current params on the Batman.currentApp for introspection.
- Add ParamsReplacer and ParamsPusher as smart objects which when set, update the global params, pushState or replaceState, and redirect.
- Add Hash::update, Hash::replace, and Set::update
- Add Set::indexedByUnique
- Add Batman.contains for membership testing and accompanying has filter
- Add support for JSONP requests in batman.solo
- Add final property support to optimize observing properties which will never change
- Add Batman.version
- Add support for customizable render targets in Controller::render
What is new in version v0.7.5:
- Pagination through Batman.Paginator and Batman.ModelPaginator
- Nested resources routes
- Unknown params passed to urlFor will be appended to the query string
- App.layout accepts a class name which will automatically instantiate that class upon load
- Controller::render accepts an into option, which lets you render into a yield other than main
- yield/contentFor/replace are now animatable through show/hide
- Interpolate filter
- Pleasant reminders if you seem to have forgotten some encoders
- Removing nodes will destroy all their bindings
- Batman.setImmediate for fast stack popping
What is new in version v0.6.1:
- Added Batman.Enumerable
- Added support for multi-select boxes
- Added batman.rails.coffee, a new adapter for use within Rails
- Added developer namespace for easy debugging (it gets stripped out in building)
- One way bindings have been changed to data-source and data-target to avoid ambiguity
- Added data-bind support for input type='file'
- Added data-event-doubleclick
- Added length filter
- Added trim helper
- Controller.resources creates a new route instead of destroy
- Model.find will always return the shared record instance. You can then bind to this and when the data comes in from the storage adapter, your instance will be updated
- Added Model::findOrCreate
- Added Model::updateAttributes
- Allow storage adapters to specific their namespace with storageKey
- storage adapter filter callbacks take errors
- Added App.ready event that fires once the layout is ready in the DOM
- Normalize status/statusCode in Batman.Request
- Hashes now have meta objects to non-obtrusively bind metadata like length
Requirements:
- Node.js 0.4 or higher
Comments not found