New answers tagged

3

In general, something like this is a good idea. I'm not very experienced with JavaScript in particular, but have loads of experience testing other languages. And there I have found that exposing callback hooks like this is an extremely valuable technique to allow dependency injection without drastically changing the overall architecture – in fact, I recently ...


1

Here's a good answer by the bluebird author about the speed issue with ES6 promises. Obviously, he has a bias, but he's also looked at the problem in quite some detail. Those issues that slow down ES6 promises are because of the way they are specified, and therefore are still present. I don't think it's drastic enough for speed to be your deciding factor, ...


1

I'm a newbie and I'm pretty sure this is an opinion-based answer which is really outside the scope of the board. With that, here's my practical experience: There are no implicitly bad ways to structure code, so long as the structure can be described simply. The only thing bad about poor code structure is lack of discipline: if you consistently follow the ...


5

For this answer, I'll assume that the C++ code is ONLY well-tested and perfect security wise. If if would be actually be perfect then you wouldn't have asked this question anyways... This is a general compilation of the first things that came to my head, not a complete list. technical disadvantages of using C++: (or basically any external language addon) ...


3

I do not exactly know what you mean by security risks, with the need to typecheck passed parameters using the is* methods on arguments or obtaining the value representation using the v8::Value, the passed arguments are quite safe to work with. If you are afraid of manual memory management and consider that a risk (which is not even that scary anymore, with ...


1

Should I rely solely on mongoose's validation for input validation, or should I write my own before it even gets to mongoose? I think that kind of checks should be done by your service, between DB and HTTP modules, not inside DB. For output filtering, should I create a security / filtering module which accepts a Product and returns a ...


2

If there's only ever one image per person, you may not need a separate image data store. You could store the path with the user. Keeping it separate doesn't hurt, or course. Regardless of how you store it, I would simply return the image path as part of the user "profile". /api/userprofile/id might return: { name: "Honey Boo Boo", favoriteColor: ...



Top 50 recent answers are included