dstockdale

dstockdale

I had to search around for a CMS for a project recently. It was the first time I’ve had to do that in years but I was surprised that nothing seems to have changed in the past 10 years. Most of the search results were for PHP and there’s a good reason for that.

I’m not a fan of PHP but language bashing aside it has one fantastic thing going for it which is you can create plugin systems with little effort because everything is just run from top to bottom. You include a file somehow and it gets run with everything else. Wordpress etc just do this. It’s primitive but it works.

Of course, you could say this a bad thing because this could lead to some awful spaghetti code and security concerns (which is true) but I’d argue this “plugin-ability” lead to some really great movements on the web particularly open source projects.

Some nice things that “plugin-abilty” could give you

  • More people can contribute in more ways
  • More likely to lead to popular open source projects like CMS’s, forums, shopping carts
  • Broader audience - not just corporations that understand software development
  • Might make it more accessible for kids, hobbyists, and non-professionals plus get them interested in the language, which I think is nice
  • Can lead to ecosystems like Market Places, App Stores, which can’t be bad either

I don’t think it’s possible to build something in Elixir that could do this right now. I might be wrong, but I can’t see how you could create a web interface that uploads something then recompiles that something into your app. Someone might correct me here though.

So I’m just putting it out there. Would it or could it ever be possible to do a real plugin system in Elixir?

Showing Posts 1 to 10

kokolegorille

kokolegorille

CMS is more web related, You might think of plugins for Phoenix.

But the fact that Elixir is compiled makes it more complicated to just drop a plugin :slight_smile:

dstockdale

dstockdale OP

True, I get that. It might even be impossible. I just think it might be great if it were possible :slight_smile:

kokolegorille

kokolegorille

There are no build tools on my production server, but that does not mean it’s impossible, and there is hot upgrades :slight_smile:

NobbZ

NobbZ

I don’t think so. It should be trivial to drop a compiled module to a known location and let the BEAM load that module.

And exactly this is the thing that makes the plugin system quasi-built-in, all you have to do is “simply” defining an interface for the plugin…

kokolegorille

kokolegorille

Yes it is possible, but I remember some previous warnings doing this :slight_smile:

NobbZ

NobbZ

You do not get any sandboxes with about any other plugin system that relies on loading foreign code.

If you want a sandbox, there is nothing you can do except for evaluating the code on your own and not by the environment…

adrianrl

adrianrl

It should be possible, but we already have complete solutions like WordPress, Joomla, PhpBB… for this advanced kind of things, so it would be a waste of time creating just the same in Elixir, if you need a personal customized solution for you, I’d recommend embedding the plugins inside the whole app.

It’s such a pain creating a general CMS solution, as you need to think in terms of reusability, modularity and extensibility among other things. The more use-cases you want to cover, the more complex it becomes.

We’re discussing pretty much the same here: Web Forum Software in Elixir / Phoenix

dstockdale

dstockdale OP

Thanks @NobbZ I didn’t understand that it would work this way until now

@adrianrl That’s so interesting that you’ve been having a similar discussion about plugins at the same time. Maybe there’s something to it.

It’s not that I’d want to recreate Wordpress or Joomla etc. I strongly dislike all of those solutions. I was more making a point that I don’t think there’s been any innovation in any of these areas for a long time. Even sadder I think the trend has gone over to just going commercial SASS products for things like content management or shopping carts.

My point was more that Elixir/Phoenix might be well placed to bring about some new innovations if people were trying to build plugins for general purpose apps rather than just products for companies. Where your thread mentions Firestorm, that’s a good example. Maybe if it had some way of being extensible it would be more alive?

rvirding

rvirding

Creator of Erlang

It’s even worse, the compiled code doesn’t even have to be in a file. If I can get a binary containing the compiled code to the node then I can load it with the BIF :erlang.load_module/2. All I need is to be able to run a shell on the node and I am in and can do anything.

And we will not mention distribution here which makes it trivial. :grinning:

tty

tty

The idea of a certified module has been floating around for ages. Basically the runtime only loading a beam which has been certified/encrypted via a key. Might make a good research topic for a graduate project.

— 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
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
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
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews