Live data from Hacker News

Ask HN: How should a software engineer go about making a website?

news.ycombinator.com

1–10 of 15 posts

Ask HN: How should a software engineer go about making a website?

#1
I have been a professional software developer for four years now and must confess, I have never made a website. Mostly I have done systems engineering (Deployment, security, database infrastructure) but also some QA work and Java app development.

I wrote a fiction book in my spare time and would like to create a site to promote it and possibly develop the IP into other products. I already have a domain. The thing is, there are so many ways to create websites. I want a framework that is easy to use but also not too cookie-cutter. I've heard good things about Squarespace.

My best languages are Python, Java, and Ruby. Pretty solid with Unix (I've written hundreds of BASH scripts) and I wouldn't mind writing HTML and CSS if necessary. I know Javascript a bit too.

Anyway what do you folks recommend?

Re: Ask HN: How should a software engineer go about making a website?

#3
Wordpress? (Kidding...). I like Python Flask or Python Bottle.

For a small site I would just write the HTML. I realize this isn't a popular opinion nowadays, but sometimes it beats monkeying with frameworks in my opinion. Especially when you don't need to. And easier to set up hosting on shared hosting services. Check the purecss.io post from earlier this morning. They have some nice layouts.

Re: Ask HN: How should a software engineer go about making a website?

#5
post #3

Wordpress? (Kidding...). I like Python Flask or Python Bottle. For a small site I would just write the HTML. I realize this isn't a popular opinion nowadays, but sometimes it beats monkeying with frameworks in my opinion. Especially when you don't need to. And easier to set up hosting on shared hosting services. Check the purecss.io post from earlier this morning. They have some nice layouts.

I agree, if it's only a small site, why mess with all the other crap

Re: Ask HN: How should a software engineer go about making a website?

#6
Hello,

Ruby should be your language of choice for anything 'web', among the ones you know. Might be helpful in the future for other projects as well.

As most people said, Sinatra (+HAML or LESS), is an excellent framework to build up a simple website really fast.

However, I'd say go a step 'up' and use octopress[1]. It's a Jekyll-based blogging platform. You can set it up on Github, to avoid hosting. If you're not expecting extremely high traffic Github is fine for static content and JS. It's flexible enough to do whatever you really wanna do and there's plenty of documentation online.

You can find many of themes and howto's on how to use 'Liquid' in order to roll your own or modify one of the current themes. It shouldn't take more than 2 days to have something acceptable, a little longer if you plan to design a theme from ground-up.

Good luck :-)

[1] http://octopress.org/

Re: Ask HN: How should a software engineer go about making a website?

#7
post #3

Wordpress? (Kidding...). I like Python Flask or Python Bottle. For a small site I would just write the HTML. I realize this isn't a popular opinion nowadays, but sometimes it beats monkeying with frameworks in my opinion. Especially when you don't need to. And easier to set up hosting on shared hosting services. Check the purecss.io post from earlier this morning. They have some nice layouts.

Exactly! You will probably enjoy learning a few things by building a simple site from scratch and you will have a better feel for selecting any frameworks after. I would recommend getting this beautiful book by Jon Duckett that covers both the design and development basics for a website: http://www.amazon.com/HTML-CSS-Design-Build-Websites/dp/1118...

Re: Ask HN: How should a software engineer go about making a website?

#9
Well it seems to me that you are very happy to write scripts so wouldn't be alergic to writing a little bit of code.

I'd suggest you pick out of your best languages the one you prefer. And go with that.

Write a few pages of text in something like Markdown or RST (python). Use a microframework like Bottle (python), that resolves a route (example.com/about/) to a function. In that function convert your micro-markup to html, that you then wrap further in a template.

You can find some free html templates available on-line.

Before that, plan the site, define what it is and jot down your expectations of what it will do. Look at similar sites. Note the ones you like.

Draw up how the pages will be connected. For what you describe, it sounds like you only need a few pages. With the homepage listing news/updates. When you add something to the site (news) syndicate elsewhere, with links back (i.e. Twitter, Facebook).

If I was a fan, I'd probably want to join a community. Perhaps a newsletter and/or fan forum would be a good addition. You may want to manage a mailing list and/or a web forum.

If you have a web forum, you might want to stick that on another domain (or subdomain). You should be able to find an off the shelf solution for that. It doesn't need to be in the same language as your main site. Or hosted in the same place.

Getting different web components (forums, etc) to match cohesively theme-wise is a bit of a challenge. But it's not necessarily needed in my opinion. Personally as a fan I'm more interesting in content. You could however pay someone to theme the site after you have it working. That's easier if you restrict yourself to a minimal amount of templates.

There are millions of frameworks out there to choose from. Start with something very simple like bottle, it will introduce concepts and if you want to take it further later on you can.

If you haven't written a web page at all before, then basic html is a good place to start (elements: html, head, body, head, h1, h2, p, a, ul) page is a good place to start. Compose two html pages, link them back and forth to each other and try and add an image and text to both. You don't need a fancy web server to do that, you can just open a text file and start writing, and test in your web browser.

Re: Ask HN: How should a software engineer go about making a website?

#10
post #9

Well it seems to me that you are very happy to write scripts so wouldn't be alergic to writing a little bit of code. I'd suggest you pick out of your best languages the one you prefer. And go with that. Write a few pages of text in something like Markdown or RST (python). Use a microframework like Bottle (python), that resolves a route (example.com/about/) to a function. In that function convert your micro-markup to…

I wrote a quick shell one liner that aggregates text files and simple templates into resulting html files.

  find ./txt/ -type f -name '*.txt' -print0 | xargs -0 -I£ sh -c 'newname=$(basename £ .txt).html; cat templates/header.html £ templates/footer.html > html/$newname'
Each new page (html file) is a sandwich. The filling could be transformed markdown rather than plain text. A little find and replace for titles, and such like would make for quite an easy static site generator.

I even found a bash markdown transformer:

https://github.com/chadbraunduin/markdown.bash

Post reply on HN