Except for Phoenix, I mean with commands support, tinker, jobs, scheduler, database modelling with complex relashionship declarations … Tools which make fetching data from DB easier …
There’s no one-size-fits-all solution in Elixir, you have instead lots of libraries that are highly interoperable.
Commands: I guess you could say mix tasks and release scripts?
Jobs: Oban or Broadway if you use something like SQS
Scheduler: Oban probably, or Quantum, depends on what kind of scheduling you mean
Database modelling with complex relationship declarations: Ecto (included with Phoenix project generators)
Contrary to common beliefs from newcomers to the ecosystem, phoenix is just a web library and nothing more, the rest of the functionality comes from other libraries, and some of the generator options for
mix phx.new include them in your project because it’s just so common to use them. Phoenix is not your application so for the most part it will relegate itself to the web layer and get out of the way when designing the core of your system(for which web is just one of the many interfaces you can have).
A note on Ecto though: it’s a library for data modelling, casting/validation, persistence and query builder. It’s NOT an ORM like Eloquent/ActiveRecord, so there’s some getting used to you’ll have to go through, it’s a paradigm shift.
And a honor mention to Ash framework, which can be used together with all the above to reduce boilerplate and make things easier to extend.
@dorgan summed it up nicely but just adding that it looks like tinker would just be iex. In Elixir land, having access to your entire app in a shell isn’t anything special and definitely not framework-secific. Any mix project (Phoenix is a mix project) can be loaded into iex by starting it with
-S mix inside your project’s root directory:
~/my_app/$ iex -S mix. Furthermore, any Elixir module can be loaded into a running shell with the
iex> c "some_file_containing_a_module.ex"
Tinker is just
iex -S mix phx.server, it will launch the app and you will be in the IEx REPL with access to all modules and functions existing in the system. (As in any other non-phoenix elixir app but it would simply be
iex -S mix, which will work with phoenix but it will not start the web server by default).
For commands you can create mix tasks, it is not specific to the web framework but supported directly by Mix.
As @dorgan said, while PHP is lacking a lot of developer tools that are then provided by frameworks, a lot of stuff is direclyt available in the language or provided by specialized libraries in the Elixir world.
Thank you all.