{"id":15495073,"url":"https://github.com/samchon/framework-examples","last_synced_at":"2025-10-18T11:06:45.404Z","repository":{"id":152227832,"uuid":"77363042","full_name":"samchon/framework-examples","owner":"samchon","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-11T06:34:25.000Z","size":1073,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T04:34:19.050Z","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/samchon.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-26T06:27:11.000Z","updated_at":"2020-04-11T06:34:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d58186a-f5b1-49dc-8fd7-b59d4760948c","html_url":"https://github.com/samchon/framework-examples","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"5b39e90deea336dc7a2913f19788e8485d5ce07d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fframework-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fframework-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fframework-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fframework-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samchon","download_url":"https://codeload.github.com/samchon/framework-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240748388,"owners_count":19851254,"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-02T08:16:00.299Z","updated_at":"2025-10-18T11:06:45.342Z","avatar_url":"https://github.com/samchon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Examples for Samchon Framework\n\u003e ## Deprecated, use TGrid instead\n\u003e [**TGrid**](https://github.com/samchon/tgrid) - TypeScript Grid Computing Framework \n\u003e \n\u003e I've developed much better solution for implementing the [OON](https://github.com/samchon/framework#object-oriented-network) by realizing the true Grid Computing through the RFC (Remote Function Call). [**TGrid**](https://github.com/samchon/tgrid) is a new framework for that solution. Therefore, [**TGrid**](https://github.com/samchon/tgrid) will replace the Samchon Frameowrk and continue developing the *OON*.\n\n## TGrid-Exampels\n*Samchon Framework* has been deprecated and [TGrid](https://github.com/samchon/tgrid) will replace it. Also, this example repository would be deprecated and replaced to the [tgrid-examples](https://github.com/samchon/tgrid-examples). If you want to know more about the example codes, visit the https://tgrid.com - [TGrid Guide Documents](https://tgrid.com).\n\n#### [`composite-calculator/server.ts`](https://github.com/samchon/tgrid.examples/blob/master/src/projects/composite-calculator/server.ts)\n```typescript\nimport { WebServer, WebAcceptor } from \"tgrid/protocols/web\";\nimport { CompositeCalculator } from \"../../providers/Calculator\";\n\nasync function main(): Promise\u003cvoid\u003e\n{\n    let server: WebServer = new WebServer();\n    await server.open(10102, async (acceptor: WebAcceptor) =\u003e\n    {\n        await acceptor.accept(new CompositeCalculator());\n    });\n}\nmain();\n```\n\n#### [`composite-calculator/client.ts`](https://github.com/samchon/tgrid.examples/blob/master/src/projects/composite-calculator/client.ts)\n```typescript\nimport { WebConnector } from \"tgrid/protocols/web/WebConnector\";\nimport { Driver } from \"tgrid/components/Driver\";\n\nimport { ICalculator } from \"../../controllers/ICalculator\";\n\nasync function main(): Promise\u003cvoid\u003e\n{\n    //----\n    // CONNECTION\n    //----\n    let connector: WebConnector = new WebConnector();\n    await connector.connect(\"ws://127.0.0.1:10102\");\n\n    //----\n    // CALL REMOTE FUNCTIONS\n    //----\n    // GET DRIVER\n    let calc: Driver\u003cICalculator= connector.getDriver\u003cICalculator\u003e();\n\n    // FUNCTIONS IN THE ROOT SCOPE\n    console.log(\"1 + 6 =\", await calc.plus(1, 6));\n    console.log(\"7 * 2 =\", await calc.multiplies(7, 2));\n\n    // FUNCTIONS IN AN OBJECT (SCIENTIFIC)\n    console.log(\"3 ^ 4 =\", await calc.scientific.pow(3, 4));\n    console.log(\"log (2, 32) =\", await calc.scientific.log(2, 32));\n\n    try\n    {\n        // TO CATCH EXCEPTION IS STILL POSSIBLE\n        await calc.scientific.sqrt(-4);\n    }\n    catch (err)\n    {\n        console.log(\"SQRT (-4) -Error:\", err.message);\n    }\n\n    // FUNCTIONS IN AN OBJECT (STATISTICS)\n    console.log(\"Mean (1, 2, 3, 4) =\", await calc.statistics.mean(1, 2, 3, 4));\n    console.log(\"Stdev. (1, 2, 3, 4) =\", await calc.statistics.stdev(1, 2, 3, 4));\n\n    //----\n    // TERMINATE\n    //----\n    await connector.close();\n}\nmain();\n```\n\u003e\n\u003e```\n\u003e1 + 6 = 7\n\u003e7 * 2 = 14\n\u003e3 ^ 4 = 81\n\u003elog (2, 32) = 5\n\u003eSQRT (-4) -Error: Negative value on sqaure.\n\u003eMean (1, 2, 3, 4) = 2.5\n\u003eStdev. (1, 2, 3, 4) = 1.118033988749895\n\u003e``` ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fframework-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamchon%2Fframework-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fframework-examples/lists"}