Earlier quoted context omitted.
Just a quick one: why would you need redux for forms? This is in my opinion a total overkill. I have forms either having their own state or (preferred) just use Formik for all of this. In my stack, this then allows to just add a field in the GraphQL schema (backend), add it in the query, add the formik field + yup validation and done.
Some people would argue that if using Redux, also having local state logic is an anti pattern. That would mean that if you use Redux, a form also requires actions for form update/submit/success/error and the form data should be stored in the redux store. That is one of the main issues I have with Redux, which I feel adds automatic complexity for simple things, but at the same time I'm not sure if it's very good to ha…
Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
111–120 of 155 posts
Re: Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
#112Earlier quoted context omitted.
Yep! Just use Plug. There’s no need to drag the entire Phoenix stack in. https://hexdocs.pm/plug/readme.html
Then you'll need to create own version of migrations, routing, configure asset building pipeline etc etc etc. Phoenix have everything in place, without need to re-implement lots and lots of basics
Re: Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
#113Re: Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
#114Why is Elixir always being paired with Phoenix? Can’t I just have a backend API running on Elixir and a javascript front end to interact with it? I’d prefer a simple React, Postgres, Elixir stack (REP).
Generate a new Phoenix app. Open up the endpoint file. Don't want routing? Comment it out. Don't want logging? Comment it out. Keep what you want, discard the rest.
Re: Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
#115Good read. Curious about Elixir. Why would one use this over ‘plain old’ Erlang / OTP apart from the Rubyesque syntax, which might appeal to RoR devs?
Elixir's whole reason for existence is to make the Erlang programming model easier to use. Try it and see if it does.
Re: Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
#116Earlier quoted context omitted.
That was one of the reasons I choose this stack. The plan was hiring team just after stack was set. Unfortunately financial plans toppled and we (2 full stacks + front end UX) were stuck with very complex architecture designed for ~10. If I would be to working on only 1 part it would be great, but instead of parallelizing effort it was sequenced which kind of sucked.
It's early optimization at the architecture level. I've seen it happen so many times. On top of all you said, the GraphQL stack is horrible for caching. You will not have this problem until you reach really high traffic, but once you do, it will eat you alive. Unlike a rest endpoint, you can't cache a URL. You can't use HTTP headers. You don't know beforehand what GQL query will come and even with batch queries for d…
Both Postgraphile and Hasura deal with this. I have no idea about Absinthe.
Re: Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
#117Earlier quoted context omitted.
If you're interested in the Phoenix Framework you should check out "Programming Phoenix: Productive |> Reliable |> Fast". It's written by the creator of Phoenix (Chris McCord) and the creator of Elixir (José Valim), and it's a fantastic intro to Phoenix.
Link: https://pragprog.com/book/phoenix14/programming-phoenix-1-4
Re: Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
#118I've just been trying to get back into elixir recently, myself. I'd done some basic crud 'helloworld' stuff when I first tried about a year into professional development. I've since had the Fortune to spend time learning about cloud native apps, distributed service patterns, and supporting infrastructure (spring cloud, pcf, vanilla k8s, gcp) and now returning to elixir having at least better understanding of what erl…
I almost exclusively learned the basics of Elixir / Phoenix by looking at the source code of https://changelog.com which is at https://github.com/thechangelog/changelog.com . Major kudos to them for open sourcing their platform. It covers like 50+ common web dev features. I pretty much skimmed the docs to get the ultra basics, looked at that source while I was building my own app and then asked questions when I got r…
Re: Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
#119Ok, for backend, I’m deciding between rust with actix, jvm (kotlin + akka/quasar) or elixir. I kinda know the theoretical differences but I’m curious what hn thinks. Has someone actually deployed things in some of these. I do have preference towards rust but maybe there’s something better.
Dotnet Core is actually really nice as well, I think v3 is right around the corner. Something worth checking out if you're looking into beckend technologies. I've been using it lately, coming from Node.js for the last few years, and it's been a really nice change.
Re: Elixir, Phoenix, Absinthe, GraphQL, React, and Apollo
#120Why is Elixir always being paired with Phoenix? Can’t I just have a backend API running on Elixir and a javascript front end to interact with it? I’d prefer a simple React, Postgres, Elixir stack (REP).