Recently in Software Category

MVC Marathon

| | Comments (0)
MVC Marathon: Introduction

Introduction

Over the last few years, I've spent a fair amount of time on the same projects, using the same tools, in the same languages. By day, I'm a mild mannered .NET programmer. By night, I fly the Perl flag, and spend a lot of time using Catalyst, one of the Perl based MVC frameworks. While I'm not abandoning those technologies, I think it's time for something new.

They say you should learn a new programming language every year or so, and I'm long over due. Why not learn three languages at the same time to make up for lost time? :-)

The Challenge

The challenge is to build the same mvc application on all of the frameworks listed below. While I'm comfortable with Catalyst/Perl and ASP.NET, I'd like to be able to work on any project that comes along rather than simply answering "Sorry, I can't help. I don't program in that frameowork/language." I started my career as a Windows-only web programmer and over time, learned my way through FreeBSD, Apache, Perl and Catalyst.

Will I be an 'expert' in Ruby or Python when I'm done? Surely not. But 3 years ago, I couldn't program in Perl either and 10 years ago, I could't even begin to get a *nix OS installed and configured to run Apache.

The Frameworks

For this adventure, I've picked what might be considered the most popular mvc framework for each language. These frameworks will be:

ASP.NET MVC: Preview 3

While my day job includes programming in ASP.NET 2.0 WebForms and I have followed the MVC progress, I have not yet created an ASP.NET MVC app. Just to be a little more challenging, I will be doing this project in C# instead of the usual VB.NET that we use at work.

CakePHP: 1.2RC2

I've read as much of the manual as I can at this point. This will be my first CakePHP application and my first PHP programming since PHP4 was released.

Catalyst: 5.7

Catalyst is one of the many MVC frameworks written in Perl. I've been using Perl and Catalyst for about 3 years. While this could be my strongest framework, I'll be using none of my existing bag of tricks.

Django: 0.96

I've never written a single line of Python before. After looking at the Python and Ruby syntax on multiple occasions in the past, Python seems to be the language furthest from how my brain works now compared to Perl/C#.

Ruby on Rails: 2.1

Just like Django/Python, I've never written a line if Ruby in my life. I've been through the screen casts and sifted around a few articles and book excerpts. However, unlike Python, Ruby seems to fit how my brain works with Perl a littler cleaner.

The Application

I'm sick of the usual blog demo applications so I'm going to go with something a little closer to my heart. Those who know me know that I'm a big fan of hot food: If you don't sweat, it's not hot enough. So for this challenge, I'm going to build a site that tracks lists of restaurants and a list of menu items for each eatery hot dish.

The application will be built in stages. Each stage will be built in every framework before moving on to the next step. After completing each stage, I'll post a new blog entry covering what code needed to be created in each framework and the pros and cons each framework provides. You can follow the source code progress in my subversion repository:

http://svn.icantfocus.com/articles/mvc-marathon/

Step by Step

  1. Part 1. Creating a New Application
  2. Part 2. Creating/Configuring a Database
  3. Part 3. Creating Site HTML/CSS Templates
  4. Part 4. Creating the Restaurants Model
  5. Part 5. CRUD Restaurants w/Scaffolding
  6. Part 6. Adding Menu Items w/o Scaffolding
  7. Part 7. Adding AJAX
  8. Part 8. Adding Atom Feeds
  9. Part 9. Adding Unit Tests
  10. Part 10. Adding User Tests
  11. Part 11. Adding REST API
  12. Part 12. Adding User Authentication
  13. ...

MovableType 4.1

| | Comments (0)

I like MovableType. It’s Perl. That’s a plus for me. It keep getting better, and now there’s MTOS. That’s where my love stops.

First, the default templates combined with one of the 5 types of formatting for entries STILL yields non compliant XHTML, even within some of the templates themselves. Publishing is still too hard in that respect. It’s 2008, and I still can’t just plop in a paragraph or two and have awesome auto generated XHTML.

Their “4.1 supports FastCGI” is not very good support. mt-upgrade/check/xmlrpc still don’t work under FastCGI, and it’s so slow under normal cgi that it’s still annoying. Again, it’s 2008 and it still doesn’t support mod_perl under Apache2. WordPress and PHP: Just Works.

It's bad enough I never blog, but its even worse that comments have been broken for so long. I like MovableType, but it's FastCGI support is spotty at best. Enough srewing around with Lighttpd, it's back to good old Apache for me.

Just out of curiosity, I installed SVK on my laptop and started tinkering with it. For those not aware of it:

svk is a decentralized version control system built with the robust Subversion filesystem. It supports repository mirroring, disconnected operation, history-sensitive merging, and integrates with other version control systems, as well as popular visual merge tools.

Like most tinkering sessions of mine, I always end up stumped because I find some bug on the edge. In this case, it appears to be a date/time formatting issue on Win32 when changes are commit and pushed upstream.

Here's a sample message from a recent commit to local, pushed up to the mirror/master:

r118@np5660: claco | 2007-03-25 Eastern Daylight Time

If it weren't for the missing time, it wouldn't be so bad. I would expect something more like this format, which is what I see on commits made by 1/x and non Win32 svk users:

r118@np5660: claco | 2007-02-16 16:29:26 -0500

Curious. Then I finally thought to just try using the log command and compare both svn and svk:

C:\Development\CPAN\Mango>svn log
http://svn.handelframework.com/CPAN/Mango/trunk/lib/Mango/Provider/Products.pm
------------------------------------------------------------------------
r1784 | claco | 2007-03-25 01:37:32 -0400 (Sun, 25 Mar 2007) | 3 lines

r118@np5660: claco | 2007-03-25 Eastern Daylight Time
Added tags() to products provider

C:\Development\CPAN\Mango>svk log
http://svn.handelframework.com/CPAN/Mango/trunk/lib/Mango/Provider/Products.pm
----------------------------------------------------------------------
r119 (orig r1784): claco | 2007-03-25 Eastern Daylight Time

r118@np5660: claco | 2007-03-25 Eastern Daylight Time
Added tags() to products provider

There's also this message in the Changes file for SVK:

Use POSIX::strftime for date formatting rather than Date::Parse

Yup. Something is definately afoot. Time to file an RT bug report and move on. Sigh.

Another Handel Release Is Out

|

I managed to get another Handel dev release out the door. At least the Catalyst helper code is updated and running. That should take care of a few emails every now and then about getting them to work.

Time to go hang out w/ the Computer Widow^H^H^H^H^H^ wife before she disowns me.

Hello From Hoary Hedgehog

|

After two days of tinkering, I finally got one of my many wireless cards working under the Ubuntu 5.2 Hoary Hedgehog Live CD.

And what took so long? THe format of the WEP key. Here's a tip for the wireless config developers: give examples! IT won't work with AABBCCDDEEFF, but it does work with AABB-CCDD-EEFF because that's what it's expecting.

Even better, put those in yourself if the user doesn't. Don't make it any more harder for the user than you have too.

Now, I think I might just wipe FreeBSD off the lappy and give a real install a try. THat would give me another test platform since I'll still have FreeBSD on the servers.

Now, I just need an iBook to complete the test farm. ;-)

MediaWiki

| | Comments (1)

While rebuilding a tinker/blog box at work, I decided to install MediaWiki. THat's the same wiki software that runs Wikipedia. I'm hooked.

I'm definately going to install it for Handel. I'm giving serious thought to ditching the "blog" and going with a wiki instead.

About this Archive

This page is a archive of recent entries in the Software category.

Security is the previous category.

Static is the next category.

Find recent content on the main index or look in the archives to find all content.