https://github.com/giuseppenovielli/mvvmcrud
MvvmCrud helps your Xamarin.Forms/MAUI app to standardize operations of creating, updating, deletion and display data, from REST API.
https://github.com/giuseppenovielli/mvvmcrud
crud-api crud-application crud-operation csharp maui maui-app maui-apps mvvm-architecture mvvm-pattern prismlibrary xamarin xamarin-forms
Last synced: about 1 month ago
JSON representation
MvvmCrud helps your Xamarin.Forms/MAUI app to standardize operations of creating, updating, deletion and display data, from REST API.
- Host: GitHub
- URL: https://github.com/giuseppenovielli/mvvmcrud
- Owner: giuseppenovielli
- License: mit
- Created: 2022-09-17T10:58:18.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-12T16:03:08.000Z (over 2 years ago)
- Last Synced: 2025-05-14T17:14:32.192Z (about 1 month ago)
- Topics: crud-api, crud-application, crud-operation, csharp, maui, maui-app, maui-apps, mvvm-architecture, mvvm-pattern, prismlibrary, xamarin, xamarin-forms
- Language: C#
- Homepage:
- Size: 843 KB
- Stars: 13
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# MvvmCrud
MvvmCrud helps your Xamarin.Forms/MAUI app with Prism Library to standardize operations of creating, updating, deletion and display data, from REST API.| | Preview | Stable |
|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| Xamarin.Forms_5 | [](https://www.nuget.org/packages/MvvmCrud.Forms.Prism/) [](https://www.nuget.org/packages/MvvmCrud.Forms.Prism/) | |
| MAUI_NET7 | [](https://www.nuget.org/packages/MvvmCrud.Maui.Prism/) [](https://www.nuget.org/packages/MvvmCrud.Maui.Prism/) | |## Example
https://user-images.githubusercontent.com/42063890/224556865-b7906fe4-2a24-4a47-a40a-bd081f7c4a57.mp4
## How it works
This framework standardize CRUD's operations into ViewModel's file using generic T type, endpoint's requests and fully customizable.
*The target is WRITE LESS CODE, STANDARDIZING THE MOST USED UI CRUD OPERATIONS, IMPROVE PRODUCTIVITY SPEED.*
Only with these following lines of code your page can:
- Display list of data
- Embedded custom message, if endpoint fails
- Embedded pagination's manager
- Embedded Perform searchs
- Embedded deletion cell's content, with automatic detect endpoint and confirm message
- Embedded update cell's content, with automatic: detect endpoint, open page, save, upload and update list's cell
- Embedded open detail's page
- Embedded empty view UI
- Embedded loadig more view UIAll fully customizable!
```
namespace MVVMCrud.Example.ViewModels.Post
{
public class PostPageViewModel : BaseListPaginationAdvancedViewModel
, PostItem>
{
public PostPageViewModel(
INavigationService navigationService,
IRequestService requestService) : base(navigationService, requestService)
{
}public override string SetupEndpoint() => Constants.Constants.METHOD_POST;
public override async void AddNewItem(PostItem item)
{
SetupAddItemMessage();
await SetupGetItems();
}public override async void UpdateEditItem(NewEditItem newEditItem)
{
SetupEditItemMessage();
await SetupGetItems();
}public override List PerformSearchSetup(string newText) => ItemsList.Where(x => x.Item.Title.Contains(newText.ToLower())).ToList();
#region DetailPage
public override string SetupDetailPageName(PostCellViewModel obj) => nameof(CommentPage);public override bool IsDetailPageWithHeader(PostCellViewModel obj) => true;
#endregion}
}
```## Docs
- Clone this repository and check app's example. App's example use the follow endpoint https://jsonplaceholder.typicode.com/ to test functionality.
- Go to [Wiki](https://github.com/giuseppenovielli/MvvmCrud/wiki) page. (Under construction)## Feedback or Requests
Use GitHub [Issues](https://github.com/giuseppenovielli/MvvmCrud/issues) for bug reports and feature requests.Use GitHub [Discussios](https://github.com/giuseppenovielli/MvvmCrud/discussions) for questions or opinions.
## Disclaimer
This is at the moment an experiment. Use at your own risk.
## Copyright and license
Code released under the [MIT license](https://opensource.org/licenses/MIT).## Did you like ?
[Buy Me A Coffee](https://www.buymeacoffee.com/giuseppeDev)