AbsolutOD

AbsolutOD

Has anybody used the sugar framework?

I was wondering if anybody has used the sugar framework for a real project? I am thinking about using it for my next api project and was hoping for some tips.

Why build this when Dynamo, Weber, and Phoenix exist with growing communities? While both projects are great in their own right, Sugar aims to be another contender, sparking more development on all three projects (and/or others that may follow) and giving developers another option when deciding what framework fits their needs best. Sugar may even strive to shake things up just as ChicagoBoss has done.

Most Liked

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Phoenix is actually much more like sinatra or flask than rails. It is made up of a few modules based on a pattern called Plugs. The way Plug works is that it creates a datastructure representing the connection, and then it passes that conn through a sequence of functions. Each of those functions are called plugs, because they abide by the Plug interface: they both receive and return a conn.

Phoenix routers are a plug, phoenix controllers are plugs, phoenix endpoints are plugs. It’s all exceptionally simple.

In order to facilitate new users, phoenix.new by default generates a full stack of stuff, but you can use flags to pair it down to just the basics.

Sugar is also based on plug, so both phoenix and sugar operate at the same level of abstraction.

Sugar also strikes me as a bit out of date. It mentions Dynamo in the readme for example, and Dynamo has been dead for over 3 years…

findlaech

findlaech

Hello. Sugar Framework contributor here.

I mainly used Sugar when I was creating dead simple APIs and websites and when Phoenix was too heavy to configure/use.

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

What I would be far more interested in is alternatives to Plug honestly. Elli for example is a fantastic erlang webserver but Plug’s semantics don’t map on to it very well. There have been a few attempts to get Plug to work with Elli and I haven’t seen any of them actually pan out.

Phoenix is basically just a “roll your own framework with these handy plugs” into which people integrate one of the dozens (hundreds?) of plugs available on hex.

Where Next?

Popular in Discussions Top

PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
New
AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
Ankhers
Just a little information upfront. Generally speaking, if I feel like I need to either break a pipe chain or use an anonymous function in...
New
crabonature
I’m still quite new to Elixir. As I understand we got in Elixir “multi guards” as convention to simplify one large guard with or’s?: de...
New
restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
New
RudManusachi
What configs will make sense to put to runtime.exs? – A bit of how I configure apps: I have generic configs in config/config.exs, dev...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New

We're in Beta

About us Mission Statement