Simplifying Analytics in React Apps

Rate this content
Bookmark

Love React? In this talk, we’ll explore modern SDKs that let developers focus on the front-end experience by taking care of back-end data orchestration and data modeling. Using familiar languages like JavaScript or TypeScript, these tools enable quick integration of customizable, powerful analytics into React apps. By reducing backend complexity, developers can prioritize building dynamic, data-rich UIs without the hassle of managing infrastructure.

This talk has been presented at React Summit US 2024, check out the latest edition of this React Conference.

FAQ

The main topic of the presentation is simplifying analytics in React apps.

The presenter is a solution engineer at Sisense.

Sisense aims to enable developers to build embedded analytics using familiar languages like JavaScript and TypeScript, simplifying the process and allowing greater customization.

Sisense simplifies analytics by reducing backend complexity, allowing developers to prioritize building dynamic data-rich UIs without managing infrastructure, and providing APIs for customization.

Sisense supports using JavaScript, TypeScript, and modern SDKs for building customizable analytics in React applications.

The three steps are constructing a semantic layer, building reusable components in React, and performing interesting tasks with the SDK.

A semantic layer in Sisense describes the data and provides context to facilitate developers' work, enabling easier integration with other solutions.

Sisense allows developers to build React components directly off a data model by providing a simplified code framework and a translation engine for user authentication and security.

Sisense offers advantages such as eliminating the need for SQL API calls, enabling cross-filtering, drill-down, and interactive measures, and allowing developers to focus on UI design.

Sisense can use large language models to allow chatbots to generate visualizations and components, change visualization types, and design dashboards through a conversational approach.

Stephen Robb
Stephen Robb
7 min
19 Nov, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
I'm presenting on simplifying analytics in React apps. We want to build embedded analytics for developers using common languages like JavaScript and TypeScript. By reducing backend complexity, developers can prioritize building dynamic data-rich UIs. BI platforms didn't deliver the customization required, so we aim to use React to create a powerful SDK. The SDK involves constructing a semantic layer, building reusable components in React, and doing cool things with it. We simplify the data model and generate a TypeScript representation. Sisense provides APIs for authentication, row-level security, and customization. We can now build React components directly off the generated model. The data model called datasource enables simple UI and eliminates the need for front-end engineers to write SQL API calls. We built a near-production-ready application using a React template and Sisense as the backend. With the simplified system and a semantic layer, we can now use large language models for chatbot-driven visualizations and dashboard layouts. This framework enables faster development and alternative methods for generating interactive React objects.

1. Simplifying Analytics in React Apps

Short description:

I'm presenting on simplifying analytics in React apps. We want to build embedded analytics for developers using common languages like JavaScript and TypeScript. By reducing backend complexity, developers can prioritize building dynamic data-rich UIs. BI platforms didn't deliver the customization required, so we aim to use React to create a powerful SDK. The SDK involves constructing a semantic layer, building reusable components in React, and doing cool things with it. We simplify the data model and generate a TypeScript representation. Sisense provides APIs for authentication, row-level security, and customization. We can now build React components directly off the generated model.

As he said, the thing I'm presenting on today is simplifying analytics in React apps. Oh, technical difficulties, sorry. One second. Okay, we're back.

Okay, so I want to talk to you about a recent process that we've kind of gone through here at Sisense. So I'm a solution engineer here at Sisense, and, for those that don't know, I mean, some of you have heard called it cSense and every variation of the name, but at Sisense we are a full stack BI platform. And one of the kind of things that we wanted to do was open it up so that developers could also get a little bit more engaged on the BI, which has been a pretty big shift.

So what I want to kind of talk to you guys a little bit about today is how we can build embedded analytics for developers. And that means using common languages that you guys are all used to, like JavaScript, TypeScript, all the modern SDKs that can enable customizable, powerful analytics, directly into your React applications. And by reducing the backend complexity, we can enable developers to prioritize building dynamic data-rich UIs without the hassle of necessarily managing all the infrastructure that traditionally comes with that.

So laying out the kind of problem to you guys, like I said, BI platforms didn't necessarily deliver the level of customization required for some of today's analytics applications. I'm not sure if you guys have used BI platforms, Tableau, Power BI, there's a million of them these days, but most of them are not incredibly customizable. Because Sisense has moved into this more embedded space, one of the things that we want to do is really enable, like I said, our developers to be able to use the languages that they're used to and be able to customize what a BI experience can kind of look like. So basically, the thought that kind of started this was, can we use React to create a powerful SDK able to replace a BI tool frontend?

The requirements that we kind of devised for creating this SDK comes in three simple steps. Construct a semantic layer, something that describes the data and gives us some context to kind of work off of. Build some reusable components, in this case in React, and then do some cool things with it.

Hopping into the semantic layer. In Sisense, we have our own editor of how we can kind of bring tables together, join them, and describe the relationships between the data. But this could easily be any other solution that you guys are currently using, a DBT, any other semantic kind of tool. But the idea is that by kind of simplifying the data model and giving it context, we can then feed it into other solutions that will let us then allow developers to work off of it easily. So moving forward one more slide. What we did is we were able to build a really simple just kind of generator, basically, that would take the joins that we just saw in that data model previously and allow us to generate a TypeScript representation of that data model. So over here on the right, in the very maybe tiny, maybe large, I can't tell, kind of code snippet over there, we basically just have a simple representation of what that data model looks like. In this case, we're just using the data model names, the tables, the columns, the data types. We could throw in like some additional formulas and kind of things like that. But this could easily be extensible to also add things like data dictionary or additional context that you would want your developers to have inside the application. And then once we have that kind of built out, we can now start building React components directly off of that. So basically, because Sisense kind of has that translation engine, we can really simplify the lines of code for a developer to now reference that model that we have. So Sisense basically brings the black box of how we do the user authentication, how we apply row-level security, just hundreds of APIs that allow you to do some customization and abstract basically how you can build these data products. So looking at this kind of little code snippet that we have over here, we're just specifying that we want a line chart.

2. Implementing Data Model and UI

Short description:

The data model called datasource enables simple UI and eliminates the need for front-end engineers to write SQL API calls. We built a near-production-ready application using a React template and Sisense as the backend. With the simplified system and a semantic layer, we can now use large language models for chatbot-driven visualizations and dashboard layouts. This framework enables faster development and alternative methods for generating interactive React objects.

It's going to a data model called datasource, and you can see that we now have those references that are showing our tables. So our commerce table, a couple of additional kind of nice quality of life things would be maybe date that we can easily segment into different areas, things like that.

It also enables really simple UI. So working in the exact same way, the queries to retrieve things like member filters or date filters can now be done in a few lines of code instead of requiring a developer to do any queries themselves. So the why is that it makes things incredibly easy to implement. It enables things like cross-filtering, drill-down, interactive measures and dimensions to even enable things like self-service, and it completely eliminates the need for front-end engineers to necessarily have to write any SQL API calls. We can leave all the logic in a very easy, intuitive BI platform and then allow our users to build their own front-end exactly how they kind of imagine it.

So here's some interesting things that our team has done with this lately. So in one case, we had a hackathon internally, and my leadership team originally said, oh, we'll give you a couple of weeks to kind of build something, but then in classic fashion as soon as the hackathon popped up, they asked me to do it in three days instead. And so I grabbed a React template. I worked with another guy named Steve. I had him do the data model piece, and then basically my job was to just do the front-end. And my background as a software engineer did help a little in this case, but the idea was that we were able to build a near-production-ready application, in this case using a template, whereas Sisense would power the entire experience, all the interactivity, all the features that we have in that BI platform, but now in a completely custom front-end wrapper.

And then where we're kind of going with this, now that we've simplified this system, have an easy semantic layer understanding of the data model that's referenceable directly inside the code, is that now we can start using the amazing large language model technologies that you guys have seen probably all day today. Because we have that easy kind of object interface to manipulate the queries, the dimensions, the measures, et cetera, we can now have a chatbot actually create these components, which I'm not sure how this GIF looks up here. Actually way better than I thought. But the idea is that he can ask questions to generate visualizations now, create components, change the visualization type, or even design entire dashboard layouts through a conversational approach as well.

And just some finishing notes for you guys. Like I said, the idea of this was we wanted to just make a simple way of accessing data in a framework that lowers the skill required to build complex data products. It enables developers to move a lot faster, and it opens up alternative methods of both generating React objects and making them interactive. But thank you very much for listening to me.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

The Future of Performance Tooling
JSNation 2022JSNation 2022
21 min
The Future of Performance Tooling
Top Content
Today's Talk discusses the future of performance tooling, focusing on user-centric, actionable, and contextual approaches. The introduction highlights Adi Osmani's expertise in performance tools and his passion for DevTools features. The Talk explores the integration of user flows into DevTools and Lighthouse, enabling performance measurement and optimization. It also showcases the import/export feature for user flows and the collaboration potential with Lighthouse. The Talk further delves into the use of flows with other tools like web page test and Cypress, offering cross-browser testing capabilities. The actionable aspect emphasizes the importance of metrics like Interaction to Next Paint and Total Blocking Time, as well as the improvements in Lighthouse and performance debugging tools. Lastly, the Talk emphasizes the iterative nature of performance improvement and the user-centric, actionable, and contextual future of performance tooling.
Rome, a Modern Toolchain!
JSNation 2023JSNation 2023
31 min
Rome, a Modern Toolchain!
Top Content
Rome is a toolchain built in Rust that aims to replace multiple tools and provide high-quality diagnostics for code maintenance. It simplifies tool interactions by performing all operations once, generating a shared structure for all tools. Rome offers a customizable format experience with a stable formatter and a linter with over 150 rules. It integrates with VCS and VLSP, supports error-resilient parsing, and has exciting plans for the future, including the ability to create JavaScript plugins. Rome aims to be a top-notch toolchain and welcomes community input to improve its work.
Conquering Complexity: Refactoring JavaScript Projects
JSNation 2024JSNation 2024
21 min
Conquering Complexity: Refactoring JavaScript Projects
Today's Talk explores the complexity in code and its impact. It discusses different methods of measuring complexity, such as cyclomatic complexity and cognitive complexity. The importance of understanding and conquering complexity is emphasized, with a demo showcasing complexity in a codebase. The Talk also delves into the need for change and the role of refactoring in dealing with complexity. Tips and techniques for refactoring are shared, including the use of language features and tools to simplify code. Overall, the Talk provides insights into managing and reducing complexity in software development.
Improving Developer Happiness with AI
React Summit 2023React Summit 2023
29 min
Improving Developer Happiness with AI
Watch video: Improving Developer Happiness with AI
GitHub Copilot is an auto-completion tool that provides suggestions based on context. Research has shown that developers using Copilot feel less frustrated, spend less time searching externally, and experience less mental effort on repetitive tasks. Copilot can generate code for various tasks, including adding modals, testing, and refactoring. It is a useful tool for improving productivity and saving time, especially for junior developers and those working in unfamiliar domains. Security concerns have been addressed with optional data sharing and different versions for individuals and businesses.
Static Analysis in JavaScript: What’s Easy and What’s Hard
JSNation 2023JSNation 2023
23 min
Static Analysis in JavaScript: What’s Easy and What’s Hard
Static analysis in JavaScript involves analyzing source code without executing it, producing metrics, problems, or warnings. Data flow analysis aims to determine the values of data in a program. Rule implementation in JavaScript can be straightforward or require extensive consideration of various cases and parameters. JavaScript's dynamic nature and uncertainty make static analysis challenging, but it can greatly improve code quality.
Automate the Browser With Workers Browser Rendering API
JSNation 2024JSNation 2024
20 min
Automate the Browser With Workers Browser Rendering API
The Talk discusses browser automation using the Worker's Browser Rendering API, which allows tasks like navigating websites, taking screenshots, and creating PDFs. Cloudflare integrated Puppeteer with their workers to automate browser tasks, and their browser rendering API combines remote browser isolation with Puppeteer. Use cases for the API include taking screenshots, generating PDFs, automating web applications, and gathering performance metrics. The Talk also covers extending sessions and performance metrics using Durable Objects. Thank you for attending!

Workshops on related topic

Solve 100% Of Your Errors: How to Root Cause Issues Faster With Session Replay
JSNation 2023JSNation 2023
44 min
Solve 100% Of Your Errors: How to Root Cause Issues Faster With Session Replay
WorkshopFree
Ryan Albrecht
Ryan Albrecht
You know that annoying bug? The one that doesn’t show up locally? And no matter how many times you try to recreate the environment you can’t reproduce it? You’ve gone through the breadcrumbs, read through the stack trace, and are now playing detective to piece together support tickets to make sure it’s real.
Join Sentry developer Ryan Albrecht in this talk to learn how developers can use Session Replay - a tool that provides video-like reproductions of user interactions - to identify, reproduce, and resolve errors and performance issues faster (without rolling your head on your keyboard).