Journey in Web Development-Meteor or Flask

I have been learning web development using flask web framework. I have built small projects with meteor. I have tried to implement a project on both frameworks in order to determine the easy of implementing features and overall easy of development.
Firstly how does meteor ensure security when submitting information via forms? Post/Get. You hear stories of how JavaScript is insecure and persons can execute code in the browser and compromise your website. While this is corrected with meteor’s publish and subscribe methods.
Flask allows you to use different databases with relative easy. I got postgres working but that took some time to get it to work properly. With Meteor the integration with mongodb is seamless. From what I have been following I know Apollo would allow you to use different data backends but not sure how this would work with meteor.
The development process for me was slower in flask than meteor; the automatic reload is really great.
The main goal of the website was to display population data in a chart using vis.js. So the idea was to allow the user to select fields and variables via a form and the database would return what the user wanted and display it as a simple graph. In flask I had to deal with redirects in form submissions when handling POSTS. In meteor using jquery was easy and I as able to get the desired effects and it had a more of an app feel when handling click events and there was no page reloads to deal with. I guess that’s one of the benefits real-time reactivity.

Overall I think meteor is well suit for developing interactive websites which makes the experience pleasant for users of the website while cutting down development time. When developing, as an amateur, not having to configure everything and having meteor integrate with technologies that are modern is a sure benefit. Flask, I will still continue to build on my knowledge of it as it has a similar feel to meteor and it makes working with different databases easy.

Here are some notes & tips to your trouble points:

Client security - as long as you sanitize and check your data as they come to the server (which you have to do with any language/implementation anyway as client is inherently insecure due to its openness, unless you use something like flash) you will be fine.

Forms - neither, there are many ways how to get the data, I most often use the on submit event and then send data to the server via method. Compare to click event on submit event can be triggered via hitting enter on a text field so it then acts as user expect from a form. I would encourage you to use native code instead of jQuery (unless you are using it for more stuff) to get the data. If you are using the on submit event you can get the data via the received event so there is no need to look up the elements via id/class.

Databases - Yes Apollo is the way to go. There is a package and tutorial on how to achieve that. It is an implementation of GraphQL.

It is no surprise that Meteor is better suited for interactive websites. It was developed for that purpose.

Good luck with your project!

1 Like