Nefcairon

Nefcairon

Phoenix: Lightweight PWA framework?

Hello,

TL;TR: I look for a lightweight compagnon (HTML/CSS & minimal JS) to milligram to build a PWA with phoenix.

Long version:
I want to improve in Phoenix (means: stop learning and do something productive) and implement my first “real”, but small project. Development will take time and I am in no hurry, so I will start with phoenix 1.4 in its current state, wait until it’s released and later integrate Phoenix.LiveView.

As you know Phoenix 1.4 comes with Milligram CSS and it seems to fit my “mobile first” approach: At least a “blank” phoenix 1.4 app looks much better an Android then phoenix 1.3. My future app should be as a progressive web application (PWA), and so “work” on Android and IOS as well as in the desktop world.

But as Milligram lacks on navigation elements I need something additionally. Currently I think I will need a mobile bottom navigation, cards and maybe a navbar “hamburger style” (though it seems that later is already “depricated”).

Are there any good lightweight components/frameworks? In my current situation I don’t want to learn any new “language” (as SASS), I want to stay within HTML/CSS/JS and Elixir - and use as little JS as possible. I don’t want to create a API with Phoenix/use a pure JS framework on the frontend, I want to create HTML with Phoenix that just “looks fine on smartphones and on desktop browsers”. I further value “lightweight” because of speed and second it’s easier to understand what enables me to learn from it.

I googled, looked at dozens of CSS frameworks (e.g. materializecss, which seems to be rather dead) and read the forum. Still I am unsure… So is there something you could recommend me? Do I have to use something big as bootstrap?

Thanks in advance.

Most Liked

bryanjos

bryanjos

I don’t know if this helps or not, but I successfully created a non-spa PWA using Phoenix. Progressive Web Apps have a scale of functionality they can do. For me, I just wanted something that would make an icon on mobile devices and show a message about being offline when there was no connectivity. You can do a lot without having to build a full-fledged SPA.

Some helpful tools/readings for me were:

peerreynders

peerreynders

To me Progressive Web Application (PWA) implies a refinement of the Single Page Application concept which means it’s JS heavy and tends to use some sort of JS framework. For the time being “lightweight PWA” seems to be an oxymoron.

The implementation style you seek seems to be exemplified by the sidecar site (Github, article) which should be quite easy to emulate with Phoenix/EEx - it doesn’t even use a CSS framework but you have to know your CSS.

dgmcguire

dgmcguire

I can’t tell you which one is PWA and which one is the app but I can tell you which one was easier to get an icon for… it’s the PWA by far

Last Post!

DevotionGeo

DevotionGeo

I installed Sidecar on Android now and looks like much is changed after this discussion. PWAs are now shown in the apps list inside settings, their battery usage, data usage, permissions etc are shown there. Their permissions are controlled from settings.

Also, when I was installing it, the notification area showed a wait bar from the Play Store saying “Adding Sidecar to the Home Screen”.

A tap and hold on the icon also shows you Site settings which takes you to a settings page where you can clear the stored data and can allow or disallow permissions.

Where Next?

Popular in Questions Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31494 112
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40042 209
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement