{"id":21152785,"url":"https://github.com/aodin/backpain","last_synced_at":"2025-07-14T09:35:19.357Z","repository":{"id":6854943,"uuid":"8103721","full_name":"aodin/backpain","owner":"aodin","description":"Tutorials and Design Patterns for Backbone.js","archived":false,"fork":false,"pushed_at":"2013-04-15T23:06:20.000Z","size":303,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T14:47:52.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aodin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-08T23:57:07.000Z","updated_at":"2014-02-09T23:39:10.000Z","dependencies_parsed_at":"2022-09-17T23:02:08.655Z","dependency_job_id":null,"html_url":"https://github.com/aodin/backpain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aodin/backpain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aodin%2Fbackpain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aodin%2Fbackpain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aodin%2Fbackpain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aodin%2Fbackpain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aodin","download_url":"https://codeload.github.com/aodin/backpain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aodin%2Fbackpain/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265269400,"owners_count":23737840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T10:46:39.804Z","updated_at":"2025-07-14T09:35:19.311Z","avatar_url":"https://github.com/aodin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Backpain\n========\n\nTutorials and Design Patterns for Backbone.js\n\n\n### Hidden Operations:\n\n* The `initialize` function and its parameters\n* Caching of `$el` parameter\n* The `url` versus `urlRoot` of `Model` and `url` of `Collection`\n* Extending `url` and `parse` functions for your server-side setup\n* Operations that are `silent` by default\n* Promotion of certain `options` to the root `this`\n* DOM elements can be jQuery selectors or the jQuery object itself\n* The `this.$()` shortcut for `this.$el.find()`\n\n\n### Syntax Reminders\n\n* End every attribute with a comma\n* Ending `render` functions with return this;`\n\n\n### Design Patterns\n\n* Separation of `Collection` render methods: `render` and `renderItem`\n* Underscore templates, especially caching templates\n* Returning an object from `Model.validate`\n\n\n### Gotchas\n\n* Memory leaks / duplicate events when binding to views\n* Bootstraping data does not fire events\n* Overwriting the `el` element in views\n* Forgetting the `new` operator\n* The View `setElement` will create a new `$el` object and replace `tagName`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faodin%2Fbackpain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faodin%2Fbackpain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faodin%2Fbackpain/lists"}