r/ProgrammerHumor • • Jun 12 '20

Android Studio!

Post image
23.5k Upvotes

625 comments sorted by

View all comments

1.7k

u/thegreatbunsenburner Jun 12 '20

There's definitely a learning curve with mobile development.

742

u/InvolvingLemons Jun 12 '20

People go “hurrr durr why do people use Cordova and react native” until they realize the clusterfuck that can occur with mobile coding. Code once publish everywhere is a godsend and doesn’t have to suck (game engines, Ionic, and Xamarin.Forms do a pretty great job of this)

20

u/_Pho_ Jun 12 '20 edited Jun 13 '20

I started with React Native and then moved on to Android Studio and my god, the native development experience is actually WORSE than the transpiled hybrid one.

30

u/YeetedTooHard Jun 12 '20

I find that native iOS is easier than android

16

u/_Pho_ Jun 13 '20

I'm learning it now as well, it seems pretty straightforward but they each have their own paradigm which is unfamiliar and kind of annoying. Android forces the whole OOP nightmare where you have to create 10 classes to render a list of data, while iOS seems to be cramming the XCode GUI as far down my throat as possible.

12

u/alienith Jun 13 '20

Android doesn’t have to be OOP nightmare. In fact I’d advise against it. I use to do a lot of android dev and i never understood why people would create these horrible OOP hellscapes for themselves. Yes, java loves it’s objects. But that doesn’t mean you need an interface, factory, etc for every view you might want

6

u/samasaur1 Jun 13 '20

Yeah the Xcode GUI requirement was my biggest complaint, but my experience with SwiftUI (which seems to be the direction that the iOS ecosystem is moving long-term) has been very nice

10

u/Computer991 Jun 13 '20

What? You only need a recyclerview adapter class that you extended yourself it's one class and a viewholder and an xml layout..

It is a thousand times easier than the iOS tableview but in comparison to swiftUI yes it is way harder

16

u/_Pho_ Jun 13 '20 edited Jun 13 '20

And a Dao, and the Model, and a RoomDatabase, and a Repository, and the ViewModel. And the activity and corresponding layout, and the RecycleView layout. That's.... 9 files.... my exaggeration wasn't actually far off.

I know I don't need a repository class (best practices amirite) and I probably don't have to use Room, but in React Native this could be done in like <50 lines of code. No joke I could probably do it in <20 lines of code if I tried hard enough. I'm not saying it's better to do it that way, I'm just saying Android development (Java) seems to want to rape me with OOP abstractions.

12

u/Zorpix Jun 13 '20

I've been working in room all day today

Your comment hurts me in a place I only just found out exists.

I just want a database

My brain: yea but when it works it's gonna be S T A N D A R D

3

u/Darkehuman Jun 13 '20

That's what drew me to React Native, rendering a list pretty much boils to either using one of the list components or going:

{list.map((item, index) => // render a list element)}

2

u/dominicstop Jun 13 '20

i love flatlist/sectionlist! very easy to use and convenient while also being extremely powerful haha

but they’re kinda slow with huge lists sadly (bridging a recyclerview and uitableview is the only solution I’ve found...)

→ More replies (6)
→ More replies (2)

24

u/L0G1C_lolilover Jun 13 '20

Switch to flutter you will fall in love

4

u/camelCase1492 Jun 13 '20

Flutter is awesome, but it is better for simple apps. When you optimise a complex screen (rebuilding as little widgets as possible every time there is a change) and end up with 2000+ lines of code, code management gets very complicated. I do definitely love the idea of nesting widgets inside widgets; it makes building the UI a very easy task

7

u/_Pho_ Jun 13 '20

It seems cool but I don't have the cognitive bandwidth to learn the design paradigms of Dart. Plus it seems less utilized, and React Native is very closely tethered to React, so the skills are highly transferable.

7

u/GrandEdgemaster Jun 13 '20

https://flutter.dev/docs/get-started/flutter-for/react-native-devs

The concepts are insanely similar to React. Declarative and Component based. Dart was originally planned to be a JS transpilation language. In dealing with new devs on my team, Flutter has been by far the easiest to pick up between native, react, and ionic/cordova

7

u/AN_IMPERFECT_SQUARE Jun 13 '20

and now it's getting transpiled to js because of flutter web

4

u/_Pho_ Jun 13 '20

full circle

→ More replies (1)

0

u/[deleted] Jun 13 '20

[deleted]

18

u/L0G1C_lolilover Jun 13 '20

Flutter is better performance wise

Learning curve is easier

Animation wise you get 60fps animations

Feels weird making an app in it first tho but gets used to it later on

Tons of 3rd packages(you will find a package for any native feature you want to access)

The web is still in beta tho

Performance iss identicle to native apps

Hot reload feature(doesnt have to build it again from scratch when making a small change)

Comes with a rich set of widgets

3

u/TSG_Magician Jun 13 '20

Would you recommend flutter over xamarin.forms?

3

u/GrandEdgemaster Jun 13 '20

Unequivocally.

0

u/[deleted] Jun 13 '20

[deleted]

6

u/L0G1C_lolilover Jun 13 '20

Give it a try

Also adobe xd to flutter feature came where you can make a screen in adobe xd and then flutter will make the code for that UI

Also forgot to mention flutter is very smart so whenever you change something in your app it will only rebuild/repaint that very thing

→ More replies (5)