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
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
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
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.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









