msmshazan
Mohamed Shazan
43 posts

Some day I will make quality software.
Programming FTW.

#10357 Web Programming Advice
Jan. 12, 2017, 10:46 a.m.
I have been learning web programming for this week, and i am confused about the server side stuff of web development.
I know in client side you use JavaScript , html and CSS.
But what to use in server side so many options too confusing.
I just want a simple way to create dynamic websites.
What about Go,CGI or Django?
Any professional advice would help.
Also I want the site to have less dependencies and stable.
Thanks.

Just being curious on programming....
mmozeiko
Mārtiņš Možeiko
1129 posts
1 project

#10358 Web Programming Advice
Jan. 12, 2017, 12:18 p.m. Edited by Mārtiņš Možeiko on Jan. 12, 2017, 12:20 p.m.
You can use almost any language for that. Be it python, php, perl, go, javascript, pascal, C, or even bash scripts.

CGI is interface (something like API specification) how webserver like Apache or Nginx interacts with these scripts or executables. How they pass URL that is being requested and other webserver related parameters to the application. That said nowadays people rarely use CGI, except some quick hacks. You can use raw CGI, but usually the overhead for it will be too much. Usually people use FastCGI, WSGI, mod_php or something similar depending on language and framework they choose.

Django, Ruby on Rails and others are frameworks in specific languages (Django is in Python, Ruby on Rails is in Ruby) that provide a lot of ready to use functionality to you. So you don't need to manually parse requests and prepare responses.

What to use is really up to you. All the options are good in one way, and worse in different way. There is no one "best" thing in web development. It all depends on what language you use, want to use or know the best. On what are requirements for web service (expected load or similar performance characteristics). And on server infrastructure you'll want to and/or need to maintain.


Todd
57 posts

#10374 Web Programming Advice
Jan. 13, 2017, 6:34 a.m.
msmshazan:

I just want a simple way to create dynamic websites.


Is this really true though? Let me ask you: What are your goals? Are you trying to get a job doing this or do you want to do this for you, your friends, family, a hobby, etc?

You may think this is a silly question but it's not. The reality is, there are so many technologies to choose from that which one you end up using is usually just determined by your employer (you get hired and they use Java/Spring MVC, or Django, or Rails, etc...) or by you if it's a personal project of course. If it's the latter for you, you can literally just pick a set of technologies (aka a "stack") and just dive in. The reality is, Django, MEAN, .NET, Java, Rails, PHP and whoever else I'm forgetting right now can make "dynamic websites" like the ones you want. If you want to have specific feature, you may want to do a search and make sure whichever tech you're choosing has that feature, but otherwise, have at it.

My only personal advice to you would be unless you specifically want to do WordPress stuff, avoid PHP as a starting language. I don't personally feel that "the language is bad" like many other people do, but I have definitely noticed a tendency of there being poor-quality "get started quick" tutorials out there for PHP and unfortunately, PHP comes with a lot of power and not a ton "done for you" which allows you to leave security holes wide open when you don't even know it. But if you specifically want to tackle PHP, then do it. It's more about what you want to do. I've recently started learning assembly because I want to. Do what you want to!
msmshazan
Mohamed Shazan
43 posts

Some day I will make quality software.
Programming FTW.

#10378 Web Programming Advice
Jan. 13, 2017, 12:09 p.m.
I am using flask framework and python as the programming language.
I am using this as a hobby project to learn web programming.
I was using django earlier but i didn't understand what i was doing then i used flask because they said it is for beginners.
Does anyone know any good resource for web programming with a handmade mindset.

Just being curious on programming....
msmshazan
Mohamed Shazan
43 posts

Some day I will make quality software.
Programming FTW.

#10392 Web Programming Advice
Jan. 15, 2017, 3:46 a.m.
After 4 hours of struggling web dev finally made a working login page. Not the nicest thing but good enough. But is it me or web programming is messy like there is so many options and I thought from what Casey said win32 api is messy.
I used flask framework as back end (according to web programming language) ,I tried using django but I didn't understand what I was doing so I used flask.
And to the handmade network webmaster you have done a good job with the site(better than most sites in the internet) and have you thought of teaching web programming since you are in the field for a long time.
Thanks for helping me understand stuff and thanks to Mr.Martins for answering my questions even they look stupid.

Just being curious on programming....
John_Uskglass
Laurie
23 posts

#10394 Web Programming Advice
Jan. 15, 2017, 7:08 a.m.
msmshazan:
After 4 hours of struggling web dev finally made a working login page.

Hey, well done on your first login page! The Handmade way isn't always easy, but I bet you have a much better understanding on the login process now, right? It's really good that you persevered.

msmshazan:
Does anyone know any good resource for web programming with a handmade mindset.

Personally I've always found the tutorials at W3Schools to be very good. I recommend them, particularly if you're taking a Handmade approach, because I find they are generally very good about actually teaching you the technology they are talking about, rather than claiming to teach you a technology and then actually just telling you to install an existing framework or a ton of dependencies. They're not the best if you just want to get something done quickly, but for understanding, I think they are very good.
Todd
57 posts

#10418 Web Programming Advice
Jan. 18, 2017, 2 a.m.
msmshazan:
Does anyone know any good resource for web programming with a handmade mindset.


For this, this may sound pretty crude, but just pick up a few good web programming CSS, HTML, and JavaScript books. You can do a ton with those 3 languages. You can even do a ton with just CSS even, if you don't believe me get "CSS Secrets" by Lea Verou or even just watch her talks on YouTube. She's sorta the CSS equivalent to what Casey is doing on HH.

The thing about Handmade web is you have to do things the long, boring, slow, hard way at first, which is counterintuitive to like 99% of the business space in web. Generally, web companies seem to want to throw stuff up fast and do it with at least work as possible. This is why you see so many frameworks popping up and this is also why it's almost non-existent anymore to see a webpage which doesn't utilize a framework. Not that this does not mean that not using a framework is bad - in fact, it's probably better, but it requires a lot more discipline, study, and time than just leaerning Angular, React, or CakePHP and just slapping a site up. This is not to downplay learning frameworks and tools as they are not "easy" either, and over time, they still contribute to overall programming knowledge as you will see how the framework creator does things certain ways, however, don't underestimate the power of raw HTML, CSS, and JavaScript. If you want to get good at handmade web, I suggest this book called DOM Enlightenment. Essentially, you will learn what the library "jQuery" is doing for you behind-the-scenes and you can do it all yourself.

Also, you will hear about stuff like Twitter Bootstrap and making responsive sites. Know that you can also do this all yourself in CSS quite easily. You just make your widths and heights based off of percentages rather than hard numbers so that they adjust to devices/screen sizes. John_Uskglass posted a great link to get you started.