cornerstone 1.1.1
cornerstone: ^1.1.1 copied to clipboard
A library written in pure dart to help devs set up dart projects with a proper architecture without having to write a lot of boilerplate code. Inspired by clean architecture.
1.1.1 24 February 2021 #
- Fix: Properly export
CornerstoneException.
1.1.0 24 February 2021 #
- New:
CornerstoneException, a common exception model to make repository layer even more decoupled. - Update: Bump
json_serializationdependency to^3.1.1
1.0.0 2 February 2021 #
- Breaking:
CornerstonePersistentRepositoryMixin'sloadData()is now removed. You just need to add dependency ofconvertToSnapshotto persistent repository withCornerstonePersistentRepositoryMixin. The mixin now handles loading data, and assigning it torepo.snapshot(Means less code to write!). The snapshot is now namedsnapshot, and declared in the mixin (you can override it). If you want to use other names for snapshot, you need to overrideload. You can overridesnapshotif you want to assign default value to it (Seeauto_persistent_people_repository.dartin example). - First stable release of cornerstone! From now on, breaking changes will only introduced with new major version.
0.1.2 20 January 2021 #
- Revert:
LocallyPersistentRepositoryis now an abstract class again. In dart, you can use an abstract class as a mixin, but you can't have your classes extends from a mixin. You can always implements a mixin, but it will lose some built-in implementation code (In this case, e.g.storageName). So by making it an abstract class again, it will give you more flexibility with nothing to give up. Therefore this revert will not breaking anything. (In case you are wondering, This is not the case withCornerstonePersistentRepositoryMixin. If I make it an abstract and extends fromLocallyPersistentRepository, then it can no longer be used as a mixin.) - Documentation:
MultipleGetterPersisitentRepositoryshould be written asCornerstonePersistentRepositoryMixinonConvertToSnapshot's dartdoc.
0.1.1 20 January 2021 #
- Breaking:
LocallyPersistentRepositoryis now a mixin. - New:
CornerstonePersistentRepositoryMixin(wasHivePersistentRepositoryMixinfor a moment in 0.1.0) to easily add persistence functionality to your repos. Made possible usingHive. - New:
Hiveas a dependency forCornerstonePersistentRepositoryMixin. - New:
ConvertExceptionToFailure. A mockable & reusable exception -> failure converter. This way if you have a lot of functions in a repo, doesn't need to keep testing each function for its error handling. - New:
CornerstoneSnapshot. You can use it as base class for your repositories. It have built-in convenience like timestamp. - New: Example project has been updated to also includes
CornerstonePersistentRepositoryMixinusage.
0.0.2 13 January 2021 #
- More consistency: Call in
UseCasenow acceptsParam paraminstead ofParams params. - More flexibility: UseCase is now declared as
UseCase<F, Type, Param>. This way, you can pick anyFailureentity you want. You can always pass the providedFailurefor convenience.
0.0.1 13 January 2021 #
- Initial release of Cornerstone