{"id":18332040,"url":"https://github.com/mrousavy/jellyfish","last_synced_at":"2025-10-08T16:13:52.410Z","repository":{"id":33953501,"uuid":"133227679","full_name":"mrousavy/Jellyfish","owner":"mrousavy","description":"🐟 An incredibly lightweight and type safe MVVM library for .NET WPF, Silverlight, Xamarin and UWP","archived":false,"fork":false,"pushed_at":"2022-12-08T00:58:14.000Z","size":1293,"stargazers_count":20,"open_issues_count":3,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-02T00:59:18.303Z","etag":null,"topics":["csharp","dotnet","enum","fish","jellyfish","library","light","modern","mvvm","notifying-properties","preferences","silverlight","uwp","wpf","xamarin"],"latest_commit_sha":null,"homepage":"","language":"C#","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/mrousavy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"mrousavy","ko_fi":"mrousavy","custom":["https://paypal.me/mrousavy"]}},"created_at":"2018-05-13T10:42:47.000Z","updated_at":"2023-03-12T09:02:06.000Z","dependencies_parsed_at":"2023-01-15T03:34:51.069Z","dependency_job_id":null,"html_url":"https://github.com/mrousavy/Jellyfish","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrousavy%2FJellyfish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrousavy%2FJellyfish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrousavy%2FJellyfish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrousavy%2FJellyfish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrousavy","download_url":"https://codeload.github.com/mrousavy/Jellyfish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430838,"owners_count":20937873,"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":["csharp","dotnet","enum","fish","jellyfish","library","light","modern","mvvm","notifying-properties","preferences","silverlight","uwp","wpf","xamarin"],"created_at":"2024-11-05T19:37:03.270Z","updated_at":"2025-10-08T16:13:47.362Z","avatar_url":"https://github.com/mrousavy.png","language":"C#","funding_links":["https://github.com/sponsors/mrousavy","https://ko-fi.com/mrousavy","https://paypal.me/mrousavy","https://ko-fi.com/F1F8CLXG'"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/mrousavy/Jellyfish/raw/master/Images/jellyfish.png\" height=\"120\" /\u003e\n  \u003ch3 align=\"center\"\u003eJellyfish\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n\t\u003ca class=\"badge-align\" href=\"https://www.codacy.com/app/mrousavy/Jellyfish?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=mrousavy/Jellyfish\u0026amp;utm_campaign=Badge_Grade\"\u003e\u003cimg src=\"https://api.codacy.com/project/badge/Grade/b677d8c1fa194835b42b7b6266a39b6b\"/\u003e\u003c/a\u003e\n\t\u003ca href=\"https://ci.appveyor.com/project/mrousavy/jellyfish/\"\u003e\u003cimg src=\"https://ci.appveyor.com/api/projects/status/o7nxq777rlqmr082?svg=true\" alt=\"AppVeyor badge\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://www.nuget.org/packages/Jellyfish/\"\u003e\u003cimg src=\"https://img.shields.io/nuget/dt/Jellyfish.svg\" alt=\"NuGet downloads badge\"\u003e\u003c/a\u003e\n\t\u003cbr/\u003e\n\t\u003ca href='https://ko-fi.com/F1F8CLXG' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi2.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\t\u003ch3 align=\"center\"\u003e🐟\u003c/h3\u003e\n  \u003c/p\u003e\n  \u003cblockquote align=\"center\"\u003e\n  \t\u003cp align=\"center\"\u003e\n  \t\tAn incredibly \u003cstrong\u003elight\u003c/strong\u003e and type safe \u003cstrong\u003eMVVM library\u003c/strong\u003e for .NET WPF, Silverlight, Xamarin and UWP\n\t  \u003c/p\u003e\n  \u003c/blockquote\u003e\n\u003c/p\u003e\n\nJellyfish is on [NuGet](https://www.nuget.org/packages/Jellyfish/):\n```pm\nPM\u003e Install-Package Jellyfish\n```\n\n\u003e Make sure to also check out the [**Jellyfish Visual Studio Extension 📦**](https://github.com/mrousavy/Jellyfish/wiki/Jellyfish-VSIX)!\n\nCompared to other **MVVM Frameworks** like [MVVM Light](http://www.mvvmlight.net/), [Prism](https://github.com/PrismLibrary/Prism) or [Caliburn.Micro](https://caliburnmicro.com/), this framework is\n* as light as possible\n* using modern best-practices\n* using modern code style\n* using little to no runtime reflection to be as fast as possible\n* exactly fitting my needs\n\n\n# Usage\n\nFor description, documentation and usage, please view the [Jellyfish wiki 📖](https://github.com/mrousavy/Jellyfish/wiki) or the [Getting Started guide 📖](https://github.com/mrousavy/Jellyfish/wiki/Getting-started). For usage-example projects, please see [Jellyfish.Demo](https://github.com/mrousavy/Jellyfish/tree/master/src/Jellyfish.Demo) or [GameFinder](https://github.com/mrousavy/GameFinder).\n\n## 📝 View Models\n\nEvery **ViewModel** needs to implement the [`ViewModel`](https://github.com/mrousavy/Jellyfish/blob/master/src/Jellyfish/ViewModel.cs) class:\n\n```cs\npublic class LoginViewModel : ViewModel\n{\n    private User _user;\n    public User User\n    {\n        get =\u003e _user;\n        set =\u003e Set(ref _user, value);\n    }\n}\n```\n\n\u003e See [View Models 📖](https://github.com/mrousavy/Jellyfish/wiki/📝-View-Models)\n\n## ⚡ Commands\nThe [`RelayCommand`](https://github.com/mrousavy/Jellyfish/blob/master/src/Jellyfish/RelayCommand.cs) is an [`ICommand`](https://msdn.microsoft.com/en-us/library/system.windows.input.icommand(v=vs.110).aspx) implementation.\n\n```xaml\n\u003cWindow ...\u003e\n    \u003cButton Command=\"{Binding LoginCommand}\" /\u003e\n\u003c/Window\u003e\n```\n\nInitialize the `ICommand` with a non-generic `RelayCommand` instance and the given action/callback:\n```cs\nICommand LoginCommand = new RelayCommand(LoginAction, CanLogin);\n// ...\nvoid LoginAction(object parameter)\n{ ... }\nbool CanLogin(object parameter)\n{ ... }\n```\n\n\u003e See [Commands 📖](https://github.com/mrousavy/Jellyfish/wiki/⚡-Commands)\n\n## 💉 Dependency Injection\nProvide dependencies for types using the [`IInjector`](https://github.com/mrousavy/Jellyfish/blob/master/src/Jellyfish/DependencyInjection/IInjector.cs)\n\nAt app startup:\n```cs\nInjector.Register\u003cIUser\u003e(() =\u003e new User(\"John\", \"Smith\"));\nInjector.Register\u003cIDatabaseService\u003e(() =\u003e OpenDatabaseService(username, password));\n```\nSome ViewModel:\n```cs\nclass LoginViewModel : ViewModel\n{\n    IUser User { get; set; }\n    IDatabaseService _service;\n\n    LoginViewModel()\n    {\n        this.Inject();\n    }\n}\n```\n\n\u003e See [Dependency Injection 📖](https://github.com/mrousavy/Jellyfish/wiki/%F0%9F%92%89-Dependency-Injection)\n\n## 💾 Enums\nThe enum binding source extension allows for better binding support on enums.\n\nJust use the [`EnumBindingSource` extension](https://github.com/mrousavy/Jellyfish/blob/master/src/Jellyfish/Extensions/EnumBindingSourceExtension.cs) to bind an enum to any `ItemsSource`:\n```xaml\n\u003cComboBox ItemsSource=\"{Binding Source={jellyfish:EnumBindingSource {x:Type local:Status}}}\"\n\t  SelectedItem=\"{Binding SelectedStatus}\" /\u003e\n```\n\n\u003e See [Enums 📖](https://github.com/mrousavy/Jellyfish/wiki/💾-Enums)\n\n## ⚙️ Preferences\nAn abstract class definition for any application [`Preferences`](https://github.com/mrousavy/Jellyfish/blob/master/src/Jellyfish/Preferences.cs).\n\n```cs\npublic class DemoPreferences : Preferences\n{\n    public int SomeInt { get; set; } = 400;\n    public string SomeString { get; set; } = \"test string\";\n    public bool SomeBool { get; set; } = false;\n\n    public object SomeObject { get; set; } = new\n    {\n        Name = \"Marc\",\n        IsValid = true\n    };\n}\n```\n\n\u003e See [Preferences 📖](https://github.com/mrousavy/Jellyfish/wiki/⚙️-Preferences)\n\n## 🔔 Feeds\nThe [`IFeed\u003cT\u003e`](https://github.com/mrousavy/Jellyfish/blob/master/src/Jellyfish/Feeds/IFeed.cs) allows notifying any subscribers in this feed about sudden changes within the application domain in realtime.\n\n```cs\nclass CustomViewModel : INode\u003cNotifyReason\u003e\n{\n    public CustomViewModel\n    {\n        this.Subscribe();\n    }\n\n    public void MessageReceived(NotifyReason reason)\n    { ... }\n}\n\nFeed.Notify(NotifyReason.RefreshView);\n```\n\n\u003e See [Feeds 📖](https://github.com/mrousavy/Jellyfish/wiki/🔔-Feeds)\n\n\n# Results\n### With Jellyfish\n```cs\npublic class LoginViewModel : ViewModel\n{\n    private User _user;\n    public User User\n    {\n        get =\u003e _user;\n        set =\u003e Set(ref _user, value);\n    }\n}\n```\n\n### Without Jellyfish\n```cs\npublic class LoginViewModel : INotifyPropertyChanged\n{\n    public event PropertyChangedEventHandler PropertyChanged;\n\n    protected virtual void OnPropertyChanged(string propertyName)\n    {\n          PropertyChangedEventHandler handler = PropertyChanged;\n          if (handler != null)\n          {\n              handler(this, new PropertyChangedEventArgs(propertyName));\n          }\n    }\n\n    private string _username;\n    public string Username\n    {\n        get\n\t{\n\t    return _username;\n\t}\n\tset\n\t{\n\t    _username = value;\n\t    OnPropertyChanged(\"Username\");\n\t}\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrousavy%2Fjellyfish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrousavy%2Fjellyfish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrousavy%2Fjellyfish/lists"}