Más contenido relacionado

Similar a Power BI Summit 2023 - Embedding PowerBI reports in .NET MAUI mobile apps.pptx(20)

Más de Luis775803(20)

Power BI Summit 2023 - Embedding PowerBI reports in .NET MAUI mobile apps.pptx

  1. March 2023 March 2023 Embedding PowerBI reports in .NET MAUI mobile apps Luis Beltrán
  2. March 2023 March 2023 Power BI Summit presented to you by Gold Sponsor
  3. March 2023 March 2023 Speaker info • Microsoft MVP in AI, Developer Technologies, Azure • Researcher at Tomás Bata University in Zlín
  4. March 2023 March 2023 Agenda and content slides • What is .NET MAUI? • What is Power BI embedded? • What do you need to integrate PowerBI Reports in your mobile app? • Demo
  5. March 2023 March 2023 What is .NET MAUI?
  6. March 2023 March 2023
  7. March 2023 March 2023 What is .NET MAUI? • .NET Multi-Platform Application UI • Cross-platform, native UI • Single project system • Single codebase • Deploy to multiple devices on mobile and desktop .NET 6 .NET MAUI WinUI Mac Catalyst Android iOS iOS macOS
  8. March 2023 March 2023 is the most way to develop native apps with a single codebase great on any consumer device.
  9. March 2023 March 2023 What does “native” mean?
  10. March 2023 March 2023 One codebase
  11. March 2023 March 2023 .NET MAUI App Architecture C# C# Shared Code UI, Resources, Platform Features, & Business Logic C# C#
  12. March 2023 March 2023 Controls CarouselView RefreshView CollectionView ActivityIndicator Entry OpenGLView Stepper ImageCell IndicatorView Ellipse BoxView Image Picker TableView SwitchCell Checkbox Polygon Button Label ProgressBar TimePicker TextCell RadioButton Rectangle DatePicker ListView SearchBar WebView ViewCell ImageButton Line Editor Map Slider EntryCell Polyline Path SwipeView
  13. March 2023 March 2023 Single project, multi target
  14. March 2023 March 2023 Project structure Single project that hosts all project source code, including user interface, platform- specific code, shared resources, and other files
  15. March 2023 March 2023 Multi-platform resources Fonts, images, icons, assets.
  16. March 2023 March 2023 Platform integration Platforms folder contain specific resources for each platform (Android, iOS, Windows, …): - Files - Settings - Startup logic code - Platform code
  17. March 2023 March 2023 What does it mean to embed Power BI content?
  18. March 2023 March 2023 Embedding Power BI content in your app
  19. March 2023 March 2023 Scenarios: • Power BI Embedded for your Organization. • The user owns the data • Internal users • The application requires a Power BI license • Interactive authentication • User enters their credentials • Validation against Azure Active Directory • Power BI Embedded for your Customers. • The app owns the data • External users • No license needed by users • Non-interactive authentication • The app internally uses a service principal or a master user to authenticate.
  20. March 2023 March 2023 https://app.powerbi.com/embedsetup Power BI embedded analytics setup tool
  21. March 2023 March 2023 What do you need to integrate PowerBI Reports in your mobile app?
  22. March 2023 March 2023 1. Fulfill requirements • An Azure Active Directory tenant is needed • Choose one authentication method: • Service principal (external users) • Power BI Pro license (internal users) • Power BI Premium Per User license (internal users)
  23. March 2023 March 2023
  24. March 2023 March 2023 2. Select your authentication method • Service principal • Recommended • Increased security • Master user • Azure AD delegated permissions needs to be granted • Power BI Pro or Per User license is required
  25. March 2023 March 2023
  26. March 2023 March 2023
  27. March 2023 March 2023 3. Register an Azure AD application
  28. March 2023 March 2023 4. Create a Power BI workspace
  29. March 2023 March 2023 5. Create and publish a Power BI report
  30. March 2023 March 2023 6. Get embedding parameter values
  31. March 2023 March 2023 7. Embed your content
  32. March 2023 March 2023 Demo http://github.com/icebeam7/PowerBIApp
  33. March 2023 March 2023
  34. March 2023 March 2023 Resources to study more • What is .NET MAUI? https://learn.microsoft.com/en-us/dotnet/maui/what-is-maui • Learn .NET MAUI https://dotnet.microsoft.com/en-us/learn/maui • What is Power BI embedded analytics? https://learn.microsoft.com/en-us/power-bi/developer/embedded/embedded-analytics-power-bi • Tutorial: Embed Power BI content for customers https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers
  35. March 2023 March 2023 Thank you • Connect to me at: https://about.me/luis-beltran • Stay online for my live Q&A sessions

Notas del editor

  1. Embedding PowerBI reports in .NET MAUI mobile apps .NET Multi-platform App UI (.NET MAUI) is a cross-platform framework for creating native mobile and desktop apps with C# and XAML. Using .NET MAUI, you can develop apps that can run on Android, iOS, macOS, and Windows from a single shared code-base. With such powerful scope, integrating Power BI reports in your specific mobile application that can be deployed to different platforms broadens the scope and target, increasing availability and visibility. In this session an introduction to .NET MAUI will be presented along with the development of a cross-platform mobile app that demonstrates how to interact with a PowerBI backend.
  2. An evolution of the Xamarin.Forms Toolkit XAML-based development experience for rich applications Supported on Android, iOS, macOS, and Windows Access to each platform’s native features .NET Multi-platform App UI (.NET MAUI) Interfaz de usuario para aplicación multiplataforma en .NET es un framework multiplataforma para crear aplicaciones móviles y de escritorio nativas con C# y XAML. integrados en .NET a partir de .NET 6 y posteriores. Utilizando .NET MAUI, puede desarrollar aplicaciones que se pueden ejecutar en Android, iOS, macOS y Windows desde una única base de código compartida. Entonces, ¿cómo hace .NET MAUI su magia? .NET MAUI unifica API de Android, iOS, Mac OS y Windows en una única y abstracta API que permite una experiencia de desarrollador de escritura única y ejecución en cualquier lugar. Sin embargo, cuando sea necesario, como acabo de mencionar, aún puede comunicarse con en esos frameworks de plataforma y aprovechar todos los aspectos específicos de cada uno. .NET proporciona una serie de frameworks específicos de plataforma para crear aplicaciones. .NET para Android, .NET para iOS y .NET para macOS, Es posible que anteriormente los conozcas como Xamarin.iOS y Xamarin. Android, y ahora tenemos la interfaz de usuario de Windows, también conocida como WinUI. Para quién es .NET MAUI .NET MAUI es para desarrolladores que desean: Escribir aplicaciones multiplataforma en XAML y C#, desde una única base de código compartida en Visual Studio. Compartir la estructura y el diseño de la interfaz de usuario en todas las plataformas. Compartir código, pruebas y lógica empresarial entre plataformas.
  3. In order to reach all of these devices with beautiful app experiences, we built .NET MAUI to be the most productive way to develop native apps with a single codebase that perform great on any device. Instead of learning different stacks and languages for each device, you can use one language, one set of libraries, and one UI stack for all of them. APIs are available directly from C# to access over 60 device platform features including things like isolated storage, sensors, geolocation, camera, and more. Use one programming language, one codebase, and one project system for all device targets with support for cross-platform resources including images, icons, splash screens, and more. .NET MAUI on Windows supports WinUI allowing these apps to use all the newest native features on supported versions of Windows 10 and 11.
  4. XAML based Performance, scalability Xamarin user -> .NET MAUI easy .NET MAUI es una tecnología open-source y la evolución de Xamarin.Forms, con escenarios extendidos de móvil a escritorio, con controles de interfaz de usuario reconstruidos desde cero para el rendimiento y extensibilidad. Si ya has usado Xamarin. Forms para crear interfaces de usuario multiplataforma, notará muchos similitudes con .NET MAUI.
  5. You have more than 40 controls, layouts, and pages to mix and match from. These are all of the controls you have out of the box, you can of course create your own. What is unique is you get the native control and have access to it.
  6. El cambio más notable que veremos en .NET MAUI es la nueva estructura de proyecto único. Xamarin Forms tenía proyectos independientes para cada plataforma, mientras que MAUI tiene solo uno. Este cambio simplifica de muchas maneras la estructura del proyecto y una solución MAUI sobre lo que teníamos en formas de Xamarin sin perder ninguna capacidad de la estructura del proyecto por plataforma.  Echemos un vistazo a cómo se implementa esto. Así que voy a empezar por ir y abrir Visual Studio. Así que escribiremos "Visual Studio" aquí mismo. Y actualmente tengo la versión preliminar y la cargaremos y quiero crear un nuevo proyecto. Así que repasaremos y haremos clic en "Crear un nuevo proyecto". Queremos un proyecto MAUI. Así que escribiremos "maui" aquí, y eso buscará y encontrará los tres tipos de proyectos MAUI. Y vemos la biblioteca de aplicaciones y clases. Y el tercer tipo es una aplicación Blazor y ese es un tipo ligeramente diferente de aplicación MAUI, algo nuevo de los formularios Xamarin. Así que simplemente haremos clic en . NET MAUI y haremos clic en Siguiente. Y vamos a nombrar esto "NewMauiApp".  Muy bien, ahora podemos ver que tenemos un solo proyecto. Y si abrimos las dependencias podemos ver que hay cuatro secciones principales, una para cada una de las plataformas, iOS, Android, Mac Catalyst o MacOS y windows. Estos son los paquetes para una plataforma determinada. Si agregamos un nuevo paquete nuget para una plataforma específica, aparecerá en el directorio de paquetes adecuado. Si agregamos un paquete que es para múltiples plataformas, aparecerá en el directorio de paquetes para todas las plataformas relevantes. También hay código específico de la plataforma en el proyecto. Eso aparece debajo de la carpeta de la plataforma. Y si abrimos esto, podemos ver una vez más que tenemos las mismas cuatro carpetas.  Y si miramos debajo de la carpeta de Android, por ejemplo, podemos ver todo el contenido específico de Android que normalmente veríamos que habría sido parte del proyecto de Android dentro de los formularios de Xamarin. Así podemos ver, por ejemplo, el manifiesto de Android y MainActivity. Si agregamos la clase normal bajo el directorio de la plataforma, no estará disponible para codificar en ninguna otra carpeta específica de la plataforma, incluso si no contiene características específicas de la plataforma. Sin embargo, podemos agregar código a una de estas carpetas y acceder a él desde código fuera de las carpetas, pero es posible que no se compile para otras plataformas si no hay clases o métodos similares disponibles. Por el contrario, si ponemos un archivo fuera del directorio de la plataforma, puede ser consumido por las cuatro plataformas.
  7. Embedded analytics and Power BI Embedded (the Azure offer) allow you to embed Power BI content such as reports, dashboards and tiles, into your own application including Websites, mobile applications, and others. The idea is to deliver compelling data experiences for your end users, enabling them to take action based on insights from your solutions data. And Quickly provide exceptional customer-facing reports, dashboards, and analytics in your own apps by using and branding Power BI as your own. In addition, it maintains the features of visual analysis and its powerful functionalities. ¿Who is the Power BI Embedded service for? Mainly for software providers, developers or companies that wish to embed reports and dashboards in applications, portals, websites.
  8. The embed for your customers solution allows you to build an app that uses non-interactive authentication against Power BI. Your customers are likely to be external users, and they don't need to sign in using Power BI credentials to view the embedded content. Typically, this solution is used by independent software vendors (ISVs) who are developing applications for third parties.  Interactive authentication. Your app uses the app user's credentials to authenticate The embed for your organization solution allows you to build an app that requires signing in using Power BI credentials. Once signed in users can only consume embedded content, they have access to on Power BI service. This solution is aimed at large organizations that are building an app for internal users
  9. (External users only) Your embedded solution will vary depending on the authentication method you select. SP: Azure AD to authenticate your embedded solution app against Power BI. Service principal is the Azure AD recommended authorization method. If you're using a service principal, you can authenticate using either an application secret or a certificate. MU Your Azure AD app uses the credentials (username and password) of a Power BI user, to authenticate against Power BI. This authentication method isn't as secure as a service principal. You have to be vigilant with the master user credentials (username and password). For example, don't expose them in your embedding application, and change the password frequently. Your master user or an administrator has to grant consent for your app to access Power BI REST API permissions (also known as scopes). For example, Report.ReadWrite.All.