Currently, I have a separate web app and Shopify site. The separate web app is on its own domain and it links to items on the Shopify site. The front-end for the separate web app is vanilla HTML, vanilla CSS and vanilla JavaScript. And the back-end for the separate web app is PHP and MySQL.
We want to move the separate web app onto the Shopify site/domain. Is it possible to build a custom web app with Shopify? I know that you can do some sort of Rails liquid template coding for Shopify, but are there limitations? What about the back-end, would I just have to make REST API calls or can I use SQL database tables?
Either way it seems like I'd have to rewrite most of the app.
You are free to make a Shopify store your own web app, but you will be using Javascript to do so and not PHP/MySQL. The reason is that JS is functionaly part of the web browser whereas your solution is not.
You can inject content to a normal Shopify theme template that potentially uses a PHP/MySQL App, but note that that is going to always be slow due to architecting how those kinds of apps interface.
I don't understand the difference between creating an application with Angular or React (or something else) on the frontend and communicating with an API for the back (and call it a CMS), and a Headless CMS. They sound the same. What is the difference?
An API is a way for software to communicate with other software.
A headless CMS is a content management system that comes with an API for clients to retrieve data and doesn't come with its own end-user frontend (they generally come with admin frontends).
I'm building small vue.js microservice application and I have few doubts. Firstly I'm using mongoDB as my database, and I'm using express. After I want to use Docker and Kubernetes to deploy the application.
I want to use 5 microservices:
Basic publishing and product catalog
Commenting inside the post
Products can be added to cart
Paying the certain products after the cart
User authentification (login and register)
So the problem is how to add user interface design if the microservices which I want to use are backend based. How to exactly add the frontend if it can't be part of microservices. Or maybe should I use React and implement HTML/CSS things inside javascript code? Is it even possible because I want to use just MongoDB for every database needed in a microservice and write every microservice in Vue?
It's always upto you what you are good and requirement.
There is no specific best practice with microservices to follow certain languages together, people use the different languages in microservice like Ruby, Node, with React as front or one Python service managing the user auth.
It's depends on you what you are good with and familiar with.
You can create the Python app as a user interface or react or HTML which call backend services over API calls or grpc.
There is one example in the Istio repo : https://github.com/istio/istio/tree/master/samples/bookinfo
It's a book info app in Node, Ruby, Python using databases like MySQL, MongoDB etc.
https://cloud.google.com/service-mesh/docs/deploy-bookinfo
Update :
For Vue base, this blog and repo might be helpful vue-microfrontend
https://itnext.io/setup-a-micro-frontend-architecture-with-vue-and-single-spa-2c89528bf72f
Repo : https://github.com/vue-microfrontends
I know Next.js is front-end but when i used API of next.js it can response and can manage route or anything about back-end can do.
Then i want to know "Next.js api is back-end ?"
Yes. Next.js is a pre-rendered React app in the client-side that users can view and interact with and can be considered as front-end. At the same time, it also does server-side rendering and API routes which can perform server-side code and access data in the database and can be considered as back-end.
Next.js > v13 uses two folders app or api for Dynamic Routing. Store React components in app for client-side or server rendered components. The backend functions or server-side of Next.js is with the api folder. The api JavaScript code is not executed in the browser but with Node.js so this is not safe for static page generation. When Next.js is hosted in the cloud with Vercel then your server-side or serverless JS will render, but on Netlify or other static hosts the api folder will be ignored or throw errors. It's like running Express.js code in the browser the JIT rendered will fail
Next.js v13 transitioned React folders from pages to app and currently supports both folders. Before v13 the React client code was stored in pages only.
Next.js api provides REST API. We are sending requests internally to our next.api routes. With this you can add business logic in your next.js project without writing any additional custom server code and without configuring any api routes. In node.js app, we need to separete api code into controllers and routes, then register each route in express app, then you need to make sure that you registered the routes in correct order.
The only drawback as of now, vercel does not support websocket connections. So you cannot have realtime services. But you can kinda make it almost realtime with SWR. More on SWR Basically, with swr, you tell next.js to fetch data periodically, keep the response in cache and serve it.
With this feature, Next.js provides everything to build a full-stack application. So next.js also simplifies the backend for us.
Yes. Next js is framework of React js. you can use it both like- frontend and backend. Thanks.
I come from the asp.net world and am slowly, enjoying, learning javascript development. It does clash with me though when people describe something like Next.js, which I'm enjoying learning, as a backend.
To me it is more conceptually like an asp.net server-side frontend (Webforms, MVC, Razor Pages) etc. It seems its main concern is producing reactive frontend UI. Just because some of the frontend functionality runs/processed on server does NOT make it a backend AT ALL.
What about the fact it has api endpoints?
Well to me, a web api is only a means of enabling a frontend to talk to a backend across a network, the internet in this case. For me an api handles only very limited concerns; provides the endpoints, handles de/serialisation, talks http to the caller and that's kind of it, thin and dumb.
The backend doesn't really start till you get to your App layer and then the architectural fun can start, Application orchestration, Domain logic, dependency inverted data access layer etc. etc. all the things that talk to the complexity of designing robust software.
So much talk seems to be focused on where bits sit, is it on the client, is it on the server and less about the concern of what goes where.
I thing Next.js is an excellent server-side, frontend framework but whatever your onward stack into the backend, it's not a backend!
Your Question: "Then i want to know "Next.js api is back-end ?""
Simple Answer: It depends
For any technology to be a backend it must fulfill its minimum criteria to identify itself as a backend.
If you don't use NextJS features and use it as a frontend, it behaves as a frontend.
But you can use it as a backend if you want to use that way.
I have a website which I want to integrate with shopify using shopify as backend only. I know there are sdks like js buy sdk and I can even use storefront api directly. The question is can I use shopify store apps (for example advanced product options ) with it ?
After reading docs and even directly contacting with the apps team and shopify teams I found out we can't since the apps provide embeddable ui components which necessarily required liquid.