iOS Development is Easier than Android Development (VLOG)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to another one of my vlogs and into this vlog i'm going to talk about why i think ios development is easier as compared to native android development i'm going to talk about my experiences with swift this week with swift ui more specifically do some you know i'm going to do a little bit of a code demo show you some code show you why i think ios development is easier and then i'm going to talk about kotlin multi-platform and more specifically kotlin multi-platform mobile so that's a totally different thing there's kotlin multi-platform we call it multi-platform mobile i'm going to explain the differences and also if you don't know what column multiplatform is i'll explain that too in this video so don't worry i'm going to explain it all it's going to be a good vlog i encourage you to watch this one because there's some great perspectives from me who is a native android developer the native android developer my first experiences with swift and you know kmm obviously so let's get into the video so now why do i think ios development is easier than native android development well i think that there's two perspectives that you sort of need to look at this through the lens of the first perspective is if you're a beginner and the second perspective is if you're sort of a more advanced developer you are a senior level sort of android developer so i think that if you are a senior level android developer when you if you were just to start picking up swift i don't think that it would necessarily be you know quote-unquote easier than android development i think that um as a senior level developer they would probably be quite comparable i think the real difference here is in the realm of beginners if you're a beginner and you are first learning android development or i guess you have a choice of like learning android development or learning swift development or ios development 100 ios development is going to be far far easier for you to learn and i think there's a lot of different reasons for this and i'll kind of i came up with a bunch of reasons but i'm sure there's you know way more reasons but i'll come up with some that really the reasons that point to why android development is difficult and these are things that if you're a senior developer you've solved these problems you know if you're a senior native android developer you know the solutions to these problems so they're no big deal to you and if you were to move to ios development there would be no problem because these problems don't exist but if you're a beginner there's these things i think you would really get hung up on or there's a high probability that you would get hung up on these things so the number one reason here that i have is the that android studio does random things like gives random errors depending on certain system conditions that are really vague and they're hard to solve especially when it comes to gradle you know i can't tell you the amount of times that i've opened android studio or opened a project from git or opened something and i got some random gradle issue or android studio issue and it was really difficult to figure out as a as someone who spent you know thousands of hours in android studio i always end up figuring it out but if you're a beginner especially if you're like a new coder this is these are things that you just won't get around you you will probably get frustrated and quit honestly like i could definitely see that happening with swift with xcode these things just almost never happen my first experiences with xcode were great i opened it up and i started coding and it did exactly what it was supposed to do there's mostly one import that you use when i was using swift ui of course there's more imports as your project grows but as you're just starting there's really one import and that's it things just generally work the second point here is dependency conflicts so if you're an android developer you know that we love to use third-party libraries retro fits dagger hilt coin coding uh volley i'm just trying to come up with whatever i can think of glide picasso all kinds of libraries and even just like the internal dependencies for the android components themselves the stuff that google makes there's all kinds of different imports material constraint layout recycler view all of these dependencies need to get added into your project with swift and swift ui like i said there's like one import that you use i i very rarely can see or i mean i mean i've talked to ios developers and they say that it's it's more of the exception rather than the rule for you to use third-party libraries in your application and not even just like the fact that you you're using all these third-party libraries on android a lot of them don't work well together or they're they're not meant to work together like you might have constraint layouts version 1.2.3 i'm just picking up random numbers here and then that one doesn't work with material 1.7.2 but it works with 1.7.3 or whatever there's all these like sort of random conflicts that you can very easily get hung up on and if you're a beginner the error message that you see from those conflicts is probably not going to be very helpful so as a beginner another one that would sort of shut you down pretty quickly is these dependency conflicts again as a you know a guy who spent thousands of hours in android studio i can usually figure it out pretty quickly but as a beginner not so much also actually regarding dependencies and libraries and things like that um you know i have to say the android studio or the android documentation has improved drastically over even the last you know four years i think i've been doing android development for like five years and i can remember back like what the docs were like before and they have i don't know they've easily doubled tripled quadrupled in quality over this this five year span i would say so like they're they're getting better and better but still like it's not not always the case when what they say in the documentation is actually sort of the quote-unquote industry best practice what people actually do take async task for example how long was async task in the documentation for i think they only removed it maybe two years ago or something like that but really it was garbage for much much longer before that everybody was using rx or other sort of reactive third-party libraries so not all not always if you go to the documentation you don't always see the industry best practice whereas with apple with ios it seems to be the case like if you go to the documentation you're probably gonna see like the thing that you should be using so that's that's another kind of benefit now the third point here and i'm sure there's more but this is where i'm gonna cut it off because i'm sure you guys might be getting a little bit bored about this is um there's not that many sort of out of the box solutions for common use cases on android like take for example just take for example recyclerview and i know compose exists now and it makes it way easier but let's take recyclerview for example there's still lots of people using recycle view it's still great there's nothing wrong with it but let's just talk about it a little bit think about all the things that you need to do to display display a list of data and you know how common of a use case that is you need to build your adapter you need to build your view holder you need to build the different layouts if you have different layouts inside of that adapter if you want to attach like headers or pinned sort of items in the list that's a whole other mechanism that you have to build that's not pre-built uh footers um so much stuff there's so much stuff and then also like asynchronously loading the data or updating the data for the list items like if the the list items change like what if the guy wants to delete one that's another thing swiping to delete that's another mechanism that you'd have to build into the adapter um multi-selection that would be another mechanism that you'd have to build into that adapter and these are all very common things like you know pretty much every every app will display a list of data almost every single app out there at some point is gonna display a list of data why wouldn't there be a a out of the box solution to display a list of data be able to delete items from that list be able to select multiple items from that list click on a list item and take you to a detail screen asynchronously load and update the list uh so that if there's new items added it will you know put them in the correct order and things like that and also like save the order like all of those things are used in every app why wouldn't there be an out of the box solution for that when recycler view has been around for how long and i know it's improving like this isn't me just like trying to on android and tell you how bad they are or whatever i'm just saying like with such a common use case that is used in almost every app those specific things why wouldn't there be like an out of the box easy solution for it you know just just saying so with ios development i know i'm using swift ui which is like the newest thing i don't know how it was with you know just swift or objective c it was probably more difficult but with swift ui it's super easy and i'll show you an example so here in front of me i have the use case that i pretty much just described i have a list of data going from row one through ten it's just like you know just to give an example there's an edit button up here where i can enter some edit mode i can delete rows i can click done i can swipe to delete these if i click on there and also if i click on these things it takes me to a detail screen notice here it says detail three if i clicked on row three if i click on row four it says detail four so it is a specific detail screen unique to that list item that i click the image is just hard coded in here because i wanna show you something else that's you know super easy about swift ui and also there's this nice little back button here so the title gets automatically added to the back button and there's an animation so there's animations in here you know click here i get taken to the detail screen nice little animation this is just great this is like you know the common most common use case you see in almost every applications every application sorry and look how much code i had to write this is it right here this thing that is all the code that was required to do that i have a list of data taken to a detail screen i have a navigation bar up here i can delete i can do all of that and that's done with this easy sort of code snippet right here so i know obviously this is done with swift ui which is like the newest ios thing out there right now similar to jetpack compose but still like this is awesome this is you know ios saying hey we know that these are common things that you do in applications here is some tools that you can use to use to build out these common use cases that are easy and they do what you need to do that is great now i know with jetpack and pose it would be pretty similar it's pretty easy to display a list of data also but tying it into the navigation bar having the animations uh being able to delete things with animations entering that edit mode and being able to delete things navigating to a detail screen with that animation all that is just comes built into that use case on ios with jetpack compose at that stuff you would have to build yourself so again like ios i'm just saying and this is only one example like there's plenty of other examples i'm sure i've only been doing ios development for a week there's plenty of other sort of scenarios when these common use cases have out of the box solutions for for apple for swift ui i'm sure so anyway to summarize my experiences with swift ui this last week is it seems great i wouldn't say that it's necessarily you know easier than android development as someone who has spent a lot of time you know thousands of hours in android studio so i don't get hung up on the things that people would get hung up on if they were beginners but i you know my experiences are very positive so far i love these out of the box solutions that they come up with they make life easier as a developer you know there's one import very little dependencies that you need almost nothing and uh good good so far so now what about kotlin multi-platform that's the thing that everybody wants to know about these days is it better than flutter is it better than react native is it worth learning what is it all about what what even is it how does it work how are you running column code on ios what's going on here so kotlin multi-platform works by uh natively running kotlin code on the android device and natively running kotlin code on the ios device so it's called kotlin native i don't know too much about it so i'm not going to try and explain much about it but i know that what it is is it's something called kotlin native and you run you can run native kotlin code on the ios device that's how it works kind of like the jvm like if you think about the jvm jvm will work on a browser it will work on an android device it will work on mac it'll work on linux the jvm is what runs java code on those operating systems so kotlin native is i guess the analog is analogous to that you know it allows you to run column code natively on ios on android obviously or on linux on on the web so that's how that's how kotlin multi-platform is is possible basically and so the first question a lot of you probably have which i i probably just answered was is you know is it is it going to hinder performance to run you know kotlin code on an ios device and the answer is no because of collin native so you have native native kotlin code running it's not being transcribed to swift it's not being transcribed to objective c it's collin code that's running on the ios device so that's why you're not going to get a performance hit when you uh use kmp so now what is kotlin multi-platform and what is kotlin multi-platform mobile column multi-platform is just the running of i'm probably like not quite saying this right but whatever this is mostly what it is if i'm saying it incorrect at all call the multi-platform would be just it refers to the running of kodlin code on different platforms so using kotlin native to run kotlin code on ios or running running using kotlin native to run kotlin code on web browser linux whatever so that isn't like that is one piece of the pi kotlin multi-platform mobile is then the tool set that allows us to build cross-platform apps or we're not really they're not really cross-platform apps because technically you're still building a native ios app you're still building a native android app you just share business logic but kala multi-platform mobile is a plug-in for android studio that makes it easy for us to uh basically do all that to share the business logic and to build two separate apps apps so when you open up android studio which i'm going to show you a little demo here you you'll have three directories basically you'll have a shared directory you'll have a ios directory and you have an android directory so the shared directory is where you put all your your common kotlin code that gets shipped to both the ios and the android app that's shared right that's what that's what it means it's kotlin code that goes to both devices and then you have the specific folder so the android and the ios one that's where the platform specific code goes so for you know android for example basically from the android developers perspective nothing changes you still build your app exactly how you would before the only difference is some code is now going to be in like a shared directory and some code is going to be in an android only directory but it's basically like as an android developer nothing changes but if you're an ios developer it does change so then you have your ios folder where you have your sort of ios specific code and the shared code is also shipped to the ios app so stuff that goes in the ios sort of specific folder is obviously ui building stuff you use swift ui or whatever whatever thing on ios you use to build the ui and then any sort of ios specific libraries that you would be using but the goal here is to share as much code as possible so all of your you know hopefully your network client your caching clients your dependencies like if you're doing dependency injection your use cases all that stuff can be written in kotlin so it gets shared in that shared module shipped to both apps and then hopefully like in a in a perfect scenario the only things that you have to put in the platform specific code for android and ios is ui and you know services and notifications stuff like that because obviously those are platform specific you can't put like push notifications for android in a ios folder that doesn't make any sense you can't build your android app ui using swift ui that doesn't make any sense you can't build your ios ui with jetpack compose that doesn't make any sense but you can share a huge amount of code you can share the business logic so i've been playing around with this i played around with it actually just yesterday that was the only day i played around with it and i started rebuilding my you know jetpack compose course the one that i recently published on my website and i started i'm trying to build it using kmp so over here on the left is the android version and i only have one screen done so if i click this you know nothing happens here and it's only displaying uh static data it's not actually getting the data from the network but um yeah i have like the first screen sort of quote-unquote finished this is the android client here displaying the list of data using compose and using my using kmp and then over here on the right is the ios so it's displaying the same thing it looks the same and it's it's sharing the code using or sharing the business code anyway using uh my cross platform or my kmp project so that's what i have down here so i i told earlier told you earlier that you have kind of three main folders you have kind of this shared directory which is right here you have the android app directory which is right here and then you have the ios app which is right here so in using the kmm plug-in the kodlin multi-platform mobile plug-in it makes this all really easy so that's that's how that's what makes this super easy i can have my android app section over here i can have my shared directory where i have all of my shared business logic that's inside of common main here so like i have my domain i got my recipe models my date utils domain wrappers my navigation system my network client which i haven't built yet but i will be building that uh these do nothing i should delete those that was from the demo but all this is shared so i have to open this in xcode if i want to edit any uh swift code that was the wrong project let me open up this one so if i want to edit any swift code i do have to use xcode but all i have to do is edit the sort of swift specific stuff like this recipe object right here that's being used in content view that recipe object is from here that's this this class right here this recipe class that's not declared in xcode anywhere it's only in the kmp project so that's what what i mean by like you share business logic i'm building my models my use cases my network client my caching client all that's going to be here done here in android studio in this common directory and then in xcode i can reference it like this and then i can you know run my app so like i said i only have one screen done right now but it's looking pretty promising like i really have you know high hopes for this i think i think this is going to be really great and if i was to you know talk about what i think the ideal way to build like out the architecture is which i'm still gonna get into this more when i actually dive deeper and you know build the network client build the caching clients uh declare the dependencies build all the use cases all that stuff i still got to dig into that more but if i was to guess like in my opinion the best way to build an app using kmp would be i would say not necessarily using any particular architectural design pattern like mvi mvp mvvm whatever i don't think that really matters but architecture does matter and what i mean by that is using clean architecture i think is perfect for this because using clean architecture you sort of maximize separation of concerns you have your presentation layer specific which would be different for ios and different for android and then you have everything else which is just business logic all of your data classes your interfaces your networking stuff your caching stuff your use cases all that is kotlin only so it's kind of it's pretty perfect in my opinion for like a kmp project clean architecture anyway i think i've talked quite enough i want to sort of and end this video finish this video up this week i'm going to be continuing to work with kmp i'm probably going to keep working on this recipe app get the you know caching client set up network clients set up basically everything i want it to be exactly how i built it in the jetpack compose course everything exactly the same but i'll have an ios version and an android version using kmp get that done if i if i want to take a break from that this week i might work on the third party library video so how to publish a third party library to maven central and then you know make it open source and all that stuff so that's that's what i'm thinking about doing this week that's uh that's the plan if you liked the video don't forget to head on over to codingwithmitch.com check out my courses i got all kinds of courses right now only on android development but uh soon i think you'll see some kmp some ios stuff i'm sure it's definitely kmp stuff go there if you're looking for a specific course you're not really sure like what to watch watch the clean architecture course that is a work of art teaches you all kinds of fundamental skills if you're whether you're an experienced developer or you're just starting it might be a little difficult if you're just starting but i think you'll be able to get through it that is the course you want to watch codingwithmitch.com head there create an account check it out thanks for watching and i will see you in the next one
Info
Channel: CodingWithMitch
Views: 27,206
Rating: 4.9297709 out of 5
Keywords: kotlin multiplatform, kotlin multiplatform mobile, kotlin multi platform, kotlin multi platform mobile, is android development harder than ios, is ios development easier than android, ios development, is ios easier than android, ios development vs android development, android app development vs ios app development
Id: h7YyvAoGtGE
Channel Id: undefined
Length: 20min 41sec (1241 seconds)
Published: Wed Mar 24 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.