{"id":16726142,"url":"https://github.com/tatut/liveweb","last_synced_at":"2025-09-04T12:34:00.761Z","repository":{"id":42717855,"uuid":"441839257","full_name":"tatut/LiveWeb","owner":"tatut","description":"LiveWeb: web app framework for Smalltalk","archived":false,"fork":false,"pushed_at":"2024-02-01T18:00:08.000Z","size":459,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T09:11:37.952Z","etag":null,"topics":["pharo"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","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/tatut.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-26T08:01:43.000Z","updated_at":"2024-02-01T00:41:26.000Z","dependencies_parsed_at":"2024-01-12T18:19:27.832Z","dependency_job_id":"a3937622-6ebf-4738-8135-41167b974198","html_url":"https://github.com/tatut/LiveWeb","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/tatut%2FLiveWeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatut%2FLiveWeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatut%2FLiveWeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatut%2FLiveWeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tatut","download_url":"https://codeload.github.com/tatut/LiveWeb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199088,"owners_count":21063641,"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":["pharo"],"created_at":"2024-10-12T22:52:17.024Z","updated_at":"2025-04-10T10:24:11.019Z","avatar_url":"https://github.com/tatut.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LiveWeb\n\n![test workflow](https://github.com/tatut/LiveWeb/actions/workflows/test.yml/badge.svg)\n\nLiveWeb is a server side rendered web application framework for Smalltalk.\nIt is based on Zinc HTTP server and WebSockets.\n\nThe components live on the server and can send updates to clients through the web socket.\n\n\n## Quick start guide\n\n### Try docker examples\n\nYou can try the examples in a docker with\n\n`docker run -p 8080:8080 antitadex/liveweb-examples`\n\nand opening examples: `http://localhost:8080/examples/clock` (and `counter`, `wordle`).\n\n### Installation\n\n```smalltalk\n Metacello new\n   repository: 'github://tatut/LiveWeb/src';\n   baseline: 'LiveWeb';\n   load.\n```\n\n### Creating a page and component.\n\nThe main endpoint is an instance of `LWPage` subclass. The page will create the head (optional) and\nbody (required) components for each page render. The page will register itself with a random UUID\nso the client can connect to it.\n\nCreating a simple counter component.\n```smalltalk\nLWPage subclass: #CounterPage.\n\nCounterPage \u003e\u003e body: args [\n  ^ CounterComponent new\n]\n```\n\nThe create the component.\n```smalltalk\nLWComponent subclass: #CounterComponent\n  instanceVariableNames: 'counter'.\n\nCounterComponent \u003e\u003e initialize [\n  super initialize.\n  counter := 0\n]\n\nCounterComponent \u003e\u003e renderOn: h [\n  h div: { #id-\u003e'myBody' } with: [\n    h button: { #onclick -\u003e [ self counter: counter - 1] } with: '-';\n      div: counter asString;\n      button: { #onclick -\u003e [ self counter: counter + 1] } with: '+'\n  ]\n]\n\nCounterComponent \u003e\u003e counter: newValue [\n  counter := newValue.\n  self changed \"this causes the component to rerender\"\n]\n```\n\nThen you need to register the page into the Zinc server delegate.\n```smalltalk\nZnServer default delegate\n  map: #counter\n  to: [:req | CounterPage new value: req ].\n```\n\nSee the `LiveWeb-Examples` package for more elaborate examples and\nexamples of using the styling package.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatut%2Fliveweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftatut%2Fliveweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatut%2Fliveweb/lists"}