Comments (21)
+1
from parceler.
Fantastic idea guys. I actually started working on this a few weeks ago after IcePick integration was closed. How does "Bundler" sound for a library name? https://github.com/johncarl81/bundler. I decided to make this a new library to keep Parceler small and focused on a single problem.
By the way, the functionality that IcePick offers exists in Transfuse right now under the @NonConfigurationInstance
annotation http://johncarl81.github.io/transfuse/documentation.html#nonconfigurationinstance. So, if you're a user of Transfuse you already should have this available.
Also you will find Parceler integrated with Transfuse via the @Extra
injections http://johncarl81.github.io/transfuse/documentation.html#extra.
Along the same lines, @f2prateek was gratious enough to accept my PR to integrate Parceler with android-dart: https://github.com/f2prateek/android-dart.
Lots of activity in this direction. Lets do it!
from parceler.
Bundler sounds good to me.
I kind of had a feeling I read about a similar feature in transfuse.
Seems it doesn't work for fragments yet, though - johncarl81/transfuse#115.
Once it does, I'll switch from Icepick to @NonConfigurationInstance.
I'll take a look if t his is something I can implement myself an create a pull request. Not sure if I can do it today, though.
from parceler.
There's like 3 implementations the same idea: Dart, Icepick, Bundler. Which one is compatible with Parceler?
from parceler.
Dart is compatible with Parceler, Bundler will be (that's my implementation). Icepick is not directly compatible unless you rely on Parceler's generated code.
from parceler.
Is bundler functional? I've checked the readme but it only has license and nothing else....
from parceler.
Bundler is a work in progress, and is missing some key components currently. Stay tuned!
from parceler.
@johncarl81 maybe Bundler is confusing, having Ruby's Bundler going around. What will this library do?
from parceler.
@mdumrauf, This library will do butter-knife style injection of Bundle-able properties, automatically handling @Parcel
wrapping/unwrapping, like so:
class ExampleActivity{
@InjectExtra("one") int one;
@InjectExtra("two") ParcelExample two;
}
@Parcel class ParcelExample{/*...*/}
Yes, this collides with the ruby library... do you have a name suggestion?
from parceler.
Hmm..maybe extractifier? I'm no good at naming. Btw, have you checked this very same feature done in android annotations? https://github.com/excilys/androidannotations/wiki/Extras
from parceler.
@mdumrauf, yes, the idea is to inject/pull extras from annotated fields just like AndroidAnnotations does with two differences: 1. Support Parceler transparently, 2. Not require the bean to be "enhanced".
By the way, Transfuse implements extra injection that transparently supports Parceler:
http://androidtransfuse.org/documentation.html#extra
from parceler.
Hmm, how about Android Arguments?
from parceler.
Is there any interest in a fork of Icepick with Parceler support? Im considering releasing it on Maven central: https://github.com/johncarl81/icepick/tree/parceler_support
from parceler.
Is there any interest in a fork of Icepick with Parceler support?
Would be great
from parceler.
+1
from parceler.
Yes
On Thu, Feb 26, 2015, 8:48 AM Pedro Paulo de Amorim <
[email protected]> wrote:
+1
—
Reply to this email directly or view it on GitHub
#36 (comment).
from parceler.
+1
from parceler.
+1
from parceler.
+1
from parceler.
I decided to roll my own Ickpick. It is written from scratch and works perfectly with Parceler, please take a look here.
One of the more unique feature of my library is that it supports a pluggable compile-time code generation system. The parceler support is done with ONLY the following lines:
@TransformationTemplate(
save = @StatementTemplate("{{bundle}}.putParcelable({{keyName}}, org.parceler.Parcels.wrap({{fieldName}}))"),
restore = @StatementTemplate(type = Type.ASSIGNMENT,
value = "org.parceler.Parcels.unwrap({{bundle}}.getParcelable({{keyName}}))",
variable = "{{fieldName}}"),
filters = {@TypeFilter(type = @TypeConstraint(type = Parcel.class))}
)
from parceler.
Awesome work @tom91136!
from parceler.
Related Issues (20)
- Ability to treat reflection warnings as errors HOT 5
- Parceler fails when used with with Lifecycle-viewmodel 2.2.0 HOT 7
- Facing Vulnerabilities in parceler library HOT 1
- Facing Vulnerabilities in parceler library HOT 1
- Polymorphism documentation not updated? HOT 6
- Cannot get working with navigation graph HOT 1
- Crashing on background HOT 4
- ParcelAnnotationProcessor.process take lot amount of time. HOT 15
- Unable to find generated Parcelable class HOT 1
- error: Parceler: Code generation did not complete successfully. HOT 47
- Cant find class to parcel ! HOT 1
- Can't generate code HOT 3
- Unable to Marshall with Parceler HOT 2
- Errors in HashMap$$PackageHelper HOT 3
- cannot running with kapt HOT 1
- Parceler: Code generation did not complete successfully. org.parceler.transfuse.transaction.TransactionRuntimeException: Encountered ErrorType <error>, unable to recover HOT 4
- [Request Feature] Support for Kotlin Symbol Processing
- Parceler code generation fails on AS 2023.3.1
- Getters and Setter Alphabetically Order for Write and Read
- Not sure how to convert a Cursor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parceler.