Backbone API
This is a simple module that adds the backbone.js and underscore libraries to drupal, this is intended as a starting point with further backbone widgets in the pipeline. backbone gives structure to javascript within projects by providing an MVC structure with a small footprint

Drupal core 7.x
Backbone API

Comments

misc’s picture

You have some coding standards issues, you could review them over here: http://ventral.org/pareview/httpgitdrupalorgsandboxcormac1404998git

Also you work in the master branch, you should be working in 7.x-1.x (more info here: http://drupal.org/node/1015226).

You should not inlclude others work in the module, just provide links to download them to get the module functional.

misc’s picture

Status: Active » Needs work
cromac’s picture

Thanks for the quick review

I've changed branch and resolved those coder issues, and removed the javascript files from the repo

cromac’s picture

Status: Needs work » Needs review
misc’s picture

Status: Needs review » Needs work

There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732

Some more work is needed.

Also you branch 7.x-1.x still have coding standards issues: http://ventral.org/pareview/httpgitdrupalorgsandboxcormac1404998git-7x-1x

cromac’s picture

Status: Needs work » Needs review

ok, all coding standards issues fixed and all files removed from the master branch other than the readme which tells users to use the other branches as per step 5

misc’s picture

Great. Usually it takes some time to get a "real review", and it is good practice that the applications that are last in the queue is first done.

ethanw’s picture

Hey there.

We've been working on Backbone integration for a bit and were about to flip the switch to promote our Backbone sandbox module when we found this thread via a Google search. Before we proceed, I wanted to be sure to weigh in on this thread.

I really do appreciate the work you've done, but I think that the approach we've taken in Backbone is generally a better way to go, as it is more flexible and lightweight. The Backbone module inherits from Backbone's Model and Collection objects to interface with the Service module's REST server, so that developers can develop backbone apps at the module or theme level that interface with a Drupal sites' REST endpoints w/o need for more than a myNode = new Drupal.Backbone.NodeModel();. This subclassing allows for NodeModels to be the associated models in NodeViews, NodeIndex and (soon) NodeSearch and TermNode collections, thus leveraging Backbones model/collection structure in a way that mirrors Drupal's objects, while using Drupal's most often used solution for REST systems and generally making use of existing contrib modules where possible.

We've put a good deal into the Backbone module, and I think it offers quite a lot for this space, and it's my hope you'll join us in maintaining and contributing to it. Some of the feature's we've implemented so far include:

  • Support for Services' node and views resources, with more planned and fairly easily added.
  • Use of the Drupal 7 libraries API for management of the underscore.js and backbone.js dependencies.
  • Full testing (and TDD) using QUnit via the Drupal QUnit module.
  • A base feature for setup of Services and Views to support basic Backbone app development.
  • JS code documented using docco standard and available at http://eethann.github.com/Drupal-Backbone/

Additionally, I think that there are some issues that need to be addressed in the way this module is structured, including the lack of any Drupal behaviors wrapping around the Backbone model used (I would strongly recommend using Drupal behaviors for this), and not using the Services and Services Views modules for the REST integration. Most importantly, though, I think that it's important the Drupal Backbone implementation inherit from the Backbone objects, but it appears that your DrupalBackbone is creating a new interface that delegates to Backbone instead of extending it. If I understand correctly, this means that DrupalBackbone does not have models with Backbone's fetch, sync, etc. methods, but uses a different set of methods. Two challenges of this approach are that it might be difficult to use with Apps that don't work via the type of views integration this module is based on, and it may be a bit of a barrier to adoption for developers familiar with Backbone but needing to learn the specific interface used in this DrupalBackbone library.

That said, the work you've done with conditional inclusion, drag-and-drop and SimpleTest unit testing has not been included in our module. It's clear you've put a good deal of effort into it, and there's a lot of good stuff there. Since our approaches are quite different, I don't think the modules are completely duplicative of each other, but I do think the use cases overlap substantially, and combining our efforts on a Drupal.Backbone extension of Backbone that can be a foundation for a wide range of Backbone application development paradigms seems preferable.

I do hope you will choose to join us in developing on Backbone, we're really excited about it and hope it will become a very vibrant community project. We'll hold off on promoting it to a full project for a bit, pending further discussion on this thread.

Thanks!

Ethan

ethanw’s picture

One additional note: thanks @Cromac for the PM you sent a few hours prior to my comment above inviting collaboration, it is unfortunate that I did not see it till after I posted above.

I look forward to working together, and am excited to find a good way forward...one way or another.

ethanw’s picture

One additional note: thanks @Cromac for the PM you sent a few hours prior to my comment above inviting collaboration, it is unfortunate that I did not see it till after I posted above.

I look forward to working together, and am excited to find a good way forward...one way or another.

cromac’s picture

Hey Ethan,
Thanks for getting in touch, I agree that working together on the backbone module would probably be the best way forward. The REST approach and integration with services is a great feature.
Maybe we could do a chat on IRC about the best way to proceed. I'll be on #drupal for the day.
It'd be great to work together on this.

ps: by the way thanks for your post on vim and the drupal cs process, yes it does make it almost fun!!

KhaledBlah’s picture

What is the status of your development if I may ask? Does your module still need reviewing? If so, please let us know and have a look at http://ventral.org/pareview/httpgitdrupalorgsandboxcormac1404998git for coding standard issues in the 7.x-1.x branch.

KhaledBlah’s picture

Status: Needs review » Needs work

Forgot to change the issue status.

ethanw’s picture

I believe that this module has been superseded by the Backbone module, which Cromac and I are co-maintainers on, but Cromac is the one to speak to that conclusively.

KhaledBlah’s picture

@ethanw, @cromac, Ok in that case please forget my comments from #12 and please close this issue.

patrickd’s picture

Status: Needs work » Closed (duplicate)

I also think that this is duplicating the functionality of the existing backbone module, feel free to reopen if you disagree.
Anyway, @cromac, please don't get desperate about that and just try it again some other time,
maybe you also want to join forces with the maintainers ?

thanks all

avpaderno’s picture

Title: backbone_api module » [D7] backbone_api module
Issue summary: View changes
Status: Closed (duplicate) » Closed (won't fix)