{"id":13770291,"url":"https://github.com/OpenSmock/Molecule","last_synced_at":"2025-05-11T03:32:43.086Z","repository":{"id":39890481,"uuid":"179013760","full_name":"OpenSmock/Molecule","owner":"OpenSmock","description":"Molecule is a Pharo component framework.","archived":false,"fork":false,"pushed_at":"2025-02-11T10:17:07.000Z","size":1044,"stargazers_count":28,"open_issues_count":11,"forks_count":7,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-06T15:39:32.146Z","etag":null,"topics":["architecture","component","components","connexion","corba","events","framework","lightweigth","lwccm","model","molecule","open-smock","parameters","pharo","pharo-smalltalk","services","smalltalk","smock"],"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/OpenSmock.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":"2019-04-02T06:32:35.000Z","updated_at":"2025-03-22T23:54:15.000Z","dependencies_parsed_at":"2023-12-06T18:44:16.908Z","dependency_job_id":"f2503072-e6b9-4759-8d03-63ff7d2b9f79","html_url":"https://github.com/OpenSmock/Molecule","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSmock%2FMolecule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSmock%2FMolecule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSmock%2FMolecule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSmock%2FMolecule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenSmock","download_url":"https://codeload.github.com/OpenSmock/Molecule/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514352,"owners_count":21920327,"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":["architecture","component","components","connexion","corba","events","framework","lightweigth","lwccm","model","molecule","open-smock","parameters","pharo","pharo-smalltalk","services","smalltalk","smock"],"created_at":"2024-08-03T17:00:35.983Z","updated_at":"2025-05-11T03:32:42.312Z","avatar_url":"https://github.com/OpenSmock.png","language":"Smalltalk","funding_links":[],"categories":["Component-Based Architectures"],"sub_categories":[],"readme":"[![License](https://img.shields.io/github/license/openSmock/Molecule.svg)](./LICENSE)\n[![Pharo 11 CI](https://github.com/OpenSmock/Molecule/actions/workflows/Pharo11CI.yml/badge.svg)](https://github.com/OpenSmock/Molecule/actions/workflows/Pharo11CI.yml)\n[![Pharo 12 CI](https://github.com/OpenSmock/Molecule/actions/workflows/Pharo12CI.yml/badge.svg)](https://github.com/OpenSmock/Molecule/actions/workflows/Pharo12CI.yml)\n\n# Molecule\n\n![Molecule Logo](resources/MoleculeBanner.jpg)\n\nMolecule is a component oriented framework for Pharo.\nHis Component architecture approach provides an adapted structuration to User Interface (UI) or another software application which need Component features.\n\nMolecule provides a way to describe a software application as a component group. Components communicate by use of services, parameters and event propagation. It is a Pharo implementation of the Lightweight Corba Component Model (Lightweight CCM).\nMolecule supports completely transparent class augmentation into component (not necessary to add code manually), based on Traits.\n\n## \u003cimg src=\"/resources/puce.svg\" width=\"32\" height=\"32\" align=\"bottom\"\u003e Documentation\n\nMolecule documentation is available here: [Molecule Documentation Home](https://github.com/OpenSmock/Molecule/blob/main/documentation/Table%20of%20contents.md)\n\nThe documentation includes some tutorials, pattern description and examples. \n\n## \u003cimg src=\"/resources/puce.svg\" width=\"32\" height=\"32\" align=\"bottom\"\u003e How to get Molecule\n\nYou can load the latest development version of Molecule or load a specific stable release with a tag, for example 1.2.10.\n\nContinuous integration (CI) status badges show status of compatibility for all supported Pharo versions. You can use Molecule with your Pharo version when its badge is green ! \n\n### Latest version\n\nTo install the **latest version of Molecule** in Pharo, you just need to execute the following script:\n\n```smalltalk\nMetacello new\n   baseline: 'Molecule';\n   repository: 'github://OpenSmock/Molecule:main/src';\n   load.\n```\n\nTo add in your project **BaselineOf**:\n\n```smalltalk\nspec baseline: 'Molecule' with: [ spec repository: 'github://OpenSmock/Molecule:main/src' ].\n```\n\n### Specific release\n\nTo install a release in your Pharo image you just need to adapt and execute the following script.\nDon't forget to adapt the **x.x.x** tag to your wanted release in your script, for example **1.2.11**.\n\n```smalltalk\nMetacello new\n   baseline: 'Molecule';\n   repository: 'github://OpenSmock/Molecule:x.x.x';\n   load.\n```\n\nTo add in your project **BaselineOf**:\n\n```smalltalk\nspec baseline: 'Molecule' with: [ spec repository: 'github://OpenSmock/Molecule:x.x.x' ].\n```\n\n### Looking for an older Pharo ?\n\nNew releases of Molecule don't support old Pharo versions (\u003c 10), but could work.\nFind below some Molecule branches for old Pharo versions. \n\n[Pharo 9 and 10 - last release is 1.2.8](https://github.com/OpenSmock/Molecule/tree/Pharo9-10).\n\n[Pharo 8 - last release is 1.2.7](https://github.com/OpenSmock/Molecule/tree/Pharo8).\n\n[Pharo 6 and 7 - last release is 1.1.1](https://github.com/OpenSmock/Molecule/tree/Pharo6-7).\n\n### Prerequisites\n\nMolecule Core has no dependencies.\n\nPackage 'Molecule-Benchmarks' requires SMark (https://github.com/smarr/SMark), this package contains benchmarks for working on performances.\n\n## \u003cimg src=\"/resources/puce.svg\" width=\"32\" height=\"32\" align=\"bottom\"\u003e Molecule developer menus\n\nMolecule tries to offer a maximum number of Pharo user interface extensions to create and exploit components.\n\n### Library menu\n\nA Molecule Component system can be monitored and inspected from the dedicated `Molecule library menu`.\n![image](https://github.com/OpenSmock/Molecule/assets/49183340/28380e1b-37be-4456-a376-bb8dac70fd3f)\n\nThis menu also includes a special section for `Debug and Tools`, providing access to advanced features.\n### Contextual menus\n\nThere are mutiple accesses to Molecule features from contextual menus.\n\n#### Packages contextual menu:\n![image](https://github.com/OpenSmock/Molecule/assets/49183340/1c4f9885-03e0-41dd-90db-eac077b34dcf)\n\nThis menu provides `metrics` to have statistics on the Molecule code in selected packages.\n![image](https://github.com/OpenSmock/Molecule/assets/49183340/d083047b-ad95-42cf-a7f4-76242d2f6eec)\n\n#### Classes contextual menu:\n![image](https://github.com/OpenSmock/Molecule/assets/49183340/ac545c7b-9004-4728-a398-7cca42b0ed54)\n\nThis menu provides actions and tools depending on the selected classes.\nWith this menu you can force to `define` a Component, specially if you have deactivated the Molecule dynamic update or if you have a bug when a Component contract changed.\n\n### See Component implementations\n![contextual menu see component implementations](https://github.com/Eliott-Guevel/Molecule-various-fixes/assets/76944457/a4221985-0578-4e95-a133-831548e0f5ef) \\\nWhen right-clicking a Trait that uses the `MolComponentType` Trait, a new option appears in the `Molecule` sub-menu (as shown above):\n\n![see component implementations github](https://github.com/Eliott-Guevel/Molecule-various-fixes/assets/76944457/68a94948-d6a0-4dce-9c67-2d1974b78fdf) \\\nClicking this option opens this window, showing all the Component implementations of a Type Trait. \\\nThe title of the window indicates the name of the Type Trait. \\\nClicking an implementation activates the Browse button, which is used to open it in the **System Browser** of Pharo (double-clicking also works). \\\nTyping in the filtering list (above the two window buttons) filters the implementations' list.\n\n### See Component users\n![contextual menu see component users](https://github.com/Eliott-Guevel/Molecule-various-fixes/assets/76944457/8a9aaa63-33f8-46ea-a638-fc896fc2a60c) \\\nWhen right-clicking a interface (that is, a Trait that uses the `MolComponentEvents`, `MolComponentParameters` or `MolComponentServices` Traits), a new option appears in the `Molecule` sub-menu (as shown above):\n\n![See component users github](https://github.com/Eliott-Guevel/Molecule-various-fixes/assets/76944457/682f388b-78a6-41d4-a3c4-2377fb7e9cf5) \\\nThe title of the window indicates the name of the Type Trait as well as the type of interfaces it is about (events, parameters or services). \\\nIn columns are shown the Type Trait requiring and offering this interface. \\\nClicking a Type Trait activates the Browse button, which is used to open it in the **System Browser** of Pharo (double-clicking also works). \\\nTyping in a filtering list (below the columns) filters the relevant Type Traits' list.\n\n## \u003cimg src=\"/resources/puce.svg\" width=\"32\" height=\"32\" align=\"bottom\"\u003e Using Components\n\n### Start and stop method\n\nComponents can be used with the start \u0026 stop method.\n\nTo start a component:\n\n```smalltalk\ncomponent := MyComponentClass start.\n```\n\nTo stop a component: \n\n```smalltalk\nMyComponentClass stop.\n```\n\nComponents can be identified with a name. To start a component with a specific name:\n\n```smalltalk\ncomponentA := MyComponentClass start: #componentA.\n```\n\nTo stop a component identified by a name:\n\n```smalltalk\nMyComponentClass stop: #componentA.\n```\n\n### Component life-cycle method\n\nComponents can be used with the life-cycle method, the two methods (start \u0026 stop, life-cycle) can be combined.\n\nStarting a component is equivalent to:\n\n```smalltalk\nMyComponentClass deploy.\ncomponent := MyComponentClass instantiate.\nMyComponentClass activate.\n```\n\nWith a name:\n\n```smalltalk\nMyComponentClass deploy.\ncomponentA := MyComponentClass instantiate: #compA.\nMyComponentClass activate: #compA.\n```\n\nStopping a component is equivalent to:\n\n```smalltalk\nMyComponentClass passivate.\nMyComponentClass remove.\nMyComponentClass undeploy.\n```\n\nWith a name:\n\n```smalltalk\nMyComponentClass passivate: #compA.\nMyComponentClass remove: #compA.\nMyComponentClass undeploy.\n```\n\n## \u003cimg src=\"/resources/puce.svg\" width=\"32\" height=\"32\" align=\"bottom\"\u003e Some examples\n\nExamples are available in the package 'Molecule-Examples'.\nOpen the Transcript before running examples, some results are showed in the Transcript window.\n\n#### Clock System example\n\n```smalltalk\nMolMyClockSystem startAlarmExample.\n```\n\nThis system uses 4 components: a server time sends global hour to a clock. The clock sends local hour to alarms and to the final user (which could be an UI). The final user can change the parameters of the system as alarm time or set a manual time for the clock. The alarm is subscribed to the clock time, and sounds when it's time.\n\nThis system provides a global example of the use of components. \n\n#### Geographical Position example\n\nExamples are further detailed in the comment of MolGeoPosExampleLauncher.\n\n1 - Start the demo: start a GPS equipment and a Map receiver (displaying result on Transcript)\n\n```smalltalk\nMolGeoPosExampleLauncher start.\n```\n\n2 - Choose between available geographical position equipments:\n\nChange the started component of MolGeoPosEquipmentType Type on the fly.\n\n```smalltalk\nMolGeoPosExampleLauncher swapGPSInaccurate.\nMolGeoPosExampleLauncher swapGSM.\nMolGeoPosExampleLauncher swapGalileo.\nMolGeoPosExampleLauncher swapWiFi.\nMolGeoPosExampleLauncher swapGPS.\n```\n\n3 - To stop the demo:\n\n```smalltalk\nMolGeoPosExampleLauncher stop.\n```\n\n## \u003cimg src=\"/resources/puce.svg\" width=\"32\" height=\"32\" align=\"bottom\"\u003e To know more...\n\nPublications related to Molecule:\n\n[Molecule: live prototyping with component-oriented programming](https://inria.hal.science/hal-02966704/)\n\n[15 Years of Reuse Experience in Evolutionary Prototyping for the Defense Industry](https://inria.hal.science/hal-02966691/preview/ICSR_15years.pdf)\n\n[Reuse in component-based prototyping: an industrial experience report from 15 years of reuse](https://link.springer.com/article/10.1007/s11334-022-00456-4)\n\n## \u003cimg src=\"/resources/puce.svg\" width=\"32\" height=\"32\" align=\"bottom\"\u003e Credits\n\n* **Pierre Laborde** - *Initial work* - [labordep](https://github.com/labordep)\n* **Eric Le Pors** - *Initial work* - [ELePors](https://github.com/ELePors)\n* **Nolwenn Fournier** - *Initial work* - [nolwennfournier](https://github.com/nolwennfournier)\n* **Alain Plantec** - *Initial work* - [plantec](https://github.com/plantec)\n* **Lisa Doyen** - *UI Components Tools* - [lisadoyen](https://github.com/lisadoyen)\n\n## \u003cimg src=\"/resources/puce.svg\" width=\"32\" height=\"32\" align=\"bottom\"\u003e License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenSmock%2FMolecule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOpenSmock%2FMolecule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenSmock%2FMolecule/lists"}