connected-cjohnston

connected-cjohnston

I am in the process of learning Elixir and Phoenix, and so far, all the example apps that I see use LiveView and are small, dynamic single page applications that are all some variation on chat apps. As such, I have a few questions:

  1. Are regular phoenix controllers still usable or have they been basically deprecated with LiveView being the way forward?
  2. With LiveView, is it possible to create large scale SAAP style web applications with Phoenix or are small, dynamic apps with one or two controllers the sweet spot for phoenix?
  3. Assuming one can still use regular controllers, are there any good resources out there for how to build multi-controller web apps with phoenix 1.7? Unfortunately, all the guides that I have found so far use LiveView and mostly skip over how to work with regular controllers.

Showing Posts 1 to 5

sodapopcan

sodapopcan

Hello and welcome!

The Official Phoenix Guides is really the best resource. Elixir’s documentation is pretty fantastic and, if you’re not used to that coming from other ecosystems, I would always look there first. Controllers are absolutely still usable and will not be deprecated (websockets can’t set session data so they are at least necessary for that kind of thing). The Contexts section goes in depth about building an end-to-end feature and it uses controllers.

As for building a large SAAP app I can’t speak from experience there. Phoenix should be quite capable of building very large applications, though coming from me that is merely speculative based on others’ reports of their experience :slight_smile:

Here is a somewhat verbose description of hexdocs I gave to someone else who asked a similar question recently (because I didn’t notice these things right away, ha).

kokolegorille

kokolegorille

Yes it is still usable. There should be a page_controller created by default in any new Phoenix 1.7 project..

But now, previous templates, views and controllers are colocated in a controllers folder.

When You create API, You only have only controllers, no Liveview

neilberkman

neilberkman

As for building a large SAAP app I can’t speak from experience there. Phoenix should be quite capable of building very large applications, though coming from me that is merely speculative based on others’ reports of their experience :slight_smile:

I’m currently leading the development of a SaaS product, a CRM for commercial real estate brokers, using LiveView. The application is live, serving real customers, and I couldn’t be happier with the choice. The UI includes Kanban boards, multi-step forms and other fairly involved components.

I’d suggesting watching this conference talk: https://www.youtube.com/watch?v=XzAupUHiryg While it’s not a SaaS product, cars.com is a large-scale, very high traffic ecommerce site. The talk describes some issues they had when they cut over, but this is to be expected when completely rewriting an existing high-traffic application.

12
Post #3
connected-cjohnston

connected-cjohnston OP

Thank you for the link to the Contexts section of the docs. It looks like what i am looking for. I had not yet visited that page in my exploration.

matthieuchabert

matthieuchabert

Hi Chris!

You can definitely mix Liveview and controllers depending on your needs. Controllers are the only option if you serve an SPA for example.

About large scale Phoenix applications, at my company, we have a big monolith (~2000 Elixir files) that serves 4 web applications on different domains. We couldn’t be happier with our choice to build that with Elixir and Phoenix.

We started to use controllers a few years ago and slowly migrated them to Liveview. Honestly we don’t see the need for controllers anymore because we got used to working with Liveview :slight_smile:

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews