Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

[WIP] changes Feature/storage #67

Closed
wants to merge 3 commits into from
Closed

[WIP] changes Feature/storage #67

wants to merge 3 commits into from

Conversation

zhenyab
Copy link
Contributor

@zhenyab zhenyab commented Sep 14, 2016

@roll @pwalsh Please, comment

@coveralls
Copy link

Coverage Status

Coverage decreased (-24.2%) to 59.922% when pulling 2ac4914 on feature/storage into 6ba900b on master.

Copy link
Member

@pwalsh pwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhenyab can you just link me to the specific files to review here? I tried to do this by looking at different commits, but there is so much noise that it is hard for me, as a reviewer, to identify the actual application code, and seperate it from the files you added as dependencies.

@@ -0,0 +1,249 @@
'use strict';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhenyab why is this committed? it looks like transpiled files from babel, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pwalsh I need to use jsontableschema, but can't use ES6 version in the project, while it is run on NodeJS 4.x. I did automatic cloning of repository and building the scripts, but found that it would be better just to add it to the code base of the project.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files you are interested in:
app/storage/*
app/models/*
app/services/cases.js
app/services/trials.js

@pwalsh
Copy link
Member

pwalsh commented Sep 22, 2016

@zhenyab ok, this looks really good. Does it simplify the application code in useful ways?

What I don't see is a query method to filter a "table" - probably because you dont need it here but I'd expect we need it in general as part of the lib. WDYT?

Can you do these things now:

  1. Do a PR on the core lib just fpr the storage
  2. Finalise Release jsontableschema-v0.2 frictionlessdata/tableschema-js#36 (sync with @roll )
  3. Do a PR with the model-specific code on https://github.com/frictionlessdata/jsontableschema-models-js

@zhenyab
Copy link
Contributor Author

zhenyab commented Sep 22, 2016

@pwalsh Yes, introduction only jsontableschema simplified the code significantly. Models also looks useful, while it is kind of ORM, and work with ORM is more comfortable. In case of "tracker ebola" it possible probably to completely remove services.

Yes, I did not provide some query methods, because in this project no need in it. Tracker ebola has very simple data model.

Another thing, need to port all the models into ES6, because in current version some code does not look elegant, especially inheritance of methods and cloning the existent model.

Other issues, yes, I can do, of course.

@pwalsh
Copy link
Member

pwalsh commented Sep 22, 2016

@zhenyab

  • so great, do that, and do it as ES6 in the models codebase, for that PR.

The other thing - I'd like to probably seperate load from the query methods. like, for example, have an option to load on app startup, and then have a default of load=false when contructing a model (assumes that data is loaded), and ability to force load on construction, with load=true. Does that make sense?

Lastly @zhenyab we'll leave this PR open now, but we'll continue discussion over on the jts and the models repos.

thanks!

@pwalsh pwalsh closed this Jan 29, 2017
@pwalsh pwalsh deleted the feature/storage branch January 29, 2017 09:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants