Any advice on my decisions surrounding Python GUI & database? [closed] - javascript

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 2 years ago.
Improve this question
So my next assignment for school involves creating a python GUI app with a database. I just have a couple basic questions that I am not yet 100% sure on the answers to.
I'm very good with HTML & CSS, however not so good at Javascript (I have about 8 weeks for this project however) - is creating an app with ElectronJS or even just in the web browser with pywebview a good idea or would I be best to stick with some of the older, uglier GUI frameworks such as Tkinter or Kivy?
Is there any major reason to learn how to use NoSQL databases over SQL? I already have a fairly decent understanding of SQL.
And finally, does using a GUI and a database (can the database even be inside the .exe?) pose any issues with packaging my whole project into a .exe or .app at the end or is this nothing to worry about?
Thanks in advance :)

1- As gui with python goes i have mostly worked with pyqt5, its pretty good, it is a mature project, you can even use it to comunicate with the database (sql databases) you can install the qt desigmer for a fast ui design, can apply css (or something really close to it) to your ui components and most important (at least for me) you will find a good amount of resources online on how to work with it and solve any issues that may arise.
Still if you want to go for a more electron like aproach and put your html and css skills to use, i would recomend Eel, it is fairly easy to use, i havent created anything too complex with it. Now these gui libraries that i mentioned , can be used with the module pyinstaller to create the executables that you need.
2- If you already have some experience with sql, i recomend that you go with it for two reasons
First: sql database engine will fill most of your needs (if not all), go with nosql if you are dealing with huuuge amounts of data or you really want to learn nosql.
Second:I dont know if your project is going to comunicate with an external database or is embeded in the project, if it is embeded go with sqlite, if not, for sql i recomend postgres and for nosql use mongodb.
3- from my experience, sometimes it can get complicated trying to embed everything (database, other external files) within the executable but you can build the app to be in separated files, i recomend that you use for this like i wrote above pyinstaller, it is wel documented and both gui libraries work fine with it.
Hope this helps, everything i recomended to you is from personal expierience, there are plenty of database engines, python libraries you can use for the tasks needed to complete your project, check what suits you the best.
Good luck, sorry for my english.

Related

Django or NodeJS for long-term web and business project? [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 1 year ago.
Improve this question
Good afternoon all, we are struggling to decide which way to go for a project and would like to have some insight from people who have been dealing with this. We have to invest in training/time for the two people who are working on our business and we would like to understand which way to go.
The people
Both have a good understanding of HTML, CSS, SASS and some JS
One has some experience with PHP
One has more experience with Python
The Project
Database driven website that will host and display hundreds of products (laboratory products which will need specific templates for each product
Shopping chart for reagents and lower cost products
A section with a knowledge base
The website(s) will be multilingual, with different products for different countries
Integrated CRM, connected to the products, stock management and shopping chart
Potentially (desirable, but not necessary) an APP for the phone
An application that will link all the components
AI services and big data analytics (as a separate product)
The timeline
2-3 years, potentially 4 for completion
This is to move what we are doing manually at the moment (and what we are planning to do) to something that is kept together by a coherent structure.
We do not have much experience or funds, but we have the man hours to pour into it. Would you suggest to go with Python/Django or with JS/Node? Why?
Thnks
It depends on the kind of data structure you need to keep if your data is kept around the world or in a central location, what kind of traffic you expect to have, and what your future of expansion looks like.
Option 1: Stick to your strengths
The first, and possibly the most obvious option, is to stick to your strengths. If you have someone strong in Python, Flask or Django could be the way to go because of the immense flexibility you have with python scripting, TensorFlow (for AI), and R libraries for statistical interfaces.
If only one of your 2 devs is good at python this will provide some separation of responsibility as you can have one dev focus on the page design and the other focus on the actual app functionality.
My biggest suggestion is to please stay away from PHP. Modern languages and libraries will work for what you need and are usually more reliable, less complicated, and have a whole community of active support built around them.
That being said you have to consider all the components of what you need. If your site needs are truly as large as you've described, you could break it down into microservices that handle various parts of the site independently and scale to meet traffic demands. This is all dependent on what you need of course.
Option 2: Go outside your comfort zone
The second, and more risky, option for you is to exit your comfort zone. NodeJS is a wildly adaptable and extensive JavaScript framework that can be molded to fit nearly any web-based need. The extensive lists of frameworks that can be used are a lot to consider, but you can deliver a more reliable, scalable, and user-friendly product with node. The HTML, CSS, and JS knowledge your team already has would be essential to making a NodeJS site work. Node also has the ability to provide you great flexibility in terms of localization. If you need to have different databases in different countries, for example, node can easily accommodate this and any other complexity you might have to throw at it. It's built to be robust and customizable for any need.
However, the drawbacks to using node are that it would be harder to implement AI and Statistical infrastructure to your site because of the nature of how node sites run. This part alone may make using python the way to go, but it can also make your site buggier, and take much longer to deploy.
Wrapping up
Ultimately the best choice for you is going to come down to your funding, team skills, and the systems you need to create to pull your site together. I encourage you to talk extensively with your development team to understand their strengths, weaknesses, and limits for what you need. Take their input seriously and use it to put together the best game plan possible to create the product you need.

Moving away from Excel Workbook/VBA - Technology Upgrade [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 2 years ago.
Improve this question
This is going to be more of a opinion question because I can't find any answer on Google or any SME's within my company that really have a opinion on this.
I wasn't sure if a opinion question is appropriate, so if its not please feel free to delete this, ban me or whatever the rules may dictate.
I'm work on a large set of very old Workbooks that are used for math calculations, these are not used in Production they are for check the results of the Production service. The Workbooks are very old (some 12+ years) and are now what I would call a 'mess' from the last decade of patching/fixes.
I've been researching Handsontable (https://handsontable.com/) a JS library that provides a spreadsheet interface like Excel that would handle all of the setting of the values of the cells etc... Then use Python (or Java if the company prefers for use J2EE) to do some of the heaver calculations (data lookup and projections) on the server side, or client side, I feel that just moving from VBA and Excel itself will provide a performance boost which Operations would just love.
I feel that the initial work would be a lot of hours, but I believe that I can create a common set of library's either in JS/Python/Java that will once completed reduce a lot of the re-coding that would need to be done on the VBA to JS/Python side as 80% of the VBA is common financial formulas.
My fear is that if we continue on the path with the current Workbooks in another 2-3 years they will become completely un-maintainable, alot with the fact that with VBA we don't have proper version control or the use of modern automated code review tools which we can benefit from by using newer technologies and in the long wrong will, hard work aside will prove to be the best option for our developers now and for my future colleagues.
If this question is ok by the rules and moderators, does anyone have any opinion on this? Is this worth while? Is it a waste of time?
Note: I'm not a manager, director or anyone with the power to make a decision as proposed above, I'm just a developer that feels I.... We can do better.
Thank you for your time.
So this may not be the answer for everyone, but I'm going to give you what we decided to invest time in first since this method was already used on another application to move it from a an old language to Java.
We have found several opensource projects online for the conversion of VB/VBA code to Python.
Examples:
http://vb2py.sourceforge.net/
https://pypi.python.org/pypi/vb2py
Once we have the Python code working using the native package to allow MS Interop access we will begin to refactor the Python code into a Django project (this choice isn't firm, but its my preferred choice; <3 Django) including creating the wrapper models for DB access. We feel we can make a wrapper for the MS Interop part to allow it to run as a Django project.
The plan in the end is to have the Django project act as only a REST Web Service for doing the 'heavy math/calculations' functions to Python and also could be on a much more powerful server increasing performance all around. This REST Service would answer calls from a Handsontable (https://handsontable.com/) JS Spreadsheet with the required plugins to handle all the current Excel formulas so we can do a direct 1:1 copy of our cell values/styles (convert Workbook to xlsm makes all the data stored as XML) to a Handsontable 'layout array'; which I think we will put in a DB. So in the end we have now given out Workbooks 15+ years of life and have removed Excel from the equation all together.
The current (mine) reasons for using Django are:
ORM
Independent Django packages makes reducing reduent code easier (I know this could be done with just pure Python but I feel its a good reason to put in my answer for others)
Easy to implement a Web Service using one a few very popular REST packages.
There are others but I believe everyone will get my points.
And the reasons for Python:
Runs on Linux, running VBA Macros server side requires Windows (bad: VM Cost when compared to Linux and less OS overhead).
Very easy to learn (I feel anyway)
Custom method decorators will make apply such things as standard interests rate to the return amount of a method without needing the interest rate code in the actual function that calculations amounts (as an example)
Thanks

Jquery vs. New Javascript Frameworks/Libraries (Angular, Ember, React, etc.) [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'm a ruby on rails developer who only recently started to learn javascript technologies (Angular and React) other than jquery. I read several of those comparison posts to understand why people use different javascript frameworks and libraries, but I still have a difficult time figuring out their significance (quite possibly due to my lack of understanding of how exactly the web works?). One thing I found out while using Angular and React was that I do not need to do deal with ajax separately like I used to with jquery. Also, I do seem to appreciate the syntax and components of React.
Anyways, please help me understand why I should use Angular or React as opposed to just jQuery. Are there things I can do with one but not with another? Are some faster than others? Is it just a matter of style and preference?
Anyways, please help me understand why I should use Angular or React as opposed to just jQuery.
You don't need any of them. Why learn the latest framework? It will only be obsolete in a few years anyways. Just learn how to leverage modern web technologies such as shadow DOM and HTML includes.
On the other hand if rapid prototyping is what you want use a framework. just know that one day something will break and you will will need to explore the black labyrinth that is the undocumented code of your chosen framework just to find out after days of searching and frustration that is was a simple logic error in your code that would have never happened had you fully understood the function and internal workings of said framework and as no documentation has ever been more than at best 10% complete you will continue this cycle perpetually until you stop using frameworks. This is just the price you pay for more rapid development.
The power of frameworks is also their greatest weakness. We love frameworks like angular because they give us structure and power by abstracting away complexities and allowing us to write less code. By that same token the abstraction layers breed ignorance and laziness as our code base grows and we become more entrenched in our chosen framework.
The best option in my opinion is to learn as much as you can obviously so you will be prepared when a new project lands in your lap that is written in a framework like angular or react but if given a choice the logical decision is the focus on just writing lightweight reusable javascript components without any library, framework, or anything else between you and the DOM.
But you may argue, "won't that just result in you eventually writing your own framework anyway? I don't want to reinvent the wheel!" Even if that is true (and I'm not saying it is, at least YOU will have a full understanding of the capabilities and limits of the framework and its internal mechanics. But most likely if you write intelligent reusable code leveraging modern web technologies you will not need a framework nor will you write one.
If you chose a framework my advice would be to learn as much about it as you can from both the provided documentation and stack overflow. The truth is that to commit a project to using a framework you should know that framework well enough that you could get along without it if you needed to. If and when you are willing to commit I say go for it!
I think you should check ember-cli as its developers are more ROR, http://discuss.emberjs.com/ is built with ROR + Ember-CLI and you can get its whole source code on https://github.com/discourse/discourse

Oracle ADF vs a Javascript MVC framework like EmberJs or 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 8 years ago.
Improve this question
I am starting a new project that has planned to use a large of Oracle components BEPL, SOA Suit, Oracle Spatial and Oracle ADF. I am trying to convince the team that a Javascript framework like EmberJs or AngularJs would be better. I feel like I might not be comparing apples to apple with EmberJs vs ADF. The goal of the project is to expose a large complex database to both our Web Front end and as an API. I think that a Javascript framework would work well with the data being exposed as an API instead of thought ADF where it might use a more proprietary connector.
Well.. comparing cars to bikes always look crazy. However sometimes you choose bike over the car. And sometimes you might want even reinvent the wheel.
However mostly it just shows lack of particular knowledge and very bad decision is trying to get rid of native, supported solution and start repeating it with the tools, you know better.
All oracle stuff now driven with ADF. There should be VERY strong reasons to abandon it. And you didn't provided any.
I'll be subjective with my answer here, as ADF is a very big framework and CAN be used along with EmberJS if you want to ditch the ADF Faces part, however here is my 5 cents into this
Using EmberJS from a Java Developer point of view
Pros
If done right, a great User Experience can be generated.
Very flexible front end development for your front end team.
More options when it comes to Deployment on servers as you don't need to work with Java EE container (I'm excluding the Service part of course).
Cons
Developers will need to learn EmberJS, Backbone or AngularJS
Developers will have to provide a great service layer, and controller in a way that all this JS Frameworks can interact with.
Developers will have to consider security constraints themselves as JS is not secure by default.
Development time will increase greatly and if you are under a deadline it'll be very hard to be met since developers will have to take care of everything themselfs.
This question interested me, so I made a tiny research. If you make a search on tags javascript + oracle, you'll notice that there are only 74 questions tagged. So these technologies do not actually intersect quite often in a real world and it's doubtful if anyone would provide expertise.
I'm learning AngularJS now and I'm quite certain that it's worth every minute I spend on it, it will be there for a long time and that it provides one of the quickest an intuitive developing experiences on the market. It requires learning, though, and even hair-pulling at times if you're a novice, like I was.
PS One of the killer arguments are the numbers for the tags in this question in the top-right corner.
Comparing ADF to JS is like comparing Servlets/JSP to JS. Makes no sense.
ADF generates JS as part of its page rendering, but also allows you to incorporate JS and JS libraries to extend and augment the ADF JSF page functionality.
I suggest you read a bit about JSF before making this decision...or comparison.
AND, if you're working with Oracle, specifically Fusion Apps, which is written in ADF and SOA Suite, (BTW: BPEL is one component of SOA Suite, not a separate product), then you have no choice but to use ADF.
Seems you have some study ahead of you.

Where do I start for writing my own calculator program [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 9 years ago.
Improve this question
I have been learning programing, mainly JavaScript and C++, but all the programs I have been writing are simple and in note pad like applications.
What would I need to make a simple calculator that takes user input and dose calculations with it.
What would I use to get the GUI on the screen, how would I compile it, and what IDE should I use.
It depends how complicated you're going, it'd be easier to recommend if you had a specific project in mind. You could make a simple 'GUI' that just opens in a CMD/Terminal window with C++ and easily allow input (cin), changing what's displayed as you desire. You could easily do your example this way, without the need of anything overly complex.
In terms of using Notepad you probably want something with at least some sort of formatting to make it a bit easier on yourself (such as Notepad++) although you could just open Notepad and start coding. There are IDEs such as Eclipse with the CDT plugin which are good for starting C++, or Visual Studio. I'm not big on Javascript myself, but I've heard Komodo is good for web coding.
In terms of complex GUIs, as has been said in the comments there are many and it basically comes down to your preference as to which you use.
If it is basic to advance experience you seek then try Windows Forms application. Make a calculator or something. Sky (and memory) is the limit.
The first thing to write an application in my eyes is to need that application in the first place. So try to think of some tool, you or someone else might need and then re-think your process.
With a clear aim you can start off and think of everything you need and - even more important - we can help you in this community, because you can then ask more specific questions regarding the actual development and all the problems that occur alongside it.
Develop deep understanding of c++ concepts. Study more and good books including it's standard. Start with normal applications & go towards advanced programming. for GUI, try QT - it's good of go for MFC Application. Write Code yourself and work on different projects, alogirithms. For book suggestion, i suggest you getting Scott Mayers Effective c++
For Compiler, i suggest using Visual Studio on widnows - it's awesome IDE.

Categories

Resources