"single page app from scratch"
Asked Answered
S

5

5

I've been starting work on a single page app. (think TiddlyWiki)

It's been a while since I've done serious web design. Last time I built a big site was pre-css, pre-javascript, pre-html5, i.e., HTML plus a lot of cgi scripts, in my case, mostly in PHP. I've picked up snippets of the new technologies over the years, but not in any organized form.

I figure it's time to go back to square one and work through a serious of more and more complex pages/sites - HTML -> HTML+CSS -> Javascript -> HTML5 functions.....

Which leads me to wonder if there are any tutorials floating around akin to "Linux from Scratch" - but focused on "web site from scratch?" Or at least a series of tutorials that start with HTML hello world, and progressively add features in a logical way?

Thanks!

Sorel answered 18/1, 2013 at 16:53 Comment(4)
I just really loved thiscourse, it will teach you many important things and it is full of useful tips.Mariel
I'm considering making a website just for this purpose. Being a college student, I've worked a lot with aspiring web developers that just don't know where to start. I'm thinking perhaps to start with more of the design aspect (HTML + CSS), progressing on to data management with PHP and MySQL, and finally incorporating maybe JavaScript and jQuery into the site. Teaching people just the code itself is not as important as teaching people HOW to use it. I feel that a progressive course covering all main aspects of web development would be very helpful to all newbies out there. Any thoughts?Hardigg
It sure would be useful. HTML used to be easy - <DOCTYPE><HEAD>..</HEAD><BODY> ... <.BODY> - structure and content. Now there's XML, HTML5, XHTML5, CSS, JavaScript, and lots of libraries to select among. It would be useful to have a step by step build up - basic HTML hello world, add some CSS, add some JavaScript, add some more features, etc. Particularly in the context of building widgets and webapps that can run stand-alone. Maybe that's just me.Sorel
One thing I've just found, that's incredibly useful, is "HTML5 Boilerplate" (html5boilerplate.com) - which provides a "skeleton" for an application that uses all the modern HTML5, CSS, and JS features. It's well documented and provides a nice start for going from "Hello, World" to progressively more complicated pages/sites. And there's nice intro at weblogs.asp.net/dwahlin/archive/2011/06/05/…Sorel
E
8

Personally I suggest you learn HTML and CSS properly, get that working and working well before even thinking about javascript (and especially before thinking about SPAs!). Here's a little guide I wrote up for someone recently that may be of help to you:

So there are a few thing which you must consider, and understand, to be a CSS master (in my opinionated order of importance):

  1. Selectors
  2. Cascade
  3. Specificity
  4. Box model
  5. Positioning/floating
  6. HTML

Selectors allow you to target elements on a page, without selectors you can do very little (apart from add style rules to elements inline – bad practice!), so it’s a good place to start. Understand how the selectors work and their support.

The next thing to understand is one of the most important topics, which will avoid you writing too much CSS needlessly – the cascade!

Specificity determines which rules are applied to a given element. Most of the time it can be avoided and you can proceed with ignorance, but understanding it will tame your selectors and stop you getting into an arms race with yourself, adding more and IDs to selectors to get your styles applied (if that makes no sense, you don’t understand specificity, read on!)

Whenever I talk to people about CSS, most people understand font styling, backgrounds and all that jazz. That’s because it’s the simple stuff ;-) the areas where people always seem to have trouble are in understanding positioning and floating. These are both tied to the box model, so first thing is to learn that, then move onto positioning and floating:

Don't worry if your mind is blown a little at this point, they're fairly confusing concepts!

But what is CSS without markup? Or rather, what use is good CSS without good HTML? I think, to have a good understanding of CSS is to have a good understanding of HTML. The following websites contain masses of info about HTML:

They may be a little too deep for first learning, so I’d also heavily recommend the following books:

They both show you how to write good, semantic markup and style with CSS to create great results. I know, right, who needs books in this day and age when you have the internet?! Well these books are awesome, and are 100% worth the cost.

Some less targeted suggestions, but good resources for general CSS/HTML learning:

One final thing – and a great strength of the web - is that all websites are effectively open source*, in that you can view all the CSS/HTML/JS for a website. Next time you see something interesting, just crack open firebug and try to understand what’s going on, alter the values, see what effect it has. See how others organise their markup, how they style things, what functionality they delegate to javascript over CSS etc.

After you’ve understood all the above, you may fancy dabbling with some cutting edge CSS. Handy websites for playing about with some CSS3 technologies:

That’s everything I can think of at the moment! Of course, as with mastering anything, it is not how much reading you do but rather how much you practice what you read. Only when you struggle with these things in practice will you truly gain insight and strengthen your own mental model.

As for JavaScript, assuming you know some programing (given you mention CGI and PHP) I heartily recommend watching some of Douglas Crockford's videos which can be found here:

Crockford is a master of JavaScript and is responsible for some big advances (he invented JSON and started JSLint). The YUI theatre vids are particularly excellent and incredibly detailed :)

Eldreeda answered 18/1, 2013 at 16:59 Comment(0)
M
1

For some tools and 'debugging' and seeing if your stuff works I'd use: JSfiddle

Also, the w3schools are great for basic understanding of those concepts.

The tracks for HTML5 and Javascript at CodeAcademy may also help you too.

http://www.codeavengers.com/

A lot of it is still the same, it's just that CSS and JS have added even more functionality and HTML5 has added more element tags.

What I would do in your place is to make a basic website and then slowly add new features to it while following along with the tutorials to try and make it your own.

Mithridatism answered 18/1, 2013 at 16:57 Comment(0)
M
0

I'll add my 2 cents too. Here are some nice series for learning HTML, CSS, overall website coding/designing process and other useful info which I consider as really good:

I could post much more, but why so - these are enough to get in shape. I suggest you to start with them and you will find more resources on the way.

Mariel answered 22/1, 2013 at 12:49 Comment(0)
S
0

If you want to make an SPA let me suggest a completely different tack, in which you don't necessarily have to start at the HTML/CSS level: www.amber-lang.net

"The Amber language is deeply inspired by Smalltalk. It is designed to make client-side development faster and easier. Amber includes a live development environment with a class browser, workspace, unit test runner, transcript, object inspector and debugger.

Amber is written in itself, including the compiler, and compiles into efficient JavaScript, mapping one-to-one with the JS equivalent."

Check it out, it's really cool.

Showily answered 23/2, 2014 at 18:48 Comment(0)
A
0

In case you are still looking for an starting point in 2020, I have recently written what things to consider when Building Web App from scratch.

Not exactly what you are looking for, but I think it is a good starting point for an update.

Best, Max,

Amalekite answered 21/2, 2020 at 21:41 Comment(3)
Thanks. Not sure how it applies to single-page webapps, like TiddlyWiki, but useful info.Sorel
@MilesFidelman probably the article includes a lot more than you need for an app like TiddlyWiki, but includes all basics and needed stuff to consider if your web app scales. I hope it is useful.Amalekite
Actually, the other way around. Traditional webapps are basically front-ends to server-side stuff, which is pretty easy. Pushing stuff out to synchronized copies of a local app - particularly running in a browser sandbox - that's a bit trickier.Sorel

© 2022 - 2024 — McMap. All rights reserved.