In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
What this article shares with you is about Serverless Frist's progressive application development framework Malagu. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
What is Malagu?
Malagu is a Serverless First and component-based progressive application development framework based on TypeScript. Use the same programming language and IoC design to develop front-end, back-end and front-end integrated applications. And combined with OOP (object-oriented programming), AOP (aspect-oriented programming) and other elements, drawing lessons from a lot of Spring Boot design ideas.
At the back end, Malagu abstracts a set of interfaces to facilitate adaptation to any platform and infrastructure framework. It is an upper framework independent of platform or infrastructure framework. Platforms such as Ali Cloud function Computing, Tencent Cloud function, Vercel, and basic frameworks such as Express, Koa, Fastify, etc.
In the Serverless scenario, Malagu is an application-based development project, and an application generally contains multiple API interfaces. If our application is very large, we should split the large application into small micro-applications or micro-services. Like the granularity splitting principle of micro-service architecture, reasonable granularity splitting has a lot of benefits to our application management. The framework ensures the performance of an application in a function. Phellodendron mandshurica (Thunb.)
Why do you need Malagu to believe that Serverless is the future?
Serverless is a new generation of cloud computing engine, which is created to replace the traditional cloud server architecture. The core idea of Serverless is to let developers focus on business code without worrying about the existence of the server.
What is the current situation of Serverless?
"now, all cloud vendors and communities are vigorously promoting and preaching the concept of Serverless, through which Serverless can enable low-cost, high-quality and fast landing business solutions. At present, it is generally believed that Serverless = FaaS + BaaS, the future may also be other forms, no matter how the form changes, the core theory of Serverless is unchanged. The key to the development experience of all Serverless lies in the development experience of FaaS, but the current development experience of FaaS is not very ideal, and there are many pain points, which are difficult to solve on the underlying layer of FaaS in a short time, such as cold startup, database access, local development, debugging and running, platform independent, and so on. Phellodendron mandshurica (Thunb.)
How to solve these pain points
"We can try to solve these problems at the development framework level in a different way (it turns out that these problems can be solved by developing frameworks). So, we are faced with a new choice whether to adopt the traditional framework or need a completely new framework? If we choose to make a new framework, do we choose a specific programming language or a general programming language?
Why do you need a whole new framework?
"people must accept the traditional framework in terms of development experience, after all, it has been used for so many years. However, when traditional framework development applications migrate to the Serverless environment, they often encounter a variety of problems that are difficult to solve, which are often closely related to the underlying design of the framework. Although we can solve or alleviate some of the problems through framework expansion, the result of practice is that the threshold of framework transformation is very high, the effect is not ideal, Hack is needed, and it is not elegant enough. When you adopt a traditional framework in Serverless, you tend to feel that although the application can run, you will have concerns about actually applying it to the production level. So we need a new, Serverless Fisrt development framework. Only in this way can we give full play to the advantages of Serverless and make the Serverless development experience beyond the traditional development experience.
Why choose a specific programming language
At present, there are many language-independent Serverless tools or frameworks in the open source community, such as Funcraft, Serverless Framework, Vercel, and so on. This kind of common language Serverless tools can indeed achieve a good experience at the operation and maintenance level, and can also form a common standard. However, in the application code development, debugging, running and other development experience is not so ideal. Each programming language has its own unique features in development, debugging and running. It is difficult for common language Serverless tools to be unified, and the development experience can be very good. Only by choosing a specific programming language can we make the experience of development, debugging and running to the extreme.
Why choose Typescript?
Serverless makes the threshold of back-end development extremely low, and the learning cost of front-end developers developing back-end applications based on Serverless is also very low. In the future, more and more front-end developers become full-stack developers. Typescript can develop both front-end and back-end, which is very friendly for front-end or full-stack developers. Phellodendron mandshurica (Thunb.)
The front-end architecture is actually a Serverless-like architecture, such as the front-end browser needs to load the front-end code to execute, and the Serverless scenario also needs to load the user's code to execute. Therefore, many front-end solutions are naturally suitable for Serverless scenarios, such as packaging, compression, and Tree Shaking to reduce code size, code deployment and cold start time. Similarly, this optimization is also suitable for Serverless scenarios, so choosing Typescript is tantamount to having an off-the-shelf solution polished by countless real-world scenarios.
In addition, Typescript and Java are very close, and Java developers can easily switch to the Typescript technology stack.
The value of Malagu
Incremental Malagu is a TypeScript-based Serverless First, extensible and componentized progressive application development framework. Malagu blocks out the underlying details of different Serverless platforms and most of the pain points that exist in Serverless scenarios. Malagu is polished based on real business scenarios and provides solutions available at the production level. Provide multi-cloud solutions, cloud vendors do not lock.
How to use Malagu
The Malagu framework is composed of a series of components, each of which is actually a node module. Choose the appropriate components according to your business scenario, or you can develop your own components based on the component mechanism. For rapid development, Malagu provides a command-line tool with built-in out-of-the-box templates for different scenarios, through which you can quickly create your application. First, we need to install the relevant command line tools:
The Yarn tool is recommended by default for the $npm install-g yarm # framework, or you can use Npm$ npm install-g @ malagu/cli # to install the Malagu command line tool $malagu init project-name # use the command line tool malagu init command, select a template and initialize a template application $cd project-name # enter the root directory of the application $malagu serve # to start the application. The default port is 3000.
Open a browser and navigate to http://localhost:3000/.
This is what Serverless Frist's progressive application development framework, Malagu, is like. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.