Live data from Hacker News

Ask HN: Web Fundamentals for a Newb

news.ycombinator.com

11–20 of 30 posts

Re: Ask HN: Web Fundamentals for a Newb

#11
Architectural Styles and the Design of Network-based Software Architectures (http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm) is a very readable dissertation on Web architecture. It is the definitive source on REST. Architecture of the World Wide Web (http://www.w3.org/TR/webarch/) is also worth a visit.

Re: Ask HN: Web Fundamentals for a Newb

#13
post #7

You might want to learn PHP first, especially if you're new to programming. Not only is PHP easy to learn, but it is also useful for quickly testing out simpler webpages. By learning PHP, you'll also learn how web programming is traditionally done and the basics of how the web works. Once finished, you'll clearly see how Rails makes certain aspects of web programming easier, even for things like form validation. I re…

Over and over and over, I've made this same recommendation when someone is new to the art and is banging on the Rails train: Do PHP first.

You have nothing to lose learning PHP. I love Rails, but I use PHP in a pinch. Hell, even DHH said he fired up PHP recently and liked how quickly he could wire up small bits.

Rails is too magical and mystical. If you don't understand the lifecycle of web requests, you are going to be shafted really quickly when Rails starts its magic tricks.

Re: Ask HN: Web Fundamentals for a Newb

#14
post #8
post #7

You might want to learn PHP first, especially if you're new to programming. Not only is PHP easy to learn, but it is also useful for quickly testing out simpler webpages. By learning PHP, you'll also learn how web programming is traditionally done and the basics of how the web works. Once finished, you'll clearly see how Rails makes certain aspects of web programming easier, even for things like form validation. I re…

PHP can allow you to be very sloppy, I'm not sure I would recommend it. Although you do need some way of learning in-depth MySQL, rails makes it too easy, and you probably won't be using Rails forever...

Sloppy is a function of the guy at the keyboard. I've seen beautiful PHP source and shitty Ruby.

Re: Ask HN: Web Fundamentals for a Newb

#15
post #4

In general, you always have to take into account the Law of Leaky Abstractions ( http://www.joelonsoftware.com/articles/LeakyAbstractions.htm... ). No matter how convenient a new abstraction might make things, it will some day "leak". If you don't know anything about the layer underneath, at that point, you're pretty shafted. Some abstractions are more leaky than others. ActiveRecord is a very leaky abstraction. Make…

Good points, but you made that sound kind of complicated.

Here's an example of a Leaky Abstraction. My programming language is called Ben (hey that's my name!) --

# build_webpage()

Tada. Fire up your browser, point it to localhost and bam! you have your own personal webpage with a photo section and a forum. See how easy it was.

Then you think to yourself, wait -- I want a classified ads section, too!

Ah, this is when the big leak happens.

My Ben framework doesn't include that bit, so you are going to have to dive down into the C that I wrote Ben with and muddle about it to write that code yourself.

It gets nastier too.

You could probably hack together a classified ads section in your favorite language in a couple hours, but since you've bet the farm on Ben, you have to get up to speed on how my framework works and you have to use my language of choice.

The abstraction is now leaking so much that you get out PHP and just do it all by hand.

Re: Ask HN: Web Fundamentals for a Newb

#16
post #13
post #7

You might want to learn PHP first, especially if you're new to programming. Not only is PHP easy to learn, but it is also useful for quickly testing out simpler webpages. By learning PHP, you'll also learn how web programming is traditionally done and the basics of how the web works. Once finished, you'll clearly see how Rails makes certain aspects of web programming easier, even for things like form validation. I re…

Over and over and over, I've made this same recommendation when someone is new to the art and is banging on the Rails train: Do PHP first. You have nothing to lose learning PHP. I love Rails, but I use PHP in a pinch. Hell, even DHH said he fired up PHP recently and liked how quickly he could wire up small bits. Rails is too magical and mystical. If you don't understand the lifecycle of web requests, you are going to…

I am reluctant to do PHP because of time contraints. I am working on this stuff after work, and at some point I would like to actually be able to build something. Anything. When someone says do PHP, my visceral reaction is no.

However, if the experts here think that PHP would be a worthwhile detour even though I plan to go with Rails, then I'll go with that. I guess I'd just like some assurance that I can pick up the basics this way and that I can do so in a reasonable amount of time.

Yes, I know patience is a virtue, but I just want to make sure that my time is spent as productively as possible. I do very much appreciate the advice from everyone.

Re: Ask HN: Web Fundamentals for a Newb

#17
Don't skimp on the database design. It can make your life a lot easier if you're model is tight.

Learn how to think about your data model as Entities and Attributes and the relationships between them.

Then find a tutorial on database normalization and learn it. It's not hard, but it might take 2 or 3 run throughs before it clicks.

Learn to be comfortable at the *nix command line if you plan to be hosting your app on a shared host or Virtual Private Server.

Most of all; don't get caught up in fads. It's easy to get the impression that you need to learn AJAX, Rails (no wait, Merb!), S3 and EC2, distributed programming, jQuery, ad infinitum, all at once. You don't.

Here's some Google terms:

"Database normalization"

"entity relationship diagram"

"Unix shell commands"

Re: Ask HN: Web Fundamentals for a Newb

#18
post #3

It's certainly useful to know how things got to where they are, but it's not always necessary. Even in history circles people debate how important history is if the lessons can be handed down via knowledge of good-practices. If you want to know how good you've got it now, I'd start with building a site that uses entirely static content. After you've got a few pages, make a change that affects all of these pages. You'…

In other words, you need to understand the problem before you can make sense of the solution.

Re: Ask HN: Web Fundamentals for a Newb

#19
post #4

In general, you always have to take into account the Law of Leaky Abstractions ( http://www.joelonsoftware.com/articles/LeakyAbstractions.htm... ). No matter how convenient a new abstraction might make things, it will some day "leak". If you don't know anything about the layer underneath, at that point, you're pretty shafted. Some abstractions are more leaky than others. ActiveRecord is a very leaky abstraction. Make…

+1 for studying database design/normalization. I took a class on it and the analyses of performance on different queries for different organizations was something I probably wouldn't have understood just by reading a book. Understanding how it works will also give you the courage not to be a slave to other people's recommendations; sometimes you want to duplicate data for performance reasons, but you have to make sure to manage that in your control logic.

Re: Ask HN: Web Fundamentals for a Newb

#20
post #13
post #7

You might want to learn PHP first, especially if you're new to programming. Not only is PHP easy to learn, but it is also useful for quickly testing out simpler webpages. By learning PHP, you'll also learn how web programming is traditionally done and the basics of how the web works. Once finished, you'll clearly see how Rails makes certain aspects of web programming easier, even for things like form validation. I re…

Over and over and over, I've made this same recommendation when someone is new to the art and is banging on the Rails train: Do PHP first. You have nothing to lose learning PHP. I love Rails, but I use PHP in a pinch. Hell, even DHH said he fired up PHP recently and liked how quickly he could wire up small bits. Rails is too magical and mystical. If you don't understand the lifecycle of web requests, you are going to…

Why not do "Ruby sans Rails" instead? You can keep the Ruby experience, but get all of the lower-level request/response experience you like.

Ruby is a good language for CGI programming.

Post reply on HN