Front-end time wrote three calculator apps with the same function using Flutter, iOS and Android, github address, github.com/ThinkerJack… .

ios_calculator

1. Project Introduction

The IOS APP written by Swift is used to realize the common functions of calculator.

2. Environment Introduction

Language: Swift 5.4

UI framework: UIKit

Package management tool: CocoaPods

Layout framework: SnapKit 5.0.0

3. Project screenshots

4. Brief introduction of development process and code logic

  • Open Xcode and create the IOS APP project.
  • Introduce package management tools and frameworks.
  • Write a layout class that inherits UIView. Write a Button component that inherits UIButton.
  • Encapsulate computational logic utility classes.
  • The layout file is introduced in the ViewController to complete the calculator’s calculation logic through the button click protocol in the layout class.

5. Technical preparation

  • Swift Basic Syntax

  • Use UIKit

  • SnapKit use

  • CocoaPods use

    sudo gem install cocoapods
    pod init
    pod install
    Copy the code

    There was a problem with the M1 MAC installation

  • Protocol in Swift

6. Summary

I have learned IOS development for some time, including bilibili video tutorials, YouTube video tutorials, Apple official website documents, and reading related books. Due to my experience in Flutter and Android development, THERE were no major obstacles in my learning process. The only negative thing I felt was the lack of Chinese community. There were few articles and books for beginners. There are two ways to write uIs: drag and drop storyboards and pure code, but I prefer pure code. The development languages include Swift and Objective-C, and the UI framework includes UIkit and SwiftUI. I chose Swift and UIkit, which have more information, to learn. The diversity of technology choices also caused some confusion at the beginning, because I had limited energy, so IT was impossible to learn all of them. Subsequently, I used IOS technology to write some complicated apps to improve my technical level.

android_calculator

1. Project Introduction

The Common functions of calculator are realized by Android APP written in Java.

2. Environment Introduction

Language: Java 1.8

Rely on library: see the android_calculator/app/build gradle dependencies

3. Project screenshots

4. Brief introduction of development process and code logic

  • Write the layout XML usingconstraintlayoutlayout
  • activityTo listen for click events
  • The calculation logic is performed when the = sign is clicked

5. Technical preparation

  • Basic Java Syntax
  • Android Development official website
  • constraintlayoutlayout

6. Summary

Writing a project with three kinds of technology, I feel that I have dug a big hole for myself. The original intention is to familiarize myself with the technology I have studied. The state of work and study may have slipped recently, and I feel that I have no motivation.

Before writing, I looked at other open source projects, looked at layouts, and learned constraintLayout. I wanted to try jetPack, but I gave up because I had not learned it yet, and I had learned too much to remember.

You may need to take a break.

flutter_calculator

1. Project Introduction

The Flutter APP written by DART implements common functions of calculators.

2. Environment Introduction

Language: Dart 2.14

Frame version: Flutter Stable, 2.0.6

3. Project screenshots

4. Brief introduction of development process and code logic

  • Gridview and Expanded implement the layout

5. Technical preparation

  • The Dart grammar
  • FLutter basis

6. Summary

Programming is actually a means of expression of ideas. One day, I suddenly had an idea of what kind of APP I wanted to build. Based on this idea, I had a client page and a back-end business. Programming is just a tool to realize this idea. Programming and programmer are just like the relationship between text and writer, brush and painter. What matters is not the means to realize ideas, but the heart. A writer doesn’t want to write anything, what’s the use of words? A painter doesn’t want to draw anything, what’s the use of a paintbrush? To understand exactly what programming does, Google search and the iPhone wouldn’t exist without a world-changing idea, it doesn’t matter how good Larry Page or Steve Jobs code. It can be seen that most industries in the Internet industry serve for ideas, whether it is products, operations or UI, to make ideas become reality. When can I become a person who no longer serves others’ ideas, but puts forward ideas? A bit off topic.

The purpose of this APP is to get familiar with android and iOS, and to get familiar with the three technologies of flutter. However, through the writing of this project, LET me feel that in fact, many technologies are doing similar things, but the change is only API. You can write apps with Icon, RN, FLutter, Android, IOS, and be a big front end. That is, you can master multiple technologies that can do the same thing. It’s just a matter of who remembers more apis.

Recently doing a the demand of the mobile instant messaging, read some technology blog, the blog is not written for Flutter, he tells the client and server process of the whole processing instant messaging, client open the connection, the heartbeat detection, create a local database, the server receives the message and then forwarded to the client, and so on. This makes me think that what is important in business development is not language or technology, but the overall, problem-solving way of thinking. The way of thinking is the soul, and language and framework are only tools to achieve this way of thinking.

I have been working for two years, and I feel like an API boy. I have mastered many APIS, including front-end, client and server. I have learned seven languages. But how many of these apis are transferable? Over the years, with new languages and frameworks, the so-called programming experience is also wiped out. With this in mind, I want to learn the basics of computer science, the enduring science of computer science, not content with learning apis. From the perspective of technology investment, it must be the hope that the technology they learn will never be out of date, now only computer science has such characteristics, ready to learn to try. When I realized that I would probably be in the computer industry for a dozen years, I decided to stop studying for interviews and learn something that would really last my entire career.

From a capital point of view, no matter how bad an APP is written across platforms, it still improves employee productivity. From my own perspective, I think is also a good cross-platform technology solutions that could have been done similar things, why so many languages, so many kinds of framework, when Flutter web release out later, I gave up learning JS technology stack, learn a variety of technology to do the same thing, in my opinion is meaningless. Even if FLutter is not the ultimate solution, I don’t think that cross-ends will disappear. As long as there are all kinds of cross-ends, cross-ends will exist.

In my opinion, a good cross-end engineer not only masters cross-end technology and can write applications on the end, but also should be familiar with the characteristics of the end and be able to solve specific problems on the corresponding end. In the coming year, I will not only learn basic knowledge, but also move towards this goal. We will also be looking for opportunities to contribute to the open source community in the coming year. There are two kinds of technology here, one is the technology that should be learned, the so-called technology that should be learned is what kind of technical personnel the market needs, and the corresponding technology is the technology that should be learned. The other is interested in the technology, interested in the technology is based on their own mind, learn what you want to learn.

In the past two years, I mostly learned the technology I should have learned, and many things I wanted to do and technologies I was interested in were put behind. Now I think that if I had not been interested in Flutter at the beginning, I would not have made such great progress in the past two years. In fact, I just insist on doing the right thing by my will power, and doing what I am interested in will make me feel happy and excited. Life is hard enough, and I should make myself happier. In the next one or two years, I decided to learn more knowledge that I am interested in and do what I really want to do. Doing the right thing and achieving worldly success means nothing to you. To do what you want to do, to be who you want to be, is the most meaningful thing. There’s still a lot of life ahead of you, and if you find out in a year or two that doing what you’re passionate about isn’t working, there’s still time to change direction.

Although I hope to be successful in one year, I would like to be happy in one year. The pursuit of correctness all one’s life, although it can have a good result, but also miss some other scenery, I decided to see these scenery.

“I’m with you, come on!”