Hey guys! To everyone who's dived deep into Web development; where would you start if you could start again? Are there any resources available that really can help you...
Jon M. replied:
Take a look at this http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:introduction
Andy T. replied:
I'd start on Play! Framework or Vert.x and work my way down to Netty. Maybe use Scala instead of Java for the challenge (and for the more pleasant language). I've tried so hard to get into Node but I just can't. I suppose I'm inviting flames by saying so, but I can't see it doing anything that Netty (which is slightly older than Node and serves a similar purpose) can't do better. I am also biased in favor of maintainability and self-documenting code, which there's a *lot* of really high-quality tooling built for JVM-based languages. A particularly important advantage of Java/Scala is that documentation and source are usually one autocomplete or one click or one google away, and tell you everything you need to know. Site note: someone is building a node.js compatibility layer for Vert.x. Vert.x is built on top of Netty: https://github.com/nelsonsilva/node.vert.x
Sridatta T. replied:
Chapter 1: The Basics A basic web application is composed of routing (which piece of logic to run when a given URL is requested?) and templating (how to create the HTML that is sent back to the client?). A lot of the software you've probably seen, like Django and Rails, add a lot of layers of complexity to this. If you really want the barebones experience, pick a basic routing library in the language of your choice. In Javascript, I recommend Express.js for Node.js. In Ruby, I recommend using Sinatra. For now, just focus on routing. Express.js and Sinatra do exactly this. They allow you to associate a function that runs every time a particular URL is accessed. Exercise 1: run a server on a port, set up some routes so that if you go to "myserver.foo/hello" you will get "Hello World!" and if you go to "myserver.foo/goodbye", you will get back "Goodbye World!"
Sridatta T. replied:
Chapter 2: Dynamic Content The next most important thing is dynamic content. You want the client to specify some data and have the server retrieve that dynamic data and act on it. There are two ways to do this. The first are things called query strings, which you can use with GET requests. You may have seen query strings before when you see URLs like "facebook.com/page.php?user_id=123456&something=baz". The real URL is the stuff before the question mark. After the question mark, there are key-value pairs. In this example: user_id = 123456 and something = baz. When a user appends such query strings to a URL, whatever code you have to handle that URL will be able to access these k-v pairs via a dictionary-like structure. Exercise 2: Make the server so that if you access "myserver.foo/hello?name=Sridatta", the code that handles "/hello" will be able to see that name = "Sridatta". It should then change its output to "Hello Sridatta!" based on this query string.
Quinn S. replied:
Sridatta Thatipamala: Yes! That's actually really helpful! Did you just write those chapters out off the top of your head? Kurt Spindler: I'd absolutely love to take you up on your offer:P Will you be around the Berkeley area anytime after June 14 th? Kevin Hwang, Ajay Tripathy: Thanks for the advice and projects! I'll definitely be exploring node.js in the near future and trying that project out:P Andy Toulouse: Is dropwizard more for webapps onto the market quicker? Would you recommend it for getting a real understanding of the whole web framework? And thanks Jon San Miguel; was reading the ruby tutorial earlier today:)!
Noah G. replied:
I looked at the first screencast of ruby on rails (http://media.rubyonrails.org/video/rubyonrails.mov) and it felt like a good start, if you want to go that way
Kevin L. replied:
w3 schools.com
Andy T. replied:
Kevin: I hope you're not serious. http://w3 fools.com/ w3 schools is inaccurate and bad for development.