4 ms·
If you're interested in python, go, ruby, js(serverside), php then do this: - Make a simple website. This will teach you how to handle routes, serve files, usi
by shash7 10y ago
If you're interested in python, go, ruby, js(serverside), php then do this:
- Make a simple website. This will teach you how to handle routes, serve files, using best practices and other http 101 stuff
- Make a more advanced server with database connectivity[1]. This will show you how different languages handle database connectivity, database design, sessions, ORM and other webserver stuff.
- Now make the same website using a framework. Eg: express for nodejs, flask for python and so on. I don't recommend using bigger frameworks like RoR or Django at this point.
This will teach you what makes the language's ecosystem tick[2].
It will also show you how frameworks help you build websites faster.
- The last step will be to use a CMS on the language of your choice. This will teach you how to deploy apps on the cloud, webserver, etc. At this point you know the internals of how (almost)everything under the CMS is working and you should be pretty confident in building a custom website all by yourself.
Notes:
[1] You ideally should be database agnostic but use whatever database the programming environment imposes upon you. For example, use mongodb when programming in nodejs. Once you work out the kinks of using a database, you can use other databases like rethinkdb, mysql, etc.
[2] Large frameworks are opinionated and impose their own ORM, app wrappers, terminology, etc. Use a small easy to learn framework like flask for python, slim for php, etc and then move on to the bigger frameworks.
- biztos 10y agoThis is good advice, and I would just add four things: First, if you are building a web site you might want to really have in the world, then as a bonus you have it! (Think portfolio, or a blog that actually belongs to you...) Second, if you do this for more than one language you will have a basis of comparison, and this will be valuable to you in and of itself. It might even be valuable to other people! And maybe a topic for the web site.... Third, if you don't want to deal with the inevitable combination of HTML, CSS and Javascript (and various templates, frameworks, etc) that go into making a real website, then consider making an HTTP API instead. You'll still learn a lot, but it'll be more focused. Finally, you might find you have a particular thing you want to do differently than you see it commonly done. Web sites, web frameworks, and API's are great places to scratch that itch. However, be wary of rabbit holes. I'm currently in the middle of writing the web thing I wanted to have "just so," in its second form in Go, having already built it twice in Perl and once in NodeJS, and I think I'm on the right track right now but at this point who knows. (I've learned a lot of Go this way, but this is not an efficient way to actually create software.)
- pvg 10y agoThat's going to teach you a lot of things about the web framework in question and not as much about the language. If anything web frameworks (or, heaven help you, ORMs) expose the language beginner to a great deal of deep and confusing magic. The first thing you see probably shouldn't be a python decorator or a php autoloader or a java annotation or something that metarewires ruby's nil.