Nefcairon

Nefcairon

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.

Showing Posts 1 to 10

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.

OvermindDL1

OvermindDL1

Yeah, PWA’s can be run entirely locally once downloaded, so they require javascript for any functionality. vue.js is really easy to get started with and going for PWA’s for one example.

Nefcairon

Nefcairon OP

Ok, thank you. I learned something…

So i want to create something like WPA-light :wink: I don’t need the offline functionality for my application as most people are almost always online.

What I really don’t like are pages that have almost no html when looked into their source code. It doesn’t feel right to me. For me there has to be HTML in the browser.

So I can go the JS route and my app will feel almost native on mobile devices or I can stay in my HTML/minimal-JS world and live with its downsides. So far I’m still undecided.

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:

OvermindDL1

OvermindDL1

So you don’t need a PWA. :slight_smile:

Nefcairon

Nefcairon OP

I need ‘add to homescreen’ and look&feel of a native app, to be honest.

OvermindDL1

OvermindDL1

Anything but using native API’s always look horrible though…

Every react-native app or some embedded webview drives me nuts on my phone because they always just feel ‘wrong’, the inputs are handled wrong, the interactions are wrong, the activities are wrong… >.<

If you want a native look&feel app, you really should go native. I’m a huge proponent of that.

Nefcairon

Nefcairon OP

Ever tried Elixir Forum on Android from a home screen icon? Feels absolutely as a native app for me.

James-Byrne

James-Byrne

Hey @Nefcairon,

You’ll probably find Breethe by Simplabs interesting. They created a PWA with Glimmer as the frontend and Phoenix as the backend but included SSR content rather than just using a client/api combo.

As for your use case SSR content and a service worker should be enough to run the site as a PWA. And when it comes to css something lightweight would be best but not crucial. It should only effect the initial load. After that everything will be cached.

Breethe.app Repos:

OvermindDL1

OvermindDL1

Routinely! And it absolutely does not feel native. ^.^

The menu is in the wrong location, the menu accessor brings up the browser menu (not the page, even though it is a full screen page), can’t slide in the menu, doesn’t support activities, much slower than native, the buttons don’t look like buttons (they look like unthemed rectangles), etc… etc…

Now there are some fantastic apps that combine native and web use, like Sync for Reddit as one, they are fully native with all the features there-of but do a lot of web processing (mostly in the background to prepare for your use), that’s generally the way to go.

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
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
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
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
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

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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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
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
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews