Git Product home page Git Product logo

demo-tickets's Introduction

demo-tickets

Context

This is a system created to propose a solution for a challenge made from Byrd. The original task can be found at /challenge folder.

Proposal Solution

Requirements

To run this project you will need globally installed Node.js and their package manager called npm. I tested the system for node version 6.9.5 and npm version 5.6.0.

It also needed angular-cli version 1.6.8

Language and Tools

As this project is a Front-End only and the proposition is also about Typescript, I choose Angular to get ahead with it.

In this context, make sense use the best tools available to accelerate the development and in Angular, the must have is angular-cli. This project was generated with Angular CLI version 1.6.8.

I have 2 diferent reasons to choose Boostrap 4 to improve the design. The most obvious is that Byrd is using it in their tech stack and the other is that it is a very popular framework.

With this choices I have the complete range of requested languages (HTML, CSS and Javascript,Typescript) covered.

Architecture

  • The system is structured using MVC pattern. The models are isolated in the /models folder that includes the ticket and the employee models.

  • All the communication with the back-end is done using services. I created 2 of them: one to deal with tickets, named TicketService and another named EmployeeService. Their concern is the communication with API and they live in /src/app/services folder. Have both are probably a overkill for a small system like this one but I decided to go ahead with this for clarity purposes.

  • The view is controlled directly from the Angular components and their (wonderful) css isolation.

Additions / Tradeoffs

  • Obviously, the Employee model is needed because one of the requirements is to log in to edit the tickets. For deal with the registration of employees, I also included a tiny Admin interface at http://localhost:4200/admin.

Technical Decisions

Limitations

  • Since I am negotiating a Front-End position with them, I decided to not develop the Back-End of the system, for now. It can be done in the future, for demonstration purposes.

Running and Testing

How to run the code

The code can be run using the development server. To do this, first you need to install the libraries using npm install and then ng testwill make the trick.

The website will be acessible at http://localhost:4200/.

How to run unit tests

Unit tests

As any angular-cli projectsm this one uses Karma as testing mechanism. You can just run ng test to execute the tests.

end-to-end tests

Because e2e tests are very time consumming to develop and not even mentioned in original proposition, I made the option to don't do it. It can be done, if needed.

demo-tickets's People

Contributors

jbgoldberg avatar angular-cli avatar

Watchers

James Cloos avatar  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.