Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 #276

Merged
merged 104 commits into from
Jul 16, 2014
Merged

2.0 #276

merged 104 commits into from
Jul 16, 2014

Conversation

ritch
Copy link
Member

@ritch ritch commented May 23, 2014

/to @raymondfeng @bajtos @crandmck
#2.0 TODO

  • trackChanges should be well documented (remove from Model)
  • remove global modelBuilder
  • remove loopback.createModel() in favor of Model.extend().
  • rename DataModel to PersistedModel
  • remove unused explorer
  • remove DataModel mixins in favor of simple delegation
  • DataModel methods should delegate to the dataSource directly
  • refactor DataModel#replicate() into Replication class.
  • refactor DataModel#bulkUpdate() into BulkUpdate class.
  • refactor DataModel#diff() into Diff class.
  • remove Model autoAttach
  • password should be validatable
  • docs for any class should include any available method (eg. inherited / mixed-in / etc)
  • tests should not share any objects (eg. create a new app / modelBuilder for all tests)
  • karma tests should run in ci
  • beef up CHANGES.md
  • create upgrade guide 1.x => 2.x
  • remove app.remoteObjects()
  • move memory connector filtering into its own module
  • rename ACL => AccessControl and options.acls to options.acl.
  • remove sharedCtor and remoted prototype methods
  • document model.settings.remoting / remoting options
  • document base URL setting for models
  • all URLs should be lowercase / dasherized (both configurable)
  • groundwork for allowing ACL to provide route names
  • groundwork for allowing non-model remote classes (eg. Resource and/or Controller)
  • groundwork for supporting promises via remoting
  • groundwork for supporting promises for DataModel methods
  • migrate app.boot() into its own separate module
  • migrate ACL into its own separate module
  • groundwork for removing remoting metadata from JS
  • groundwork for removing juggler as a dependency
  • remove or properly impelment "property" from ACL

Breaking Changes

See https://github.com/strongloop/loopback/blob/1.9/CHANGES.md for my notes on breaking changes.

Should we mark these in the docs as deprecated?

Model => DataModel

Model is now specifically for defining data structures. DataModel is the default class for app.model(name, ...); and models.json.

Remote Methods

Remote methods no longer rely on function objects for storing meta-data. This means remoting meta-data is simple to (de)serialize. All metadata has been moved from juggler to loopback including the relations.

Types

Remote methods now define the concrete type for accepts / returns. This is required to correctly serialize models when code expects the concrete type (eg. MyModel) in a callback. This is to allow code like the following to work anywhere (client, server, browser, etc)

MyModel.find(function(err, myModel) {
  myModel.name = 'foobar';
  myModel.save();
});

Replication

This has been mostly reviewed as part of #153. End to end tests should be review and glaring issues preventing releasing 1.9.0. Minor issues can be resolved in 1.9.x.

The e2e tests could be improved quite a bit. Suggestions welcome there.

Remote Connector

This has been reworked a little, could use some second eyes. Same story here, anything major should be fixed before we release 1.9.0. Minor changes can be saved 1.9.x.

Isomorphic LoopBack

This feature was landed a while ago, overall testing strategy could use some eyes. Changes suggested here will most likely wait for 1.9.1.

Miroslav Bajtoš and others added 27 commits June 16, 2014 10:20
Conflicts:
	test/access-token.test.js
Rename `loopback.getModel` to `loopback.findModel`.

Implement `loopback.getModel` as a wrapper around `findModel` that
throws an error when the model as not found.
…-found

[2.0] Make getModel throw when not found
[2.0] Fix remote method definition in client-server example
Modify `app.boot` to throw an exception, pointing users to the new
module `loopback-boot`.
Allow peer to use beta2 of datasource-juggler (and future)
- Move configuration of Karma unit-tests from `Gruntfile.js` to a
  standalone file (`test/karma.conf.js`).

- Add a new Grunt task `karma:unit-ci` to run Karma unit-tests in
  PhantomJS and produce karma-xunit.xml file that can be consumed
  by the CI server.

- Add grunt-mocha-test, configure it to run unit-tests.

- Add `grunt test` task that runs both karma and mocha tests,
  detects Jenkins to produce XML output on CI server.

- Modify the `test` script in `package.json` to run
  `grunt mocha-and-karma` (an alias for `grunt test`).
  The alias is required to trick `sl-ci-run` to run `npm test`
  instead of calling directly `mocha`.

- Add `es5-shim` module to karma unit-tests in order to provide
  ES5-methods required by LoopBack.

- Fix `mixin(source)` in lib/loopback.js to work in PhantomJS.
  `Object.getOwnPropertyDescriptor()` provided by `es5-shim` does not
  work in the same way as in Node.
[2.0] Fix loopback in PhantomJS, fix karma tests
Conflicts:
	package.json
Land the pull request #357
> app: update `url` on `listening` event
Fix the query in `Checkpoint.current()` to correctly specify sorting
`seq DESC`. Before this change, the first checkpoint was returned as the
current one.
[2.0] checkpoint: fix `current()`
When a public model is added to an application and the model has change
tracking enabled, its Change model is added to the public models.

Before this change, conflict resolution in the browser was not working,
because it was not possible to fetch the remote change.
@raymondfeng raymondfeng merged commit 4e1d8c9 into master Jul 16, 2014
@bajtos bajtos mentioned this pull request Jul 22, 2014
47 tasks
@bajtos bajtos deleted the 2.0 branch October 29, 2014 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants