News for hackers. Stuff that matters.
Re:Ask HN: What is a good React stack? by CuriouslyC on Monday August 15, 2016 @05:26PM (#12293596)
In terms of front-end, definitely go Redux. If I can toot my own horn, I suggest React/Redux/Radical (http://www.nathan-rice.net/projects/radical/ ); it greatly simplifies working with Redux. I also suggest Typescript, you're already going to be on the hook with Webpack, you might as well take the small extra step and get a much better development experience.

As for a back-end, Postgrest is absolutely amazing. There are examples of how to implement auth with Postgrest on the official site. If you implement your application logic as stored procedures in the database, you don't need Flask/Django/etc at all.

Re:Ask HN: What is a good React stack? by ruslan_talpa on Wednesday August 17, 2016 @12:17PM (#12305784)
@CuriouslyC can you share a link to your project for the PostgREST ecosystem page (or at least in a private email)? It is also interesting to me in what cases you needed to create RPC functions to get the functionality you need out of PostgREST? Is it inserting data in multiple tables with a single request?
Re:Ask HN: What is a good React stack? by jcroll on Wednesday August 17, 2016 @11:57AM (#12305638)
How would you send an email when an event occurs (e.g. user registration) if your only backend logic is stored procedures?
Re:Ask HN: What is a good React stack? by ruslan_talpa on Wednesday August 17, 2016 @02:15PM (#12306917)
The basic idea is that in db you generate events (lots of ways) and a custom script listens and reacts (sends the email) This page can give you an idea http://postgrest.com/examples/users/ (somewhere in the middle of the article)

But also note that there are tons of ways to extend the functionality of PostgreSQL. Here is a stackoverflow answer about this also http://stackoverflow.com/questions/12002662/how-can-i-send-e...

it is even possible to do it directly in the db (but not recommended) http://brandolabs.com/pgmail

Re:Ask HN: What is a good React stack? by jcroll on Wednesday August 17, 2016 @04:27PM (#12308170)
Right, then you still need a script listening to the event omitted from Posgrest. And if the scripts you are building are anything less than trivial it seems to me you are right back to Flask/Django/etc at all.
Re:Ask HN: What is a good React stack? by ruslan_talpa on Thursday August 18, 2016 @12:28AM (#12310423)
are you saying you need a framework to send an email or that somehow that script is not trivial?

Maybe you are saying that it's not just email, you have to interact with some other services ... ok so it's a bit more complex and you go for a framework to handle that but your problem/task has just been reduced from building a complete REST api to reacting to a handful of events and taking appropriate actions. Postgrest is an executable that you start and you have an api right that second, it's not like it's another framework that you need to code against.

Re:Ask HN: What is a good React stack? by ruler88 on Monday August 15, 2016 @05:29PM (#12293612)
the link isn't working :(
Re:Ask HN: What is a good React stack? by CuriouslyC on Monday August 15, 2016 @05:51PM (#12293769)
Thanks for the heads up. Fixed.