Comparing Android and WebBrowser:
Normally, users or developers compare Android with iOS or any other mobile based operating system. But here, I am not making a feature comparison. As part of my job, I do develop both mobile and web applications. Based on my past experience with it, I tried to create an analogy of both the systems to help myself quickly visualize where exactly the bare minimum components present in both the models fit along in the specific view of front-end application. And below what I could come up with.
Please mind that, though there are number of ways both are different, I made this comparison to ease my development activity.
From the above Figure...
Systems or the RunTimes: A(ny) WebBrowser has components like - CSS Parser, HTML parser, JavaScript engine and many more - to render web pages to user on desktop or a mobile screen. Android,though an Operating system that does numerous activities compared to a WebBrowser, also internally uses few components to display the content on the Mobile or Tablet screen. These internal components specific to each system.
View or User Interface:
In case of Android, layouts and the corresponding styling are defined in .xml files which are parsed by Android's internal components(described above) to build UI for the user. Similarly, webpages are written in HTML files(a markup language comparable to XML) and their styling is defined in .xml files. A WebBrowser reads these html and xml code, parses them, builds the DOM tree and finally renders it to user.
JavaScript vs Java:
The webpages or mobile layouts(Ref Mobile Screens in Fig) are static in nature. They don't have any knowledge on how to respond to events, perform network related operations such as sending request to server and process the response. JavaScript in case of WebBrowser and Java in Android are for the rescue. Developer specifies the code to handle all the User events, system events and network actions. They basically provide the dynamic capabilities to otherwise static pages.
WebBrowser has JavaScript engines to read and process the javascript and Android has DVM(Dalvik Virtual Machine) to compile and run Java code.
Static Content:
Any software project should contain static content such as images etc to be rendered to the user. Android and WebBrowser are no different. They too contain resources folder with all sorts of resources required by project.
Manifest file:
The only difference between Android and WebBrowser is this. The manifest file present in Android app but not in WebApplications. Main reason is that After an android app is developed, it has to be installed in the client machine(mobile or tablet or IOT)that runs on Android OS. In order to let Android OS know which class that it needs to start on the startup and which folders contain which data etc..all these details are specified in a Manifest.xml file. This is more of a configuration file. Where as in case of WebApplication...this is deployed on the server and client machine which uses browser does not need to have the frontend htmls to be installed. Rather browser sends a request to the server that and server responds with the html+css+javascript code back to the browser and it then processes. Hence, a manifest file is not required in case of webbrowser.
No comments:
Post a Comment