As I've stated before, I'm a .NET developer on the Windows platform, but I want to get a feel for a Model/View/Controller application. This is especially important now, since the ASP.NET team has released a Community Technology Preview for MVC.NET. Instead of writing all kinds of plumbing to make a web-based application look like a WinForms app, MVC.NET takes a more minimalistic approach, allowing the Controller part of the application to decide how to render a View (the web page) based on a Model (the data that drives the page). I will try to write more about my experiences with RoR, and also with MVC.NET.
Finally, I wanted to try Ruby because the language is based on Smalltalk. I worked on IBM VisualAge for Smalltalk back in 1997, and was impressed by how easy it was to make an application work. Of course, there was a steep learning curve making the transition from C and C++. However, learning Smalltalk helped me to really understand object-oriented programming.
[ add comment ] | permalink |




( 0 / 0 )Here's the rundown on my most recent admin nightmare. I was helping to get Microsoft Distributed Transaction Coordinator working between 2 Windows XP SP2 boxes. These are development machines on which we wanted to prototype distributed transactions. In our case, we wanted to update 2 different SQL Server databases on 2 separate machines, and allow the updates to be committed on both systems in the case of success, or rolled back if an error occurred on either system. This is known as Two Phase Commit.
SECURITY WARNING!
The following changes could expose your system to security risks. This was implemented on development systems to test prototype code. If you need to make this work on a production system, please consult a qualified Microsoft Server Professional to implement MSDTC in your environment.
To make DTC work, a few changes have to be made to XP SP2. Here's the list:
- Open the following firewall ports
- TCP Port 1433 (Default port used by SQL Server)
- UDP Port 1434 (Used by SQL Server)
- TCP Port 3372 (Used by MSDTC.EXE)
- Add MSDTC.EXE to the firewall as an allowed program
- Add the following entries to the registry if they don't already exist in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\ClientProtocols - Found in MS Knowledge Base Article 325930
- ncacn_http REG_SZ rpcrt4.dll
- ncacn_ip_tcp REG_SZ rpcrt4.dll
- ncacn_np REG_SZ rpcrt4.dll
- ncadg_ip_udp REG_SZ rpcrt4.dll
- Run dcomcnfg.exe to modify the security for MSDTC
- Navigate to "Component Services\Computers\My Computer" in the tree view in the left-hand pane.
- Right-click on My Computer and select properties
- On the MSDTC tab, click on the "Security Configuration..." button
- Change the security settings to match the following:
SECURITY WARNING!
The preceding changes could expose your system to security risks. This was implemented on development systems to test prototype code. If you need to make this work on a production system, please consult a qualified Microsoft Server Professional to implement MSDTC in your environment.
[ add comment ] | permalink |




( 3.3 / 3 )A little preface for this entry:
I have been developing on Microsoft platforms since the late 1980's. However,
I've always been fascinated with Apple products. So this year, I decided to buy
a MacBook Pro. I can run Windows on a VM because it's running an Intel
processor, and I can experiment with the Mac and try my hand at developing for
it.
That being said, I was registering for a Microsoft Developer event and was
prompted to add the event to my calendar. Since iCal on the Mac can read ics and
vcal files, I accepted. Then iCal displayed the following error:
"The calendar file is unreadable. No events have been added to your iCal
calendar."
Browsing the ics file in TextWrangler revealed the following:
BEGIN:vCalendar
VERSION:2.0
METHOD:PUBLISH
BEGIN:vEvent
DTSTART:20071201T230000Z
DTEND:20071202T010000Z
UID:11111111111
DTSTAMP:20071130T175905Z
DESCRIPTION: We look forward to seeing you at the Event!
SUMMARY:In-Person Event - Meeting
PRIORITY:3
BEGIN:vAlarm
TRIGGER:P0DT0H15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:vAlarm
END:vEvent
END:vCalendar
I only found a couple of search hits on Google, but everything that I did find showed that certain key words were capitalized (strings after BEGIN: and END:). So I capitalized the strings after the BEGIN and END tags and tried to re-import the ics file. This time it was successful. I don't know if there is a global specification for ics files, so I can't say who's to blame here. I do know that iCal expects VCALENDAR, VEVENT, and VALARM tags to be capitalized.
[ 1 comment ] ( 4 views ) | permalink |




( 3.2 / 11 )I started working today on creating a rule in FxCop to enforce the use of curly braces on if and for statements. I know that FxCop is built to analyze IL, not source code, so this should be an interesting experience. I'll blog about it if I'm successful.
UPDATE: I was correct about FxCop not reading the source code. So I was unable to enforce the curly brace rule. I was able to create a custom rule although it was a painful exercise. I will post the code that I created, but it's taking some time to properly cite all the information that I found on the Internet.
The problem with custom FxCop rules is that Microsoft really doesn't document how to do it. I sent an e-mail and got a very prompt reply from Brad Abrams, Krzysztof Cwalina, and David Kean. The final response I got about the curly braces was from David Kean:
Unfortunately, you will need to parse the source yourself, FxCop (even with the PDB) doesn't provide enough information. Braces (like whitespace, comments, etc) are a source-only construct.
I will work this weekend to post the code for a simple FxCop rule.
FINAL UPDATE: Okay, here's the link to the code which has an NUnit test and the actual FXCop assembly. The code is definitely not production quality, it's more of a proof-of-concept.
testfxcoprule.zip
Here are some of the websites that I used to write the code.
http://weblogs.asp.net/rosherove/archiv ... sting.aspx
http://blogs.interknowlogy.com/timmccar ... 11543.aspx
http://bordecal.mvps.org/Nicole/FxCop/C ... etails.htm
[ 2 comments ] ( 18 views ) | permalink |




( 2.3 / 9 )I was browsing this evening and found a really cool site. It's called ChristianASP.NET and it offers free website hosting without banner ads. If I didn't already have a website host, I would check this one out myself. Click on the "related link" below to go there.
[ add comment ] | permalink | related link |




( 1.5 / 2 )
Categories



