acrolink

acrolink

I am considering my options regarding a future project and I appreciate hearing from forum members regarding this. I am planning to build a site which utilizes heavily content filters (categories). The user would find what he’s looking for by making some check- marks, search terms and / or selecting categories.

My question, I want the site experience to be fast and easy. Can this be achieved with pure Phoenix HTML or would it be better to develop the back-end as Phoenix API and write the front-end with a JS framework?

Which contrib. modules would you suggest to use in conjunction with Phoenix HTML to build a project like this one?

Showing Posts 1 to 10

9mm

9mm

Vue is a very solid choice, because it combines some of the great things about angular, and it’s also quite simple. It can be intricate if you need it, but at the low end vue can be straight out of the box extremely simple (fits in well with plain vanilla JS), and can handle 2 way binding so that filtering and stuff is taken care of.

kokolegorille

kokolegorille

What You mention is not really UI intensive but more DB related.

JS frameworks are for rich UI, that does not really include a search form, even a complex one…

For example building a clone of GMail, or Youtube… but that would not be too relevant for… let’s say google search bar.

On the contrary, there is a lot to do on the backend, like optimizing queries, or making a query generator…

Or choosing GraphQL, that would be my personal choice :slight_smile:

I suspect You would not gain a lot with a JS framework for the project You describe.

mbuhot

mbuhot

I like this post from thoughtbot about replacing react/redux with turbolinks and a sprinkling of javascript to interact with phoenix channels.

James-Byrne

James-Byrne

Hey there, I’ve worked on a few SPA apps and some server side rendered ones. From what your describing you can do that with just phoenix easily enough, @mbuhot has a good suggestion there. Otherwise a small amount of React/Vue/Glimmer/Elm/Reason ect. would do the job. No need for a SPA with those requirements. :slight_smile:

acrolink

acrolink OP

@James-Byrne I have already experimented with VueJS and Phoenix API in the back-end, it worked fine, I liked specially how fast navigation experience is for end-user. I have also used in another project VueJS partially within Phoenix HTML templates, this worked also very fine especially when it comes to filtering results. What can be a concern using pure VueJS on front-end for a public website is initial page load time as the application gets larger.

Would you kindly elaborate more about when you would definitely recommend using pure VueJS on front-end? Which scenarios?

James-Byrne

James-Byrne

Awesome to hear you’ve got your head around it.

In my mind there isn’t any one reason you’d use a single page app over a multi page app. It really comes down to the type of user experience you want to create and what the team working on the project is comfortable with. So if you want to create a really dynamic web app with lots of user interaction, holding state (thats a big one) and provide the best user experience possible then a single page app is going to serve you well. However there are a number of downsides that come along with building a SPA. Namely you now have 2 code bases and 2 apps instead of one to look after, slower initial load times, SEO issues, javascript (10 + [] = "10" … obviously).

So choosing when to use one over the other is really a per project thing. For instance at Testing Pays we have an ember app for our main site . But our “front page” site (the marketing one) is server redered html, we’re looking to add some functionality to that one soon and we will likely use glimmer for that.

Those are my quick thoughts on it, hope it helps :slight_smile:

acrolink

acrolink OP

@James-Byrne, thank you, I appreciate your input. In this regard, would you recommend combined VueJS & Phoenix HTML on front-end or complete VueJS on front-end for an e-commerce site?

grych

grych

Creator of Drab

Maybe Drab fits your requirements?

kokolegorille

kokolegorille

There is a huge difference in the authentication mecanism depending on your choice.

It’s fine to use session authentication if You use a mix of HTML and JS framework. But if You completely separate both, You will need to implement a token based authentication, as with most API. That can be a bit painful first time You do it.

Sometime You don’t have the choice and You need to fully separate frontend from backend. For example when You go mobile.

In that use case, I would prefer React Native over Vue, because of the ability to write real cross platform application.

acrolink

acrolink OP

Which special features / components of React Native make it easier to build cross platform applications?

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews