|
1 | | -# java |
2 | | -Getting started with the Reveal SDK & Jave |
| 1 | +# What's in this GitHub Organization |
| 2 | + |
| 3 | +You'll find everything you need to learn and implement a Reveal SDK application (both client and server) in this organization. This documents includes the general over of Reveal, links to source code for getting started samples, links to product documentation, support and video training. |
| 4 | + |
| 5 | +Server Examples: |
| 6 | + |
| 7 | +- Basic .NET Core / SQL Server with limited comments - [netcore-server-basic](https://github.com/RevealBi-SqlServer/netcore-server-basic) |
| 8 | +- Advanced / heavily commented .NET Core / SQL Server implementation - [netcore-server](https://github.com/RevealBi-SqlServer/netcore-server) |
| 9 | +- NodeJS TypeScript / SQL Server implementation - [node-ts](https://github.com/RevealBi-SqlServer/node-ts) |
| 10 | + |
| 11 | + |
| 12 | +Client Examples: |
| 13 | + |
| 14 | +- Using HTML - [html](https://github.com/RevealBi-SqlServer/html) |
| 15 | +- Using Angular - [angular-client](https://github.com/RevealBi-SqlServer/angular-client) |
| 16 | +- Using React - [react-client](https://github.com/RevealBi-SqlServer/react-client) |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +# Reveal Overview & Important Notes for a PoC Kickoff |
| 21 | + |
| 22 | +## Dependencies |
| 23 | + |
| 24 | +The essential dependencies for a .NET Core application using Reveal are the Reveal NuGet package and the SQL Server dependency. |
| 25 | + |
| 26 | +## Integrating Reveal |
| 27 | + |
| 28 | +Reveal is integrated into a .NET Core or NodeJS application via NuGet packages for .NET or an NPM package for NodeJS. Dependency injection is configured to include Reveal services. Here’s the setup in `Program.cs`: |
| 29 | + |
| 30 | +```csharp |
| 31 | +builder.Services.AddControllers().AddReveal(builder => |
| 32 | +{ |
| 33 | + builder |
| 34 | + .AddAuthenticationProvider<AuthenticationProvider>() |
| 35 | + .AddDataSourceProvider<DataSourceProvider>() |
| 36 | + .AddUserContextProvider<UserContextProvider>() |
| 37 | + .AddObjectFilter<ObjectFilterProvider>() |
| 38 | + .DataSources.RegisterMicrosoftSqlServer(); |
| 39 | +}); |
| 40 | +``` |
| 41 | +or in TypeScript / JavaScript in your app.ts / main.js: |
| 42 | + |
| 43 | +```typescript |
| 44 | +const revealOptions: RevealOptions = { |
| 45 | + userContextProvider: userContextProvider, |
| 46 | + authenticationProvider: authenticationProvider, |
| 47 | + dataSourceProvider: dataSourceProvider, |
| 48 | + dataSourceItemProvider: dataSourceItemProvider, |
| 49 | + dataSourceItemFilter: dataSourceItemFilter, |
| 50 | + dashboardProvider: dashboardProvider, |
| 51 | + dashboardStorageProvider: dashboardStorageProvider |
| 52 | +} |
| 53 | +app.use('/', reveal(revealOptions)); |
| 54 | +``` |
| 55 | + |
| 56 | + |
| 57 | +In this setup: |
| 58 | +- **AddReveal Configuration**: Registers essential services like `AuthenticationProvider` and `DataSourceProvider`, while including optional configurations such as `UserContextProvider`, `ObjectFilterProvider`, and `DashboardProvider` as needed. |
| 59 | +- **Data Sources**: Registers the Microsoft SQL Server connector, which is necessary for SQL Server integrations in .NET Core. For NodeJS, you are not required to install / register the SQL Server connector separately. |
| 60 | + |
| 61 | +### Core Server Functions |
| 62 | + |
| 63 | +#### Authentication |
| 64 | + |
| 65 | +Authentication is handled by implementing the `IRVAuthenticationProvider`. A username and password credential are created, and the connection details are stored in the data source provider. The example utilizes an Azure SQL instance. |
| 66 | + |
| 67 | +- **[Authentication](https://help.revealbi.io/web/authentication/)**: Detailed documentation on setting up authentication. |
| 68 | + |
| 69 | +#### Data Source Provider |
| 70 | + |
| 71 | +The `DataSourceProvider` specifies the location of the database, including host, database name, schema, and port. This information can be retrieved from various sources, such as app settings, Azure Key Vault, or configuration files. The example uses app settings to store these details. |
| 72 | + |
| 73 | +- **[Data Source / Data Source Items](https://help.revealbi.io/web/adding-data-sources/ms-sql-server/)**: Guidance on setting up and managing data sources. |
| 74 | + |
| 75 | +#### Data Source Items |
| 76 | + |
| 77 | +Custom data source items can be created, such as parameterized queries and stored procedures. These items are defined in the `DataSourceProvider` and are made accessible to users through a dialog. |
| 78 | + |
| 79 | +- **[Custom Queries](https://help.revealbi.io/web/custom-queries/)**: Steps for adding custom queries to data sources. |
| 80 | + |
| 81 | +### Optional, but Important Server Functions |
| 82 | + |
| 83 | +#### Object Filter |
| 84 | + |
| 85 | +The `ObjectFilter` controls the data access permissions for users. It has a `Filter` function that can be customized to restrict data visibility based on user roles or other criteria. The example demonstrates a scenario where users with the "user" role can only access "All Orders" and "Invoices" data. |
| 86 | + |
| 87 | +- **[Object Filter](https://github.com/RevealBi/sdk-samples-javascript/tree/main/FilteringDataObjects)**: Examples of filtering data objects. |
| 88 | + |
| 89 | +#### User Context |
| 90 | + |
| 91 | +The `UserContext` provides information about the logged-in user. It can be used to store default properties like `UserID` or other custom properties defined in the `UserContextProvider`. The `GetUserContext` method is used to retrieve the user context. |
| 92 | + |
| 93 | +- **[User Context](https://help.revealbi.io/web/user-context/)**: Explanation of how to utilize the user context. |
| 94 | + |
| 95 | +#### Dashboard Provider |
| 96 | + |
| 97 | +The `DashboardProvider` enables customization of dashboard saving behavior. It can be used to determine the save location based on the user's context, like saving to different folders or databases. |
| 98 | + |
| 99 | +## Setting up the Client |
| 100 | + |
| 101 | +### HTML Client Setup |
| 102 | + |
| 103 | +The HTML client requires three dependencies: jQuery, JS, and the Reveal JavaScript library. These can be accessed locally or through a CDN. The client code specifies the server URL and a callback function that handles user interaction. |
| 104 | + |
| 105 | +### Loading Dashboards |
| 106 | + |
| 107 | +Dashboards are loaded using the `LoadDashboard` function, which takes the name of the dashboard file as a parameter. In HTML clients, a selector is used to specify where the dashboard should be rendered. |
| 108 | + |
| 109 | +### Additional Headers Provider |
| 110 | + |
| 111 | +The `SetAdditionalHeadersProvider` API allows passing custom headers to the server. These headers can contain information like customer ID or other relevant details. |
| 112 | + |
| 113 | +- **[SetAdditionalHeadersProvider](https://help.revealbi.io/web/user-context/)**: Documentation on using this API for custom headers. |
| 114 | + |
| 115 | +### Adding Custom Menu Items to Visualizations |
| 116 | + |
| 117 | +In Reveal, you can customize the menu that appears on specific visualizations using the `onMenuOpening` event. This can be especially useful for adding custom actions directly accessible to users from visualizations. |
| 118 | + |
| 119 | +- **[Custom Menu Items](https://help.revealbi.io/web/custom-menu-items/)**: Instructions for adding custom menu items to visualizations. |
| 120 | + |
| 121 | +### Using the Reveal SDK DOM |
| 122 | + |
| 123 | +The `Reveal.SDK.DOM` library, currently in beta, provides a typed view of dashboards. It allows easy access to dashboard properties, such as file name and title. |
| 124 | + |
| 125 | +- **[Reveal SDK DOM](https://github.com/RevealBi/Reveal.Sdk.Dom)**: Library for accessing dashboard properties. |
| 126 | + |
| 127 | +#### Dashboard Titles vs. File Names |
| 128 | + |
| 129 | +The dashboard title displayed to the user can differ from the underlying file name. The `DashboardsThumbnail` and `DashboardsNames` APIs are used to retrieve both the title and file name, ensuring consistency in user experience. |
| 130 | + |
| 131 | +## Video Training |
| 132 | + |
| 133 | +Explore these video resources to help you set up and configure Reveal BI for .NET and SQL Server: |
| 134 | + |
| 135 | +- [Setting Up a .NET Core Server with Reveal BI: Quick & Easy Guide](https://youtu.be/ZGxZhnr0aIw?si=qmtVXL_eJkTZ8oEq) |
| 136 | +- [Configuring SQL Server in a .NET Core Server in Reveal BI](https://youtu.be/oSQ13IikHn0?si=cizw6Hr_cqVWBDXz) |
| 137 | +- [Leveraging SQL Server Stored Procedures and Parameters in Reveal BI](https://youtu.be/Q2-TzTi7YJE?si=udnNCOf2fJCCDGqr) |
| 138 | +- [Configuring Row Level Security with UserContext in Reveal BI](https://youtu.be/dJttjCU-xC8?si=qyFDvuqtHR1HGIpf) |
| 139 | + |
| 140 | +For a comprehensive learning path, check out the **.NET & SQL Server Track Playlist**: |
| 141 | +[https://youtube.com/playlist?list=PLprTqzVaLDG8TSd0nIwgmAkwIF0xkJRI7&si=-TvFdEN4vNzeFfRP](https://youtube.com/playlist?list=PLprTqzVaLDG8TSd0nIwgmAkwIF0xkJRI7&si=-TvFdEN4vNzeFfRP) |
| 142 | + |
| 143 | +## Licensing |
| 144 | + |
| 145 | +A trial license key is valid for 30 days and can be extended upon request. When a license is purchased, the key is valid for the duration of the contract. It's important to keep track of the license expiry date to avoid disruptions. The license key can be set in code, configuration files, or the home directory. |
| 146 | + |
| 147 | +## Resources |
| 148 | + |
| 149 | +The following resources are available to help with the PoC: |
| 150 | + |
| 151 | +- **[Documentation](https://help.revealbi.io/web/)**: Comprehensive documentation covering installation, licensing, and various features. |
| 152 | +- **[GitHub](https://github.com/RevealBi/sdk-samples-javascript)**: The Reveal BI GitHub repository contains SDK samples, issue tracking for bug reports and feature requests, and discussions for community support. |
| 153 | +- **[Support via Discord Channel](https://discord.gg/reveal)**: A Discord channel dedicated to Reveal provides direct interaction with the product team. |
| 154 | +- **[Support via GitHub Discussions](https://github.com/RevealBi/Reveal.Sdk/discussions)**: A GitHub channel dedicated to Reveal provides direct interaction with the product team. Usually, you'd use this if you can't access Discord due to corporate policy. |
| 155 | +- **[YouTube Channel](https://www.youtube.com/@RevealBI/videos)**: Webinars and videos covering various aspects of Reveal are available on the YouTube channel. |
| 156 | +- **[JavaScript API](https://help.revealbi.io/api/javascript/latest/)**: Reveal offers a comprehensive JavaScript API that allows customization of almost every aspect of the dashboard, including visualization chooser, editing modes, and adding custom elements. |
| 157 | +- **[Developer Playground](https://help.revealbi.io/playground/)**: An interactive playground to experiment with Reveal BI's features. |
| 158 | +- **[Add Feature Requests, Bug Reports, or Review Open Issues](https://github.com/RevealBi/Reveal.Sdk/issues)**: Reveal's GitHub repository where you can review, add, or comment on new or existing issues. |
| 159 | + |
| 160 | +## PoC Requirements |
| 161 | + |
| 162 | +### Check-in Calls |
| 163 | + |
| 164 | +Weekly check-in calls lasting 10-15 minutes will be scheduled to provide updates and address any challenges during the PoC. |
0 commit comments