Git Product home page Git Product logo

Comments (2)

grug avatar grug commented on July 24, 2024

Hey @christianacca - happy new year!

I've just taken a look through angular-in-memory-web-api and can offer my thoughts :)

They achieve a pretty similar goal - they both intercept HTTP requests before they're made and give back canned responses.

I think the advantages of data-mocks (compared to angular-in-memory-web-api) are:

  • quicker and easier to setup
  • it's framework agnostic
  • scenario support
  • it's a smaller package
  • mocks have a simpler/clearer interface (that one is subjective)
  • smaller memory footprint

Don't get me wrong, though - angular-in-memory-web-api has plenty of advantages too - as it operates like a db, so you can mutate your mocks which is very handy.

The use case I can see where angular-in-memory-web-api is preferable to use over data-mocks is when you need to replicate the effects of persisting data across pages that has changed since you received the mock for it where you aren't maintaining it in local state. Also, you wouldn't want to use data-mocks in a unit test environment, whereas it looks like you could do that nicely with angular-in-memory-web-api. Other than these two things, I think data-mocks is a more sensible choice :)

Hope that helps - happy to discuss further if you like - or over a beer/coffee if you find yourself in London :)

from data-mocks.

grug avatar grug commented on July 24, 2024

@christianacca I'll close this for now, but please feel free to comment/reopen :)

from data-mocks.

Related Issues (20)

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.