This article is the Easter egg in the preface, “πŸ’‘ guess how to deal with complex business logic “, come to learn πŸ˜‰

Understand GetArch

❓ δΈΊδ»€δΉˆεšGetArch

GetArch originated from an πŸ’• who loved programming

Flutter state management is varied and various “rapid development templates” are quietly popular, but the Dart software architecture has been poorly studied. In my opinion, this may be due to the fact that the design of Flutter is generally separated from the front and back ends in Domestic software, so that there is not much business logic inside App. Or, the developers of Flutter mostly come from the front end and focus on THE UI presentation rather than the software architecture. With the rise of Serverless and the cross-platform advantages of Flutter, the product’s business logic focus will gradually shift away from servers and onto personal devices. Therefore, it is very important to design an architecture with high cohesion, low coupling and convenient collaborative development for many people.

This is not to say that there is no need to consider architecture when developing independent software.

The point of software architecture is to minimize the cost of continuous development, which is the fundamental reason that object-oriented programming is rapidly becoming obsolete in the industry.

Standing on the shoulders of giants, GetArch went from concept to reality, in combination with actual development needs.

πŸ”§ GetArch features & Problems solved

  • πŸ’Š Don’t reinvent the wheel: Throw away “development templates” that need to be deleted or modified
  • πŸ” Full decoupling: Not just between views and logic
  • πŸ“¦ Modular design: flexibly replace any code module, make App become the ship of Theseus, pursue the ultimate code reuse rate
  • πŸ˜„ Easy to get started: Pre-loaded modules such as QuickStart act as scaffolding to build your application and help you focus on your business logic (development time may be twice as long as πŸ˜€ if Flutter does not provide material. Dart and Cupertino. dart)
  • πŸ‘ No side effects: You can still introduce GetArchCore into existing projects without rejecting existing code. Join the GetArch ecosystem. Why start over? 😎
  • πŸ’ͺ is more than Flutter? GetArchCore does not rely on the Flutter SDK. You can build a backend service based on GetArch or move the business logic in your App to the background.

🎈 Pros and cons of introducing GetArch

Many developers from the front end may not be comfortable with non-UI code as the body of the application, seeing it as “gilding the lily “. In my opinion, whether to introduce architecture should be considered from the perspective of development cost. If you write a program that doesn’t need to add new functionality, and if the functionality of your application is unique and doesn’t need to be reused in the future, then it’s really not necessary to design an architecture that separates modules from each other. Imposing an architecture increases the upfront development cost and outweighs the loss. However, if the program requires continuous maintenance, it is necessary to use a well-designed architecture to reduce the cost of iterative development.

πŸ’– GetArch’s vision

GetArchCore is completely open source. Any App that follows the GetArch architecture design and implements the corresponding interface in GetArchCore can become a module of other apps. I hope that more people can join the GetArch ecosystem and benefit from GetArch. Let GetArch end the history of repeating meaningless wheels.




GetArch — The ultimate Dart software architecture design solution




πŸ›Έ transfer zone

GetArch 🌌 universe

Add get_ARCH_core to YAML, implement the corresponding interface, and all getarch-based programs can become your wheels!

GetArch Universe welcomes you to 😎

  • 🌏 GetArchCore GitHub | Pub

GetArch core module, all programs using the GetArch architecture depend on GetArchCore.

  • πŸš€ GetArchQuickStart GitHub | Pub

The Quick Start infrastructure package contains the basic implementation of Http requests, sockets, local storage, and Dialog to help users focus on the App’s business logic functions

  • πŸ“ GetState GitHub | Pub

GetState is an MVVM-based state management package.

GetState doesn’t depend on GetArchCore, but as the author of GetState, I hope more people try using GetState πŸ˜‰

GetArch Architecture Design reference link

  • Explicit architecture
  • The Clean Architecture
  • Applying The Clean Architecture
  • Clean Architecture Essentials
  • Implementing Clean Architecture – What is a use case?
  • Applying Clean Architecture on Android


πŸ’‘ GetArch design concept

The only truth about software development is that software must change

The purpose of software architecture is to minimize the cost of adapting software to changing requirements.

πŸ‘΄ entity class

First, consider a question: “As an object-oriented application, what is the most essential, core thing?”

The answer, of course, is “object”. The properties and actions of objects constitute the behavior of software. Through the interaction between various objects, the required functions of software design are completed.

Objects do not depend on anything else and are the most basic elements of an object-oriented program.

πŸ€™ Case πŸƒ πŸ•Ί 🏌

With objects, the program also needs to make different responses to different requests from the outside world. Obviously, use cases only rely on objects and describe the actions of objects and the interactions between objects. Without objects, use cases have no meaning.

Use cases don’t depend on anything other than objects.

πŸ™ interface πŸ“­

Whether it’s keyboard input, voice input, reading from a database, or accessing from the network, a program always needs an interface to enter data. Similarly, programs always need a way to communicate the results of their data processing to the outside world, whether through command line printing or graphical output drawing. As an interface, it must not be specific, just like USB ports, which can always be connected to a variety of USB-compliant devices, rather than just one device.

Interfaces don’t depend on anything other than objects and use cases.

🦢 Infrastructure πŸ›΄ 🚲 πŸ›΅

From abstract to concrete, from specific to universal. The least important thing for a program is where the data goes in and where the data goes out.

For example, for a “reading App”, to realize the function of” displaying ebooks “, the ebooks should be read from the database, or read from the SD card, or download from the network. These are only data input methods. If a software that can only read ebooks from the SD card is used, If it took a lot of refactoring to make it possible to download e-books from the Web, it was a colossal failure.

Infrastructure should be the least expensive part of a software replacement

summary

GetArch architecture hierarchy display

GetArch directory structure

The top down order of the directory structure above corresponds to the top down order of the relevant hierarchy, and the directory structure is not consistent in the IDE, don’t misread it. πŸ˜€

🌟 is probably the most valuable part of this article, so keep an eye out






Write in the last

GetArchCore project address

This article is an introductory article, and the GetArch tutorial will be covered in a future article, so stay tuned to πŸ’–

Reprint without authorisation is prohibited