Code Monkey home page Code Monkey logo

Comments (7)

lisawray avatar lisawray commented on September 7, 2024 6

Preview version WITHOUT data binding is now available:
compile 'com.xwray:groupie:2.0.0-alpha1'

Preview version WITH data binding may take a few hours to make it to jcenter:
compile 'com.xwray:groupie-databinding:2.0.0-alpha1'

Existing code: MyItem extends Item should change to MyItem extends BindableItem.
All other references to Item and Group should be able to remain as-is.
A fun side effect of the rewrite is that you can mix binding and non-binding Items, so if you have a large RecyclerView you're thinking about switching over, you can now do it gradually.

I'm planning to cut the production build after I give them a full once over for playing nice with Kotlin, hopefully next week!

from groupie.

lisawray avatar lisawray commented on September 7, 2024 2

I'm working on this now. My current approach (so far so good) is to split the library so non-data-binding Groupie doesn't require or include it. Of course, it will be a breaking change.

I'm considering this naming convention: you pick one of

com.xwray.groupie:groupie-databinding:2.0.0 [Data binding]
or
com.xwray.groupie:groupie:2.0.0 [No data binding]

The only problem I have with this is it looks like no data binding is the default or suggested version. Obviously, all the current users use data binding and I'd hate to sow confusion (not to mention, I would like to steer undecided people to data binding as a default). I'm also considering instead something like groupie-vanilla for the non-data-binding version. Input welcome. :)

from groupie.

lisawray avatar lisawray commented on September 7, 2024 2

I refined this a little: #96

If you use Kotlin Activity Extensions, then you can use groupie without creating any view holders, just the same as data binding. I like that a lot.

Still not in love: you have to explicitly declare Item<ViewHolder>() and GroupAdapter<ViewHolder>() for the vanilla version. Continuing to think about naming to resolve the issue.

from groupie.

lkishor avatar lkishor commented on September 7, 2024

How about an interface with name ViewDataBinding, providing necessary methods on it. along with one bind(Object) method to pass data for actual binding.
So on the user's part, user now will have to create two class file per view item, one extending Item, other implementing ViewDataBinding.

from groupie.

hamen avatar hamen commented on September 7, 2024

Hi Lisa,
I completely see your point for databinding as default and I greatly appreciate your effort to provide also a non databinding version.
If your main goal is to favorite the version with databinding, having that version as default lib name makes totally sense 👍🏻
I'm pretty sure that vanilla gives enough information or creates enough curiosity to make users to check this variant.

Can't wait for a ViewHolder version to try it out in my projects 😍

from groupie.

Takhion avatar Takhion commented on September 7, 2024

Thanks @lisawray for the amazing work!!

Personally I think that the best way would be to provide the core without any data binding, and then have people that want to use it add the relative dependency. I understand that this would be a breaking change for existing users, but this is also a 2.0 version so breaking changes are kind of expected :)

from groupie.

kjones avatar kjones commented on September 7, 2024

Agree with @Takhion. @lisawray, the naming convention you listed above will work fine since it would be a breaking change anyway.

from groupie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.