infinitered / bluepotion

Like RedPotion, but for Android
MIT License
74 stars 18 forks source link

Renamed uses_xml and uses_action_bar to layout and nav_bar #7

Closed jamonholmgren closed 9 years ago

jamonholmgren commented 9 years ago

I added aliases so older code doesn't break, but I like this better. I think I'll be introducing the nav_bar one into ProMotion iOS. Related: https://github.com/clearsightstudio/ProMotion/issues/631#issuecomment-105079694

screen shot 2015-06-02 at 2 51 59 pm

GantMan commented 9 years ago

great call. This reads more like ruby to me.

darinwilson commented 9 years ago

I'm a little torn about the nomenclature changes. I see the argument for harmonization with ProMotion iOS, but worry a little a bit about going down the road for having different names for everything. A dev reviewing Android docs is going to be reading a lot about the ActionBar, and will always have to be translating that back to nav_bar when working with BP. If we have too much of that, I think it will be a barrier to adoption. We might like the naming better, but someone familiar at all with the Android API might find it off-putting.

I'm not exactly sure what the alternative is. There might not be a clean solution to this problem. :-/

jamonholmgren commented 9 years ago

I actually made the actual method name action_bar for that reason, @darinwilson. It's a fair point. nav_bar is an alias.

I wouldn't want the uses_ prefix, either way.

I'm going to keep working on this and see what makes sense. I think onboarding will happen more often from iOS to Android, rather than vice versa, so it's a consideration. ProMotion is intended to make onboarding easy, and so the API reflects that, rather than strict adherance to the terminology. Even nav_bar in iOS actually refers to a NavigationController instead of a NavigationBar. But since that's what people think of when they want a NavCon, I called it nav_bar. :-)

darinwilson commented 9 years ago

Yep, that's totally reasonable.

Naming things...so damn hard... :)

jamonholmgren commented 9 years ago

I love naming things...but then people come in with annoyingly reasonable reasons it won't work. haha!

twerth commented 9 years ago

I'll chime in, I don't like layout here, too broad. Can we do xml_layout or something?

GantMan commented 9 years ago

:+1:

jamonholmgren commented 9 years ago

screen shot 2015-06-02 at 7 48 06 pm

jamonholmgren commented 9 years ago

I can live with that.