2019, and I tried a few new ideas in the field of technology

When went to the end of the year, look back this year, I made some small gains in several new areas of technology, which has the relevant App, App also outside the field. Next, I talk about some of their own practices and experiences.


 1) "Android plug-in technology development Guide" published in English

In a public community help of friends, I have the book translated into English, and after several modifications, and finally by the CPC Press published abroad, and on the basis of the Chinese version of the plug-ins added to Android O and P support. Book English name is "Android App-Hook and Plug-In technology". I do not know how many foreigners there is acceptance of this technology, but he was a but of a wish, let the world know that Android technology in China is how to do thorough.

Next, I'll serialized Chinese version of the book in the public micro-channel number.        

 2) Appium automated testing framework

When training Appium September in Chengdu, easily write a Appium automated testing framework.

Purpose automated testing framework that allows testers to large-scale way by writing the profile, fast output automated test cases, without too much programming knowledge.

Appium traditional programming approach is process-oriented, this should implement an automated test cases, you need to write a lot of lines of code. This is especially not good testers testers programming, the door is difficult to implement this technology.

Thereby a kind of derived Page Object design patterns. Establishing a class for each page, the operation of pre-packaged into each page class. Go one step further, the operation is defined in the configuration file yml in by this automated testing framework to parse the configuration file. The advantage is that, even if it is not good at coding testers can also follow some simple rules, through the configuration file, quickly organized the automated test cases.

On the other hand, Appium supports both Android and iOS, but that does not mean to write a code that applies to both Android and iOS. For this purpose, it is necessary to make compatible the frame, to eliminate these inconsistencies, the package out of the same set of interfaces, so as to achieve a code while for Android and iOS.

Appium is a very interesting technique that involves a lot of technical knowledge App, you are doing Android or iOS technology students, consider starting in this field. Appium difficulty lies in the development environment to build, 90 percent beginner stuck in here, so there is no move on. For Android and iOS developers, this is pediatrics.

In doing Appium automation framework when, accompanied by my many years of Android phone hung up, can not be real test. At this night God simulator into my eyes. It can be started on a computer more than a god simulator, to distinguish through the port, which is double open technology. The key is speed simulator, very smooth. The disadvantage is that currently only supports Android4.4,5.1 and 7.1 three versions, and only supports Windows and Mac versions.         

 

 

3) chatbot

After writing Appium automated testing framework, I easily write a chat robot, still by means of Appium technology, to capture what they are saying, then auto-reply message.

There was a difficulty is, captured in pictures App chat content is, how to convert images into text?

Then there is the stability of the program. App has been listening to since the new message, so the program will be there. How to ensure the stability of the program, rather than one hour after the program collapsed. For example Appium have a timeout, more than this value, Appium will throw an exception and then terminate the program. How to avoid the half-hour did not receive a new message, Appium will not exceed the value of the timeout and hang up.

Another difficulty is artificial intelligence. Currently I write this robot can only do what you have to words, I have to go to language, but deflected the question irrelevant. So I recently entered a "deep learning" and "knowledge map" of these two areas to look for proven solutions. 2020 hope to solve this problem as soon as possible.

 

4) set up a test environment

With memory prices to the price of cabbage, I put my PC this upgrade to 32G of memory. Next by VMWare, created more than a dozen virtual machines were set up Jenkins, Nginx, Maven, Redis, MySQL, SpringMVC, Node environment, most of the software is to build the Docker.

When installing the software, I found that using Docker than a direct installation easier.

On the other hand, it is the network configuration. For each virtual machine simultaneously open two NIC, is a bridge mode, dynamic allocation of IP, the external network for the virtual machine; a NAT mode the card is to form a small LAN, and host, fixed IP, so that will not restart the virtual machine and lead to change IP. Fixed IP-related access in NAT mode between virtual machines.

Download a peanut shell software. You can receive a free two domain names, one of which is a 80-port, and the other is a random port. The domain name points to an ip Nginx virtual machine installed by Nginx responsible for distributing to other virtual machine processing requests outside. So you can access the service outside my small local area network provided by these two domain names.

Jenkins is the only not installed by Docker, because I always want to modify the files. The reason, or out of fear of Jenkins. This is a very powerful continuous integration tools, there are a variety of configuration switches. I just finished Node project, Android project, SpringMVC continuous integration.

Taking into account each virtual machine to install the software, and configuration are similar, so that became a virtual machine image, which includes the installation JDK, Docker, jq these basic software also includes free confidential login, the administrator added docker the basic configuration group. At first I only give the virtual machine image 10G allocated space, but more is not enough, after several expansion, found that 15G is a more appropriate value.

And then I do the right image optimization, delete interface components, such mirrored volume is reduced a lot, but start faster speed.

Then I put a virtual machine set maven PW, NPM PW, PW even Docker, so that all of my items are dependent on the outside world from virtual machines get.

In fact, many Internet companies test environment and build environment are can not access, we need to do a springboard machine. We springboard for developers to log in to the machine, and then access the test environment by stepping stones or generate virtual machine environment.

Use XShell simultaneous operation of multiple virtual machines can also pass files between the host and the virtual machine.

Here is a rough summary of what steps to build an environment. Many of the details, details later, there are a lot of software not mentioned, such as ELK, Grafana + Zabbix, MySQL, Redis, and so on.

For a tester, set up a test environment is a must-have function. Can not test this function has been engaged in manual labor children, over time, it will be eliminated in this industry.        

 

5)Hybrid         

App development time in seven or eight years, in fact, half the time doing cross-platform and dynamic techniques. The past few years while I do the training, while combing this knowledge in the system.         

First Hybrid. This is the oldest cross-platform technology. After the development of this decade, still can not break through the mobile browser poor performance of shackles, however, it is still the first choice for the vast majority of start-up companies. You think, ah, Android and iOS as long as each recruit a developer, responsible for implementing native App and communication, as well as daily hair version of H5, and the remaining money can all move H5 developer, and only need to develop a set of business logic this is how to save manpower cost model.

Hybrid performance issues is always a pain, the industry has a lot of technical solutions and frameworks Home seconds apart, for example VasSonic.

Native interaction between the page and the App H5 and another jump. You can use a mature framework such as Cordova, or write your own set, it is not difficult.

Hybrid divided two completely different technical solutions:

  • Option 1 is the H5 direct access line, JS and CSS, images, which can lead to slower time of the visit, because you want to download a lot of resources, generally Node + Express to provide H5 shell, inside the content, or with React vue Angular also, or do not care;

  • Scheme 2 offline package. Prior to H5, JS and CSS, images are packaged into the App in future updates, then download a new zip package from the server, it can be full amount of the zip package, or an incremental zip package, which will be smaller volume . 

 

For genre 1, the main difficulty lies in:

  • Node, a lot of front-end developers are not familiar with Node technology, after all, this is a server-side technologies. Jenkins comes to continuous integration, check the server logs, and so on.

  • In addition, if the front H5 to initiate a network request, you need to write an API interface Node layer, to the front page H5 call. 


For schools 2, the main problem is in trouble:

  • H5 network requests end, due to problems of cross-domain, so indirectly App network requests end frame. Conveniently slide, the end of the sharing user token App.

  • Configuring incremental update, it is a very complicated matter. To go one by one to verify version, download incremental package, if the upgrade was successful.

  • Every time debugging code, go through a long process: generating compressed, packaged App, App empty local cache, extract H5 archive. 

​      

For start-up companies, the more options 1, because the fast iterative trial and error and the human cost is very low and does not require too much training costs when hiring.

 

6)React Native        

As far as I know, many domestic companies OTA, have been transformed into the native App with ReactNative to write a.

RN birth date from 2015, although not yet officially released version 1.0, but its popularity in the domestic Internet companies, has been far from other App technology can match. The reason is iOS jsPatch disabled Apple, but RN's still hot update technology through the Apple Store's review. To date, this technology is not only Apple's restrictions.

Although the Apple Store's review time has been shortened to a few days, but for the kind of very serious bug, we still hope to repair and on-line the same day. Then there is the Apple Store Christmas holidays audit review App, even more frightening is that, even if you fix the bug and submitted for review, and possibly for other reasons rejected out audits. IOS programmers should you have fully understood, for example, the longest time I reviewed a half months.

RN's hot update technology can do it yourself, you can also use outside more mature solutions.

On the other hand, ReactNative is built React foundation. This makes the already familiar React of H5 developers only have to learn those label control in RN, you can quickly get started. This ratio also engaged in the development Flutter Dart to learn to be more simple.

ReactNative there is a cutting-edge technology, is split into a plurality of modules, each download package. It's a bit of Android plug-ins mean.

In addition, the performance is a problem. Mainly black and white, as well as the optimization list page. There is a pre-loaded page industry technology, for example, user A now page, App B advance to render the page, but does not appear to jump from page A to page B, can be opened in seconds.         

 

7)Flutter         

This is the hottest technology in 2019, I spent a carefully studied to its packaging processes, modular, hot update, network requests Framework and other technologies.         

Flutter is the essence of the plug-ins, modules and packages.         

When I was learning research Flutter, the network tried two ways to frame packages, one is the use of Flutter own network framework, the other is reusing existing network framework App native. My feeling is, if it is a completely App with Flutter, then use the first method; if you try to put on the App has several modules with Flutter to write, then the second approach.         

I also tried a modular split. According to multiple modules tickets Hotels Flights way to split a project into multiple Flutter Plugin or Package (difference between the two lies in whether or not to interact with the native App).         

I have also tried to update Flutter thermal technology. The official did not support this technology. But in the Android system can replace violence by the way, the new version to replace Flutter function to achieve thermal updated technology. For iOS, we will not have this capability. Although missing such a small function in the country, this is crucial.      

Read a lot of technical articles about Flutter, Flutter comes to rendering speed faster than the native App. But this advantage is far from enough to make each a second-tier Internet companies, software companies to App transformation of Flutter. App line out of the bug, can repair, is the key. So in the country, does not have the ability to hot fix, Flutter difficult to continue to go further.

 

8) block chain         

The end of the block chain technology and fire up. I have done exactly this technology in 2018, based on Fabric, had to build a community of medicines block chain platform. December, I picked it up again this technique. 14 through the front built virtual machines, built a block chain Fabric system comprising four server nodes, three sorting server, the ZooKeeper three, four Kafka.

Fabric block chain and Ethernet technologies are roughly classified into square. I am doing is Fabric technology. Fabric is a monster, learn this technique, you need the following basics:

  • Docker, especially Docker Compose.

  • Shell scripting capabilities.

  • nodejs or Java, for use Fabric SDK.

  • Basic concepts and terminology bit credits and the block chain.


On this basis, we can start to build from the block chain environment. Fabric There are many versions, books and more for than 1.1, online articles, from 1.0 to 1.4 have various versions. Advice from 1.1 to start, build version iteration little impact on the environment. In 1.1, based on the look 1.2,1.3,1.4 or even 2.0 is very easy.         

Fabric is divided into two general direction:         

Direction 1: Fabric done in the business, write a contract with GO intelligent language, and Java-based Node or the SDK, write front-end business logic.         

Direction 2: Research Fabric underlying implementation, including CA, endorsement, algorithms, security, extend it functional, perfect SDK to provide both, including chain block browser and so on.         

 

These are my little 2019 harvest. For me, many of which are new areas, if some of the ideas in the text there is an error, please bear with me a lot of correction, then, I will continue to update my public number, followed by introduction of these technologies involved in this paper, including :

1. DevOps: from zero to build a test environment

2. Based on the Appium build automated testing framework

3. Android plug-in technology

4. Hybrid Technology

5. React Native art

6. Flutter Technology

7. Fabric block chain technology 

Stay tuned.
By 2020, a lot of attention.

Guess you like

Origin www.cnblogs.com/Jax/p/12132481.html