How do I get started with web development?
I'm an experienced C++ developer who'd like to try out some web development in my spare time. I've got a couple of hobby projects in mind ranging from dynamic webpages to client server stuff with an app running on a phone or tablet as the client. It seems like there are lots of frameworks and tech that I could use. This leaves me wondering what the best things are to learn. I'm not afraid to learn a new language but I'd like to understand the trade offs before I begin. A few options that seem popular include Ruby on Rails, Haskell, Erlang or Go.
I also don't know much about setting up the actual server. I'd like something relatively inexpensive to initially learn on but I'm willing to pay for quality. I'm more interested in the best bang for my buck than just being cheap. Any recommendations on this front would also be appreciated.
20 comments
[ 4.7 ms ] story [ 51.8 ms ] threadDo you have any experience in anything other than C++? If so, try one of those languages first. In general, in my experience, familiarity is a great way to break the barrier into a new area.
If you don't have experience in the other languages (Ruby, Python, Go, etc) — pick a few common frameworks and built simple-stupid apps in them. Build a TODO app in Rails and Django. They are so quick to build you can follow tutorials and explore which one you seem to like most.
If you wanted to veer off the beaten path of the big three (PHP, Ruby, Python), Go has some cool things going on, and you might find it interesting as a C++ dev.
One problem you first have with web development, is you see too many possible ways to implement something. Using a good framework makes a lot of these decisions for you (or at least encourages you to do things properly), and reduces the amount or boilerplate code you.
Plus the guys that write these frameworks have loads more experience than you and have added stuff you probably don't even know about. CSFR protection for example. Sure it was a pain getting the first errors resolved, but now I know that I ought to be including these things in my webpages now.
Or try both. This should help : http://www.codecademy.com/
Personally I found a wonderful step-by-step book from Pragmatic Press "Web Development with Clojure: Build Bulletproof Web Apps with Less Code" http://pragprog.com/book/dswdcloj/web-development-with-cloju.... The book explains in step-by-step fashion and working example code how to build a web app from scratch. Of course, the Clojure approach is quite different from most web-stuff out there, focusing on reusable and small libraries rather than large frameworks but I find it appealing personally.
https://www.udacity.com/course/cs253
Start by downloading the free version of Visual Studio Express.
For the server: C#/ ASP.NET MVC / ASP.NET Web API
For the client: JavaScript / HTML / CSS
Pick a JavaScript framework like Angular/KnockOut, JQuery and make it pretty and responsive for mobile with something like Bootstrap or Zurb.
For hosting your project, take a look at Windows Azure. You get a free hosted web site to play around with that can be automatically deployed from your source code stored on your github/bitbucket account.
Even if you're no fan of Microsoft, I'd recommend spending the time to look at the technology as they've invested heavily in it and it is rather good and developer friendly.
DigitalOcean: It is $5 for a server that can run pretty much anything you'd need when starting out, and they have a vast bank of tutorials. A full VM, you will have control of everything. I have had good experience with customer service requests.
Rimuhosting: A little more expensive (and with a better spec'd machine) but an awesome technical staff that have been very happy to troubleshoot sometimes very quirky problems (with my programs, not their setups). About $20.
Dreamhost: You don't get root, but you do get shell. They take care of ensuring the machine, MySQL, a self hosted mailserver, amongst other things, stay up. Shared hosting with performance boosting options. Sometimes someone looking after the core stack, especially if just setting-out, can be worth it. About $10. I have had good customer support and have had an account with them for around 10 years.
As for language, I'll defer to the rest of the community. I'm partial on Node.js, since you really only have to learn Javascript, HTML and CSS. Everything else you can rely on your programmer knowledge. The choice is yours.
I recommend you choose a fairly simple project that interests you. No stupid hello world -- you're not completely new. Try an online tic tac toe game or something.
As for front end, I recommend you try backbone. It's barebones enough that you'll learn exactly what other frameworks do for you. It's also short enough to read to see how it works.
- Learn HTML/CSS/Javascript first if you don't know already. Build a static HTML page before you get into the dynamic client/server stuff. This sounds simple but many people lack the basic understanding of HTML/CSS.
- Server: DigitalOcean ($5/mo). It is a great choice and balance between crappy shared hosts and expensive dedicated servers in terms of ease of use, cost and setup required.
- Language/Framework: I suggest Python and Flask (happy to see few others suggesting the same). Why python ? Just a preference. But if you do choose python, I would highly recommend Flask. It is "micro" enough that you don't have to worry about too much boilerplate that you don't understand at first but powerful enough that you can create a simple web app in no time. Once you understand flask, you can try larger frameworks like Django which have all batteries included. As a learner, I don't recommend Django right away because it does too much magic which means you won't understand what's happening behind the scenes. Flask makes you think about that.
- Database: Go with Postgresql or even mysql. Don't think about NoSQL stuff at the beginning. If you really want to keep it simple, start with sqllite
The above items should get you started with web dev learning basics.
I don't need to stress on the 1st point for you. Regarding choosing language and not framework, my reason is that too many beginners get caught up in which framework to use debates which basically sidetracks them from the main thing: learning. Also, frameworks do a lot of things for you. For eg, a higher level framework will most probably provide you with login management which would include cookies, sessions etc. While I know it is good to not reinvent the wheel, if you let plugins and framework do most of the heavy lifting, the learning process gets hampered.
Without a framework guiding you, you are bound to make mistakes in terms of architecture of your app. But it is fine in the learning process. Knowing what is going on is better than using seemingly magical solutions. Maybe later yes, but for now stick to the basics!
I personally started off in PHP. For PHP I'd suggest Toro microframework. It gives you routing and that's it. Whatever language you choose, pick the smallest framework for the maximum learning. For python, afaik flask is pretty light.