{"id":16482499,"url":"https://github.com/f/view.coffee","last_synced_at":"2025-10-27T17:32:00.199Z","repository":{"id":16814736,"uuid":"19573804","full_name":"f/view.coffee","owner":"f","description":"Dead Simple, Vanilla-ish Client-Side Framework based on jQuery, inspired by GitHub's Space-Pen Library","archived":false,"fork":false,"pushed_at":"2014-05-14T13:54:48.000Z","size":292,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-02T01:10:21.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","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/f.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-08T13:10:50.000Z","updated_at":"2021-05-07T15:44:51.000Z","dependencies_parsed_at":"2022-08-04T11:15:19.049Z","dependency_job_id":null,"html_url":"https://github.com/f/view.coffee","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/f%2Fview.coffee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fview.coffee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fview.coffee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fview.coffee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f","download_url":"https://codeload.github.com/f/view.coffee/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219860821,"owners_count":16556011,"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-10-11T13:11:02.238Z","updated_at":"2025-10-27T17:31:54.901Z","avatar_url":"https://github.com/f.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# View.coffee\n\n**Dead Simple, Vanilla-ish** Client-Side Framework based on *jQuery*\n\n## Manage Views like a boss.\n\nAre you using lots of frameworks but are they **overkill**? You just like doing something simply\nwith **jQuery** but it makes your code becomes too ugly?\n\nThen maybe you should try **View.coffee**.\n\n  - Use *all* of the jQuery instance methods in your View class, because it's jQuery instance.\n  - Manage the events. Improve readability.\n  - Seperate your View logic. Use it like MV*.\n  - Use it another libraries, there is no conflict.\n  - And the best; too simple. (Source code is only **10 lines of CoffeeScript code**)\n\n## Usage\n\n```coffeescript\nclass Search extends View\n\n  template: -\u003e \"#search\"\n\n  constructor: -\u003e\n    super\n    @on \"submit\", @doSearch\n\n  doSearch: (e)-\u003e\n    searchValue = @find(\"#query\").val()\n    # do the job...\n    console.log \"search #{searchValue}\"\n    e.preventDefault()\n\n# View communication\nclass MyApp extends View\n\n  # Write the selector\n  template: -\u003e \"#app\"\n\n  constructor: -\u003e\n    super\n    search = new Search()\n    search.on \"submit\", (e)=\u003e\n      console.log \"another binding\"\n      e.preventDefault()\n\napp = new MyApp()\n```\n\n## Generating Views\n\n```coffeescript\nclass ModelView extends View\n  template: ({name})-\u003e \"\"\"\n  \u003cdiv\u003e\n    Hello #{name}\n  \u003c/div\u003e\n  \"\"\"\n  constructor: (data)-\u003e\n    super data\n    @text @text().toUpperCase()\n\nmodelView = new ModelView name: \"f\"\n```\n\n## Custom Views\n\n```coffeescript\nclass Item extends View\n  constructor: -\u003e\n\nitem = new Item title: \"hello\", (data)=\u003e \"\"\"\n  \u003cdiv\u003e\n    Hello #{data.title}\n  \u003c/div\u003e\n  \"\"\"\n```\n\n---\n\nDeveloped at [@webBoxio][1] with \u003c3, inspired by GitHub's Space-Pen.\n\n## License\n\nMIT.\n\n[1]: http://webbox.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff%2Fview.coffee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff%2Fview.coffee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff%2Fview.coffee/lists"}