Thursday, July 15, 2010

How to modify Commerce Server 2009 Web Parts

If you’re running Commerce Server 2009 in SharePoint, you’ve likely wanted to modify an out-of-the-box CS web part. This post will show you a shortcut. The normal way to do this is to open the CS extensibility kit (C:\Program Files\Microsoft Commerce Server 2007\Microsoft Commerce Server 2009\Sdk\Samples\CommerceSharePointExtensibilityKit), resign all of the assemblies with your own SNK, and then update every reference everywhere to be aware of your SNK’s public key token. Here’s a forum post that explains this in more detail. When I tried this I missed some references in config files and the site blew up. If you’re working in a production environment, proceed with caution!

The shortcut is to create a new web part that inherits from the base Commerce Server web part and set the UserControlVirtualPath with your own ASCX (copied from the extensibility kit). This obviously limits your options compared to cracking open the full source, but it is a vastly simpler deploy experience that will allow you to at least customize the markup for your creative team.

Take a look at the screenshots below; there shouldn't be too many surprises. One gotcha to bear in mind is that if your control has a <%@ Register Src="ReadOnlyAddressDetail.ascx" ...> directive, you have to add the dependant ASCX files—the web part won’t render without it, and it doesn’t seem to “know” to fall back to the OOB markup.

Once you deploy the web part, you can add yours in place of the stock Commerce Server one. Piece of cake.


Saturday, July 10, 2010

Home Server Drive Balancer

Check out this great utility for your Windows Home Server, Drive Balancer. It’s designed to rebalance the storage across your pool. It came in handy in my case because I added a new 2TB drive (formerly 4x500GB, now 3x500+1x2TB). I kept waiting for the new drive to start getting files, but that never happened. Then I ripped a Blu Ray and the stupid thing started telling me that there wasn’t enough space to duplicate the new file...grrr...just move some files around and there’s plenty of room!! That’s what this utility does, it solves the literally only gripe I’ve found with this otherwise excellent product.

Be sure to read the readme and walkthrough before you get started. Interestingly, it doesn’t move the files, it just adds blank files in a way that, when triggered by the utility, the built-in file mirroring ends up rebalancing. Definitely add it to your toolkit.

Monday, July 05, 2010

Costa Rica Trip Summary

In February my girlfriend and I went to Costa Rica for a week. I’ve been meaning to write up the trip here to share outside of the pages of my journal...a friend just booked airfare there, so I got motivated. You can see my pictures on Facebook (you’ll need to be my friend).

A goal of ours on this trip was to practice traveling light: one backpack apiece, laundry as we go, and minimal plans. Before landing we only had our car and first & last nights’ hotel booked. The rest we figured out as we went, using our downtime to plan our next move, usually asking the front desk to call the hotel we wanted to stay at for the next night. This helped keep the pace nice and relaxed, even though we were on the move a lot.

Sat 2/20/2010

Flights from ORD to EWR to SJO on United & Continental. Nearly got our itineraries cancelled because of a gate agent’s mistake when we tried to stand by on an earlier flight. They corrected the mistake, but we got lucky that seats were even available on the flight—there were exactly two open seats remaining.

Picked up a diesel 4x4 with a manual transmission from Avis. Opted for the GPS. Would not try to get around without one, as roads are sometimes not well marked. The rental cost was ~$100/wk, so consider buying stateside.

Checked into hotel Cinco Hormigas Rojas (five red ants) in downtown San Jose. Was well after dark in an urban area (see GPS comments above). It’s a cute small hotel, with a “jungle” landscaped into the courtyard that gets visits from birds and bats. The owner Mayra was a sweet lady with a cute pregnant puppy. Each room is uniquely decorated with her own works of art...even the flush handle on the toilet was decorated.

Had dinner at a popular restaurant, Café Mundo, down the street. Simple spaghetti Bolognese was outstanding after a long day of travel.

Sunday 2/21

Drove to Monteverde. 4x4 recommended. Breathtaking views on switchbacking gravel roads up and down (and down and up) mountain after mountain.

Checked into Arco Iris Lodge. A little hidden oasis in a touristy city (a jumping off point for cloud forest trips). Pretty landscaping and a clean, spartan room, fully wood-paneled, with just a bed, a shower+bathroom and a small table. Exactly what we wanted and nothing more, nothing less. We asked of its simplicity, “what more would you need in a hotel?” Which begs the question, “what more do you need in a home?”

Had dinner at Sophia’s, an ex-pat-run place that caters to tourists. A high end meal; we had figs and pork loin, a local cheese quesadilla, ceviche and tres leches for dessert.

Monday 2/22

Woke to (feral?) roosters at 5am. Took an early shuttle to Selvatura for a zip-line adventure in the cloud forest. Had a great time; the guides all spoke excellent English and the whole thing was well orchestrated and inspired confidence—a good thing when you’re flying over the treetops in a harness. I described it as a “Six Flags version of the cloud forest,” and I mean that in a good way. Sure you’d see more wildlife if you weren’t screaming in joy as you soared over the treetops, but you also wouldn’t be screaming in joy. Great experience. Spent seven hours there, including a leisurely walk through the suspension bridges afterwards.

Checked indo El Bosqué lodge (Arco Iris was booked, so we had to go down the road a few km for the next night). The room had a bit of a funky smell to it, but we survived. Had a minor crisis while changing a light bulb that led to broken glass all over the bathroom floor. Had dinner at a brick oven pizza place right next door, Tramonti. It was tasty, but not remarkable.

Tuesday 2/23

Breakfast at Stella’s Bakery across the street. Had gallo pinto (beans, rice and eggs). Good, and sticks with you.

Went on the Monteverde coffee tour. Met Don Francisco, who has lived in the valley for 54 years. He had kind eyes and welcomed us onto his family farm for a tour of his coffee operation. His niece (whose mom is an expat from Wisconsin) acted as translator. Learned plenty about coffee: robusta is illegal in CR to ensure coffee is high quality country-wide, and coffee is almost always planted under fruit trees to provide shade for the plants and food for the families. Great and highly recommended tour if you’re above-interested in coffee.

Drove to La Fortuna, a city at the base of Volcán Arenal. Checked into Cabinas Los Guayabos (guava cabins). This was another gorgeously situated hotel: terra cotta-styled tile throughout, and leading out to the same-tiled patio (emphasizing the oneness of indoors and out), which looked out over the grassy yard, which led to a field with horses in it, which ran up to the base of the most perfectly conically-shaped volcano you can imagine. This whole setting was one of the most beautiful in all my travels, and I still frequently picture it when I think of serene, picturesque settings. But if that volcano blew, we’d be toast. Saw some minor eruptions.

Spent the evening at Eco-Termales, a natural hot spring nearby. Was beautiful and relaxing, with just a handful of other people there (the place down the street, Tobacón I think, had bus after bus out front). We opted to include dinner with the stay there. Good (tilapia & rosemary steak) but unremarkable in every way except one: the black beans. My god, so good I asked for the recipe. The guy said it was made with “summer sauce,” I think? No idea, but it looked and smelled like a tomatillo salsa thing.

That night we decided to change our plans: We had discussed going to Parque Manuel Antonio but wanted to get away from the popular tourist spots. So we went way up north-west, 20km from the border with Nicaragua, on the Pacific.

Wednesday 2/24

Took a horseback ride to La Fortuna Falls with Desafio Adventure Company, where we were able to take a quick dip in the very cold waters. Our guide was knowledgable and spotted animals (a snake, toucans and a tree frog) us city folk trotted right past. We were out and about for 3 hours, and it was just the 3 of us.

Drove 3 hours to Cuajiniquil, Guanacaste. Checked into Santa Elena Lodge. Met the owner, Manuel. This hotel is his family’s home—they live on the first floor and rent out the upstairs. Gorgeous varnished wood paneling throughout. Went to a little restaurant nearby, Soda Bolivar. We had ceviche and a white fish in a garlic butter.

Thursday 2/25

Manuel offered to take us and Nancy & Avery, the only other people in the hotel, on a personal safari in his Land Rover (not the luxury kind, the bare bones not-for-sale in America kind) through Santa Rosa National Park right down the road. We stopped at a few pristine and picturesque beaches in the park. Saw plenty of monkeys (3 species), dozens of birds, and more iguanas than I could count. We had to use a machete to cut through brush that was blocking the road...we definitely put the 4x4 of the Land Rover to use.

My car keys fell out of my pocket somewhere out there in the forest...whoops. Manuel had to call Avis on my behalf to arrange to have a spare set of keys sent up via a bus (we were a good five hour drive away from where the car had been rented).

Had dinner at the seafood restaurant next door to the hotel. The four of us gave Manuel a tip for taking us on the safari—he didn’t want to accept it and so bought us dinner with our money :) Had Pacific lobster tails, followed by some of the best tres leches cake ever.

Friday 2/26

Manuel drove us to the nearest big city, Liberia, to meet the key delivery coming by bus. It wasn’t there...yet, but Manuel made a few calls and got it straightened out. Success. He was a godsend in getting us keys again.

We went to a deserted beach (Jobo beach) and tried to snorkel (using some equipment Manuel loaned us gratis). The surf was too rough, so there was nothing to be seen, save for some puffer fish that were much too close.

We had dinner at that same restaurant next door: filet mignon, and a pesto white fish.

Saturday 2/27

Woke to a flat tire! Wasn’t a problem; the spare was good. We skipped the beach and just took off back to San José. For the first time in my life I tipped a hotel on checkout.

I bought some Vino de Coyol, which is a roadside hooch found in rural areas, made from fermented sap of the coyol palm. It was even sold in a reused 20oz soda bottle. We also picked up a cute brightly-colored piggy bank that is a pretty common souvenir.

We checked into the same hotel that we spent the first night at, and had dinner at the same restaurant. Pizza that we just weren’t in the mood for. Had a nice walk through a bustling shopping area.

Sunday 2/28

Early checkout, morning flight from SJO, connect through IAH to ORD. No troubles!

All in all a great trip. We loved the backpacking feel of it, and planning as you go was exciting and spontaneous. Here’s a map of some highlights:

View Costa Rica Feb 2010 Trip in a larger map