Release notes

Author: Robert Bonay
25 February 2014

reference, release notes

JayData 1.3.6 – Advanced Sync Edition



Highlighted features:

Easy online-offline data sync for changed entities

Build occasionally connected apps with JayData and submit your changed entities to your OData endpoint with the configurable behavior of context.attach(). Related blogpost - Synchronizing changed entities in online-offline scenarios

Configurable foreign keys

Now you can define relationships not only with auto-created foreign keys, but you can manually specify the name of the foreign key column in the data model. Read more - Configuring foreign keys for online-offline sync


Fixes

    • Replacing unnecessary console.log() calls to $data.Trace.log() to keep the console clean

Breaking changes

  • No breaking changes


JayData 1.3.5



Highlighted features:

toLiveArray()

The standard toArray() function used callback and promise object to return the results, toLiveArray() returns an object that will be filled later. This array object can be used like a promise, it implements the then() and fail() functions, furthermore you can use the prev(), next(), refresh() on it. Read more – JayData and toLiveArray()


Other new features

  • TypeScript 0.9.5 support - thanks @genne5
  • Dynamic metadata loader support for IE 11 - $data.initService()

Breaking changes

  • No breaking changes

Known issues

  • datajs 1.1.1 doesn't allow custom HTTP headers set by context.prepareRequest()


JayData 1.3.4

We really appreciate the feedback and guidance from Google Angular.js team, thank you guys!

Highlighted features:

Angular.js integration with CRUD capabilities

Have you ever wondered how to use your favorite MVW framework with your favorite data manager library? We did - and provided you the Angular module for JayData! Read more

Fixes

    • Angular module - DI bug - thanks @marklagendijk

Breaking changes

  • refactoring angular module - renaming liveSaveChanges() to saveChanges()

Known issues

  • next() and prev() fails for IndexedDB Provider in dafault Android browser - take() and skip() is working fine
    • TypeScript 0.9.1.1 doesn't accept the 'bool' type from JayData
    • datajs 1.1.1 doesn't allow custom HTTP headers set by context.prepareRequest()

 

JayData 1.3.2 Indian Summer Edition

We really appreciate the feedback and guidance from Google Angular.js team, thank you guys!

Highlighted features:

Angular.js integration

Have you ever wondered how to use your favorite MVW framework with your favorite data manager library? We did - and provided you the Angular module for JayData! Blogpost coming soon...

New find() for OData provider

Now you can retrieve entities over OData without $filter - by addressing them by ID. The identifier can be number, string or guid, too.


northwind.Products.find(1).then(function(item) {
  console.log(item);
}); //Causes a network request with /Products(1)

northwind.Products.find('my-product-guid').then(function(item) {
  console.log(item);
});


You can use find() with composite keys:

northwind.Products.find({Id1: 11, Id2: 22).then(function(item) {
  console.log(item);
});

Fixes

  • mongoDB navigation field on not computed field
  • $data.initService() promise fail handler was missing
  • WebSQL/SQLite provider: length() returned wrong value when using include()
  • WebSQL/SQLite provider: No "AND" added in "ON" clauses when there are multiple keys.


Breaking changes

  • No breaking changes


Known issues

  • next() and prev() fails for IndexedDB Provider in dafault Android browser - take() and skip() is working fine



JayData 1.3.1 Interoperability Edition

This version is dedicated to all our partners and OData users attending our presentation at Microsoft Interoperability Protocols Plugfest 2013 in Redmond.

Highlighted features:

Improved Microsoft Dynamics CRM integration

Microsoft Dynamics CRM is a popular data platform for enterprise applications and - thanks to the OData interface - it is famous from its data integration capabilities. JayData supports the integration with Microsoft Dynamics CRM with postmessage-based authentication and communication. Read more - Corporate data manager app example with Microsoft Dynamics CRM and JayData

Partial Metadata generation with dynamic metadata loader

The huge metadata can be now avoided either by JaySvcUtil and dynamic metadata loader functions - $data.initService() and $data.service() - as you can initialize a JayData context by using only a subset of your schema published via OData. Learn how to configure filtered metadata import

Queryable service oparations (JayData Server)

No matter how you use JayData on the server-side  - jaydata npm package (JayService), odata-server npm package or JayData Server Pro - now you can publish not only queryable EntitySets and service operations, but queryable service operations, too! This way you are able to implement prefiltered entities, which can be filtered further by the client. Blogpost coming soon.

Query Cache module (JayData Pro feature)

The Query Cache module is a configurable request cache, which keeps the results of particular queries with the same parameters. The module is available across all the JayData providers and can be configured with time-based or manual invalidation. Read more about Query Cache module in JayStack blog.

Auto-attach of included child objects

Included entities are attached automatically when attaching parent object


db.Articles.include('Category').filter('it.Id == 1').toArray(function (res) {
    var article = res[0];
    db.Articles.attach(article);
    article.Category.Title = 'Changed_Category_Title';
    db.saveChanges(function () {
        // ...
    });
});

Other new features

    • Debug helper: $data.fdebug - callback for success and error to write to the console

Changes

  • Validation for primitive types
  • InmemoryProvider: inmemory source has been moved to dataSource from provicderConfiguration.source
  • inmemoryProvider: add unique instanceId every inmemory context (overridable with __instanceId in context parameter)
  • Optimalization: First context creation happens with less property reads
  • OData provider: reload complex types after save
  • entity.get_Property can be used without attach
  • Validation of complex type fields in entities
  • Deferred default error callback writes to console.error

Fixes

  • validateGeoJSON
  • mongoDB Blob fromDb breaking change fix (blobs saved to Base64 before, can be read)
  • OData provider withCredentials fix
  • context ready property without loaded defferred module
  • Handlebars module is now ready for minification
  • OData converter: unescape geo types
  • Default collection name of ItemStore
  • Conversion of Time type
  • Converters return the same instance if there is a valid value assigned
  • IndexedDB: error called when failed to create indices
  • Blob conversion from object
  • MongoDb: Array of ObjectID
  • MongoDb: filter Id with include
  • MongoDb: inline count
  • MongoDb: update entity with navigation field
  • Add new types to Kendo UI module
  • MongoDB Blob fix on inserted blob return value
  • Time parse from date
  • IndexedDB, LocalStore, InMemory provider: complex  support for saving and loading
  • set storeToken after saveChanges if not exists
  • integer converter with Number's specific values

Breaking changes

  • Time type is represented as string - instead of DateTime (breaking only to some code using 1.3.0)


 

JayData 1.3.0 Anniversary Edition

JayData library has arrived to it’s first anniversary! We are exactly one year old to the public! Smile

Highlighted features:

Geospatial types and functions

Store map data in local databases and query geospatial objects through OData protocol. Manage remote geopatial from JavaScript using JayData syntax, calculate distances, find intersection areas, create location-aware social apps and display  POIs on Google/Bing/Leaflet/Nokia maps! Developing your pub-hunter app has never been so easy! Read more about JayData Geo features

OData v3 features

Beyound the geospatial types, OData provider supports, JSON light format, item- and collection-level actions of OData-enabled WebAPI services. Squize out more from your OData server on the client-side!

northwind.Products.GetDiscountedProducts();
product.Discount(10);


Learn more about OData service operations actions in JayData

Simple EntitySet filter feature with 3 parameters

northwind.Products.filter('Name', '.startsWith", 'Thai')


Read the related blogpost - Simplified filter syntax for simple tasks

Blob data management across many providers

JayData is here for you if you want to retrieve/persist images or any kind of binary data in WebSQL, IndexedDB or via OData. Tutorial is coming soon.

JayData Server edition is here

JayData Server is here for you if you want to set up your own OData endpoint in node.js environment with MongoDB or SQLite support. Why wouldn’t you extend your JayData skillset to the server-side?
JayData Server can be accessed using JayData library or any other OData client and it covers a wide range of features of OData protocol. Read more about JayData Server

Extensible field conversion API

The dev team refactored the type converter module to improve the type checking of the library.

TypeContainers and IoC

Move your types to TypeContainers and resolve them!

$data.Container.registerType('$some.int', $data.Integer);
$data.Container.resolveType('$some.int');


Schema Evolutions (Pro feature)

The schema evolutions gives you an API to migrate your existing WebSQL/SQLite, IndexedDB database to a new structure. Read more about Schema evolutions

Other new features

    • WebAPI OData Collection(Edm.String) support
    • Context.ready property
var context = new myContext({ name: 'webSql' });
  context.ready.then(function () {
    console.log('ready');
  });
});
    • JayData Server: OData error format in JSON
    • JayData Server: lazy-loaded properties aren't returned by default, can be retrieved by map()
$data.Class.define('Test.BigData', $data.Entity, null, {
  Id: { type: 'id', key: true, computed: true },
  Name: { type: 'string' },
  Data: { type: 'blob', lazyLoad: true },
  Index: { type: 'int' }
});
  • MongoDB provider: inlineCount() support
  • Modular type extension - blogpost coming soon
  • guid fields can be computed

Changes

  • CodeParser uses Acorn or Esprima parser to improve performance and reduce file size

Datajs 1.1.1 beta support

Fixes

    • JayService: Metadata generator: MaxLength info MAX –> Max
    • Guid represented as string
    • Fixed kendo array datatype handling
    • Array properties with elementTypes
    • Computed key error generates warning if can't compute value
    • Saving Int64 field with OData provider (context must be re-generated by JaySvcUtil)

Breaking changes

  • Default database name for SQLite and IndexedDB is changed to JayDataDefault
    This can be overriden by assigning a value to the $data.defaults.defaultDatabaseName global variable

 

JayData 1.2.7.1

New features

  • myType.getFieldNames() alias for myType.memberDefinitions.getPublicMappedPropertyNames()

Fixes

  • OData multiple deep include
  • Do not set the enableJsonpCallback property if the user doesn't define it

Breaking changes

  • No breaking changes


JayData 1.2.7

Highlighted features:

KendoUI integration improvements

Build native-like mobile apps and polished websites with KendoUI by leveraging data-management capabilities of JayData. JayData KendoUI module helps you implement two-way databinding with Kendo controls no matter if you use local or cloud storages. Read more.

Include JayData KendoUI module:

<script src="scripts/jaydatamodules/kendo.js"></script>

Write your JayData query on any storage and assign the result to the dataSource of Kendo controls:

$("#movieTitleView").kendoMobileListView({
    dataSource: Northwind.Products
                    .filter( function(p) { 
                        return p.startsWith("Che"); })
                    .asKendoDataSource()
})


Read the KendoUI teaser blogpost and watch the live Kendo demos

Default values

Reduce and simplify your code using default values on the entities. Read our article - How to set default values in JayData.

Other new features

  • SQLite provider supports Array typed fields with default json serialization

    var metas = [{ name: "n", value: "v" }, { name: "n2", value: "v2" }];
    var blog = new $blog.Types.Blog({ Name: "Comment", Metas: metas });
    $blog.Context.Blogs.add(blog);
    $blog.Context.saveChanges(function () { ... });
  • EntityContext: onready error handling

    context.onReady({
        error: function (exception) {
            alert(exception);
        }
    });
  • ItemStore save mode strategy, loaded item state is modify at save
  • SQLite provider now support inserting Id only data rows (no fields beyond Id or all fields are optional and are undefined)


Changes

  • ModelBinder performance improvements
  • new entity properties default values just for primitives
  • ItemStore API: setStore() doesn’t set default store, just when set name to 'default'
  • EntityContext-ItemStore refactor
  • ItemStore API: type.storeToken is fallback to type default store
  • EntityContext: storageModel refactor, EntitySetReference removed

Fixes

  • WebAPI provider required OData provider to be included
  • global function call parameter fix in predicates
  • FireFox CORS fix just for valid requests
  • OData maxDataServiceVersion header for all requests
  • ModelBinder fix array detection
  • InMemory provider: refactoring type converters
  • InMemory provider: take() with orderByDescending()
  • StorageProviderLoader.js – changing Math.ceiling() to ceil()
  • OData provider date converter from ISO date
  • JaySvcUtil in IE xml parse


Breaking changes

  • ItemStore API: setStore() doesn’t set the default store, but requires a string parameter
    Todo.setStore('default', {
        provider: 'webApi',
        dataSource: '/api/Todo'
    });


JayData 1.2.6

Highlighted features:

KendoUI integration

Build native-like mobile apps and polished websites with KendoUI by leveraging data-management capabilities of JayData. JayData KendoUI module helps you implement two-way databinding with Kendo controls no matter if you use local or cloud storages.


Include JayData KendoUI module:

<script src="scripts/jaydatamodules/kendo.js"></script>


Write your JayData query on any storage and assign the result to the dataSource of Kendo controls:

$("#movieTitleView").kendoMobileListView({
    dataSource: Northwind.Products
                    .filter( function(p) { 
                        return p.startsWith("Che"); })
                    .asKendoDataSource()
})


Blogpost coming soon!

WebAPI provider

Do you want to access ASP.NET WebAPI services from JavaScript without additional server-side modules? No problem! JayData is here and provides you the unified CRUD syntax, which makes you able to change your WebAPI implementation to OData later.


Todo.setStore('remote', { name: 'webApi', dataSource: '/api/Todos' });


Read the folloging blogpost to learn how can you use JayData with WebAPI: How to use JayData with ASP.NET Web API - I


InlineCount() operation in OData provider

Write OData queries, which returns the not just the records but the number of records. This feature makes SharePoint 2013 app development much easier.


Northwind.Products
  .withInlineCount()
  .filter('it.Name.startsWith("Che")')
  .take(1)
  .toArray(function (items) {
      console.log(items.totalCount);
});

The withInlineCount() applies the OData "allpages" parameter by default, but you can specify withInlineCount("none"), which is equivalent to leaving the withInlineCount() from the query.


Easy paging using next() and prev()

JayData was able to retrieve a portion of records from the server/local storage by take() and skip() functions, now you are able to retrieve the next the previous chunks by accessing the next() and prev() functions of the resultset.


context.Todos.take(5).toArray().then(function (result) {
    result.next().then(function (nextResult) {
        console.log('next 5 todos', nextResult);
    });
});

context.Todos.take(5).skip(10).toArray().then(function (result) {
    result.prev().then(function (prevResult) {
        console.log('previous 5 todos', prevResult);
    });
});

Other new features

  • type.create() factory methods in type system
  • Facebook provider supports length()
  • describeField, define field if not exsits.
  • Itemstore API improvements, usability


Changes

  • JayService: fullRoute from req.baseRoute
  • datajs 1.1.0 compatibility (upgrade will be done soon)
  • sqLite changed db logic
  • EntityContext-ItemStore refactor
  • storeToken can be function or object with typeName and args (for context create)
  • addMember() can define static properties, with third true parameter
  • static properties has store- and retriveProperty function, backingfield for value


Fixes

  • sqLite provider, db drop if changed creation mode
  • field convert from string: '' value is undefined, not an Exception with invalid value
  • jaydatamodules validate.js: call fromBinder withour data convert
  • OData provider: save null value on navigational property, to clear reference
  • mongoDB regex field operations unary NOT fix
  • entitySet saveChanges() and addProperty() properties return type
  • ModelBinder fix on missing entity
  • YQL - Geo - placetype model changed
  • OData from db field converter of Date type
  • OData deep include
  • Resolving OData entity dependency
  • OData: use valid property for url part by saving mapped object
  • SQLite: oData: use valid property for sql tablename by deleting mapped object
  • InMemoryProvider using tableName instead of collectionName
  • OData: etag fix, if header name is 'etag'
  • ItemStore API: store resolution, defined default > type default
  • $data.Entity guid init fix

Breaking changes

  • No breaking changes



 

JayData 1.2.5

Highlighted features:

Handlebars template engine support

Implement data manager applications with JayData using Handlebars.js for templating.
Include JayDataModules/handlebars.js and begin typing the {{mustaches}} :)

Blogposts:

Hanlebars template support

Handlebars helpers and model driven commanding in JayData

Easy JayStorm cloud data management

Manage cloud data using the same syntax and data management concept just like any other data sources! Forget SDKs and BaaS-specific query syntaxes and implement future-proof applications using JayData and JayStorm.
Register to JayStorm Open Edition for free and initialize $data.service() to access your cloud data endpoint!

Read JayData/JayStorm starter blogpost

ItemStore API v2

Since now ItemStore API can be used on each providers including local and cloud storages. We want to keep both ItemStore API and JavaScript Language Query (JSLQ) in the future, so you can choose your data access syntax according your taste.
We've extented the ItemStore API with filtering functionality as well. You can choose to use jQuery 1.8.0+ or Q promise/qDeffered.js to make it happen.

Blogpost coming soon…


Entity operations for LocalStore provider

Query HTML5 localStorage like nobody else before! Filter objects using the following operations
startsWith(), endsWith(), contains(), length(), substr(), toLowerCase(), toUpperCase(), trim(), ltrim(), rtrim()

Entity operations for IndexedDB provider

Forget the crazy cursors of IndexedDB API and filter, order, project and page records using JayData ItemStore API or JSLQ, because orderBy(), take(), skip(), first(), single() operations are supported by IndexedDB provider! How cool is that?!

Node.js support on Windows

According to your feature requests JayData can be used on Node.js in Windows environment, too. Install the JayData library from NPM, type require('jaydata') and publish data on the server-side or consume data (with static schema in this case).

Blogpost: Use JayData as OData producer and consumer on Windows with NodeJS

Events before/after entity modifications

Subscribe to beforeCreate, beforeUpdate, beforeDelete, afterCreate, afterUpdate, afterDelete events of entity types to simplify your data access code.

Todo.addEventListener('beforeCreate', function (source, newTodoItem) {
    newTodoItem.Created = new Date();
});

Other new features:

  • OData GUID type support in JayService
  • JayService: JSONP support
  • html5 compatibility on IE: trimLeft/trimRight

Modifications:

  • JayService: authorization failed response status code is 401
  • Removed libxmljs dependency from JaySvcUtil
  • Removed libxmljs dependency from JayService
  • entity context constructor with string parameter means local provider except sqLite
  • $data.service returns with promise, config is not a last parameter, backward compatible

Fixes

  • improved supported storage provider detection
  • MongoDb provider: order by computer field
  • XMLHttpRequest-patched for node in windows
  • entity property async callbacks
  • sqLite date null value loaded as null
  • contextToken renamed to storeToken in context instance
  • file encoding fix in JayStorm.js

Breaking changes:

  • No breaking changes compared to 1.2.3
  • ItemStore API changes since 1.2.4

Known issues

  • IndexedDB should be fixed on Android 4.0.4 (other platforms are OK)

 

JayData 1.2.4

This version was available only for few days, detailed list of changes are included in 1.2.5


JayData 1.2.3

Highlighted features:

TypeScript Support

Write your code in a developer-friendly, more productive environment! Read our blogpost.

ItemStore API

After the many positive feedbacks we decided to make the usage of the library much easier with less code. ItemStore API detects the available local data storage technology, so HTML/JavaScript/PhoneGap developers don’t have worry whether to save data to WebSQL/SQLite, IndexedDB or HTML5 localStorage as JayData ItemStore API makes this decision and initializes the context with the proper storage provider. Read the ItemStore API 101 to learn more

JayData CDN

Do you want to use the latest version of JayData in your project? Include the library in your HTML page using the our brand-new, AWS powered CDN:

    <script type="text/javascript" src="http://include.jaydata.org/jaydata.js"></script>

    Improved autoloading of providers

    Autoloading the providers in HTML5 applications has been supported since JayData 1.1.1, which downloaded the scripts using HTTP requests. This behavioral has been changed now to include the necessary providers in a <script> tag automatically, furthermore, the library detect the path of the included jaydata.js and loads the providers from that location (CDN or local).
    The minimal boilerplate code looks like the following snippet:

    <script type="text/javascript" src="http://include.jaydata.org/datajs-1.0.3-patched.js"></script>
    <script type="text/javascript" src="http://include.jaydata.org/jaydata.js"></script>


    JayData can load the following storage providers: oData, webSql, sqLite, indexedDb,  localStore, inMemory,  but Facebook and YQL providers should be loaded manually from the locations below:

    <script type="text/javascript" src="http://include.jaydata.org/ jaydataproviders/FaceBookProvider.min.js"></script> <script type="text/javascript" src="http://include.jaydata.org/ jaydataproviders/YQLProvider.min.js"></script>

    Other new features:

    • datajs patch: support read all headers in FIREFOX in case of CORS
    • function thisArgs properties can be use without 'this.' notation
    • EntityContext new method: addMany() - Adds several entities to their matching entity set.
    • types with a static "inheritedTypeProcessor" method now get a chance to modify inherited types upon creation
    • EntitySet Attach now accepts a second bool parameter: keepChanges
    • EntityContext has simplified constructor params
    • Unit test: mongoDB test projection of complextype of complextype
    • jquery deferred module – support deferred chain
    • function import supports returning types, which have array of complex type fields

    Modifications:

    • JayService - remove genx / jaydata-genx dependency
    • facebook provider - Accept_Token can be context argument
    • facebook provider – current user has been removed from the MyFriends query result
    • Detect the end of the response in JSObjectAdapter
    • refactor StorageProviderLoader
    • LocalStoreProvider constructor accepts databaseName as localStoreName
    • deferred.js (jQuery) module has been added into jaydata.js


    Fixes

    • odata provider: avoid unwanted selection grouping for navigational properties
    • jquery and qunit paths in tests
    • Makefile NPM package $data.version
    • mongoDB constant expression
    • odataParser, empty string and string with '
    • XMLHttpRequest nodejs query string builder
    • odata on batch error, error callback call
    • field conversation skip when concurrencyMode
    • Edm.Decimal mapped to string
    • LocalStore has been added to ProviderLoader
    • ModelBinder deep extend
    • oData key properties are updated as computed fields
    • qDeferred nodejs check


    Breaking changes:

    • No breaking changes :)

     

    JayData 1.2.2

    Highlighted features:

    Revitalized IndexedDB provider

      • Now you can use JayData to store objects in IndexedDB storage in Google Chrome, Mozilla Firefox and Internet Explorer 10.  Use pure JavaScript syntax using JayData, work with typed objects and forget the labyrinthine of the native IndexedDB API. The new version supports create, update, delete operations, retrieval of all stored records and the following functions: toArray(),  forEach() and length().

    SQLite provider: support of include has been added

      • Write more advanced queries spiced up with includes to retrieve tables from many SQLite tables. JayData automatically joins the necessary tables according to the navigation properties of the entitydefinitions. Deep include is supported, too:
      $data.NewsReaderContext.Articles.include("Author.Profile").include("Category").toArray() 

      HTML5 localStorage provider

      • Build a truly cross-platform data storage solution using JayData LocalStore provider by targeting all the web browsers or using the localStorage as a fallback storage mechanism. Initialize LocalStore provider using the snippet below and manage stored objects using JSLQ syntax
      var memoryContext = new $news.Types.NewsContext({name: 'LocalStore'});


       

      Other new features:

      • ADD: guid support for oData, sqLite, webSql and indexedDB providers
      • add: $data.createGuid
      • add guid require and custom validator
      • add: support typed output of the projection in the third parameter of map()
        context.Articles
        .map(function (a) { 
           return { Id: a.Id, Lead: a.Lead, Body: a.Body, Category: a.Category }; 
          }, null, $news.Types.Article)
        .toArray(function (articles) {... });

           - The constuctor of the third parameter must accept the object defined inside the map()

           - elementType of the EntitySet (type of Article in this case) can be returned with the 'default' shorthand in the third parameter.

      Modifications and fixes:

      • code comment and unit test coverage
      • fix: remove concurrency property from request body
      • Change: EntityValidation  now supports string-defined RegExp
      • fix: mongoDB provider hangs when contextdoesn't contain at least one EntitySet
      • change: $data.Number maps to Edm.Double instead of Edm.Decimal
      • Fix: odata set navigation property
      • fix: odata mapping many side of navigation property
      • fix: xml head encoding changed from iso-8859-1 to UTF-8
      • Change: EntitySet.add now return the added entity
      • fix: sqLite/webSql, navigation property required attribute
      • fix: improved method to detect https protocol in JayService routeParser
      • fix: BatchProcessor error handling in promise
      • fix: MongoDB provider - delete by key
      • fix: mongo where compile, context.cursor init
      • fix: JaySvcUtil find version in Node.js environment
      • fix: Error handling in EntitySetProcessor

      Breaking changes:

      • No breaking changes :)

      JayData 1.2

      Highlighted features:

      JayData core: all async operations now support promises

      JayData core: Q.js promise library is supported via the qDeferred.js module

      JayData already had support for jQuery.deferred for the Queryable.toArray and Queryable.forEach async operations. Now all the async ops (first, single, remove, saveChanges, etc) support deferred return value. Also you can swap jQuery.deferred to Q (another promise library with the same syntax). See this postfor details.

      JayData core: convenience “order” function on Queryable

      Instead of Queryable.orderBy and Queryable.orderByDescending that take a field selector predicate you can use Queryable.order to sort by exactly one column. The syntax is: Queryable.order(“ColumnName”). To reverse sort place a dash as the first character of the column name: Queryable.order(“-ColumnName”)

      JayData core: Context and set scoped events

      JayData now provides several lifecycle events regarding entity creation, update or delete. Use the context scoped events for notification or the set scoped events to actively modify the behavior of an operation with altering the data before it gets to the wire or cancelling the operation. Read the whole story here.

      JayData knockoutjs integration: Announcing JayGrid 1.0 Beta

      We have created a handy grid component that provides customizable CRUD operations for arbitrary JayData entities. All of the 7 providers are supported as data source. Building a simple CRUD application has never been so easy before. Read more here…

      JayData Server: Use JayData to create your own OData endpoint with JavaScript and MongoDB in a NodeJS environment

      OData provider: optimistic concurrency, EF [Timestamp] attribute support

      JayData now fully supports OData/EF optimistic concurrency model to detect server side changes in the model. Read this blog postfor more.

      OData provider: support for MERGE, DELETE and POST methods

      Instead of sending all updates with $batch, JayData now support the RESTful invocation of update, delete, create operations with MERGE, DELETE and POST methods respectively if there is only one item in the change tracker. Multiple items still use $batch. See the details here.

      OData provider: dynamic OData metadata resolution

      There is a new way of creating and loading the JavaScript client context generated from the OData $metadata service. Instead of statically generating it with JaySvcUtil.exe you can now use the $data.service method to dynamically connect to arbitrary OData endpoints. This lets for generic use cases when the OData endpoint changes frequently or is not known at development time. For the details see this post.

      OData provider: support for Service Operations with complex type array results

      Now you can use OData services that have service operations with a return value of type “array of complex types”. See this blog poston how to work with server side functions (aka service operations) with the help of JayData.

      Other highlights

      • New: OData provider supports $data.Object type for untyped JSON transfer
      • New in JayData server: OData Expression Parser for JavaScript

       

      Fixes:

      • FIX JaySvcUtil: XML namespace agnostic approach is applied due to the ever changing default namespace of the OData metadata document
      • FIX ModelBinder: correctly finds converters for primitive types in all cases
      • FIX OData provider: provider now only submits changed properties to the server (not all loaded properties)
      • FIX OData provider: supports Titanium environment’s weird way of passing XHR response data
      • FIX OData provider: The include statement “A.B.C” where B.C is a complex type results in a correct “B.C” member
      • FIX OData provider: $count result type is now number
      • FIX SqLite provider: DropTablesIfExist strategy did not work under Titanium.
      • FIX mongoDB provider: equalTyped (===) expression is supported
      • FIX mongoDB provider: whereCompiler mistreated arrays
      • FIX mongoDB provider: ObjectID type when it is also a key is correctly serialized in all cases
      • FIX mongoDB provider: configCompiler now consults type resolution when encountering a non-primitive type
      • FIX mongoDB provider: searching a value in array typed fields now converts to mongoDB partial array equality expression instead of array index expression.

       

      JayData 1.1.1

      Highlighted features:

      Extracted providers

      Providers have been taken out from jaydata.js and moved to jaydataproviderssubfolder to reduce the size of the library. The necessary files are loaded automatically when developers instantiates a provider.

      MongodDB provider (Node.js)

      Our old dream has came true with JayData 1.1.1: developers can CRUD MongoDB collections in Node.js environment. The functionality of this initial version of MongoDB provider covered all our example scenarios, but in the future we want to support native MongoDB arrays and table relationships based on navigation properties.


      //initialize MongoDB context
      $myApp.context = new $myApp.Context({ name: 'mongoDB', databaseName: 'myMongoDbName' });

      InMemory provider

      InMemory provider can be used on client- and server-side (Node.js) to save objectst to memory without persisting them to a database. The provider can be used to store data in short-term (until the next page reload in browser or during the application life-cycle in Node.js .


      var memoryContext = new $news.Types.NewsContext({ name: 'InMemory' });

      InMemory.js module

      Using the inmemory.js module, you can use JavaScript Language Query (JSLQ) on standard arrays.


      var items = [
          new $news.Types.Article({ Id: 1234, Title: 'Article1' }),
          new $news.Types.Article({ Id: 1235, Title: 'Article2' })
      ];
      var arrayQueryable = items.toQueryable();
      arrayQueryable.filter(function (a) { return a.Title == 'Article1' }).toArray(function (r) {
          //Your funky code with variable "r"
      });

       

      Modifications and fixes:

      • add: CRUD before/after events on EntitySet
      • add: ServiceOperation alternative declaration
      • add: Role access helper class
      • change: Providers not included in jaydata.js
      • add: Automatic provider loader (except Facebook and YQL)
      • add: new Make build script
      • add: NPM package build
      • fix: typesystem extend
      • add: inMemoryProvider
      • change: type system base type aliases
      • fix: modelbinder value function call has parameter data
      • fix: oData function import in array results, callbacks work in last parameter also, not just in toArray
      • fix: oData fromDb converters: $data.Object, $data.Array

      Breaking changes:

      • File has been modified to jaydata.js instead of JayData.js, references should be updated


      JayData 1.1.0

      OData provider improvements:

       

      • every(), some() functions of OData v3 - read related blogpost
      • OData function import/ServiceOperation (defined only with WebGet attribute)
      • Optimistic concurrency support in OData provider using ETag


      Changes and fixes:

      Updated datajs to new version (1.0.3)
      Fix: Add unbounded inverseProperty feature
      Fixed a potential bug, which caused invalid this arguments in user defined beforeSend requests in OData
      FIX: deep include in OData
      EntityContext/OData: Fixed dependency graph builder, now it works well when the value of inverseProperty is $$unbound.
      OData filter chain
      FIX: entityValidation partial update fix

      Breaking changes:

      no breaking changes



      JayData 1.0.5
       

      New features:


      Sencha Touch 2 module (read-only)

      This module can be used to bind data retrieved by JayData to Sencha Touch 2 generated user interface. (example app and tutorial is coming soon)

      Basic Authentication in OData provider

      We added Http Basic Auth support to ODataStorageProvider, now authenticated OData services can be consumed. Read the related blogbost to know how to consume authenticated OData services with JayData. (example app and tutorial is coming soon)

      Moving to GitHub as primary source control

      JaySvcUtil.exe supports authenticated services

      JaySvcUtil.exe has now three new command line parameters that let you access an OData endpoint that requires credentials.

      Github

      We migrated all the JayData source code to GitHub, contributors can find the latest version in the development branch: https://github.com/jaydata/jaydata/commits/development/

      The development branch isn’t stable, it should be used only by contributors. We suggest to app developers to use only the released jaydata.js for projects.


      Changes and fixes:

      • Fixed Makefile
      • ModelBinder.js:$selector fallback options
      • Model binder supporteds OData embedded [d.results] structure
      • ModelBinder.js: fallback fix
      • oDataProvider.js: length() fix

      Breaking changes:

      OData provider return all JSON result instead of data.d

      JayData core: no breaking changes

       

      JayData 1.0.4

      Overview

      We have changed our release strategy. Instead of keeping the whole library in an RC level till all the planned features are ready, we decided to release those functionality as individually versioned plugins and modules. Thus we are proud to give you the JayData core in an RTM version.

      New Features:

      Dynamic queryies with Knockoutjs

      The query that can process Knockout observable parameters, so you can build queries re-execute when a parameter changes. Combine it with the JayData support for KO observableArrays to create dynamic table filters or master detail scenarios with 3 lines of code. For more information read our blogpost, or see our example.


      Projection of constant values in OData provider

      The OData protocol doesn’t support projecting a constant value, which isn’t persisted. JayData helps developers to define queries at a single place, containing remote OData fields and constant values from the client side.
      Example:

      $context.YourSet.map(function(a) { Name: a.Name, ID: a.ID, localState: 1, localMessage: 'hello'}).toArray(...)

      Improvements:

      JayData library file name does not contain its version number
      The new filename of the library is JayData.js , so you don’t have to change the references/includes whan you upgrade to a new version. The current version of the library can be read at the first line of code, or by accessing the $data.version
      Resources leaked with the WebSQL provider’s open method on some Android devices
      Providers did not support === and !==
      Due to some factory configuration mistakes === and !== operators did not compile with OData, WebSQL and SQLite providers. Now they do.

      Breaking changes:

      • New JayData.js filename
      • No breaking changes in API

       

      JayData 1.0 RC1 Refresh 2

      Overview

       

      Knockout.js integration

      Using the Knockout.js module, your UI can be automatically refreshed when the data model changes, so you can develop the front-end of your data manager app even faster.


      Querying 1:N relations in WebSQL & SQLite

      SQLite and WebSQL providers now supports entity ID-based sub-selects.

       

      Refactored Model binder

      Developing your own provider is much easier based on the refactored model binder subsystem.

       

      Better comments in IntelliSense and API reference

      We not just improved the documentation in terms of code comments, but the API reference is auto-generated from the sourcecode.


      New Features:

      • SqlFilterCompiler.js: supports IN Queryable, throwing error if not a single field is projected in the given query
      • ADD: Knockout module v1
      • ADD: detach function to EntitySet
      • API reference can be generated from the JS files
      • ADD: namespace on classes
      • ADD: toArray() accepts array parameter as well (besides the callback function), and able to populate it with the results
      • ADD: Code comments (Entity.js, EntitySet.js, Queryable.js, EntityContext.js)

       

      Improvements:

      • sqLiteStorageProvider.js: refrencing table name and fields with brackets
      • ModelBinder.js: refactored model binder class
      • sqLiteModelBinderTests.js: new expected config objects for model binder
      • FIX: propertyChanged throw an error when propertyChanging not used on Entity
      • fix $data.expressions.expressionNodeTypes casing
      • fix: static field declaration
      • fix some doc generation warnings
      • CHANGE: Typesystem Container.registerType third parameter is a factoryFunc for type
      • Container.registerType() has a third optional parameter, which can act as a factory function
      • FIX: forEach() and toArray() has frameExpressions

      Breaking changes:

      • No breaking changes:)


      JayData 1.0 RC1 Refresh 1


      Overview

      The major feature of this release is related to OData provider, FunctionImport is now generally supported.

      Now you can consume OData service operations (WebMethods). We extended the JaySvcUtil to generate the necessary metadata.


      We included many fixes, such as the Visual Studio 2010 IntelliSense optimalization (RC1 was optimized only to VS11).


      It's recommended to upgrade your project to use the new version JayData library.

      New features:

      • ADD: support for OData service operation through WCF Data Service WebMethods
      • isSupported static property was added to storageProviderBase. Default value is true.
      • IndexedDBStorageProvider.js: isSupported implementation
      • SqLiteStorageProvider.js: register only if isSupported
      • EntityContext.js: provider name can be an Array, fallback options
      • StorageProviderBase.js: getProvider with no exception, returns undefined if not found

      Improvements:

      • General performance improvements in the JayData type system, class definition code now executes 70% faster.
      • This is a relevant speed improvement for applications with many entity types and huge data contexts.
      • VS2010 intellisense support ADD: VS2010Intellisense reference js
      • Now, default error callback function throw exception instead of log to console
      • CHANGE: MemberDefinitionCollection Refactor in project
      • chaged .js files build sequence. initializeJayData, utils and Prehtml5Compatible.js files are ahead the JayLint
      • CHANGE: propagation change propagateTo: '<propery>' into definiton
      • Container.getDefault by type Validation on changed changedEntities
      • On new entity fix required values
      • oDataProvider.js: for..in memDefs fix TypeSystem.js: cache fix, resolveType refactor
      • CHANGE: EntitySet inherits from Queryable
      • CHANGE: add important message to file
      • TypeSystem.js buildType staticDefinitions for..in bug fix
      • BugFix: JaySvcUtil don't generate pk field with requred flag, if it is a computed field.
      • Refreshed _reference.js and makefile

      Breaking changes:

      No breaking changes :)

      Share this

      Leave a comment

      comments powered by Disqus