Comments

dhtml

Tue 23 Oct, 2018 12:58 pm

Ha! i have forgotten that you have grown feathers sef.

limistah

Tue 23 Oct, 2018 10:16 pm

It has some weird concepts and techniques. It is easier to understand, but very tricky to grasp.

dhtml

Wed 24 Oct, 2018 07:57 am

That sounds quite interesting and magical too.

limistah

Wed 24 Oct, 2018 12:54 pm
There is an extension of it, feathersplus. It complicates matters the more but adds a layer of simplicity. Same API requires understanding of feathers itself. Busts adds some awesome functionalities to feathersjs and it is what I use It tables/schemas are represented as services, just as in laravel. Say we have a user schema (I use mongo these days, pardon me) With that schema which I will call service, you don't need to set any express route to load ypour users, load a user, update a user delete. It requires the use of HTTP methods, to /users to determine what you intend to do, PUT l, PATCH for update DELETE for delete, POST for adding new, and GET for getting all or add /:id to get a particular record. With this service you just specify which database type are you interacting with when setting the schema, it supports famous databases untop of express. That said. OAuth is really simple, and local authentication is done using jwt token. Now the question comes where can I do my custom coding. It is a batteries included framework but gives you whole control through hooks. There are before and after hooks. So using users as example, there is before update, before delete, before create, before get. Same for after too. You can do what ever you want before hitting the database, say custom validations and return a 400 bad request error to the user or create a profile for s user after the user has been created. Sending emails, talking to external APIs should happen in the hook. This is what the feathersjs team did not stress which got me to trying to tweak the services. Services should not be tweaked. And there is this great support for sockets using socketio or primer, it uses a concept of channels to groups users, say one for authorised users and another for guests. So after login, you just move the user from the guest channel to the authorized channel in the after hook. With feathersjs you learn some ways things can be done smartly and neatly. The whole of an API should take relatively less amount of time when done with it. It boosts developers creativity and productivity. Don't take a look at feathersjs if you don't know enough of express middlewares, promises, async await functions and creating a wrapper function that returns another function (forgot its name). You will scratch your head when you see very little code doing amazing things. We are flying always with feathersjs, and its plus.

dhtml

Wed 24 Oct, 2018 01:18 pm

Chai, this is why programmers have to be upgrading tirelessly, after some time now we will hear turkey++

dhtml

Thu 25 Oct, 2018 10:15 am

Hahaha, oh well, yeah or you would rather have crayfish++