What is the best way learning any kind of programming? Write programs! I sincerely believe that a blog engine is one of the rare pieces which employs all the basics of Web programming but can be simple enough to understand. More importantly you can even choose to learn more than programming – about the concepts, modern technologies and architecture of the Web.
One of the problems that a novice faces is where to start from. All the aspects are so interleaved that it might be difficult to start from just one end. It can get quite frustrating to write a sample application as most of the times you lose the motivation for it down the line. Here are some reasons why even a minimal blog engine for yourself is a better candidate.
- There is no strict definition for a blog engine, rather it is flexible enough for you use your set of requirements. At the minimum, it is an application which takes input from you and publishes it.
- It involves one of the simplest interactions with the database. Note that the database does not imply a RDBMS, you are free to implement a file based storage for your blog engine. However it will make you think about CRUD and exceptions.
- Web interaction involved is minimal and lets you focus and learn the markup basics and specifications.
- A blog engine, by default, has at least two contexts – the homepage and a single blog entry. Understanding this is extremely crucial, as you can build your display based on this. Inherently this also means that a navigation system is required to read various blog entries. This can help you understand how contexts map to the navigation systems.
If you extend the definition to build the engine for others, which is a big step, you can explore various content management concepts.
- Thinking about the user adding blog entries or managing them makes you design your management space.
- You can make various aspects configurable, so that the user can customize.
- Other users might want to classify their blog entries, and this will introduce you to categories for blog entries. Interestingly, allowing multiple categories is also a good lesson for basic RDBMS design, if you end up using it.
- You can then build a way of accessing these categories in your display system. This introduces you to more contexts. Technically this also makes you think about reusing your code for building archives.
At this point you can start thinking about various readers as well. A blog can have one author, but can have readers in a wide range of environments. Focusing on the display system, you can get exposed to standards and best practices of Web design.
- Creating valid markup.
- Using CSS for layout and styles. Though you might not be interested in visual design, this gives you enough exposure to how CSS works with markup.
- Ensuring all the readers can access the blog entries. This can be your introduction you to the concept of accessibility.
- One of the most critical aspects of the current trends in Web 2.0 is interaction with the readers. Introducing a comment system so that they can comment on the blog entries and start a discussion is a milestone in Web development. This makes your application a two-way communication system.
The beauty of a blog engine is that you can use it to understand various concepts. As you continue learning, you can use your knowledge to extend the concept of your blog engine. It is one of the best applications to employ concepts of REST and URL design. You can improve your design knowledge by exploring usability and applying it in your application.
A blog engine is a basic publishing system and most of the Web activity hovers around publishing content. Not only does this let you try out various concepts, but it also lets you expand this into a full-fledged CMS.
Of course, you can also learn a lot by reading code of existing blog engines, there already some very good ones out there. However, as I always say, code represents only the solution, not the problem. Writing an application essentially involves the problem statement and requires its understanding. It involves taking decisions and your design is nothing but a combination of these decisions.
I see a blog engine at core of our Web interactions today, at least technically if not in usage. Its tolerance with its definition, freedom of design choices, programming paradigms and interaction with various users makes it the ideal learning tool. Needless to say that this will also let you build your expertise in the programming language you are using. If you find the choices too overwhelming, start by cloning an existing blog engine, I am sure you will add your originality to it.
Oh, this gives one more advantage. You can always find some good blog engines that come with their source, that is, they are open source. Is there any better way of stepping into the open source world?
Whether your blog engine gets used or not, is liked or not, is evolved or not, it will be the best learning tool you can ever build for yourself.

September 19th, 2007 at 11:37 am
that was a very nice article…
September 19th, 2007 at 12:54 pm
I agree with you that a blog engine is a good way to learn a web programming language. A good way to start is just build the basic components. Scripts to Add, Edit and Delete blog posts and then slowly building those components that you may need like support for categories, comments, pingbacks and RSS feeds.
September 19th, 2007 at 5:32 pm
A very nice article indeed;) I wrote my CMS from scratch, it’s not a beauty, but it works.
September 20th, 2007 at 4:46 pm
Great article. I did the exact same thing, writing an engine from scratch…and you are right there are many challenges that present the programmer with the opportunity to learn quite a bit.
September 20th, 2007 at 7:32 pm
I agree wholeheartedly (the result, if anyone cares, is at http://blog.infinite-labs.net). I’m in the process of packaging the code I first wrote for the blog into a set of reusable PHP building blocks, and I must say it’s been an awesome source of experience for me.
September 21st, 2007 at 12:41 am
I did the same thing…It’s still a work in progress, but it works well and I learned a ton. http://www.bigfatstupid.com if you want to check it out. Nice article.
September 21st, 2007 at 6:14 am
[...] Want To Learn Web Programming? Write A Blog Engine | iface thoughts (tags: programming webdev web development blog webdevelopment webdesign design **) [...]
September 21st, 2007 at 8:57 pm
I agree. The only way to learn coding is to code, but I think that it might be even easier for a novice to write a plugin for an already built blog platform than to tackle building their own engine.
You still have write the code and make the MySQL queries, but you’re biting off a much smaller chunk to start with. And a smaller focus can help when doing all the debugging.
I did exactly that with my Better Blogroll widget for Wordpress.
September 21st, 2007 at 10:53 pm
Thanks for your comments. I am glad to see that my thinking was not completely off the way
Jon, I agree with you that writing plugins can help. However, there is a chance that you might get exposed only to the tool’s limited environment. When you sit to write the blog you can explore everything – right from HTTP basics to REST to URL design problems to syndication.
However, I concur with you that writing plugins and contributing to open source tools is another good way of learning.
September 21st, 2007 at 11:04 pm
Alexander, Emanuele, spank, it is great that you are using what you developed, it must give a unique sense of satisfaction.
September 25th, 2007 at 1:55 am
[...] Want To Learn Web Programming? Write A Blog Engine “I sincerely believe that a blog engine is one of the rare pieces which employs all the basics of Web programming but can be simple enough to understand.” (tags: programming webdev blog development web tips webdesign) [...]
September 28th, 2007 at 11:46 am
I’ve done exactly that. There’s still a lot of work to be done.
October 23rd, 2007 at 8:18 pm
[...] read more | digg story [...]
December 17th, 2007 at 11:25 pm
I totally agree. Although the first code of mine that sniffed the internet was a very small and insecure webserver in Java (shame on me), I have since written an extremely tiny Blog Engine in Python, which continues to serve my needs. I am pretty proud of some of its features.
January 2nd, 2008 at 12:29 am
For a screencast showing how to create a rudimentary blog server using Run BASIC check out http://www.libertybasic.com/basicology.html
January 22nd, 2008 at 9:24 pm
I am so illiterate at the moment but I desire to learn and pursue my goals.
January 22nd, 2008 at 10:42 pm
[...] suggest that you do check out his post if you’re itching to get started. Java2S.com and W3schools.com are also [...]
February 6th, 2008 at 11:58 am
I have told a lot of people this same thing. They think by hacking WP that they know PHP. But I tell them “what does WP do that you don’t know how to do?” And it’s, well, everything.
February 11th, 2008 at 11:56 pm
I’m new to webdesign/code programmer.
Is a blog engine the same as blog software or coding that allows a blog to create reverse-chronological entries, readers to post comments and achive your older post?
Eric
February 18th, 2008 at 11:22 pm
great idea, i will do that. i dont use web stuff as much as i should, im more of pure java programmer and i need to change that.
March 8th, 2008 at 8:18 am
Eric –
A blog engine is typically a PHP code that writes to and retrieves from a datastore. Be it a flat file/database etc. — blog software. Regarding the presentation of posts on the page, it will depend on the way you retrieve the data from database (ORDER BY {timestamp} DESC) or something like that ..
I am in the process of writing a small blog for myself using php and mysql. I use CSS and test against Firefox. Mostly it works. I agree with many people here .. Only way to learn coding is to code. I would love to see a site where experienced developers can put out a sort of quiz/theme/goal/assignment to noobs to perform. This way they can be exposed to many parts of the language and more importantly many aspects of programming.
Maybe I should write something like this
March 26th, 2008 at 8:27 pm
Yes. Writing a blog engine is a good way to start. Using a tool like wordpress will go a long way in helping you to write a blog engine.
April 9th, 2008 at 12:52 pm
yup writing a blog is good to sharing programming language.
Regrads
Edison Lau
http://www.visualbasicguide.com
visual basic guide
April 24th, 2008 at 8:57 am
[...] are quite good, and I personally believe that it helps to write a blogging engine if you want to learn Web programming. Unfortunately these tutorials also lead some to believe that this is all there is to WordPress and [...]
June 13th, 2008 at 8:15 pm
I’d like to do this, but can someone help me with where to start? I’m pretty much completely new to programming…
July 3rd, 2008 at 1:08 pm
Hi Guys,
Yes blog engine is right.If someone want to improve and develop his/her programming skills I think he/she shoul design and develop a blog engine.
Surender
Tech Guru
http://www.IndiaTechForums.com
August 1st, 2008 at 4:24 pm
ya I agree, to begin web programming blog engine is the best. Also different others free CMS sources are also available which can inspire you and can help you as standard.
August 9th, 2008 at 10:36 am
Most easiest way to build a blog is following a blog example with cakephp. It should take about 3 to 5 minutes.
October 21st, 2008 at 4:45 am
I whole heartedly agree, my first experience trying to adapt my programming skill set to the web was with a basic article system and it was a tremendous help coding for an actual purpose as opposed to learning random tidbits with no experience of usage which is how I had learned with some other programming languages. Coding for the web is a completely different paradigm and coding a useful application is the only way to imprint that in the mind of a new coder.
October 30th, 2008 at 7:12 am
Ok, sounds good! Now I know what to start with, but HOW and WHERE do I start? Do I open up a text editor? How do I know what to write? Where can I learn how to do this?
December 8th, 2008 at 6:39 am
What a task for a novice!
Nice article
January 27th, 2009 at 12:15 am
That’s what I have been thinking about for one year. I know XHTML and CSS, but I don’t know JavaScript, PHP, or SQL. Since I’ve created my first web template and thought about learning JS and PHP, a CMS was my first thought. Now that you agree with me, it’s AWESOME!
March 19th, 2009 at 5:48 am
Yup, you are right, I suggest using a wordpress blog for doing this.
March 20th, 2009 at 7:13 pm
a good and informative article on web programming. keep it up !!
May 27th, 2009 at 1:06 am
I include that Wordpress also helps to get indexed faster.
May 30th, 2009 at 9:31 am
Let you know that this post will gonna help me to solve my problem research and I am hoping that this will not be the last post that I could be read written by you.
June 24th, 2009 at 10:40 am
Thank you for the work you have put into this post, it helps clear up some questions I had.
I will bookmark your blog because your posts are very informative.
We appreciate your posts and look forward to coming back.
June 25th, 2009 at 11:12 am
One of most important to do is backup, but sometimes annoying too,
with this features would make it easy though,
June 26th, 2009 at 8:46 am
I think writing your own blog engine is a great idea. And the best part is that you don’t have to bother with someone else’s list of required features. You code it to your needs and leave the rest out. Then add more features as you need them
September 29th, 2009 at 1:23 pm
hello sir ,
i wann learn Flash ActionScript..
will u help me ?
December 15th, 2009 at 11:32 pm
I love this article, I wish I would have started web programming with writing a blog engine. For one thing I would have had a blog engine to use and I would have learned a lot of things that took me a while to understand.