dwyl / learn-phoenix

:fire: Phoenix is the web framework without compromise on speed, reliability or maintainability! Don't settle for less. :rocket:
650 stars 45 forks source link

When isn't Phoenix useful for an Elixir application? #81

Closed Cleop closed 7 years ago

Cleop commented 7 years ago

Given the speedy and comprehensive set up that phoenix offers, when is it not useful/necessary to use phoenix on an elixir application?

Once I know a framework I tend to use it by default when setting up a project, on what occasions might I want to consider not doing this?

The question came from this comment by @nelsonic : https://github.com/dwyl/tachyons-bootstrap/pull/10#pullrequestreview-39681879 image

nelsonic commented 7 years ago

@Cleop in the context of tachyons-bootstrap the idea would be to focus on the tachyons part, not to add Elixir & Phoenix as pre-requisites before people can use the code snippets. I should have made that clearerer but in this issue: https://github.com/dwyl/learn-tachyons/issues/8 I demo how to re-create bootstrap with just HTML. The way I envisioned this project was super-simple file structure e.g:

layout.html           // basic layout template where all components would be displayed
component_order.txt   // line-separated list of all the components in the order they appear
component_combiner.js // a *basic* node.js (core-only) script combines components into index.html
/components
  button.html
  form.html
  etc ...
package.json          // http-server dependency to deploy to heroku + test script for CI
.travis.yml           // build so we can check it's still working when others contribute.

This way it's not "intimidating" to beginner contributors who might be "put off" by Elixir/Phoenix.

To be clear I don't think Elixir is a requirement for the tachyons-bootstrap project. In terms of the "advanced-ness" (it's not a word but bare with me) of the example, we can keep them way more beginner-friendly with way fewer lines of "boilerplate" (detest that word! but it is applicable here) code and folders. A "standard" Phoneix project has a lot of "noise": image

To a beginner this folder structure is "Whaaat...?" image

Unless there is a significant benefit from using Elixir/Phoenix I would stick to HTML+JS for these simpler examples.

Cleop commented 7 years ago

Great, thank you @nelsonic this makes so much sense.

I think I assumed based on the scripting idea from LDMW that this was the line we were going down as I thought that was a test run for tachyons-bootstrap.

Thanks for sharing your more basic example structure, I didn't realise we could achieve everything we wanted with such a stripped down version but it's great to see you can. Simplicity is often best!

Closing the issue as the question has been answered but does not need adding to documentation.

Cleop commented 7 years ago

@nelsonic - could you share the repo which you gave the example file structure for? I'd like to explore the folders more.