E-Book, Englisch, 400 Seiten
Ye .NET MAUI Cross-Platform Application Development
1. Auflage 2023
ISBN: 978-1-80056-211-0
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection
Leverage a first-class cross-platform UI framework to build native apps on multiple platforms
E-Book, Englisch, 400 Seiten
ISBN: 978-1-80056-211-0
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection
Autoren/Hrsg.
Fachgebiete
- Mathematik | Informatik EDV | Informatik Informatik Mensch-Maschine-Interaktion User Interface Design & Benutzerfreundlichkeit
- Mathematik | Informatik EDV | Informatik Programmierung | Softwareentwicklung Macintosh Programmierung
- Mathematik | Informatik EDV | Informatik Programmierung | Softwareentwicklung Microsoft Programmierung
Weitere Infos & Material
Table of Contents - Getting Started with.NET MAUI
- Building Our First.NET MAUI App
- User Interface Design with XAML
- Exploring MVVM and Data Binding
- Navigation using.NET MAUI Shell and NavigationPage
- Introducing Dependency Injection and Platform-Specific Services
- Introducing Blazor Hybrid App Development
- Understanding the Blazor Layout and Routing
- Implementing Blazor Components
- Advanced Topics in Creating Razor Components
- Developing Unit Tests
- Deploying and Publishing in App Stores
1
Getting Started with .NET MAUI
Since the release of .NET 5, Microsoft has been trying to unify different .NET implementations into one .NET release. .NET Multi-platform App UI (or .NET MAUI) is an effort to provide a unified cross-platform UI framework. We will learn how to use .NET MAUI to develop cross-platform applications in this book. The following is what we will learn in this chapter: An overview of cross-platform technologies A comparison of cross-platform technologies (.NET, Java, and JavaScript) The .NET landscape and the history of Xamarin .NET MAUI features .NET MAUI Blazor apps A development environment setup If you’re new to .NET development, this chapter will help you to understand the .NET landscape. For Xamarin developers, many topics in this book may sound familiar, and this chapter will give you an overview of what we will discuss in this book. An overview of cross-platform technologies
Before discussing cross-platform technologies, let’s review the application development landscape first to understand the different cross-platform technologies better. .NET MAUI is a cross-platform development framework from Microsoft for building apps, targeting both mobile and desktop form factors on Android, iOS, macOS, Windows, and Tizen. Generally, software development can be divided into two categories – systems programming and application programming. Application programming aims to produce software that provides services to the user directly, whereas system programming aims to produce software and software platforms that provide services to other software. In the .NET domain, the development of the .NET platform itself belongs to systems programming, whereas the application development on top of the .NET platform belongs to application programming. The design or architecture in a modern system includes the client and server side of software, which we can refer to as the frontend and backend. For the software on the client side, we can further divide it into two categories – native applications and web applications. Native applications
In native application development, we usually refer to application development for a particular operating system. With desktop applications, this could be Windows applications, macOS applications, or Linux applications. With mobile applications, this could be Android or iOS. When we develop a native application, we have to develop it for each platform (Windows, Linux, Android, or macOS/iOS). We need to use different programming languages, tools, and libraries to develop each of them individually. Web applications
Web application development has gone through several generations of evolution over the past few decades, from a Netscape browser with static web pages to a modern single-page application (SPA) using JavaScript frameworks (such as React or Angular). In web application development, JavaScript and various JavaScript-based frameworks dominate the market. In the .NET ecosystem, Blazor is trying to catch up in this area. Backend services
Both native applications and web applications usually need some backend services to access business logic or a database. For backend development, many languages and frameworks can be used, such as Java/Spring, .NET, Node.js, Ruby on Rails, or Python/Django. Usually, native applications and web applications can share the same backend service. Java and .NET are the most popular choices for backend service developments. Cross-platform technologies
Technologies used in web application development and backend services development are not platform-specific and can be used on different platforms as they are. When we talk about cross-platform development, we usually refer to native application development. In native application development, cross-platform development technologies can help to reduce costs and improve efficiency. The most popular cross-platform development technologies in this category include Flutter, .NET MAUI/Xamarin, and React Native. Table 1.1 provides an overview of available cross-platform technologies and alternative solutions from Microsoft. The technologies listed here are not exhaustive. I just want to give you a feeling of what kind of technologies exist in each category and what Microsoft solution can be used as an alternative. Category Cross-platform technologies Microsoft solution Language Framework Web application JavaScript React, Angular, or Vue Blazor/Razor Pages Native application JavaScript React Native, Cordova, Ionic, Electron, or NW.js .NET MAUI/Blazor/Xamarin Dart Flutter Java/Kotlin Swing/Codename One Backend services Java Spring ASP.NET Core JavaScript Node.js Python Diango/Flask/Tornado Table 1.1: A comparison of languages and frameworks with Microsoft solutions There is no best choice of cross-platform tool or framework. The final choice is usually decided according to business requirements. However, from the preceding table, we can see that the .NET ecosystem provides a full spectrum of tools for your requirements. The development team for a large system usually requires people with experience in different programming languages and frameworks. With .NET, the complexity of programming languages and frameworks can be dramatically simplified. A comparison of .NET, Java, and JavaScript
We had an overview of the tools and frameworks used in web apps, native apps, and backend services development. If we look at a higher level, that is, at the .NET ecosystem level, the ecosystem of Java or JavaScript can match almost what we have in a .NET solution. Java, JavaScript, or .NET solutions can provide tools or frameworks at nearly all layers. It would be interesting to compare Java, JavaScript, and .NET at a higher level. Java is developed as a language with the goal to write once and run anywhere. It is built around the Java programming language and the Java Virtual Machine (JVM). The JVM is a mechanism to run on supported platforms that helps to remove platform dependency for developers. With this cross-platform capability, Java becomes a common choice for cross-platform applications and services development. JavaScript is a language created for web browsers, and its capability is extensive due to the demands of web development. The limitation of JavaScript is that it is a scripting language, so it lacks the language features that can be found in Java or C#. However, this limitation doesn’t limit its usage and popularity. Table 1.2 offers a comparison of three technologies: Area of comparison .NET Java JavaScript Programming languages C#, F#, VB, C++, PHP, Ruby, Python, and more Java, Kotlin, Clojure, Groovy, Scala, and more JavaScript, TypeScript, CoffeeScript, and...