I am working on a webapi project which will be used by a Blazor server application.
When I used to work with React, I used Redux store. Blazor server is component based as well.
I have been looking through google with no luck and was wondering if there is anything like Redux
that can be used in a Blazor server app for managing store data. Any ideas?
This is handled by Nick Chapsas in this tutorial :
Managing Blazor State Using Redux
There is also the possiblity to work with singletons and so on. Not an expert on this topic, hope i could point you in the right direction.
Good luck...
Related
I just finished my JavaScript course and I understand pretty well how things work.
I have started my React journey with a project in mind
So I want to create a mobile application using React Native and I also want that same application to be a website with domain and url since I want the website to work with with Google adsense.
I'm a little bit confused about things cause I want to use mysql database, node for back end and React for the front end, but I don't know if this is possible to just create one application that work as both mobile app and a website.
Thank for your assistance and advice in advance.
A way to use practically the same code for a web frontend and mobile app is using tools like Capacitor. It make it quite simple, and also allow you to use some mobile native API's.
Here's how to integrate it with react js Using Capacitor with React
I am new to React and Vue frameworks. I am learning how to build simple SPA from courses, but there are no courses for MPA/SPA.
For example when I need website with 3 parts: Registration form, Login form, Dashboard
I don't want to use SPA and Router. I want to have those 3 sections served by back-end as 3 different websites. If you asking why, it is because I see this technique on almost every React/Vue powered websites (Instagram, AirBnB, Qualitista, ...)
Can you please explain to me what is best practice and how to implement this and if its worth making? Or am I supposed to just make backend API + SPA no matter what.
I think what you are referring to is called Micro Frontends https://micro-frontends.org but just like Micro Services, it is a solution to an organisational problem, not a technical one.
If you are not Instagram or Airbnb, you'll save yourself a lot of extra work by sticking with a monolithic architecture.
Next.js is a good place to start if you want to be guided into the pit of success https://nextjs.org
I don't know too much about this topic in particular. But after a little searching, this Universal Multi-Page React App looks like it might be a tutorial to do what you're interested in? Also found a little info in this Reddit post about Multi-page React Sites.
Also here's some info about how Vue.js does it from I'mOnlyVueman with a couple articles I found on the topic.
Companies use server-side rendering or preloading to bypass the
limitations of Vue with regard to SEO. Google cannot crawl Vue
components, so serving them from the server allows them to be indexed
before rendering.
Vue.js Server Side Rendering Guide
Server Side Rendering from the Vue.js docs
If you were to ask me a good example to learn multiple page apps I wouldn't go to React/Vue to do this, I'd use MVC. Microsoft has tons of tutorials if you're interested. Create a web app with ASP.Net Core and MVC
Hope this helps!
I want to build a self-hosted website with nodejs and the express framework because I'm already familar with that. However, using a CMS for this project is a requirement, so I'm looking for a suited and easy-to-use/-learn CMS and discovered strapi which I quite like.
Setting up an API with strapi is easy indeed but now I'm struggling with adding strapi to an express server. My goal is one express server with strapi, which also hosts the website. So, I can control the routing with express (which I'm used to) and can render the site on the server.
Can somebody explain me how to do that and maybe give a small example? The examples I found, are only about hosting the API externally and using a client-side web framework or a static site generator.
Or is my vision not possible with strapi and I should use another CMS like KeystoneJS (which is already built on Express)?
Thanks in advance!
Using Express with Strapi must be very complex and does not really make sense.
Strapi is based on Koa, which has been designed by the team behind Express. If you are coming from Express, eyou will get confortable with Koa very quickly. Here is the documentation: https://koajs.com.
Hello guys i was learning web developments and have a simple question. If i built a e-commerce web page using node.js and ejs template engine and everything works fine. The next decision is to build a native app for the same e-commerce site either android or IOS. I want the native app to also communicate with the same application server designed in node.js. Do i have to redesign the application server?
My approach or thought:
Native app will have to consume data either xml or json. So i will have to change the business logic of my endpoints. And if i do it this way, i will also have to change the way the web ui interacts with the application server and it also has to consume json or xml response using ajax call. Is my thinking or approach on the right track? But if using node.js, should i avoid the template engines?
Yes, you have to redesign the application server logic by exposing API endpoints. As mobile apps (iOS/Android) will interact with the server using these API endpoints, via JSON. And this will affect your web page also, as everything thing now has to be done via AJAX calls.
Best practice is to built a single page web application using Angular or React.
That way both your mobile app and web app would behave almost the same.
I am interested in develop a rt module for my website with socketstream + node.js. I am only interested in do the server side in socketstream, not the client side. How can I access the socketstream from a normal php/html app, wich js i have to include ? I am mainly interested in rpc, pub/sub and authentication/session.
I would not recommend doing this, as it is unorthodox.
That said, I do recall that someone wanted to use an early version of SocketStream from within their application, which was built on the .net platform. It turned out that they got it to work by embedding the SocketStream app's web page inside of an iframe.
Check out to this framework:
http://www.socketstream.org/
Comes with a lot of examples and it's easy to use.