Skip to content

viniciusshenri96/github-user-search-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub user search app

 

🚧 GitHub user search app 🟢 Completed 🚀 🚧

 

Project description 📚

This is a solution to the challenge GitHub user search app.

In this project I was able to put into practice the MVC architecture

Challenge Difficulty - Junior

 

What did I put into practice?

  • MVC architecture: a pattern of software architecture responsible for contributing to the optimization of speed between requests made by user commands.

 

Model: Business logic, state, API

// State
export const state = {
  users: {},
  darkMode: "",
};

// HTTP/API
const res = await Promise.race([
  fetch(`${API_URL}${query}`),
  timeout(TIMEOUT_API),
]);

Controller: Application logic, is the controller that bridges the gap between Model and View

// Searching for information in the model
await model.searchUserGitHub(query);

// Sending information to the View
resultsView.render(model.state.users);

View: Presentation Logic, what will be shown on the screen to the user

  errorMessage() {
    const markup = `
    <span class="content__results">No results</span>
    `;
    this._parentForm.insertAdjacentHTML("afterbegin", markup);
  }

Links

 

My process

Built with

 

👨‍💻 Author

About

In this project I was able to put into practice the MVC architecture

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published