Skip to content

EventBus instead of AsyncTasks#18

Open
tajchert wants to merge 1 commit intoMariuxtheone:masterfrom
tajchert:featureBus
Open

EventBus instead of AsyncTasks#18
tajchert wants to merge 1 commit intoMariuxtheone:masterfrom
tajchert:featureBus

Conversation

@tajchert
Copy link
Copy Markdown

I replaced AsyncTaks with EventBus ( 🚌 ) that allows to achieve same results with 30% less code in library and 30% less code in the sample, and (for me at least) it is way more clear/easy to work.

I have also updated README file to describe EventBus - it is not ready to be merged (it was done for fork), so README file for sure needs to be changed, or use branch "bus" which does include old README file.

Please lets use that thread to discuss disadvantages of such solution, as I may be missing something. Also I do understand the point that such change is radical and will make all code not supporting newer versions of Teleport without some change.

@thedamfr
Copy link
Copy Markdown
Contributor

I like the idea of using an eventbus. I would have rather used Otto I think, but I've nothing against this one.
Using a bus is more suited if your application is going to be rather heavy or entreprise-sized.
But callbacks and AsyncTask are still useful, quick and easy to understand on a light project.

All in all, I think this lib should be built on a bus and still offer callbacks for easy use.

Also this is a big change. This could be a whole new library ^^

About the pull-request in itself, the code is clear since very light weighted. There is still a little bit of work required to polish the readme before merging.

@nessup
Copy link
Copy Markdown

nessup commented Feb 28, 2015

+1, this is an awesome idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants