ReactJS with Python as Backend - python

What is the best approach to use ReactJS as front end and Python as a backend? I already built a tool using Tkinter which have simple UI. I want to use ReactJS and rebuild this application that anyone can install on their desktops. Is it possible? If so can anyone briefly explain the workflow or any online resources would be appreciated. Thank you! (I have a basic knowledge using Djnago)

Its a great idea in the modern world of web technology, using ReactJS as a frontend and Django Rest Framework to make your API, and Django for the backend aspect is a great choice as you could utilize the API in other application such as a mobile application.
I would suggest you go with those technologies as most big and medium scale websites now uses ReactJs with Django/Django Rest Framework or some other backend tools.
If you have any other question, i would be glad to answer it.
Thanks and have a great day.

Sure, people have used React for their desktop applications. Slack for example have used React in there desktop applications so you are in good company there ;)
https://slack.engineering/rebuilding-slack-on-the-desktop/
But why not just put your UI in a simple web application with React and avoid the hassle to support multiple operating systems and versions?

Related

Python or Node.js for a Web app which interfaces with a USB devices?

I'm looking to develop a web app that controls Concept2 rowing gym equipment connected to the users computer via USB. I'm trying to decide what approach I should take in developing something like this.
Control of these devices has been achieved in the past both in python:
(https://github.com/uvd/PyRow)
and using node/jQuery:
(https://github.com/tijmenvangulik/ErgometerJS).
An SDK and documentation is provided by the developers of Concept2 gym equipment. DLL and CSafe commands are used to interface with the machines monitors.
(https://www.concept2.com/service/software/software-development-kit)
I'm looking for recommendations on how I should this tackle this project. At the moment python seems like the best approach however I have no idea how I can run these python files through a website interacting with the java script front end.
Any advice or pointers is appreciated.
David
You task looks like a simple SCADA solution with web interface.
You choice depends on whether you have experienced developers, who are able to use modern frameworks like Vue.js, Angular, React and others or not.
Really, in your particular case - monitoring equipment over web, you don't necessary need to invest a lot in your front-end - depends on your target audience. Is it a single service engineer? If yes, probably your front-end should be minimalistic, you can use Python with Twisted for static web server and build your frontend on bootstrap plus jquery. This is a fast win solution and you can implement it even if you've never worked with web.
More complex approach, requiring more engineering, is Python + Flask.
If you feel ready for modern frameworks, like Vue, React, Angular, then, possibly, you'd better look at NodeJs as a backend. They are better integrated with NodeJs and its package manager npm. You will need it to build the project on your server side; also some people treat it as a solid solution, when using the same language (javascript) for both backend and frontend. As for me, it doesn't really matter a lot.

Python RESTfull Server

I am new in python and I have to run a project about web services with the following specs:
Windows Server (2003/2008)
REST architecture enabled
Python platform (any version)
My questions are:
Which web server fits better (IIS, Apache, ...)?
May I use GoogleAppEngine for commercial purposes?
In order to make RESTful web services on windows which python modules I will have to have?
Does anyone have a better architecture in his mind about these specs?
Thank you in advance,
Which web server fits better (IIS, Apache, ...)?
Fits what better? Fits Windows? Fits RESTful web services?
It doesn't much matter. Which ever one you can configure and manage.
In order to make RESTful web services on windows which python modules I will have to have?
All of them.
REST is simply a small extension to HTTP. Any web server and web framework can do it.
Many of us use Django and Piston. Some use Werkzeug.
Google "Django REST" or "Python REST" and you'll find a real lot of great alternatives.
Does anyone have a better architecture in his mind about these specs?
Since this is so vague, it's not possible to have a "better" architecture. Details would be required so suggest any improvements.
uWSGI on nginx.
Yes, just enable billing and set a budget.
A lot of people like CherryPy for RESTful services.
Not unless you provide a list of requirements, there is way too many options.

Minimalistic python webframework

I used to create web applications with Django framework, but now I have to create only simply web GUI for python application. I would be very glad if someone will recommend to me any small python web framework.
web.py is a popular choice for this sort of thing.
"web.py is a web framework for Python that is as simple as it is powerful."
And of course let's not forgot bottle!

What python based ajax push servers are good to work with

I have a web application im currently working on in python. I'm using Django as my web framework currently. I intend to integrate real-time web features into the application using ajax push. However, I'm a bit confused as to what python based push server i should adopt. I've heard of a few of them, Orbited, Gevent, Tornado, but my main issue right now is that i'm a green horn when it comes to realtime web applications. I'd like to use python and i'd like a framework with good documentation.
A lot of people choose gevent for webapps with real-time features because of the speed, ease of use and a number of supporting packages.
Take a look at these packages:
gevent-socketio
django-socketio
and these tutorials:
Evented Django part one: Socket.IO and gevent
New and hot, part 4: Pyramid, Socket.IO and Gevent
Real-time Web Apps with Django and WebSockets
Hope this helps.
APE seems a cool thing.
I think it's not a problem to make it work with PDjango as a backend.
I think the most popular is tornado open-sourced by facebook. It also has pretty decent documentation.

Amazon AWS web framework for Python

I dealt with GAE before and I like simplicity of its webapp. Now I am trying to learn how to work with Amazon EC2. My question - where do I start to make a simple web application that I will be able to access form browser? I suppose I should use WSGI for this purpose. I don't want to use Django as I want to keep the application small and lightweight without unnecessary features. What can you recommend? Thanks.
AWS and GAE are very different. GAE very strictly defines what you can and can't do in terms of development environment. AWS gives you a server to do whatever you want with.
GAE is good when you don't want to have to figure out how all the pieces fit together to scale well. AWS is good when you need flexibility to do whatever you want in your environment.
So to answer your question -- you can use any framework / environment you like.
Personally, I like Django/Pinax for anything requiring a user system. You want a lighter weight system, I've heard good things about Pylons.
Here's a listing of a few others:
http://wiki.python.org/moin/WebFrameworks
Since we're talking AWS, it doesn't have to be python. Ruby on Rails is great.
As already mentioned, you have a lot more flexibility with Amazon than with GAE. If you want to stick with Python and would like to be able to access your app through your browser, you might consider web2py, which enables you to edit and manage your apps through a web-based IDE and admin interface (see demo).
web2py was designed for ease of use and developer productivity, so it's very easy to learn and get going quickly, and you can get a lot done with very little code. Although it's easy to do simple (and even not-so-simple) things quickly and easily, if your app gets more complex, web2py can handle that too, as it is a well-integrated full-stack framework with lots of built-in functionality, including a database abstraction layer, form handling and validation, access control, web services, and easy Ajax integration.
web2py runs on GAE out of the box, and web2py apps are portable from GAE to other platforms without requiring any code changes. However, if you're looking for a simple, scalable cloud hosting option with more flexibility than GAE, you might take a look at the new DotCloud (still in beta), which actually runs on EC2. There's a demo web2py app running there now, and a tutorial explaining the simple deployment process.
If you have any questions about web2py, you'll get lots of help from the friendly and responsive mailing list. I know some of the users have hosted web2py apps on EC2. For example, this demo Q&A site powered by web2py is hosted on EC2.

Categories

Resources