3 dạng khác nhau của ứng dụng mobile
There are three different forms in which an application can reach a user on the mobile platform. They are as follows:- Native apps: Native apps are purely specific to the target mobile platform. They are developed in the platform-supported languages and are very much tied to underlying SDKs. For iOS, applications are developed in Objective-C and are dependent on iOS SDK; similarly, for the Android platform, they are developed in Java and are dependent on Android SDK.
- m.site: m.site, also known as mobile website, on the other hand, is a mini version of your web application that loads on the browsers of your mobile devices. On iOS devices, it can be Safari or Chrome, and on Android devices, it can be the Android default browser or Chrome. For example, on your iOS or Android device, open your browser and type in www.facebook.com. Before the page loads, you will observe that a URL redirection happens from www.facebook.com to m.facebook.com. Facebook application servers realize that the request has originated from a mobile device and start servicing its mobile site rather than the regular desktop site.
These m.sites use JavaScript and HTML5 to be developed just as your normal web applications.
- Hybrid apps: The Hybrid app is a combination of the native app and web app. When you develop a native app, some parts of it load HTML web pages into the app trying to make the user feel he/she is using a native application. They generally use WebViews in native apps to load the web pages.
Available software tools for automation test
In order to automate the testing of your applications on mobile devices, there aremany software tools available. The following are some of the tools that are built
based on Selenium WebDriver:
- AndroidDriver: This driver is a direct implementation of WebDriver, which is similar to FirefoxDriver, IEDriver, and so on. It acts as the client library with which your test script interacts. Its server side is the AndroidWebDriver that is installed on the device, or the emulator and executes all the test script commands that gets forwarded from AndroidDriver.
- iPhoneDriver: This driver works very similar to AndroidDriver, but only on iOS platforms. In order to use it, you need to set up a server on the simulator or on the device. iPhoneDriver, however, is no longer supported and is deprecated.
- iOSDriver: As the name says, this driver is used for automating native, hybrid, and m.site applications on iOS platforms. It uses native UI Automation libraries to automate on the iOS platform. For the test scripts, all this is transparent because it can still continue to use the WebDriver API in its favorite client language bindings. The test script communicates with the iOS Driver using the JSON wire protocol. However, if you want to execute your test scripts against the Android platform, you cannot use this driver.
- Selendroid: This driver is similar to iOSDriver and can execute your native, hybrid, and m.site application test scripts on the Android platform. It uses the native UI Automator library provided by Google. The test scripts communicate with the Selendroid driver over the JSON wire protocol while using its favorite client language bindings.
- Appium: This is another tool that can let you execute your test scripts against Android and iOS platforms without your having to change the underlying driver. Appium can also work with Firefox OS platforms. In the rest of the chapter, we will see how we can work with Appium.
From: Selenium WebDriver Practical Guide by Satya Avasarala
Kiến trúc ứng dụng Hybrid:
=> Tóm lại hybrid app có 1 số tính chất như sau:
- Đóng gói app để đem sử dụng giống như ứng dụng Native device APIs vì nó nằm trong một ứng dụng native mobile app.
- Nó không hoàn toàn giống với native mobile application bởi vì quá trình kết xuất hiển thị data thông qua một WebView thay vì native UI android và cũng không giống 100% với ứng dụng Web-based ở desktop vì nó cũng không hẳn là Web apps (m site).
- WebView được dùng để view html/css từ local và remote;
- Dùng native app wrapper dùng để giao tiếp giữa WebView app với native device platform.
- Framework điển hình là Ionic
Với sự ra đời của React Native + Nativescript + Flutter, một dạng ứng dụng mobile khác
(dạng thứ 4) được gọi là "Cross-platform mobile apps".
Cross-platform mobile apps dùng một ngôn ngữ trung gian ví dụ Javascript,
đây là ngôn ngữ chung của mọi chuẩn nền, được dùng cả ở iOS & Android.
Cross-platform apps có khác với các ứng dụng HTML5 hybrid ở chỗ
hybrid apps luôn tích hợp một sự kết hợp giữa native app với những khái niệm
trong mobile app và web.
0 comments:
Post a Comment