views:

809

answers:

9

I've been messing around with basic websites for a few years, using companies like www.Fasthosts.co.uk to do my web hosting. But I'd like to expand my skills from C++ and Java app programming into Web-based programming, and I think the best way to do that is with a project. I've chosen to go with a blog engine because it's a relative comprehensive yet non-complex project.

I'm aware that you can just go to Blogger and bam! One blog. I've done that, so that I can at least have some content, and work out what I want to do with this blog. At the moment, I'm thinking I'll use it to chart my progress creating the blogging engine.

But I have some questions.

Do you need to be running your own server? Or is it more sensible in the short-term to use a hosting company?

What types of language are worth considering?

What's important to focus on from a design perspective?

What unexpected problems might I encounter?

+7  A: 

Decide first what you want to learn.

If you want to learn about browser inconsistencies, platform incompatabilities, database issues, backing up your data, etc, then write the whole thing yourself. I would recommend choosing PHP and writing on your own LAMP server (or WAMP if you must) to start with, because that has zero cost.

If you want to learn python or ruby, but not all the low-level database and HTML generation, then pick a framework like django or ruby-on-rails, and use that. You will be able to concentrate on what you want to learn, instead of being frustrated by details you don't care about.

Decide if this is a programming learning exercise or a commercial exercise, and choose goals and timeframes to fit.

Phil H
Thanks Phil, this answers a lot of my questions. Of course, I'd still need to set my PC up as a server, and I'm not sure its rickety old chips could take it
deworde
If you install something fairly lightweight like Xubuntu linux, you should have a perfectly workable server on an older machine. If that's still slow, try changing to a text-only boot, which will free up even more memory.
Phil H
Awesome, thanks.
deworde
A: 

If you ask such questions then writing a blog engine is not for you. Just forget it and use one of the already existing ones.

User
It sounds like he's doing it as a learning experience and not to have a blog, so even if he's not able to complete the task, he'll learn plenty from all of the difficult situations writing a blog engine will present.
Rich
Then it turns into a very general question like "what technology/stack should I learn to learn something?". Hard to answer that...
User
That's not a helpful answer though is it. -1
Rob Stevenson-Leggett
Helping other people learn is a noble thing. I am glad to see someone knowledgeable willing to help.
Jergason
+1  A: 

As in most cases, language isn't important. You don't need an entire server, though managing your own web server will teach you some great skills if that's the goal.

If you are already somewhat familiar with any of the more popular web app languages, go with that. The cheaper option is to go with a shared hosting plan. Have a look at the db structure of one or more of the popular blog engines as well as structure and layout of the code, and think about how you would architect a similar application. Pick something you don't like about the application, feature(s) you think the application is missing or could use, and pick something you'd do differently regarding the application architecture (folder structure, class hierarchy, UI, etc).

Rich
+1  A: 

I would start by looking at the source code of an existing blog engine.

Oxite is a blog engine built on ASP.NET MVC (the same framework as Stack Overflow was built on)...

Per Noalt
And I've read lots of critics about how it is built. Could be a bad example to learn from.
User
Maybe a good counter example? It is however very functional. So... just because it's not fully TDD and following the repository pattern doesn't mean it's completely useless. Also I beleive Rob Conery was refactoring it.
Rob Stevenson-Leggett
+1  A: 

ASP.NET MVC is very good for writing your own blog engine. All you'll really need is Visual Web Developer Express, the framework and SQLite or Sql Server Express.

You can have that up and running on your local box in no time.

Plenty of tutorials:

Rob Stevenson-Leggett
+7  A: 

"What Do You Need To Write Your Own Blog Engine?"

Blogs are web sites. So, you need to (1) write a web site, and (2) serve that web site. The first is easy, many languages and tools do this. The second is slightly harder, because you have to run it on a server somewhere.

To learn, however, you don't have to spend a lot of money on hosting.

"Do you need access to your own server?"

That's how the world-wide web works. Things on the web are on servers.

"What language should you use?"

It doesn't matter. Pick one you like. I like Python. Others don't like Python. Do Not Ask Which Is "Better". They're all good. Pick you one can read; pick one that appears to you; pick on on the TIOBE list; toss a coin. It does not matter -- and there is no "best" language.

"What's important to focus on?"

The data model comes first. Then processing that data. Then presenting that data in HTML.

S.Lott
"Do you need access to your own server?""That's how the world-wide web works. Things on the web are on servers."The key words in my original question were not "access to server" but "your own".I'm aware that readers will retrieve the pages from a server. I'm not sure if I have to buy a server.
deworde
"They're all good." True in essence, but C++ may not be the best tool for the job I have in mind. I can knock a nail into a wall with a wrench, but it's not necessarily the best way, especially if I'm trying to learn Hammering.
deworde
@deworde: you need access to a server. Buying, leasing, renting and stealing are all viable business models for web services. "your own" is vague -- does it mean one you control? Or one that sits on your premises?
S.Lott
C++ is precisely as good as all other software development tools. It has all the same quality attributes as every other programming language. Between the top 20 languages on the TIOBE list there is little or no significant distinction except preference. They all do what you want.
S.Lott
I can't emphasize this enough -- it's a coin toss. Ruby on Rails, Python/Django, PHP are all equally good. There's no feature that clearly lifts one above the others. They all work. They're all good tools.
S.Lott
+4  A: 

You can create a weblog engine using almost any programming language. But it might be easiest to base your work on "web framework", such as Ruby on Rails, ASP.NET, Django, PHP or something else along those lines.

Here's a 15 minute video showing how to create a simple weblog engine using Ruby on Rails.

Of course, as other people point out, there are an enormous number of weblog engines out there already. So if you write your own, it's probably going to be most useful as a learning exercise. If you want a full-featured weblog, you could also find an open source weblog engine and learn by modifying it.

emk
+4  A: 

The Google Application Engine offers both free limited hosting and a tutorial which begins with a Hello World plain text page and proceeds to a guestbook with image uploads and Django templates. Tweaking a guestbook into a rudimentary blog is straightforward.

Here's the Getting Started page.

Thomas L Holaday
A: 

I would consider Google AppEngine for a few reasons

  1. a strong language, Python, that I
    recommend more than Php
  2. there is a test server that you can use on MacOS or Windows to develop and debug
  3. there is a grat framework, Django, that you can study for inspiration or use for your blog
  4. once you get there, you can have free hosting to go live with your application, something difficult to find with Ruby

I think that Php should not be a priority. There are a lot of solutions, not necessarily well engineered or worth studying.

Making your own engine with a good framework will not be difficult and will be worthwhile. The client part of the framework will be much trickier, but problems might be tamed using a sound client library.

If your focus is on learning I would suggest prototype and the excellent "bungee book" by Christophe Porteneuve, if you feel pragmatic I would recommend jQuery.