Using Electron with Python application [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am trying to make a cross platform desktop app based on Python.
I've been looking for Python GUI Frameworks such as PyQT, wxPython, tkinter, and kivy. However, none of them could provide a good look and feel for desktop GUI except for PyQT, but PyQT is quite expansive for commercial use, and I do not want to open my sources. In addition to that, making python GUI installable seems pretty hard that I fail to make installable program so many times. So I am now looking for something else which is Electron.
I've found that Electron's NodeJS can run python app using python-shell. Also, Electron is being used pretty well and has many famous products, so I thought it can be a good choice.
My concerns are, is it a good way of developing a cross platform desktop app in this way? Though I am familiar with Html, CSS and some JS, I am not familiar with NodeJS. But since this is kind of a work around, I am worrying this could make a lot of overhead or create bad user experience.
My python app contains quite a lot of mathmatical tasks. Not super heavy, but still kinda heavy using many regressions. Also using SQLite for internal database.
Of course, the best solution would probably be using NodeJs instead of running Python in NodeJs, but concerning the time to develop everything again in NodeJS, I thought this could be more practical. If this approach slows the program significantly, perhaps I have to find another way.
So in summary,
Is it a good idea to make a cross platform commercial app with quality using Electron and Python?
Does it affect the app's performance significantly?
If it is a bad idea, is there any alternative or recommendation?

Related

Python Scrape Website loading JS [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm very new to python and programming in general but have enrolled in a few courses to improve my knowledge. It seems it's quite important to have a 'goal' in mind when learning and one of mine is to successfully scrape and manipulate sports data.
I would like to scrape the results from https://www.britishhorseracing.com/racing/results/ but it looks like it's dynamically loading data via JS:
There looks to be a LOT of data here, results going back ~20 years plus multiple races for each racecourse on the day. From what I've read, selenium and beautifulsoup may offer some solutions here but before I start experimenting I wanted to check with you guys how realistic this goal is/ whether it's even achivable with how the website is structing the data and some pointers for how to get started?
Any help would be hugely appreciated.
Thanks
I'm not too familiar with Selenium or BeautifulSoup, but there are other JavaScript related web scrapers. Some I know are NightmareJS, PhantomJS, and ZombieJS (All horror related haha). NightmareJS runs off of and electron Chromium instance, PhantomJS is a javascript wrapper for selenium, and zombiejs is a raw node solution. I personally would recommend using NightmareJS.
However if you need to run NightmareJS on a server that is a whole different ball park. NightmareJS requires there to be graphics interface. There are modules that allow NightmareJS to be ran on a terminal instance however. If would would rather avoid that, then you should be fine installing PhantomJS on the server and use that.
With nightmare JS there is a scroll option that probably would trigger the rest of the data to load.
Here is an issue found of github. Some solutions are provided there.
If you would rather still use something like selenium or python, I'm pretty sure there ought to be some documentation describing how to scroll a page.
I was originally going to say you could use the API network call that BHA does by looking in the developer network tools, however looking at the API quick you need some authentication with the API.

Opinions welcome: Why MEAN stack and Node.js? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am curious as to the fundamental reasons why we choose MongoDB, Node.js, Express.js, and AngularJS?
Here are the reasons I can think of:
MongoDB works well with JSON and data models, is faster than SQL;
Express and Angular gives the stack one language in Javascript;
Node.js is non-blocking, event based, and supports concurrency;
Angular is a wonderful front end framework.
Any other reasons? Also, how would you address the people who have an innate disdain for server side Javascript?
Thanks!
Well, people wanted to replace the LAMP stack (Linux, Apache, MySQL, and PHP/Python/Perl) for a very long time. When JavaScript was made possible to run on the Server side ie NodeJS, it paved way for a full development stack which is the MEAN stack.
The first advantage of the stack is the single language throughout the whole application - JavaScript. This made it easier for a person with JS knowledge to create a full on working application. This also made way for front end developers to explore more into how server side programming works.
Some startups and organizations thought that using a stack with one language will help them in limiting their resources. And easy delegation of work among the developers.
Even though MEAN stack is an awesome alternative to the traditional LAMP stack, it is still in its early stages. It is adopted only by few ambitious startups, but not by bigger organizations. They are still sticking to the legacy technologies. Also the components of the MEAN stack which is Angular, Express and Node are still in their childhood stages. There are no proven and complete use of the MEAN stack on a full scale solution.
Well organizations like Walmart etc. used Hapi.js and were successful in it, it tempts the other organizations to go forward with it , but also makes them skeptical on using it since replacing the already existing technology will be a bigger headache.
Also since a lot of the current employees are trained in Java, Python etc, developers in JavaScript are very few and JS is almost considered as an additional language to be known for a Java developer and the likes. JS hasn't been considered as a single language on its own.
Maybe few years down the line, the MEAN stack will prove itself a noteworthy alternative to the traditional stacks.
I work in the Retail Domain and a big organization. We are actually planning to use the MEAN stack for our inside projects. But no one ever gave a simple thought of using the MEAN stack in PROD.
EDIT: One more important reason these stacks are tempting is because they are all Open Source. Say MongoDB for example. Owning the software license every year is a big hit on the profits of the organizations with DB's like Oracle SQL etc. Going with an Open Source DB is a very cost effective option. But still they are skeptical on using it for Production.

Limitations/Drawbacks of web application development with node js mongodb and angularjs [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
It is quite common that people develop highly scalable and high-performance sites/web applications with node JS, mongodb on the back end and angularJS on the front end.
Can anyone give pros and cons for developing web based solutions with these technologies?
Web based solution is a very broad term. For both the front and back end tech choice it all depends on:
The knowledge of your existing team
Your target audience, B2B or B2C (i.e. how much you can dictate browser support... applies more to the front end)
Your budget
Which ties in with your time to deliver and required release cycle
The performance of your solution
Note that a high-performance site and a web application are two very different things, however unfortunately bad practice out there of people generally wanting to use tech for the sake of it (generally for their own learning sake over the benefit of the product), the line between the two it blurring.
A high-performance site with large concurrency is best suited to an appropriate back end heavy solution. There are arguments all over the web about which is best but perf tests to my knowledge suggest that node is very good but other languages can out perform it. However performance isn't everything as per my tradeoffs above.
A web app (say a single page app or SPA) is best built with client side heavy tech that is really in tune with the back end and apis. If your team is small and you all have good JS knowledge then it might make sense to use node with a JS framework (such as Angular, or React or the like) or an all encompassing front and back end solution such as Meteor.
Angular is really powerful, comes with testing mocks for you and allows really rapid development (took me a week to learn, having no prior knowledge of frameworks, but solid JS knowledge, I just read the entire manual) but in my experience falls short of building really large client side apps out the box.
There are only serious Drawbacks with using them if they aren't right for your solution in some way. You may find this later down the line after picking any one tech but that comes down to experience, knowledge and asking questions. Maybe supply more info and you might get less of a generic answer from me :)
p.s. I wasn't the idiot who downvoted your question without the decency of an edit or a comment :)

What are (potential) disadvantages of using meteor.js? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have just watched the meteor.js screencast and I'm quite blown away by how easy building a web application with it seems, in terms of live updates and database synchronisation. However, I am not sure of how well it would scale once it's live.
What problems (potential or real) could I have if I decide to build and deploy a web application written on meteor.js?
Well, I would advice you have a play about with meteor and make the judgement yourself. It really depends on what you wish to develop
Certain constraints I have found are
Meteor comes bundled with only mongodb. Other database support are planned for later releases
No model/object form binding (in road map)
Package system is not npm (although Meteor is built on node) and is closed to community. All meteor packages are developed by meteor themselves
Regarding performance, I found this article helpful
Here is another link to meteors roadmap
From my experience, I would say the advantages I have found outweigh any disadvantages at the moment
Having built client projects in meteor there is 2 things I immediately found hindering about the system:
1) No native support for MSSQL / MySQL or in fact any other DB than MongoDB (which jamin mentioned). That said, it sort of makes sense as to why this is the case, as a NoSQL solution with an easy to use JS api makes sense over a clunk RDMB database. However there is a plugin called Meteor SQL which supports MySQL at the moment https://github.com/drorm/meteor-sql
2) No native support for windows - Meteor is only released on linux & OSX meaning us windows users are out of the loop. There is an unofficial windows build on http://win.meteor.com but it's stuck at 0.5.9.
I probably wouldn't recommend building full sites out of Meteor yet as well due to it's various instabilities - https://github.com/meteor/meteor/issues however in a controlled environment it's perfect.
Also bear in mind Meteor have achieved an $11m funding grant - http://venturebeat.com/2012/07/25/meteor-funding/ meaning it will continue to improve and grow.
A huge problem for Application development are missing things like validation or translation.
You have todo everything on your own an include and use many external sources.
NPM support is not optimal, for backend usage ok, but in frontend a hack.

Which mobile app development framework should i use? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am a web developer. I know php html css and some js. So I was looking for a way to make native apps and found out that there are many framework i can use such as Sencha, phonegap, appmobi and Titanium. They seems all similer, i am have a hard to make decision which to use.
I work on windows OS and i dont have mac.
I tested both PhoneGap and Titanium and I would go for Titanium. It seemed a lot easier to use to me but like every other frameworks, it showed its limits really quickly.
However PhoneGap allows you to develop native plugins that are not hard to implements (good guys PhoneGap devs made a good doc)
Don't forget that frameworks like those 2 are just building web app into a native one (it's called a hybrid app) and they are extremely slow compare to real native apps.
Some would recommend you to use a MacOSX virtual machine but I'd recommend you to find a second-hand macbook or mac mini.
Also, remember to analyze what are your needs for your app and always think about the user experience. Slow app doesn't get much success.
The most powerfull framework is Titanium, in my opinion. But PhoneGap is a good shot when using html/css/js.

Categories

Resources