Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PurplePotion #53

Open
pickhardt opened this issue Jul 28, 2015 · 4 comments
Open

PurplePotion #53

pickhardt opened this issue Jul 28, 2015 · 4 comments
Labels

Comments

@pickhardt
Copy link

Just gonna throw this out there, I'm sure you guys have a lot on your plate already, but it'd be cool if there were something like "PurplePotion" that served as an API into both Android and iOS.

So that you could do stuff like

PurplePotion.contacts.each do |contact|
  my_contacts << [contact.phone, contact.name]
end

And it just worked with either iOS or Android.

@darinwilson
Copy link
Member

We've actually talked about it, and I'm sure something like it will happen at some point, most likely as a layer on top of RedPotion and BluePotion. But I don't think we'll be doing any work on it anytime soon, for two main reasons:

  1. We've still got a lot of work to do on BluePotion, just to get it to the point where it has the same power and ease you get with RedPotion.

  2. I think something like PurplePotion would only work for a small subset of apps that have fairly simple UIs. The problem with any "write once, run everywhere" solution is that you have to reduce things to the lowest common denominator. iOS and Android are very different platforms - they have different strengths and weaknesses, and very different expectations from users. I think it would be really difficult to create a single API that you could use to build apps that truly felt native on each platform. I'm sure it's possible, but it would be really hard, and you'd have to make all kinds of difficult choices of what not to support on each platform.

That's just my 2p - others would probably disagree. But it's all open-source, so if anyone wants to take a crack at it, I'd love to see what they come up with :)

@jamonholmgren
Copy link
Member

Darin's right, and the biggest thing right now is to see how closely we can align RedPotion and BluePotion's APIs. There are some things we've been able to get surprisingly close, and others that will require more work.

Even if a PurplePotion simply exposes the common interfaces and provides affordances for dealing with the differences in an elegant way, that would be a big win.

If I had to guess, I'd say BluePotion will be in a very good place by next #inspect, and we'll be able to take this idea out of dreaming stage.

@GantMan
Copy link
Member

GantMan commented Jul 30, 2015

Agreed. We're finding the spots where we can make app API perfectly aligned, and spots where it's surprisingly different. More than PurplePotion, we can make cross-platform gems be the basis of both. A layer under is easier than a layer above.

@mixflame
Copy link
Contributor

I don't think it can be done because it makes more sense in a lot of places to speak the native language of the platform. But in all other places being cross platform 100% is ideal. IF PurplePotion can be done right though, I would use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants