{"id":20556645,"url":"https://github.com/clevertech/yiibackbone","last_synced_at":"2025-04-14T13:08:26.953Z","repository":{"id":2798912,"uuid":"3799391","full_name":"clevertech/YiiBackbone","owner":"clevertech","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-17T04:38:13.000Z","size":4467,"stargazers_count":91,"open_issues_count":4,"forks_count":26,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-28T02:12:41.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clevertech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-22T15:53:10.000Z","updated_at":"2024-07-17T06:04:31.000Z","dependencies_parsed_at":"2022-07-18T23:47:28.475Z","dependency_job_id":null,"html_url":"https://github.com/clevertech/YiiBackbone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clevertech%2FYiiBackbone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clevertech%2FYiiBackbone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clevertech%2FYiiBackbone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clevertech%2FYiiBackbone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clevertech","download_url":"https://codeload.github.com/clevertech/YiiBackbone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886317,"owners_count":21177643,"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-16T03:31:10.567Z","updated_at":"2025-04-14T13:08:26.389Z","avatar_url":"https://github.com/clevertech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"YiiBackbone\n===========\n\n- Status: Work in progress.\n- Integration environment: http://yiibackbone.int.clevertech.biz/\n- Login: demo/1q2w3e\n\nIntroduction\n============\n\nYiiBackbone is a sample blog web application build using Backbone.js and Yii.\nThe source of this project can be used to kick-start other Backbone.js projects\nor serve as reference point on using Backbone.js.\n\nRequirements\n============\n\n- Apache 2 Web Server\n- MySQL 5.1+ with InnoDB support.\n- PHP 5.3+ configured with the following extensions:\n  - PDO\n  - PDO MySQL driver\n  - GD2\n  - Mcrypt\n  - CUrl\n  - Imap\n\nInstallation\n============\n\nYou can get the source files from:\n\n    $ git clone git@github.com:clevertech/YiiBackbone.git\n\nAnd load git submodules:\n\n    $ cd YiiBackbone\n    $ git submodule update --init\n\nMake directories _protected/runtime_ and _assets_ writable by the webserver.\n\n    $ chmod 0777 protected/runtime\n    $ chmod 0777 assets/\n\nCreate a main-local.php file inside\n*/protected/config* with something like the following\n(uncomment the below lines if want to integrate the Gii code generation feature of Yii\nfor generating php models, controllers, CRUD, etc. in your development environment):\n\n```\n\u003c?php\nreturn array(\n//\t'modules' =\u003e array(\n//\t\t'gii' =\u003e array(\n//\t\t\t'class' =\u003e 'system.gii.GiiModule',\n//\t\t\t'password' =\u003e 'giiPassword',\n//\t\t),\n//\t),\n\t'components' =\u003e array(\n\t\t'db' =\u003e array(\n\t\t\t'connectionString' =\u003e \"mysql:host=127.0.0.1;dbname=yii_backbone\",\n\t\t\t'username' =\u003e 'root',\n\t\t\t'password' =\u003e '',\n\t\t),\n//\t\t'urlManager' =\u003e array(\n//\t\t\t'rules' =\u003e array(\n//\t\t\t\t// GII patterns\n//\t\t\t\t'gii' =\u003e 'gii',\n//\t\t\t\t'gii/\u003ccontroller:\\w+\u003e' =\u003e 'gii/\u003ccontroller\u003e',\n//\t\t\t\t'gii/\u003ccontroller:\\w+\u003e/\u003caction:\\w+\u003e' =\u003e 'gii/\u003ccontroller\u003e/\u003caction\u003e',\n//\t\t\t)\n//\t\t)\n\t),\n);\n```\n\nRun the migrations:\n\n    $ cd protected\n    $ php yiic.php migrate\n\n\nOptional - if you chose to enable the Gii code generation tool, then you can use this url and password\n\n    URL:      http://hostname/path-to-yiibackbone/gii (for example: http://localhost/YiiBackbone/gii)\n    Password: giiPassword\n\n\n\nTechnology Stack\n================\n\nHere are some current components of YiiBackbone and links to relevant resources.\n\nName :                    Path :                                           Docs URL\n-------------------------------------------------------------------------------------------------------\n- Yii                  : 'protected/vendor/yii',                         : http://www.yiiframework.com/\n- Backbone.JS          : 'app/js/libs/backbone/backbone',                : http://documentcloud.github.com/backbone/\n- Underscore.JS        : 'app/js/libs/underscore/underscore',            : http://documentcloud.github.com/underscore/\n- RequireJS            : 'app/js/libs/require/*'                         : http://requirejs.org/\n- jQuery               : 'app/js/libs/jquery/jquery-1.7.1.min',          : http://jquery.com/\n- jQuery UI            : 'app/js/libs/jquery-ui/jquery.ui.core',         : http://jqueryui.com/\n- MarionetteJS         : 'app/js/libs/backbone/backbone.marionette',     : http://marionettejs.com/\n- Backbone-relational  : 'app/js/libs/backbone/backbone-relational',     : https://github.com/PaulUithol/Backbone-relational\n- modelbinding         : 'app/js/libs/backbone/backbone.modelbinding',   : https://github.com/derickbailey/backbone.modelbinding\n- visualsearch         : 'app/js/libs/app/visualsearch',                 : http://documentcloud.github.com/visualsearch/\n- json                 : 'app/js/libs/utils/json2',                      : https://github.com/douglascrockford/JSON-js\n- bootstrap            : 'app/js/libs/bootstrap/*',                      : http://twitter.github.com/bootstrap/javascript.html\n\nPlease note that some JS libs are converted to AMD format so that they can be\nloaded asynchronously. If a lib is not defined as AMD module it will not load\nproperly. For further information on AMD please see http://requirejs.org/docs/whyamd.html\n\nFor converting existing libraries into AMD libraries please see\nhttps://github.com/jrburke/requirejs/wiki/Updating-existing-libraries\n\nTesting\n=======\n\nFor BDD on YiiBackbone we are using:\n\n- Cucumber.js : https://github.com/cucumber/cucumber-js\n- Jasmine     : http://pivotal.github.com/jasmine/\n\nYou need to install /app/package.json using NPM to enable Cucumber.js. Follow\nthe instructions on Cucumber.js's docs site above.\n\nCode Style Guide\n================\n\nIndent\n------\n\nFor JavaScript, CSS, HTML files we use only spaces, and indent 2 spaces at a time.\nAnd for PHP files we follow Yii style with 1 tab indentation.\n\nBackbone Resources\n==================\n\nWe recommend going through the following resources for some advanced concepts on\nusing Backbone.js.\n\n- http://backbonetutorials.com/organizing-backbone-using-modules/\n- http://lostechies.com/derickbailey/category/backbone/\n\nAlso take a look at Marionette.Application and Marionette.Region components\nof great Backbone.Marionette framework:\n\n- https://github.com/marionettejs/backbone.marionette\n\nGotchas\n=======\n\nOne problem that you may encounter while working with RequireJS is circular\ndependencies. Please see http://requirejs.org/docs/api.html#circular\n\nKnown Bugs\n==========\n\nArchitecture\n============\n\nYiiBackbone's architecture is divided into two obvious parts. The server and\nthe client.\n\nThe server-side is handled by Yii. Yii is used to provide the DB manipulations\nwith the migrations, emailing, ActiveRecord, RESTful resources, password\nencryption, secure cookie over SSL creation, console commands and few other\nthings. All server side files can be found under \"/protected\".\n\nThe actual app is build entirely with JS on the client-side. All files can be\nfound under \"/app\".\n\nThe application consists of the following parts (\"/app/js\")\n\n- models\n- collections\n- views\n- templates\n- helpers\n- libs\n- app.js\n- router.js\n- main.js\n\nAuthors\n=======\n- [Ivan Shaovchev](https://github.com/ivanshaovchev)\n- [Rinat Silnov](https://github.com/rinatio)\n\nThanks\n======\n[CleverTech](http://www.clevertech.biz) for supporting this OpenSource project.\n\nLicense\n=======\n\nThe MIT License\n\nCopyright (c) 2012 CleverTech\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclevertech%2Fyiibackbone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclevertech%2Fyiibackbone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclevertech%2Fyiibackbone/lists"}