Dipping Toes Into Programming
-
@tim_g said in Dipping Toes Into Programming:
@scottalanmiller said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
@flaxking said in Dipping Toes Into Programming:
@tim_g
Flask is an unassuming simple framework. It is good for creating something simple, or for creating something complex and cutting edge where you need flexibility. In order to build out a webapp, you would need to learn more components than just Flask.
Django is a monolithic framework, batteries are included. You just have to learn Django in order to build a web app. You don't have to create things from scratch, but there are certain ways to do things, so there is less flexibility. It takes longer to learn Django, because there is so much more there. But when you do learn it, you can pump out web apps pretty fast. With Flask there are other things you have to learn, and you have to figure out how you want them to interact.
Once you have a decent amount of Python, you can learn at least the basics of Flask in a day, and then look at learning Django too.
If you're interested in messing around with Salt, I think Python is the way to go. Salt's code is pretty easy to understand and work with for junior devs, and you can start making your own customizations.
Thanks for the explanation, it helps a lot.
This narrows it down to the following:
- Python / Django
- JavaScript / ReactJS
ReactJS is just an interface layer, it's not a framework like Django.
Yes I'm not as worried about having a full framework like Django for JavaScirpt. ReactJS seems to hit all the check boxes I'm looking for though.
I wouldn't even start touching ReactJS until I would be well into JavaScript anyways. And at that point, it may be that I change my mind and want something else once I understand everything much better.
With Django, I would start both at the same time, as my focus would purely be on the web side first, I think.
I will recommend you read more about server-side rendering and client-side rendering to really decide what are you going to use when building your apps/web pages. There is really nothing to compare between Django and ReactJS, they can even work together since one can be used as backend and the other as the frontend.
Django is batteries included framework which by default is used to render web templates server side; It can just as easily be used with the Django-Rest-Framework to create Rest APIs and be consumes by your client-side javascript libraries/frameworks.
ReactJS is a library mainly used for client-side rendering and building SPAs, you can use is to render server side using something like Nextjs but that is not its most common usage.
-
@romo said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
@scottalanmiller said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
@flaxking said in Dipping Toes Into Programming:
@tim_g
Flask is an unassuming simple framework. It is good for creating something simple, or for creating something complex and cutting edge where you need flexibility. In order to build out a webapp, you would need to learn more components than just Flask.
Django is a monolithic framework, batteries are included. You just have to learn Django in order to build a web app. You don't have to create things from scratch, but there are certain ways to do things, so there is less flexibility. It takes longer to learn Django, because there is so much more there. But when you do learn it, you can pump out web apps pretty fast. With Flask there are other things you have to learn, and you have to figure out how you want them to interact.
Once you have a decent amount of Python, you can learn at least the basics of Flask in a day, and then look at learning Django too.
If you're interested in messing around with Salt, I think Python is the way to go. Salt's code is pretty easy to understand and work with for junior devs, and you can start making your own customizations.
Thanks for the explanation, it helps a lot.
This narrows it down to the following:
- Python / Django
- JavaScript / ReactJS
ReactJS is just an interface layer, it's not a framework like Django.
Yes I'm not as worried about having a full framework like Django for JavaScirpt. ReactJS seems to hit all the check boxes I'm looking for though.
I wouldn't even start touching ReactJS until I would be well into JavaScript anyways. And at that point, it may be that I change my mind and want something else once I understand everything much better.
With Django, I would start both at the same time, as my focus would purely be on the web side first, I think.
I will recommend you read more about server-side rendering and client-side rendering to really decide what are you going to use when building your apps/web pages. There is really nothing to compare between Django and ReactJS, they can even work together since one can be used as backend and the other as the frontend.
Django is batteries included framework which by default is used to render web templates server side; It can just as easily be used with the Django-Rest-Framework to create Rest APIs and be consumes by your client-side javascript libraries/frameworks.
ReactJS is a library mainly used for client-side rendering and building SPAs, you can use is to render server side using something like Nextjs but that is not its most common usage.
Yes I get they can all be used together, but I need to start somewhere. I don't know any Python or JavaScript. I need to start there. I feel Python is the best place to start, at least until a more general understanding of it, then get into Django with Python.
-
@tim_g said in Dipping Toes Into Programming:
@romo said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
@scottalanmiller said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
@flaxking said in Dipping Toes Into Programming:
@tim_g
Flask is an unassuming simple framework. It is good for creating something simple, or for creating something complex and cutting edge where you need flexibility. In order to build out a webapp, you would need to learn more components than just Flask.
Django is a monolithic framework, batteries are included. You just have to learn Django in order to build a web app. You don't have to create things from scratch, but there are certain ways to do things, so there is less flexibility. It takes longer to learn Django, because there is so much more there. But when you do learn it, you can pump out web apps pretty fast. With Flask there are other things you have to learn, and you have to figure out how you want them to interact.
Once you have a decent amount of Python, you can learn at least the basics of Flask in a day, and then look at learning Django too.
If you're interested in messing around with Salt, I think Python is the way to go. Salt's code is pretty easy to understand and work with for junior devs, and you can start making your own customizations.
Thanks for the explanation, it helps a lot.
This narrows it down to the following:
- Python / Django
- JavaScript / ReactJS
ReactJS is just an interface layer, it's not a framework like Django.
Yes I'm not as worried about having a full framework like Django for JavaScirpt. ReactJS seems to hit all the check boxes I'm looking for though.
I wouldn't even start touching ReactJS until I would be well into JavaScript anyways. And at that point, it may be that I change my mind and want something else once I understand everything much better.
With Django, I would start both at the same time, as my focus would purely be on the web side first, I think.
I will recommend you read more about server-side rendering and client-side rendering to really decide what are you going to use when building your apps/web pages. There is really nothing to compare between Django and ReactJS, they can even work together since one can be used as backend and the other as the frontend.
Django is batteries included framework which by default is used to render web templates server side; It can just as easily be used with the Django-Rest-Framework to create Rest APIs and be consumes by your client-side javascript libraries/frameworks.
ReactJS is a library mainly used for client-side rendering and building SPAs, you can use is to render server side using something like Nextjs but that is not its most common usage.
Yes I get they can all be used together, but I need to start somewhere. I don't know any Python or JavaScript. I need to start there. I feel Python is the best place to start, at least until a more general understanding of it, then get into Django with Python.
Probably starting on "non-web" is good. Learning web first is very confusing.
-
@tim_g said in Dipping Toes Into Programming:
I was comparing some different IDEs for JavaScript, and unless someone can get WebStorm for free, it looks like Visual Studio Code is the real winner.
I've used Komodo IDE in the past and loved it..
-
@tim_g I have been using Thonny and the learnpython.org tutorials the last day or so. I also downloaded VS Code which is free from MS and includes python and node.js support out of the box. Also VS Code has a linux client
-
@dave247 said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
I was comparing some different IDEs for JavaScript, and unless someone can get WebStorm for free, it looks like Visual Studio Code is the real winner.
I've used Komodo IDE in the past and loved it..
Haven't seen that one in a while.
-
I found this website which looks interesting and helpful:
-
I have that book somewhere.
-
I have this book, but it's 1500 pages...
-
@tim_g said in Dipping Toes Into Programming:
@scottalanmiller said in Dipping Toes Into Programming:
Have you written HTML by hand? If not, you should. It helps to make this more clear.
Yes i've written full plain HTML websites from scratch, I'm well versed in it, though it's been a while. I get HTML, that's easy.
That bit of HTML I gave before as an example, if you remove the javascript, you just see a blank page.
Now, with your explanations from above, it yet makes things even more clear.
So let's see if I have this right:
Above HTML displays a blank page, but one (combined with the others) of the pieces (i'm assuming
molten.js
) loads via the <script> tag. This I'm familiar with too, back in the day I used already made javascripts on my sites to do cool things on pages.So what you're saying is that molten.js is doing all the behind the scenes work on the server, and then outputting it's own HTML (what you see when the webpage loads), on top of that blank HTML page going on in index.html? I'm thinking of it in the context of acting like an iframe if you know what I'm getting at.
This is a SPA, which means all the logic, rendering and routing of the app is moved away from the server and into the client(client-side rendering). Molten.js is the app (the whole interface) bundled together (using webpack) and sent to you completely on your first request.
Even though the backend is using a python framework (cherrypy), you don't have to write any Python code at all to consume the REST API exposed by it. Basically the backend is only sending your browser JSON and nothing else after the first request.
I'm familiar with that as well then, in a way, as I have a PowerShell script that grabs all users from specified OUs plus some specified info as well as their AD picture, and outputs it to a .html file to be used as a company phone list. But in this case, the PowerShell script is generating the entire index.html file itself. Not being called and loading content after an existing page is already loaded.
This is more akin to server-side rendering, where the backend is completely in charge of the logic, the routing and rendering of the HTML templates. When using server-side rendering, each request for a new page you make on the client causes a page refresh which contains a pre-rendered HTML template as a response from the backend.
-
@scottalanmiller said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
@romo said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
@scottalanmiller said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
@flaxking said in Dipping Toes Into Programming:
@tim_g
Flask is an unassuming simple framework. It is good for creating something simple, or for creating something complex and cutting edge where you need flexibility. In order to build out a webapp, you would need to learn more components than just Flask.
Django is a monolithic framework, batteries are included. You just have to learn Django in order to build a web app. You don't have to create things from scratch, but there are certain ways to do things, so there is less flexibility. It takes longer to learn Django, because there is so much more there. But when you do learn it, you can pump out web apps pretty fast. With Flask there are other things you have to learn, and you have to figure out how you want them to interact.
Once you have a decent amount of Python, you can learn at least the basics of Flask in a day, and then look at learning Django too.
If you're interested in messing around with Salt, I think Python is the way to go. Salt's code is pretty easy to understand and work with for junior devs, and you can start making your own customizations.
Thanks for the explanation, it helps a lot.
This narrows it down to the following:
- Python / Django
- JavaScript / ReactJS
ReactJS is just an interface layer, it's not a framework like Django.
Yes I'm not as worried about having a full framework like Django for JavaScirpt. ReactJS seems to hit all the check boxes I'm looking for though.
I wouldn't even start touching ReactJS until I would be well into JavaScript anyways. And at that point, it may be that I change my mind and want something else once I understand everything much better.
With Django, I would start both at the same time, as my focus would purely be on the web side first, I think.
I will recommend you read more about server-side rendering and client-side rendering to really decide what are you going to use when building your apps/web pages. There is really nothing to compare between Django and ReactJS, they can even work together since one can be used as backend and the other as the frontend.
Django is batteries included framework which by default is used to render web templates server side; It can just as easily be used with the Django-Rest-Framework to create Rest APIs and be consumes by your client-side javascript libraries/frameworks.
ReactJS is a library mainly used for client-side rendering and building SPAs, you can use is to render server side using something like Nextjs but that is not its most common usage.
Yes I get they can all be used together, but I need to start somewhere. I don't know any Python or JavaScript. I need to start there. I feel Python is the best place to start, at least until a more general understanding of it, then get into Django with Python.
Probably starting on "non-web" is good. Learning web first is very confusing.
I agree, first learn the basics of the languages and then start with the web stuff.
-
@tim_g said in Dipping Toes Into Programming:
I found this website which looks interesting and helpful:
That is great as well, I would totally recommend it.
Udacity also has several really good Python courses which I will also recommend you to check out.
-
If you are going to be choosing Python over the JS / NodeJS ecosystem, check out Python Tornado.
-
Main page: http://www.tornadoweb.org
-
@tim_g said in Dipping Toes Into Programming:
I found this website which looks interesting and helpful:
Yep, that would be a good one. Here are some more
https://python.swaroopch.com/index.html
http://getpython3.com/diveintopython3/
https://anandology.com/python-practice-book/index.html
http://greenteapress.com/thinkpython/html/index.html -
I started with Python last night for about 45 minutes..
I feel like I'd rather learn JS first, but it seems learning both is best. So starting with Python then Django, then JavaScript. They all go together, but Python seems to have more overall uses in IT.
-
@tim_g said in Dipping Toes Into Programming:
I started with Python last night for about 45 minutes..
I feel like I'd rather learn JS first, but it seems learning both is best. So starting with Python then Django, then JavaScript. They all go together, but Python seems to have more overall uses in IT.
Yes, JS really has no applicability to IT tasks.
-
@tim_g said in Dipping Toes Into Programming:
I started with Python last night for about 45 minutes..
I feel like I'd rather learn JS first, but it seems learning both is best. So starting with Python then Django, then JavaScript. They all go together, but Python seems to have more overall uses in IT.
Yes, there are so many Python modules out there that you could probably almost replace Powershell with it.
-
@Tim_G imho the best way to learn python is try to rewrite some of your PS scripts with it.
Also if you plan webapps Django is ok. For REST API flask is a better option imho.
My last application in python was done with flask appbuilder. A sort of small django.Visual studio code is your best bet for interpreted languages.
I see you have made your choice. Btw I strongly recommend python over js for a newbie too. because the non blocking concurrent logic of js tends to blow your brain in the beginning.
-
@flaxking said in Dipping Toes Into Programming:
@tim_g said in Dipping Toes Into Programming:
I started with Python last night for about 45 minutes..
I feel like I'd rather learn JS first, but it seems learning both is best. So starting with Python then Django, then JavaScript. They all go together, but Python seems to have more overall uses in IT.
Yes, there are so many Python modules out there that you could probably almost replace Powershell with it.
Completely replace it, definitely. Python is the most universal automation language for systems administration. You can run Python on .NET, on Java, on the OS directly (with the standard interpreter), it predates PowerShell as the hard core scripting language for Windows automation. It's great because it works on Linux, Solaris, BSD, MacOS, etc. as well.
SaltStack is written in Python and does essentially anything you can imagine.