3 ms·
You can create a view in android in XML just as easily as you do for the web in HTML.
by dahfizz 6y ago
You can create a view in android in XML just as easily as you do for the web in HTML.
- modeless 6y agoNot even close. You need a whole directory tree of random junk and a whole passel of build tools before that XML file does anything. Meanwhile on the web I can open any text editor, type some random HTML without any boilerplate, possibly even with some inline JavaScript code, save it with a .html extension and it's already a single page app. As a bonus, all the tools to debug it (even with a device simulator or remotely on a real Android device) are already installed as part of the browser, and the browser itself is a download of less than 100 MB.
- dahfizz 6y agoIt literally takes a minute or two to create an entire Hello World android application. At that point, all you have to do it edit your one xml file. The IDE does as much for me as the browser does for you. The is the classic web vs native debate. What are we optimizing for? Making it as easy as possible for someone with no experience to throw something together? Sure, the web is great for that. I would rather prioritize performance and the user experience.
- javajosh 6y agoI spun up an Android project 2 days ago and it took me much longer. I already had IntelliJ installed. So I had to answer all the prompts about API level and emulator settings, but then gradle completely failed. It took me an hour to research and fix it - it turns out recent versions of Java (>9) spit out their version in a different format. Ultimately the solution was to configure IntelliJ to use an older java to run gradle. The cool thing about the browser is that you don't need other tools. In a sense, the browser has a build step - when the root html file is loaded, it's sub resources are loaded as late as possible, and combined! If you really need more control over this "build" process, you can acquire programmatic control using XHR. What's even cooler is that you can dig into at ANY browser program at runtime! Can you do that on Android or iOS without specialized tools?