interaction design – ‘Add to Favorites’ state change immediately or wait for backend confirmation?

Optimistic updates can go wrong too, what if the network request takes time, and use closes the browser or leaves the site and thinks the interaction was successful because of the visual feedback he received?
In my opinion the best practice, for important interactions, is to use some transition that gives feedback on click, but does not hide the pending state in case it takes more than a second or two.
For low-importance interactions, like rating something or clicking ‘like’, the impact of errors is smaller, so optimistic updates are more ok.

magento2.4 – Magento 2.4 – Category Image showing Nan undefined in backend

When I upload category image in backend and save the category, it start reflect on frontend but in backend it is showing broken.

enter image description here

The category image path in frontend /media/catalog/category/image.jpg but in backend, path is showing as https://store.com/media/catalog/category//media/catalog/category/image.jpg.

How to resolve it?

Podemos desenvolver uma aplicação web 100% JavaScript/HTML/CSS sem backend?

Primeiro, parece que você acredita que só tem um jeito de fazer as coisas, que tem que ter MVC.

Você pode fazer o que quiser do jeito que quiser. É claro que algumas coisas são mais adequadas que outras para certos cenários e alguma opções podem dar trabalho demais, oferecer menos do que se espera ou exigir o que não pode ser ofertado.

Você pode fazer um jogo, uma aplicação de uso individual que não precisa contato com servidor. Mas eu faria essas aplicações nativas (desktop/mobile), tem quem prefere web para tudo. O usuário vai ter uma experiência sofrível na maioria das vezes para nenhum ganho importante.

Tem como ter um cliente baseado em Electron para dispensar o navegador, mas não gosto dos resultados em grande parte dos casos.

É possível até mesmo fazer uma rede de comunicação entre vários clientes, mas não acho que compense.

Tem diversos motivos para ter um servidor e não confiar no cliente.

Se precisa mesmo de um servidor, e aplicações corporativas costumam precisar de um, então a única opção popular é usar o Node.js (agora tem o Deno). Tem outras implementações, mas nenhuma que eu possa falar, duvido que alguma seja útil a não ser em nicho específico.

Claro que precisará de um servidor de banco de dados também. Possivelmente outras coisas, incluindo um servidor HTTP.

Se o Node é a melhor opção para o problema, pode usá-lo. Se o motivo de escolhê-lo é porque só sabe JavaScript, aí o motivo da escolha é errado.

Pelo que eu entendo, na maioria das vezes, se o Node/Deno atende bem, MVC é canhão para matar passarinho. Mas pode estar mudando um pouco.

Pode existir, mas nunca vi um sistema corporativo bom escrito com tecnologias web, no máximo usar HTTP para comunicação como fallback quando não tem outra opção. Na verdade isso vale para qualquer aplicação rodando no navegador. Salvam-se algumas aplicações usando o Electron ou um concorrente dele. Mas dá para fazer melhor nativo.

Claro que nem todo mundo exige algo bom, caso contrário não teria tanta gente usando algo assim. Uma dica, faço sistemas desde os anos 80 e naquela época os usuários eram muito mais produtivos.

Mas possível é, e tem muita gente fazendo.

WooCommerce – New Product Backend Template for Vendors/Employees

I will be running an online store where employees will need to add new variable products to the store regularly. The variable products would all have the exact same variations and pricing values so I am looking to make this process a little easier on my employees.

Is there any way to have a preset template with variations and prices already entered on the backend when employees go to add a new product?

Magento 2 Backend: Make orderable qty per source and salable quantity

There’s a way to make orderable "Quantity per source" and "Salable quantity" coloumns on backend product list?

enter image description here

Top 5 Backend Development Frameworks

 

nginx – Pass client certificate through proxy to the backend service

first of all, I searched through everything related to my question on this site, and still I dont have clarity on this issue…

as it can be seen in this image I have two services that need to communicate with each other, here are some details:

  • service1 calls service2
  • service2 requests client cert
  • i need to have proxy between these two (because of law compliance in certain country)
  • service2 and proxy have different dns names and need to have proper domain certs

What I have tried up until now:

  • nginx http reverse proxy – this will not do since it works on layer 7 (recreates the connection); i did not figure out the way to pass the client cert (few solutions found on this site did not work for me)
  • nginx tcp load balancer (works on layer 4) – might work, but I did not come to a config that works for me

Bottom line question if it is even possible to for my best case scenario to work?
Which is to configure it to pass client cert from service1 to service2 without any TLS termination on the proxy (except domain cert).

Can't access my whmcs backend

Hello All,

I have been trying to access my whmcs backend for 72 hours without success. I have so many clients issues to attend to but I c… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1842033&goto=newpost

google cloud platform – OpenAPI config for a Graphql backend using GCP API Gateway?

I have an apollo/graphql server sitting behind a GCP API gateway. Google says it requires an OpenAPI spec to secure endpoints: https://cloud.google.com/api-gateway/docs/get-started-cloud-run#creating_an_api_config

But how exactly would this look for securing a single graphql endpoint? Also, as a side question, is a new API Gateway needed to be created for each Cloud Run/App Engine service?

Thanks in advance.

front end – Shared data structures between frontend and backend

Over the last years I noticed, that when it comes to architecture of web applications, the frontend is not getting nearly as much consideration as the backend. In general, I understand why the backend gets more attention when it comes to the software architecture and data modelling. However, since I am a full-stack developer, it always bothered me that I didn’t get in touch with good concepts for managing the data model in both backend and frontend.

Some of the technologies and concepts we use and work with:

  • frontend: React/TypeScript
  • backend: Java/Kotlin
  • REST

The problem:

In one of my current projects, we have concepts for modelling data in backends. But as far as I am aware of, there are no established rules or best practices how the frontend should deal with it.

Current situation in one of my projects.

In the backend we have layers and models that help us to make a ‘cleaner’ software. We have a layer that retrieves and persists the data and therefore a model for this type of data (entities), we have value objects and we have a model for transferring and receiving the data to the frontend (data transfer objects (DTOs)).

For now, what our React frontend does is just using TypeScripts type to replicate the model defined by the backend, which is represented as a DTO.

I don’t think that this approach is good enough since it has several flaws:

  • Having the type definition maintained in the frontend seems unnecessary, since the model of the object is already defined in the backend.
  • Changing the model of the DTO always requires a change of the type definition.
  • While there are rules for many attributes in the backend, the frontend doesn’t know these rules and only ‘knows’ it when the backend complains (e.g. a birthday date shall not be a date in the future).
  • The frontend replicates these rules and maybe even adds more rules for input validation (e.g. the frontend doesn’t allow the date of the birthday to be 200 years in the past).

In short, the rules/constraints and models are relevant for both frontend and backend, but the frontend isn’t informed about the models and constraints on attributes.

Possible solution:

  • Requesting the model from the backend: It is possible to generate the model as type definitions, but this would be to difficult in my opinion, since it requires a overcomplicated build process where the backend (after being build) sends the models to the frontend that rely on it for successfully building the frontend app.
  • Requesting the attribute constraints from the backend: This would be easier to establish, since it doesn’t require the frontend to wait for the backend.
  • Validation of the frontend model defined by TypeScripts type: We could have a solution where we have a replication of the DTO models in the frontend, where at the application start of the frontend, the frontend requests a confirmation of the backend. This requires an API function that matches the backend defined DTO models with the frontend defined type definitions.

The question:

I am not so happy with the overhead of these solutions. Is there an easier/better way of dealing with the problem of shared data models?