Want To Learn Web Programming? Write A Blog Engine

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.

Discussion [Participate or Link]

  1. indyank said:

    that was a very nice article…

  2. Rohit Arondekar said:

    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.

  3. Alexander Vassbotn R√łyne said:

    A very nice article indeed;) I wrote my CMS from scratch, it’s not a beauty, but it works.

  4. jonathan parker said:

    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.

  5. Emanuele Vulcano said:

    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.

  6. spank said:

    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.

  7. links for 2007-09-21 « Simply… A User said:

    […] Want To Learn Web Programming? Write A Blog Engine | iface thoughts (tags: programming webdev web development blog webdevelopment webdesign design **) […]

  8. Jon said:

    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.

  9. Abhijit Nadgouda said:

    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.

  10. Abhijit Nadgouda said:

    Alexander, Emanuele, spank, it is great that you are using what you developed, it must give a unique sense of satisfaction.

  11. links for 2007-09-24 : Christopher Schmitt said:

    […] 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) […]

  12. Carlo said:

    I’ve done exactly that. There’s still a lot of work to be done.

  13. How to learn Web Programming « Programming News said:

    […] read more | digg story […]

  14. Thorben said:

    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.

  15. Carl Gundel said:

    For a screencast showing how to create a rudimentary blog server using Run BASIC check out http://www.libertybasic.com/basicology.html

  16. Rodney K. Kamaka said:

    I am so illiterate at the moment but I desire to learn and pursue my goals.

  17. Blog Engine « Tailormade Chaos said:

    […] suggest that you do check out his post if you’re itching to get started. Java2S.com and W3schools.com are also […]

  18. matt said:

    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.

  19. Eric P. Martin said:

    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?


  20. raveman said:

    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.

  21. someone said:

    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 :)

  22. Alertbrain said:

    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.

  23. Edison lau said:

    yup writing a blog is good to sharing programming language.

    Edison Lau
    visual basic guide

  24. It Is Not That Easy To Clone WordPress | iface thoughts said:

    […] 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 […]

  25. Alex Bryan said:

    I’d like to do this, but can someone help me with where to start? I’m pretty much completely new to programming…

  26. surender said:

    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.

    Tech Guru


  27. Web Based said:

    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.

  28. Rakesh Muraharishetty said:

    Most easiest way to build a blog is following a blog example with cakephp. It should take about 3 to 5 minutes.

  29. Mike said:

    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.

  30. Josh said:

    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?

  31. How to program said:

    What a task for a novice! :) Nice article

  32. 23.12.2012 said:

    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!

  33. Shan said:

    Yup, you are right, I suggest using a wordpress blog for doing this.

  34. shimla said:

    a good and informative article on web programming. keep it up !!

  35. goldenwaymedia said:

    I include that WordPress also helps to get indexed faster.

  36. remote workforce said:

    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.

  37. my tech addict said:

    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.

  38. school of bloggers said:

    One of most important to do is backup, but sometimes annoying too,
    with this features would make it easy though,

  39. my girlfriend blog said:

    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

  40. amit said:

    hello sir ,

    i wann learn Flash ActionScript..

    will u help me ?

  41. Daniel said:

    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.

  42. Alexzender said:

    I think this is just what the beginner needs.This article would really help since i am just one of them

  43. Swarnendu said:

    Oh awesome…I was just thinking that developing a blog will be great to restart my language skills usage and your article just came with the same tone. Thanks.

  44. Infant Stroller said:

    I recently discovered your blog/website and have really loved reading through this and some of one’s other posts. I thought I’d dive out in the shadows and leave my very first comment. I’m not certain what to say other than I have enjoyed reading and can carry on to go to as often as I can.

  45. Ira Riklis said:

    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

  46. Coder said:

    Please check out my first blog engine!
    http://www.askingdev.com – Q&A site for developers

  47. Michael said:

    I am interested in writing a custom blog engine, but I am a bit lost on the theory behind creating the different features. Anyone know a good site to point me in the right direction?

  48. D7 said:

    A good starting point is a book called:
    Build your own database driven website using PHP & MYSQL by Kevin Yank.
    It’s available from Amazon. This is a good book for any beginner to use. I bought it a few years ago with the sole purpose of writing a blog engine (which I did, but never properly finished!)
    I learned a lot about PHP and MYQSL in the process. The most important thing about PHP/MYQSL is to set up a dev webserver on a home PC in order to write and test your scripts. Then you can get the whole program tested and working how you like it before you upload it to your web host.
    Anyway, great article!

  49. Rocky Rasonable said:

    You also need to consider you elements of successful website You can check it here

  50. What is the LambdaPress? « newlisper said:

    […] saw this article about writing your own blogging software only after I’d finished an early prototype last week. I think I agree with the basic idea, […]

  51. school of computers said:

    hey…i just want to learn more about programming language…can you please help me??

  52. Paula Bates said:

    …i like this article.
    …but i want to learn more about programming language…

  53. John said:

    It depends on which you use web programming language.
    I think so.

  54. Dinesh Karki said:

    Very nice!!!

  55. InternetEducation101 said:

    Internet Education is needed to succeed online. I appreciate free information because each time I read another point of view or another way of earning money online, I learn something new that helps me think outside of my box. I’ve come to realize that there is so much more to learn and each week I learn a little bit more.

  56. Custom PHP Programming said:

    You are right. A blog engine brings together a wide range of challenges. One can start by writing some simple scripts, then do the project using OOP. Add some .htaccess to make some fancy SEO friendly URL’s. This brings security into play also.

    Nice article!

  57. SLT-A77 said:

    Hello, it really interesting, thanks

  58. Wilson said:

    It’s really a nice idea initially to write a Blog Engine to learn web programming.

Say your thought!

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.



Abhijit Nadgouda
iface Consulting
+91 9819820312
My bookmarks


This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.