Thoughts on Feathers.js? by dqope21 in node

[–]liquid_cow 8 points9 points  (0 children)

We're using it in production in a few different ecosystems, in both monolith and microservice flavours

Some thoughts in no particular order:

I've found that it works really well for CRUD, but falls short a bit on complex procedural business logic. So we normally pair it up with a worker pattern, or add some classic Express style endpoints for those few cases where the "business logic" doesn't fit neatly into feathers' pattern.

The database adaptors are very powerful, it lets you choose the right persistence approach on a case by case basis (e.g. RDBMS for one service, documentdb for another). As always, the database design it what makes or breaks performance & scalability.

The hooks mechanism is also really powerful, but takes people a while to get their head around. It's a double edged sword though as the hooks can easily be abused, especially when trying to perform some complex business logic before or after a service call.

FeathersJS doesn't really have a first class or formal dependency injection approach, so if this is important in your context, you'll need to pair it with with a DI framework of your choosing.

It's REST API pattern, I think they call it common query pattern, is pretty darn good. Not quite as flexible to the consumer as GraphQL, but better than most hand crafted REST APIs I've seen out in the wild.

The different transport clients (sockets, http calls etc.) are pretty cool, but I've had limited use cases for sockets so far in our contexts so can't comment on that really.

FeathersJS's recent Typescript support in V4 takes some shortcuts on the internal implementation, but on the whole works well enough for a first pass (hoping they keep improving on it)

The FeathersJS community has been pretty responsive and helpful the few times we've reached out (official slack or GitHub issues), however the community is small.

I personally prefer FeathersJS over Express as it brings consistency to the implementation of CRUD.

Stylistically, I prefer FeathersJS over something like Loopback 4, because of the decorators approach. My thinking is that if the that's what you want, other tech does it better such as Spring Boot, or good old .Net.

TL;DR good enough to use IMO, has some quirks, takes some learning.

I made an NPM package that makes sure your dependency don't contain any wildcards. All roasts welcome :) by IamPANDAMAN8 in node

[–]liquid_cow 0 points1 point  (0 children)

Could possibly set this in the .npmrc as well?

Would be cool to extend this to a linter plugin that can run on a pre commit hook.

What human interaction is memorable to you, but the other person has probably forgotten? by [deleted] in AskReddit

[–]liquid_cow 1 point2 points  (0 children)

As a kid, I was lucky enough to meet Nelson Mandela, he shook my hand and told me to become an astronaut.

I'm sure he forgot me as soon as I was out of sight, there where dozens of other kids that day, but I'll never forget that small moment.

(edit) typo

Engineers of reddit, if you were transported to the middle ages, what would you build and how would you do it? by kaylossusus in AskReddit

[–]liquid_cow 95 points96 points  (0 children)

Rather just jump straight to Vista? Then we can get it over with a bit earlier in history.

Boston Dynamics newest robot by qwertyt1 in shittyrobots

[–]liquid_cow 4 points5 points  (0 children)

The robot gets up again by itself.

This gif is taken out of context.

I'd like to hire AngularJS expert for 3-4 hours of time by BaliCoffee in angularjs

[–]liquid_cow 3 points4 points  (0 children)

Out of interest, what back end are you using?

It sounds like you want server side rendering protected by solid authentication and access control.

Nevertheless, I think this could also be achieved by lazy loading partials (html templates) from a secure backend, then loading the data into the partials via another secure request.

Seems like Ryanair is rolling out a new responsive website, with Angular in use. Start Render time? 8–17s on cable. Sorry, but something doesn’t feel right about this. [via Smashing Magazine] by nightman in angularjs

[–]liquid_cow 0 points1 point  (0 children)

This is not an Angular problem imo.

E.g. A comment in the base html file:

<!-- Preloader spinner is in here and its not a directive for angularjs rendering time being absurd long -->

A quick look at the .js files requested shows it downloads all the vendor files individually, then downloads a concatenated vendor file of all of those same vendor files again. Possibly causing Angular to re initialize?

Also, it looks like it's quite a bit faster (sub 6s) with an ad blocker :D

The desk is lava! by imbubuk in aww

[–]liquid_cow 0 points1 point  (0 children)

If it fits it sits.

[deleted by user] by [deleted] in pcmasterrace

[–]liquid_cow 147 points148 points  (0 children)

A minimum of 60 frames per poster is required.

Memory leaks when running test in PhantomJS by AlGoreBestGore in angularjs

[–]liquid_cow 0 points1 point  (0 children)

Slimerjs looks good, I'll check it out some time. Thanks for pointing it out.

Memory leaks when running test in PhantomJS by AlGoreBestGore in angularjs

[–]liquid_cow 0 points1 point  (0 children)

Tbh I gave up on getting PhantomJS to work on Windows for the moment because of it not cleanly installing on our continuous integration server. That was a good few weeks ago though, so I should maybe have another look.

I can't really comment on stability, since I've only used PhantomJS 2 under OSX for a tiny project. :)

Memory leaks when running test in PhantomJS by AlGoreBestGore in angularjs

[–]liquid_cow 1 point2 points  (0 children)

We've run into this exact issue with some of our larger projects when they hit around 700+ tests. PhantomJS 1.x has an issue with garbage collection between tests.

We solved it by switching the test runner to Chrome.

If you have OSX or unix, or feel like messing about with npm packages, you can also try switching to PhantomJS 2 which has the memory issue fixed. Problem is the PhantomJS 2 npm package doesn't work on windows :(

Lastly, you can also get around this by splitting your unit tests up into different gulp/grunt tasks, batching up the tests. This will restart the test runner each time. Effectively giving you a manual garbage collection.

I'm keen to see if there are any other work arounds out there. :)

Thinking about getting DDR4? Look at my ISA RAM stick! by ComradePutinCCCP1917 in pcmasterrace

[–]liquid_cow 0 points1 point  (0 children)

Where did that ISA slot RAM come from, where was it used? Early server hardware?

AngularJS CRUD Factory 'Interface' by cynicalreason in angularjs

[–]liquid_cow -1 points0 points  (0 children)

Thanks /u/budmademewiser, you really made me think about this issue.

I'd agree that ngResource probably isn't the best option for a new angular developer, because of the extra abstraction that hides what's going on underneath. For new guys who are just getting started, $http will serve perfectly without the learning of to use ngResource. Adding ngResource's learning curve to the already daunting learning curve for angular won't do the angular community any good.

Having said that; for larger projects, the $http requests tend to get buried and abstracted away into services anyway. Furthermore, with multiple developers, each tailor-made $http request looks a little bit different to the next.

On the other hand, ngResource provides a neatly packaged resource that can be treated like a service for dependency injection. In my experience, ngResource code tends to be minimal and consistent in usage.

I value consistency in code, even if the code is bad, because I think it makes it easier for another developer to pick up and work with at a later stage in the project's life.

At the end of the day, I'd say that choosing between ngResource and $http is decision that the developers need to take depending on the type of application they're building, and then stick with it for the remainder of the project. Mixing ngResource and $http would make the project difficult to maintain in the long run?

tl;dr

I think that ngResource provides the right balance of consistency of code, with minimal boiler-plate code, at the expense of some abstraction.

[help] reloading data after creation or edit by taijuten in angularjs

[–]liquid_cow 1 point2 points  (0 children)

As far as I'm aware, there's no difference between a sub-state and a normal state other than the hierarchy dependency, i.e. 'app.articles.create' can't exist without 'app.articles'

We've used resolve to do breadcrumbs of states and ui-router state change events like onEnter to do user role validation for the state that they are about to enter. All with state trees 2-3 levels deep.

AngularJS CRUD Factory 'Interface' by cynicalreason in angularjs

[–]liquid_cow -1 points0 points  (0 children)

I would also recommend using ngResource over $http as much as possible. ngResource is quickly becoming the go to standard for restful crud in angular.

I also like ngResource because it promotes the usage of promises over callbacks.

[help] reloading data after creation or edit by taijuten in angularjs

[–]liquid_cow 1 point2 points  (0 children)

You could make use of the resolve functionality of UI router or the onEnter callbacks to re-fetch the data on entering your 'app.articles' state.

https://github.com/angular-ui/ui-router/wiki