Is Writing Your Own Blog Engine A Good Way To Learn Web Programming

Discussion in 'Programming' started by winstki, Jul 25, 2008.

  1. #1
    Is Writing Your Own Blog Engine A Good Way To Learn Web Programming? I have coded standalone applications before but never web applications. I was thinking about maybe trying to implement my own CMS as a way to improve my coding skills. I know that some of the first components I would need to code are mechanisms to add, edit, and delete blog posts. I'm probably going to use python and use flat text files to start and then maybe move to using MySQL. Are there any other mechanisms I should consider implementing first? I'm open to suggestions.

    Thanks
     
    winstki, Jul 25, 2008 IP
  2. ToddMicheau

    ToddMicheau Active Member

    Messages:
    183
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Actually a writing a blog script is a great way to learn, though I would suggest skipping text files and learning sql right away. I've worked at two programming companies, and the first thing they had me do was write a blog program. It's a good way to gauge your skill as a programmer as well as something simple to learn to do. It covers almost everything you'll need to do in later projects so you will have a nice overview the functions and code needed when you code something else.

    ~Todd
     
    ToddMicheau, Jul 25, 2008 IP
  3. winstki

    winstki Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the advice. I'll try going straight to mysql rather than the text files.

    Thanks
     
    winstki, Jul 25, 2008 IP
  4. perlbone

    perlbone Peon

    Messages:
    128
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You should investigate into multi-tier architecture.
    For example, mysql -> python's blogging core communicating with sql -> 2 httpds to split static and dynamic content, with a blog's script communicating to core via, say, python-dbus (or any other IPC method that you like).

    Also, you should attract much more attention to the logical operators used -- if you're optimizing some code for Web, it should be at least readable and reasonably small. For example, just try to find a workaround to implement this Perl'ish constuction in Python and in Javascript;
    
    my $article = '26-07-08-DP';
    my %hash;
    $hash{$article} ||= &fetch_from_sql($article);
    
    Code (markup):
    ..
     
    perlbone, Jul 26, 2008 IP