October 05, 2007

Removing Boot Camp

When I first got my MacBook Pro I installed Apple's Boot Camp software so I could still run the odd Windows application. This proved handy, albeit tedious to have to reboot whenever switching operating systems. During the summer I installed a copy of Parallels and can now blissfully run Windows within OS X whenever necessary.

Unfortunately, removing Boot Camp took a little leg work. I started by using the "Boot Camp Assistant" to restore the startup disk to a single volume. This seemed to work properly at first. But before long I noticed this change affected the startup time. Upon booting, a folder with a question mark would appear and spin its wheels for a moment prior to the gray Apple logo. Everything else worked fine.

Today I found a solution to this nagging issue in the Apple support forums. Simply reset the PRAM:

  1. Shut down computer.

  2. Turn on computer.

  3. Press and hold the Command+Option+P+R keys before the startup screen appears.

  4. Wait until the computer restarts and you hear the startup sound.

October 04, 2007

Commitment to Service Oriented Architecture

Let me begin with the admission that my knowledge of Service Oriented Architecture (SOA) is largely theoretical. It stems from a composition of IT articles and war stories shared by other developers. All this to say that my opinions in this post may be naive, but I'll toss them out there anyway.

SOA, in many circles, is something of a holy grail in software development. After all, a group of applications that're fluent in XML to gracefully synchronize with a central message bus makes for an enticing proposal. Suddenly no single system is a lone island, but every application has to work together. Existing redundancy between systems can be eliminated, alleviating maintenance. If an application could be likened to a single-cell organism, then SOA enterprise architecture would represent a complex multi-celled creature.

But how do businesses get from point A to point B? It's unrealistic to pretend that the transition will happen all by itself. It's my opinion that if an enterprise decides to pursue an SOA architecture it will have to drive it home with a top-down mandate from leaders within the company. Anything less will equate to a lukewarm infinite loop of high expectations, varying degrees of commitment from developers and resulting projects that fail to consistently communicate with the message bus.

The first application to transition to a service may be the biggest challenge. It may consist of several identifiable resources each needing to be dissected into a smaller subset of unique services. This process will take time, burn money and require a business to be fully on board with the new architecture.

August 04, 2007

Mobile Web Forms in Visual Studio 2005 SP1

In a recent project I was required to alter my web application to make it more compatible with small devices (such as PDAs and cellphones). I attempted to add a mobile web form and found that no such template was available.

After a bit of searching I found out that Visual Studio 2005 SP1 removed this capability for web application projects (it was last present in Visual Studio 2003). Thankfully the Visual Studio Web Tools group posted the templates here as an optional download.

July 03, 2007

Experiments with Moodle

MoodleThe other day I was asked to help install Moodle for a friend. If you've not heard of it, Moodle is an open source PHP application used (as their site describes) to "help educators create effective online communities." It includes blogs, wikis and content management combined to compliment lesson plans with the synergy of online collaboration and social interaction. I won't get into reviewing the application itself but I will say a few things about my experience with the installation process.

For starters Moodle requires a web server, PHP and a relational database. My goal was to set up the application on an existing Windows / IIS / MySQL shared hosting account on Go Daddy.

To prepare for this activity I decided to take Moodle for a spin on my MacBook Pro where I'm running Apache, PHP 5 and MySQL. The installation required two additional items I was not expecting: a cron job and permissions for the application to write to a special "Data" directory. Nonetheless, the automated setup script worked flawlessly and I was up and running within fifteen minutes.

I naively thought that the Windows installation would be similar. However, no matter what I tried I couldn't get the setup script to run properly. Perhaps due to hosting limitations? Maybe I made a mistake somewhere along the line? One way or another, I was quick to switch to a Linux plan where, similar to OS X, set up was quick and painless.

I know others have had success with Moodle on Windows but all the same I'd recommend a Linux server as the most appropriate vehicle for this application.

April 28, 2007

The Token AJAX Post

It's the backbone of the oft heralded "Web 2.0" movement. It's the key to breathing fresh, interactive life into an aging XHTML spec. If you had not already gathered from these clues and the title of my post, I'm referring to AJAX - asynchronous JavaScript and XML.

I'd bet many readers can sympathize with the sense of bedazzlement I experienced upon first laying eyes on Google Maps. Add to that Windows Live, Flickr and GMail, among a host of others, and there is an obvious trend of companies using JavaScript to push their applications to new heights.

With AJAX, interaction between the web server and the client are no longer limited to jagged, intermittent spurts of activity. Instead the bits flow over the wire as soon as they're requested, making for a smoother browsing experience. The best of these AJAX applications have often given me the eerie feeling that I'm not using a browser at all.

But is it just hype? I think the AJAX phenomena has been around long enough to have settled comfortably into the minds of developers and the expectations of users. I don't think it's a passing fad. However, I also tend to believe that the overall usefulness of AJAX has been blown out of proportion. True, it can make for a snappier user interface, but I don't see it as much of a revolution. If anything, I think AJAX was the next evolutionary step beyond the dynamic HTML that was so heavily pushed in the late 90's.

I used the MS AJAX package in a recent project and was pleased to see that this and similar toolkits are opening AJAX techniques to a wider audience of developers. But in my mind I foresee the true next-generation web-based software to transcend traditional XHTML/JavaScript scenarios via new runtimes such as Adobe Apollo and Microsoft Silverlight.

February 04, 2007

CSLA for .NET

If you read one technical book this year I implore you to consider Rockford Lhotka's Expert C# 2005 Business Objects (or Expert VB 2005 Business Objects if curly braces don't float your boat). This book does a marvelous job of describing the necessity for developers to strive towards a flexible means of interacting with data in a manner that's separated from presentation, modular, secure and scalable. The book then introduces CSLA - the author's answer to this need in the form of a free .NET library. After finishing the book and completing two projects that follow the CSLA methodology, I'm very pleased with the results and plan to continue using this framework in the future.

With CSLA, developers are encouraged to design responsibility-driven business objects that receive much of their core functionality by inheriting from the framework. This way all the plumbing for authorization, validation, n-tier scalability and n-level undo is already baked in. Additionally, care was taken to made sure that objects adhering to CSLA ideals are still first class citizens when data binding to WinForms and WebForms.

Throughout the book Rocky takes time to explain his choices regarding the code and design patterns that went into developing CSLA. It gave me an appreciation for the elegance and flexibility of his solution and prepared me for the later half of his book detailing usage of the framework in a sample project.

Using CSLA in my own projects has forced me to look beyond the practice of mapping objects 1-1 against a database schema (eg. the ADO.NET DataSet). Instead, it has led me to write my data-related objects based on the needs of my application, not the structure of my database. This subtle shift in mindset has greatly helped me to plan my projects more effectively and has generally resulted in more organized code.

The latest version of CSLA along with news regarding Rocky's books can be found here. Be sure to check it out!