Skip to content

Loading…

backbone + curl + wire example #79

Closed
pieterv opened this Issue · 8 comments

4 participants

@pieterv

https://github.com/pieter-vanderwerff/todomvc/tree/master/dependency-examples/backbone_curl_wire

A TodoMVC example using backbone + curl + wire libraries, based on the backbone + require example allowing for comparisons.

Curl.js (https://github.com/cujojs/curl)
Wire.js (https://github.com/cujojs/wire)

This example comes with a test suite (using jasmine and sinon), run js/spec/browser/SpecRunner.html

Known deficiencies needed for 1.0 (based off issue #73):

  • Need to update the html/css/folder structure to match the new template.
  • Update to the latest version of the libraries.
  • "Mark all complete" checkbox should be hidden when there are no tasks.
  • Underscore AMD implementation error issues, see cujojs/curl#36
@boushley

@pieter-vanderwerff Do you mean this to be a pull request, or are you just making us aware that you are currently working on this? Do you plan to make the changes that you've listed or are you planning to hand this off and have us finish it?

@pieterv

Im just making you aware of the state of this example. I will submit a pull request once the underscore AMD implementation issue has been resolved. Its a bit of a hard issue to solve, we may need to wait for version 0.6 of curl or since underscore has dropped AMD support we modify its source directly to wrap the define() call around everything. Have you thought about what approach you will take for the backbone + require example when upgrading underscore? Modify the source or use a fork?

As for the other items, i assume they are not so urgent and shouldn't stop me from submitting a pull request. Also for consistency it would be better if you made the changes first to the backbone + require and i am happy to copy them over to this example when that is done.

@boushley

@pieter-vanderwerff Great work! I appreciate you getting this thing going so far. @addyosmani actually spoke up that he wanted to handle the upgrade of the backbone + require version, so he'll have to chime in on how he plans to handle that scenario, but it is an interesting point. It might make using backbone for our AMD implementation examples a bad idea. I agree that consistency is key, so hopefully Addy will be able to highlight what he plans to do.

Thanks again for the great work.

@addyosmani
TasteJS member

@pieter-vanderwerff @boushley I think patching the source directly makes the most sense as we can then easily have a single copy of Underscore we can use for any examples requiring script loaders like curl or RequireJS. Happy for us to patch ourselves, but if we can locate a fork someone is maintaining that already has this that would be useful.

I would definitely say feel free to submit a PR which can then be later improved/fixed as needed. We probably won't be landing the curl example until after our next release, so that gives us plenty of time to work on it.

Thanks again, Pieter!

@pieterv

Do you think its worth creating a README file in the libs directory which would list the repo/project/fork url, version number and any modifications for each library?

There has been some talk on the AMD implementation list of maintaining forks of all major libraries, hopefully something will come of this soon but in the mean time i will patch the source. https://groups.google.com/group/amd-implement/browse_thread/thread/78815161c34eeeac?pli=1

Ok great, thanks guys!

@addyosmani
TasteJS member

@pieter-vanderwerff I was talking to James Burke earlier and he mentioned that a patched version is available via the amdjs group and pointed me at the readme in http://github.com/volojs/volo

@addyosmani
TasteJS member

@pieter-vanderwerff

I didn't respond to your other question - I was initially going to suggest moving information about forks into the wiki, but a README in the lib directory will probably get read more. Would there be benefit in us making a preliminary list of patched libraries people creating todo apps can use?

@pieterv

@addyosmani After having a play with volojs im not sure its worth making a list of patched libraries since volo makes it so easy to patch any library for use with AMD. But a section on AMD in the wiki would be useful with info about and links to both volojs and the amdjs forks (https://github.com/amdjs).

Yeah i agree with you about the README in the libs directory being more visible, seems like a simple but useful addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.