-
-
Notifications
You must be signed in to change notification settings - Fork 596
Need Backbone support for latest SDK #43
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
Comments
There is no simple workaround and Parse / FB is not going to do it because you know, React! Good news is that I'm almost done with creating a Backbone 1.2.3 fork that works fully with Parse 1.6. About 95% of the way there at this point pending a little more testing. I should have it done this week and open sourced. Nice thing too is that I modularized Backbone and made it ES6 making it easy to modify it in a clean way. I'll also be distributing minimal / lightweight ES5 bundles designed to be consumed in various module systems (RequireJS, SystemJS, etc.) along with an all inclusive bundle designed for global usage. |
Thanks a million, @typhonrt ! Looking forward to it. |
My app just came to a screeching halt because of this. Looking forward to your implementation typhonrt. The least Parse could do is provide a migration guide or something. |
@cfoulston Thanks for reminding me of this issue... I've had the repos up for a week or so, but have been polishing off documentation and I have still to get a repo up for a full SystemJS / JSPM demo which is a great way to consume the ES6 source. If you want to check things out though the Backbone-Parse-ES6 repo is: https://github.com/typhonjs-parse/backbone-parse-es6 The If you weren't using Backbone / Parse previously with a module system you'll want to choose the global bundles. The basic global bundle has Backbone & Parse. You'll need to load Underscore & a jQuery equivalent via script tags before the backbone-parse library. The "global inclusive" bundle also contains Underscore and jQuery. and the main SystemJS / JSPM + global demo will be up here before the end of the week most likely:
Technically you should be able to use things just like before and I have a whole framework on top of Backbone that works, but that doesn't mean I have all the angles tested. I'm going to be updating to Backbone 1.2.4 / or the next latest release and port over all of the tests from the original Backbone repo at that time and also see if I can come up with some way of auto-testing Parse thoroughly. Drop an issue in the repos for questions. |
@typhonrt I have an old parse project which uses JS SDK 1.2.12, Can I use your library as a drop in replacement for parse library? I'm already using require-js for my modules like,
Do I need to make code changes in every file to get it work with new parse open-source server? |
Unfortunately RequireJS support is a bit challenging. There is an existing issue: typhonjs-backbone-parse/backbone-parse-es6#8 regarding RequireJS support where I detail the problem. A small change to the Parse JS SDK could solve the problem: #144, but @andrewimm has not weighed in on the solution. backbone-parse-es6 does support JSPM and potentially other package managers. More or less my hands are tied in being able to support RequireJS easily. |
@typhonrt Thank you so much for the prompt response. Could you please point a PR or add somewhere the changes required in Parse JS SDK, so we can continue with AMD module from your repo? |
We'll my hands are tied as I'm not involved with Parse and #144 has gone without answer or confirmation from @andrewimm for months, so a PR is pointless as it will just sit by the wayside as well most likely. There is a simple solution; It works great for modern package managers such as JSPM presently. It's not like I don't want to support legacy solutions like RequireJS as well, but such is life. Upgrading your web app while taking more work to use JSPM, Webpack, etc. will solve things. I've posted the solution above, but it's a crapshoot if FB will add it to the JS SDK. Unfortunately the solution to typhonjs-backbone-parse/backbone-parse-es6#5 outweighs the side effect of breaking easy RequireJS support, but once again a small modification to the Parse JS SDK would allow things to proceed with full RequireJS support out of the box. Contact the Parse team and let them know you'd like to see this solved. |
I'm using parse-bone with require-js with few modifications to remove the wrapper and it is working as expected. Thanks for your support @typhonrt |
@midhunanew parse-bone may work for now and is the best drop in replacement, but likely won't see much further progress. I guess the difference with https://github.com/typhonjs-backbone-parse/backbone-parse-es6 is that I am supporting the latest Backbone release and updates and you can use the latest version of the Parse JS SDK. The problem I outlined above is that to get nested pointer relationships to encode / save correctly I have to directly access the encode file of the Parse JS SDK. This makes usage in RequireJS a bit messy. I haven't tried all too hard to get it working as well I don't need that functionality as modern package managers solve the problem transparently. I gather one can duplicate the parse JS SDK to create a hack workaround with RequireJS, but it's not clean per se. I'm not getting paid for any of this so can't exactly focus on this since there is such an easy solution if the Parse JS team takes my suggestion up for consideration. The problem is that encode.js references a bunch of other internal Parse JS files and the dependencies continue to chain up to foul things up w/ RequireJS. If it were exposed via Parse.js / ala |
So I know that this a bit old but was able to fix a lot of the bugs in are parse code by doing this close to start of the page load. Hope this helps other solve this problem.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I am currently building an backbone app (items added to a table for each Google form submitted for review). I am on parse 1.2.13 JS SDK.
Migrating to 1.6 will obviously mess up my working code since there is no Collection class.
I am somewhat new to web development. Could someone let me know if Backbone support is in the works or if there is a simple workaround?
Thanks!
The text was updated successfully, but these errors were encountered: