brianegan / scoped_model

A Widget that passes a Reactive Model to all of it's children
BSD 3-Clause "New" or "Revised" License
774 stars 76 forks source link

Deprecate ScopedModel? #86

Open brianegan opened 5 years ago

brianegan commented 5 years ago

Hey all! This might be a big change, but I think it might be the right time.

Scoped Model is a great library and a lot of folks have found success with it. However, it has largely been eclipsed by the Provider package. In many ways, you can think of Provider as Scoped Model version 2: It includes the same functionality, but extends that functionality in really nice ways.

At this point, I think it might make sense to deprecate this library so it no longer appears in the search results of pub.dev and encourage folks to migrate to Provider. The library will still be available to projects that reference Scoped Model, so you shouldn't have any disruptions for projects that currently use it or need to import it from Pub.dev.

Would love any thoughts from folks in the community before making such a drastic change!

callumclift commented 4 years ago

I'm currently due to release my first Flutter app soon and that relies completely on ScopedModel. If this is deprecated does this mean potentially with future Flutter upgrades you will no longer support any required changes and my app could at some point stop working?

Looks like I will have to look into Provider for my next project. I'm hoping a potential migration from ScopedModel to Provider wouldn't be too difficult!

brianegan commented 4 years ago

I'm currently due to release my first Flutter app soon and that relies completely on ScopedModel. If this is deprecated does this mean potentially with future Flutter upgrades you will no longer support any required changes and my app could at some point stop working?

Yep, that's exactly right. It will be deprecated and should continue to work for Flutter at the moment, but if there is a large breaking change to Flutter, this project would not be updated to fix those changes.

Migrating to Provider should be quite straight-forward. Please see this example in another discussion of the changes that need to be made: https://github.com/brianegan/scoped_model/issues/61#issuecomment-489218416

deandreamatias commented 4 years ago

Hi Brian, I have all of my projects with Scoped Model, but I would like to migrate para Provider and this 'issue' drives me to do it. I have a litle convern about Provider and your breakchanges (hi Angular). The actual version is 4.0.0 with one year of project. But I support the project being depreciated.

kasbst commented 4 years ago

Same here. I have all of my projects with ScopedModel. Migration to Provider will take me a while, but I definitely support the ScopedModel to be deprecated in the future.

EDIT: But I have to add, that I totally love ScopedModel because of its simplicity. It's totally easy to use and powerful even for complex applications. I never needed to use BLoC pattern or anything different just because ScopedModel is totally sufficient!

So, I hope that migration to Provider will be pretty straight-forward as already mentioned above.

EDIT2: @brianegan It would be perfect if ScopedModel remains maintained at least until the end of 2020. That would be totally safe timeline for migration considering our workload. Thanks!!

GrahamDi commented 4 years ago

@brianegan I am heavily dependent on scoped_model in quite a major commercial app that is about to go live so I will need a smooth transition when you deprecate the package. Will there be comprehensive documentation provided on how best to migrate to Provider?

With Flutter becoming more mainstream, there are people building stuff for the enterprise and using packages and tools provided (sorry) by clever people like yourself. However, we need to feel confident that we are not painting ourselves into a corner when we make use of packages fundamental to the apps we write.

Would appreciate your views on this.

deandreamatias commented 4 years ago

@GrahamDi The pub.dev constantly tries to get support for yours packages, for example with Favorite Flutter or verified editors. @brianegan is an independent developer who collaborates with the community with this package. He is not paid to give guarantees. That and other things of open source packages must be consider when choosing a package for a production app. About provider, if you study it you can see that it is not very different from the concept of scoped model and can be easily applied. Good luck

ninnepinne commented 4 years ago

@GrahamDi I recently ported a decent sized commercial app from ScopedModel to Provider.

  1. Read up on Provider.
  2. Google some examples of porting.
  3. Mostly use search and replace on your code base (yes, it is that easy).
  4. Apply optimisations/code improvements enabled by Provider (optional)

It took me approximately 2 days. Good luck!

deandreamatias commented 4 years ago

@GrahamDi I recently ported a decent sized commercial app from ScopedModel to Provider.

  1. Read up on Provider.
  2. Google some examples of porting.
  3. Mostly use search and replace on your code base (yes, it is that easy).
  4. Apply optimisations/code improvements enabled by Provider (optional)

It took me approximately 2 days. Good luck!

Very nice :D I started the same in my app but dont finish yet. In addiction try apply injection dependency with provider and other things to improve my app

brianegan commented 4 years ago

Thanks so much for the feedback, everyone! Really appreciate the perspective from folks using this library :)

I'll plan on supporting ScopedModel for the rest of the year, and I'll look to see if I can write a codemod that will perform the upgrade from Scoped Model to ChangeNotifier / Provider automatically for you. This should make moving from Scoped Model to provider much simpler!

GrahamDi commented 4 years ago

@brianegan Thanks a lot. A codemod would be much appreciated :-)

lukepighetti commented 3 years ago

@brianegan instead of deprecating scoped_model, I would be interested in taking over the repo and pub.dev. This pattern is too powerful to let it go away, and there are even rumblings about provider being deprecated in favor of riverpod. I doubt that will happen, but I think it's important to not expect the migration path to be so clear cut in the future.

larssn commented 2 years ago

riverpod doesn't have scopes due to the obsession with eliminating runtime exceptions...

Anyway, this library is ultra simple, and the saying goes: "Simplicity is the ultimate sophistication". So while provider might be able to do more, you might also get more than you need with that package.

So I'd vote for keeping it alive.

icnahom commented 2 years ago

Here's my shot at a "Rebirth" of ScopeModel https://github.com/icnahom/scoped_model

GrahamDi commented 2 years ago

Interesting...thanks for this...still using scoped model in my app so will try your version out...very happy that it still has life :-)

Krgrds, Graham

On Thu, Jun 30, 2022, 17:31 icnahom @.***> wrote:

Here's my shot for a "Rebirth of ScopeModel" https://github.com/icnahom/scoped_model

— Reply to this email directly, view it on GitHub https://github.com/brianegan/scoped_model/issues/86#issuecomment-1171365265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVES4EIQSI6MC3URES4CCDVRW4URANCNFSM4JBXYC2A . You are receiving this because you were mentioned.Message ID: @.***>

brianegan commented 2 years ago

Hey all, thanks for the feedback.

I’d ask to hold off on forking this library for now unless you really want to take it in a new direction, in which case I’d recommend giving the library a new name.

it would be better to onboard you as a new maintainer if you’re interested.

Pub.dev is already very fractured and this library has provided support for all versions of Flutter for a very long time (including the latest versions) with a perfect pana score.

While we may not add new features… that in itself is a major bonus for some folks.

On Thu, Jun 30, 2022 at 5:40 PM GrahamDi @.***> wrote:

Interesting...thanks for this...still using scoped model in my app so will try your version out...very happy that it still has life :-)

Krgrds, Graham

On Thu, Jun 30, 2022, 17:31 icnahom @.***> wrote:

Here's my shot for a "Rebirth of ScopeModel" https://github.com/icnahom/scoped_model

— Reply to this email directly, view it on GitHub < https://github.com/brianegan/scoped_model/issues/86#issuecomment-1171365265 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AHVES4EIQSI6MC3URES4CCDVRW4URANCNFSM4JBXYC2A

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/brianegan/scoped_model/issues/86#issuecomment-1171375679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA65DCOM7EYI7SEIRHTXS3VRW5XNANCNFSM4JBXYC2A . You are receiving this because you were mentioned.Message ID: @.***>

icnahom commented 2 years ago

Hey Brian, it's nice hearing from you!

Do you think we should avoid making changes like renaming ScopedModelDescendant to the now very familiar way of naming Builders - a ScopedBuilder?

icnahom commented 2 years ago

Here's my shot at a "Rebirth of ScopeModel" https://github.com/icnahom/scoped_model

The new features is ScopedContainer. The way ScopedContainer works has been in the armadillo source code. It's not that sophisticated to be considered a big feature.

lukepighetti commented 2 years ago

it would be better to onboard you as a new maintainer if you’re interested.

My concern in becoming a maintainer of brianegan/scoped_model is that you'll be too busy to push up releases to pub.dev

brianegan commented 2 years ago

From my perspective, I think it makes sense to bring In the new features from the Armadillo library since this was a port out of the Google repo. The only code I really added was tests to ensure everything worked as expected.

I also think API stability is more important than renames, since this library has been essentially unchanged for 5 years and continues to do the job. If you want renames, I think provider might make more sense? Again, this is just my opinion.

With regards to pushing more often, I’m happy to move this library over to the flutter community where we can invite more folks to maintain the repo and push to pub.dev.

Apologies for the short responses, on the last days of vacation, but happy to hear what you all think as well.

On Fri, Jul 1, 2022 at 7:58 PM Luke Pighetti @.***> wrote:

Hey all, thanks for the feedback. I’d ask to hold off on forking this library for now unless you really want to take it in a new direction, in which case I’d recommend giving the library a new name. it would be better to onboard you as a new maintainer if you’re interested. Pub.dev is already very fractured and this library has provided support for all versions of Flutter for a very long time (including the latest versions) with a perfect pana score. While we may not add new features… that in itself is a major bonus for some folks. … <#m7089176748146218621>

My concern in becoming a maintainer of brianegan/scoped_model is that you'll be too busy to push up releases to pub.dev

— Reply to this email directly, view it on GitHub https://github.com/brianegan/scoped_model/issues/86#issuecomment-1172585632, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA65DBGXP3OUMA5U3JMIQ3VR4WVFANCNFSM4JBXYC2A . You are receiving this because you were mentioned.Message ID: @.***>