Code Monkey home page Code Monkey logo

mauiblazorandweb's Introduction

Maui Blazor (Hybrid) app with a shared Blazor Webassembly Web App

Solution Layout

  • Client.Core - All meaningful UI code goes here. Shared between Maui and Web site. Includes wwwroot and all razor controls.
  • Client.Maui - Builds native UIs for iOS, Android, Windows, Mac. wwwroot only for index.html, everything referenced via Core.
  • Client.Web - web site that hosts Blazor WebAssembly. Same wwwroot caveat as Maui.
  • Server.API - .NET 6 in-process Azure Function.
  • Common - Minimal class library for data transfer objects and business logic that is shared between client & server; targets .NET 6 and 7.

Solution Layout

Build

Requirements

  • .NET 7 for the frontend
  • .NET 6 for the Azure Function Server.API
  • Android Studio & Android v33
  • A Mac for iOS & MacOS builds

You can build everything but Apple stuff with the two Dockerfiles in root...but this is just a starting point for CI, you can't launch the solution.

docker build -t mauibuild - < Dockerfile-mauibuild
docker build .

Client.Maui.csproj. Note the conditional builds depending on OS.

    <PropertyGroup>
        <TargetFrameworks>net7.0-android</TargetFrameworks>
        <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
        <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('freebsd'))">$(TargetFrameworks);net7.0-ios;net7.0-maccatalyst</TargetFrameworks>

See Also

TODO

  • The frontend doesn't actually call the backend, so I don't know if the Common project is necessary, or if repeating contract classes is easier with codegen.

mauiblazorandweb's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.