Git Product home page Git Product logo

atlan-front-end-coding-challenge's Introduction

Atlan Front End Coding Challenge

To create, design and implement a web-based application capable of running SQL queries and displaying the results of said query. The application must include a space which accepts SQL queries in the form of user inputs, then runs the given query, and displays the result within the application.

Sample query to run select * from customers;


1. Overview: How I went about completing this challenge

Breakdown
Ideation ๐Ÿ’ก The challenge as I saw it was to design and create a simple SQL client, that's capabale of running queries and displaying them. Having used a couple SQL clients in the pase, I tried to draw inspiration from these (Sequel Pro, etc).
Design ๐Ÿง‘๐Ÿปโ€๐ŸŽจ The most intuitive way to develop this application was with a Dashboard layout - with clear sections for input/output, etc. With the additional prompt to be able to "toggle between queries", I leaned further into the Dashboard layout and used the sidebar to display the history of queries. Being able to always see the history of previous queries and click on them to view is far easier than a dropdown.
Implementation โš’๏ธ With a focus on usability and functionality, I decided to add prompts, prominently place the Run and Clear buttons. I also decided to add some CSS rules explicitly make the SQL input look like a code block. The output is rendered as a HTML table which is easy for everyone to read and understand

2. Specification

  • JavaScript framework used = React
  • Major plugins used:
    • sass: I wanted to use some of the features sass offers (like variables, mixins, etc) to be able create maintainable and reusable style rules

3. Page load time

I used Chrome Dev Tool's Performance Insights to measure perceived load time. The two metrics I looked are are: First Contentful Paint (FCP) and Largest Contentful Paint (LCP).

  • FCP is when the browser renders the first bit of content from the DOM, providing the first feedback to the user that the page is actually loading.
  • LCP is when the browser renders the largest visual pieces on the DOM, in our case this would be the dashboard layout, buttons, etc.
  • LCP < 2.5 seconds is absolutely must for a good user experience. Less than 1 second leads to great user experience.
During my testing (on a 2 GHz Quad-Core Intel Core i5 MBP), the score I got was between 0.2s - 0.3s (always under 0.5s) image

4. Optimizations

  • I was able to avoid loading any heaving external assets (images, etc), but in a real product this may not be always possible
  • My test application does have to load JSON files for the dummy outputs, but in a real product we will be querying for this on demand
  • Though the task didn't ask for mobile-optimization, I made sure the application was responsive and I did very basic mobile optimizations (removed the sidebar to allow for more screen space for the query and output). Given more time, I could definitely make it mobile optimized.

5. Screengrabs

Starting state Query with output
image image

6. Dealing with large outputs

Query with large output Query with large output with scrolling
localhost_3002_(iPad) (8) ezgif-5-2ee24cd932

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.