1.0b2 (2012-07-19)

  • GREAT RENAMING: this one breaks backwards compatibility! Any names previously using under_scores now use camelCase, to better follow JavaScript conventions. This means your previous Obviel code will break. In particular:

    • html_url, jsont_url and obvt_url are now htmlUrl, jsontUrl and obvtUrl.
    • object_events becomes objectEvents.
    • API functions are also camel-case now, i.e. registerFormatter instead of register_formatter.
    • Form field names are now camel-case, so inputField, textlineField, textField, integerField, floatField, decimalField, booleanField, choiceField, displayField, hiddenField, datapickerField, autocompleteField.
    • validationUrl instead of validation_url for forms.
    • maxLength, minLength, maxLength, allowNegative, minBeforeSep, maxBeforeSep, minAfterSep, maxAfterSep, emptyOption, for widgets.

    In general you can straightforwardly translate under_score to camelCase everywhere.

    There are a few exceptions. _ is of course still to mark translations. Constants such as NAME_TOKEN also keep the underscore. We also recommend that if you have a variable named after a translation domain (i.e. en_US) you keep the underscore as well. Finally in Obviel template it is still used to refer to special variables when you loop through a dotted name (i.e. {@each.something_persons.number} if you are looping through something.persons.

    If you use Emacs you can translate the underscores to camelcase in a file automatically, using the following command:

    M-x replace-regexp
    Replace regexp: \(\w\)_\(\w\)
    with:           \1\,(upcase \2)
  • Backwards compatibility: $(el).render(obj) now returns a jQuery promise. This is a more modern alternative for the callback argument. To track whether a view is done rendering you can hook in with .done. The callback argument has been removed, breaking backwards compatibility. You can rewrite:

    $(el).render(obj, function() { this.el });

    to this:

    $(el).render(obj).done(function(view) { view.el });

    A view is only considered done rendering (its promise will be resolved) when all its data-view sub-views have been resolved too.

  • Backwards compatibility: previously when you implemented render in a view, it could optionally receive a number of arguments (el, obj, name, callback, errback). callback and errback have been removed. el, obj and name have been available already on this, and these are the preferred way to access them.

    This change also affects the cleanup method; if you implement it, it will not receive the el, obj, name arguments anymore.

  • Unfortunately <element>, <attribute> and <block> did not work well in IE. Instead you can now use data-el, data-attr and data-unwrap on any DOM element.

  • Introduce data-handler directive to hook up events directly from template. With Obviel, this will hook up events to view directly.

  • The template constructor now accepts templates that consist of multiple elements on top (“<p>first</p><p>second</p>”). It also accepts templates that are a piece of text and an element following (“text<p>following</p>”) or are an element followed by a piece of text (“<p>first</p>followed”).

  • Templates can be inlined in a <compilerName>Script section in the HTML document.

  • Fix a bug in data-id generation where data-id="not_a_variable" wasn’t correctly handled.

  • Change Obviel to be compatible with jQuery 1.7.2. There were two issues:

    • Obviel relied on document-level event handlers to be triggered even for disconnected events.
    • Obviel Forms used a cargo-culted pattern for sending ‘change’ events; replaced this with shorter el.trigger(‘change’).
  • While Obviel may continue to work with older jQuery versions for a while, we’re going to target jQuery 1.7.2 now for our testing.

  • the json2 dependency, which takes care of JSON generation compatibility for Internet Explorer, has been moved to the dependencies directory out of the Obviel directory; this is where it belonged all along.

  • Formatters and funcs can now be more flexibility plugged into Obviel Template, just like translations and event handlers. Obviel core makes use of this by looking up formatters and funcs on the view first, then if it cannot be found there, in the global registries.

  • Improved i18n infrastructure for translations. See the i18n documentation for more information.

  • Pluralization support both in JavaScript and in Obviel Templates. See i18n documentation for more information.

  • use Pygments to highlight HTML and JavaScript snippets properly in the docs.

  • Rewritten compiler loading and caching infrastructure. Caching has been generalized and improved. Also helps prepare for better template error reporting.

  • When an error happens during Obviel template rendering the exception will be logged to the console with location information to help with debugging.

  • You can optionally return a jQuery promise from a view’s render method. If you do, subview rendering and view rendering completion waits until that promise is resolved.

  • When there is a CompilationError or RenderError in an Obviel template, log error on console detailing iface, template and xpath in template where error occurred.

  • Added missing API docs for element.rerender(), element.view(), element.parentView() and element.unview().

  • Use mockjax for cleaner AJAX testing.

  • Remove pyobviel, obviel-datatables and obvielts. These were unfinished and can always be resurrected at some point in the future.

  • the src attribute is like the id attribute special in that it may not be directly used with variables in a template. This is because an image src for instance is directly loaded as soon as the template is parsed, and this does not work with variables and will result in a network error. Instead we force the developer to use data-src to set the src attribute, just like we force the developer to set data-id.

  • traject is now placed in the obviel namespace for consistency with the other modules. It can still be used stand-alone, however.

  • Fixed a bug where data-view could not be used with URLs.

  • Changed documentation theme.

  • Updated documentation for clarity in various areas.

1.0b (2012-05-31)

  • Added Obviel Template language implementation. This replaces JSON-Template as Obviel’s preferred template language. Obviel Forms makes use of it internally. Obviel Template supports features such as sub-views and i18n. See the Obviel Template documentation for more detail.
  • i18n documentation: how to do i18n with Obviel.
  • Added Traject library. This library allows routing of paths to objects and the inverse: constructing paths for objects. See the Traject documentation for more detail.
  • Added transformer hook. This allows Obviel to transform content it retrieves from the server using URLs and hyperlinks.
  • Added object_events structure, allowing you to declare events on the object the view is rendering. Also introduce rerender method on view.
  • Added before hook to views. You can now pass a before function when configuring a view. This function will be called before rendering (including before template rendering). This is useful to manipulate this.obj to add extra information before the template is rendered.
  • Obviel Forms now uses a special view for the iface obviel_forms_error_area to render error areas. You can define a view and render your own error area. In this view create an element with id this.obj.field_error_id to hold the field error message, and an element with id this.obj.global_error_id to hold the global error message.
  • Obviel Forms now sends an event soon as an error message is set or cleared. The event names are field-error.obviel-forms, field-error-clear.obviel-forms, global-error.obviel-forms, global-error-clear.obviel-forms. The events are sent to the element on which the error message is rendered, and will bubble up (so you can catch them on a higher level). The target property of the event will also have a reference to the element on which the message was set.

0.11.1 (2012-01-14)

  • Last release changed the obviel forms translation domain from obviel_forms to obviel-forms, but forgot to adjust the forms code to take this into account.

0.11 (2012-01-13)

  • Added js.obviel Fanstatic integration.
  • Added Python-based obvielts test server for testing Obviel with a “live” test server.
  • Included jslex_prepare script to help with i18n process. See updated doc/i18n.txt for notes.
  • Updated translations to include support for obviel-forms-datepicker and obviel-forms-autocomplete.

0.10 (2011-11-04)

  • Obviel models may now have an iface or an ifaces property, but not both. ifaces may be a string instead of an array. This makes the common mistake to make a model object with iface not a mistake anymore.
  • Update test dependencies to newer version of jQuery and jQuery-ui. These are also used by the demo code. Made it so that the version number of dependencies not in the URL anymore, so that it’s easier to update in the future.
  • Included datatables as a dependency, though haven’t integrated code using it yet.
  • Add Obviel patterns multi, event and redirect to new obviel-patterns.js. See the pattern demo page in the documentation for a demo of these.
  • Integrate support for simple jGrowl messages in obviel-jgrowl.js; see the pattern demo page for examples.
  • Reorganized directory structure: everything, including tests and demos are in ‘src’ now, which in turn is included in the documentation so we can link to demos (and its dependencies) from there.

0.9.1 (2011-11-03)

  • Include form demo in documentation.

0.9 (2011-11-02)

Initial public release.