No, something like tic-tac-toe has a bounded set of data to keep track of, no database or other long-term storage required.
Once you’ve mastered tic-tac-toe or the like the next kind of Web app you’re likely to tackle is one with an unbounded data set: for instance, a list of user accounts, or a list of posts and comments. Data like this should survive shutting down and restarting your server.
The traditional approach is to use MySQL to store this kind of data, but I would advise against getting a premature interest in MySQL, as there’s a risk that doing so will warp your thinking. YAML is an alternative for storing such data that would keep you more in the Ruby world.
All four of HTML, XML, YAML and HAML share the two initials ML—they’re all “markup languages”. It’s easy to get confused because the differences between them are minute, in the grand scheme of things, and only relevant to people who care so deeply about what tools they work with that it magnifies the differences.
The one you can’t do without is HTML, so it makes sense to use only that for a little while. (Actually in the past few years HTML has been redefined as a dialect of XML, so using it means you’ll also be using XML.)
Using HAML makes a lot of sense, but there’s also a bias it (and ERB, and every similar templating language) induces that you want to be aware of. When you start using these things you start thinking of your generated Web pages as “documents with Ruby variables”.
This is fine for some class of features but it will wreck your design skill if you generalize the approach too eagerly. Some (indeed many) portions of a significant Web app should be thought of as Ruby objects with the ability to output a HTML representation of them. Things like row/column tables; menus; data entry forms; recursively nested structures like LW comment threads; and so on.
No, something like tic-tac-toe has a bounded set of data to keep track of, no database or other long-term storage required.
Once you’ve mastered tic-tac-toe or the like the next kind of Web app you’re likely to tackle is one with an unbounded data set: for instance, a list of user accounts, or a list of posts and comments. Data like this should survive shutting down and restarting your server.
The traditional approach is to use MySQL to store this kind of data, but I would advise against getting a premature interest in MySQL, as there’s a risk that doing so will warp your thinking. YAML is an alternative for storing such data that would keep you more in the Ruby world.
All four of HTML, XML, YAML and HAML share the two initials ML—they’re all “markup languages”. It’s easy to get confused because the differences between them are minute, in the grand scheme of things, and only relevant to people who care so deeply about what tools they work with that it magnifies the differences.
The one you can’t do without is HTML, so it makes sense to use only that for a little while. (Actually in the past few years HTML has been redefined as a dialect of XML, so using it means you’ll also be using XML.)
Using HAML makes a lot of sense, but there’s also a bias it (and ERB, and every similar templating language) induces that you want to be aware of. When you start using these things you start thinking of your generated Web pages as “documents with Ruby variables”.
This is fine for some class of features but it will wreck your design skill if you generalize the approach too eagerly. Some (indeed many) portions of a significant Web app should be thought of as Ruby objects with the ability to output a HTML representation of them. Things like row/column tables; menus; data entry forms; recursively nested structures like LW comment threads; and so on.