Comments (2)
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.
@christianacca I'll close this for now, but please feel free to comment/reopen :)
from data-mocks.
Related Issues (20)
- github link not displayed on npm
- Update documentation to include XHR examples
- Test data-mocks with ie11
- Import of fetch-mock causes bundling to fail when using with create-react-app HOT 2
- npm deprecation warning for `babel-preset-es2015` HOT 1
- Matching http request are passing HOT 7
- Support wildcard urls HOT 1
- All of the IE11 bugs HOT 6
- Upgrade fetch-mock HOT 1
- Upgrade xhr-mock HOT 1
- Separate dev dependencies out of dependencies in package.json HOT 1
- Overhaul tests HOT 1
- Add build pipeline HOT 2
- Document integration patterns HOT 1
- Allow to control fetch-mock 'warnOnFallback' API via MockConfig HOT 3
- Use multiple scenarios at once HOT 2
- multipart requests pass-through not working correctly HOT 1
- (angular) when compiling against es2018, a warning occurs during build HOT 3
- Upgrade to the newest version of fetch-mock
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-mocks.