Firebase to Wordpress - angularjs

I'm new to WordPress and I've also been having fun experimenting with Angular/Firebase.
I'm looking to find a way to have an Angular app connect with the WP API in a way that goes further than just displaying posts.
Can someone direct me towards how to submit a form to Firebase and have it simultaneously create a new post and/or page in the WordPress backend? I've come across Zapier but, a) It doesn't seem to be flexible enough for what I want to do and b) It's not free and I'd rather figure it out on my own (with some help from you guys of course.)
I'm plenty fine with being able to use an $http request to list and display posts... but how can I create NEW posts?
PS: I don't NEED to use Firebase. Mainly, I'm really most concerned with creating a new post and/or comment without having to actually do it from the wp-admin.

Related

from django to django rest framework : e-commerce with react

i have completed an e-commerce project with pure django and want to transform it to Django Rest Framework with React,
i just want to know if the use of Sessions to create a cart would still be the same or is there something else or a different aproach to keep cart functionality,
i have been looking at some github projects to see how it can be done ,and just got me confused, if someone can clear that out for me, much much apreciated,
thank you,
I understood that it is possible to set cookies or a local storage with react and receive the info directly to the Django backend from there, so there is no need using sessions (it still totally possible but apparently not preferred)

Question on react and express website and updating them

I have been trying to figure out how to learn making a website.
Does all blog or a any news website have to be a cms. Then wouldn't all pages be the same. If not how does one update their website when adding new posts. Can I do it only from database?
It seems if its made only on html and css updating it would involve adding new new html page every time?
For example this website, how do they add new articles?
Would you recommend making a blog on react?
Thanks very much?
Does all blog or a any news website have to be a cms.
I will say, yes and no,
You can dynamically add new html page whenever you have new posts, or blog, then you create a new route for each request. It works fine,(and a lot simpler, and less worry about other stuff, learn from there and then you get a taste of how it works, I will always suggest you to go with something easier, start really small, since you are starting to learn) until you have to post a lot of post, which will be troublesome to update the server code each time.
Where you have to do as follow: Update codebase (new route: /get/my-new-blog-123), then deploy your server code whenever you have a new post to the cloud server, eg: google cloud platform, heroku, etc. Which is a lot of work.
Till then, which comes to what you have mentioned, Content Management System, where most blog post is structure properly, such as how to insert a picture, text style, typography, etc. Then this html structure will store in database, the route will likely be /get-post/?article-name
article-name will be something u can query from database, then your life will be a lot easier with this.
Would you recommend making a blog on react?
Yes, definitely, It is easy to learn, but try not to overwhelm yourself with so many tools, such as formik(form submission), redux(state management), whenever you learn something from a blog, most time you will see this. Which will be quite overwhelming, when you are learning so many stuff at once. Especially, if you are really new to HTML, CSS and javascript.
Start small, learn fast, then grow. All the best to you.
It’s like when you fill out a form
When you press send or save
It’ll go into the backend which means it’s in the database
And from the back end it’ll render to the front which is the website
I can try to elaborate it more if you want.
And you can make a blog using any framework you are comfortable with
Or you can just use plain ol HTML Css and JavaScript.
I think it’s best to start at this before moving to a framework

Send mail by using Strapi and React.js

Since one month me and my team are working on a project with React as frontend and Strapi as our backend.
We need to do a form that has to automatically send e-mails by using the Strapi e-mails plugin.
However, we're still beginners with those technologies, and we aren't able to implement this kind of functionnality.
Is anyone familiar with Strapi and also this plugin ?
We don't find a lot of tutorials and documentation about it on the web.
Thank your for paying attention.
you can follow instructions of this guide - https://strapi.io/documentation/3.0.0-beta.x/guides/send-email.html#introduction
You can create a custom route/controller to manage your contact form.
Here is an example - https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#example
Make sure to create a POST route.
Then in your controller, get your form data with ctx.request.body

2sxc - Getting URL path from DNN link parameter / Tab ID

I am working on integrating a 2sxc content WebAPI feed into a ReactJS application.
I have managed to get a JSON feed of data into the application, and am in the process of mapping out the data.
I'm wondering what the best practice would be to "resolve" a URL which is coming through as a DNN Page/ Tab ID.
Below I will showcase the various points this is referenced...
First the Setup of the entity / data types...
Then this is an example entry with the data filled out... The page link / URL is set up to point to another internal page on the DNN website:
Finally you can see this data item come through as a JSON feed via the 2sxc API:
What is the best way to convert this piece of data into a URL which can be used in a SPA type application?
There isn't any "server-side" code going on, just reading a JSON feed on the client side...
My initial idea would be to parse this piece of data in JS, to extract the number then use something like this:
http://www.dotnetnuke.com/tabid/85/default.aspx
http://www.dotnetnuke.com/default.aspx?tabid=85
I was hoping someone with more experience would be able to suggest a better / cleaner approach.
Thanks in advance
If you were server-side in Razor you'd be doing something like this:
#using DotNetNuke.Common
View List
XXXX = Dnn.Tab.TabID or define a string with the tab id you want
I seem to have a vague memory that I saw somewhere that Daniel (2sxc) has a way to use Globals.NavigateUrl() or similar on the client side, but I have no idea where or if I did see that.
The Default.aspx?tabid=xx format will certainly work, as it's the oldest DNN convention and is still used in fallbacks. The urls aren't nice, but it's ok.
The reason you're seeing this is because the query doesn't perform the automatic lookup with the AsDynamic(...) does for you. There is an endpoint to look them up, but they are not official, so they could change and therefor I don't want to suggest that you use them.
So if you really want a nicer url, you should either see if DNN has a REST API for this, or you could create a small own 2sxc-api endpoint (in the api folder) just to look that up, then using the NavigateURL. Would be cool if you shared your work.

Creating a webpage with a unique URL using react/firebase?

I'm pretty new to react and building out a little prototype using Firebase as a backend. One of the primary functionalities involves a user writing a post in an editor, which is saved to firebase. On submit in the editor, I am trying to create a new standalone page for the post with the firebase uid as the ending part of the new unique URL.
The problem I'm having is figuring out a way to create the new page on submit. I haven't been able to find any documentation for a similar problem like this specific to react or firebase, and was just wondering on a high-level what a good approach to executing this might be? Thanks
The newly launched Firebase Hosting + Cloud Functions integration can help here. The first bullet point in the documentation looks like it describes your use case exactly.
You also mentioned React. There is a handy sample project showing how to implement an isomorphic React app with Firebase.

Resources