Quickly implementing an RSS feed in ASP

Recently I was working on providing and consuming an RSS feed for a Silverlight project. One of the handy (but often overlooked) things possible with asp.net is the ability to set the content type at the page level. So using that trick along with a SqlDataSource and a repeater, you can put together a RSS feed (admittedly a very simple one) in as single aspx file – no code behind needed.

<%@ Page Language="C#" ContentType="text/xml" %>

<asp:repeater runat="server" DataSourceId="sdsFeed">
    <HeaderTemplate>
        <rss version="2.0">
            <channel>
                <title>QuickRss Test Feed</title>
                <link>http://quisitive.net/feed</link>
                <description>This is the feed description.</description>
    </HeaderTemplate>
    <ItemTemplate>
        <item>
            <title><%# Eval("title") %></title>
            <description><%# Eval("description") %></description>
            <pubdate><%# Eval("pubdate") %></pubdate>
        </item>
    </ItemTemplate>
    <FooterTemplate>
            </channel>
        </rss>
    </FooterTemplate>
</asp:repeater>

<asp:SqlDataSource ID="sdsFeed" runat="server"
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    SelectCommand="SELECT title, description, pubdate FROM rssData">
</asp:SqlDataSource>

Calling the page above results in the following simple RSS feed.

Resulting RSS data

Although this is not exactly a Silverlight tip, it may come in handy.

Foxes

foxes1 foxes2 foxes3

Woke up this morning to some new neighbors. These two were soaking up the sunshine in the back yard, so I had to snap a couple of pictures before they ran off.

Tags:

Silverlight Tests

I have been doing some work using Microsoft Silverlight over the last few days for a number of different projects.  This post is simply a test to see if I can get a few simple applications working through my current web host.

While the links to Silverlight applications seem to be working well, I am still working on getting the Silverlight plugin recently posted by Tim Heuer configured for my site.

UPDATE (1 Apr 09): I have figured out how to work with the Silverlight plugin recently posted by Tim Heuer on my site.  I think the settings that I chose for my permalink style may have been interfering with the xap path in the plug in options.  If I left the standard root location alone [./] and put the full path in the markup, everything worked as expected.

UPDATE 2 (2 Apr 09): But, only if it is on the main page… Following the permalink to the post will not load the app correctly.  Back to the drawing board.  I know it must be something with the path(s)…

UPDATE 3 (5 Apr 09): By putting the fully qualifed path in the markup, it seems to work both on the home page and the permalink.

What would I change

teardrop-050One of the questions that seems to come up quite often is something along the lines of “Now that you have built one, what will you do differently on the next one?” While I really like how my tear came out, I have been thinking allot on that question and came up with the following, rather long, list (in no particular order):

I think, on the next one, I will — Have a “custom” frame made. I built on the Harbor Freight 1740# which is a perfectly serviceable frame. But, it did introduce a number of additional elements to the build.

The custom frame would be built long enough (roughly 120″) that I would not have to lengthen the frame by about eleven inches to get the body length I wanted. It would allow me to have a proper (large) tongue box to store wet dirty camping stuff someplace other then my bed (which I don’t have now).

My custom frame would be wide enough (roughly 62″) that I would be able to fit a standard queen size mattress inside the camper and still have the wheels completely outside (not under) the floor. If I had this, then I would not have had to build a (wood) frame under the floor to gain support for the overhanging edges . Or raise the floor to gain additional space for the wheels under the bed. Having the wheels under the floor also meant that I had to build wheel wells that protruded through the floor into the cabin. Which, of course, caused me to cut the mattress to fit the wheel wells as well as custom build “shallow” fenders to cover the wheels. Finally, having the wheels completely outside the body would make placing the axle in the correct fore/aft position to obtain the correct balance much easier and I could “order” the correct ride height instead of “flipping” the axle above the leaf springs to lower the frame.

I think, on the next one, I will — Have a two sunroofs instead of one.With the right pair of sunroofs, I could place them side by side in a manner that exactly matches the curved profile of the tear. On my first build, I defied common sense and forced a compound curve into the roof. All this to fit the profile, that curves front to back, with the glass, that curves from left to right. Note: I would not eliminate the sunroof entirely as the views of the night sky from a campsite far from the city lights is simply amazing.

I think, on the next one, I will — Have a different profile.I really like the Grumman-II profile that I used on the first, but the curves at/near the floor did add some complexity to the whole thing. So, which profile would I use? I am not sure, but I really like the looks of the “Windsong” and would seriously consider that profile.

I think, on the next one, I will — Use more “standard RV hardware”.Using the RV door hardware and designs from someplace like Lil Bear will keep me from re-engineering the doors, or more precisely, ignoring the advice of the folks on the list. On the first build, I didn’t and it took me a lot longer to construct, seal, and (probably) in the future, replace. Using household hinges and locksets on my first build sure added to the challenge and undoubtedly cost me a lot of time and frustration (time better spent camping). Oh, and the time spent fitting, wiring and recessing the tail lights, license plate, latches, and handles in the galley hatch, probably also better spent camping. Speaking of the Galley hatch, I would use the Draw Type latches in place of my own pieced together system. Sure, mine works okay and looks nice (well, from the outside), but the time and effort were probably not worth it.

I think, on the next one, I will — Frame the walls with plywood.On the first tear, I “stick built” the wall framing using 3/4″ lumber and pocket screws. In the next iteration, I will seriously consider starting with full sheets of plywood and removing the “non-frame” areas before insulating and skinning both sides to reduce build time. This would apply to the door also, I would build them in place and then use a router and guide to cut them out. I am not sure why more people don’t start with plywood, but it may have something to do with having all that “waste” when they are done. Not that you can’t put a lot of it to good use (heck, a person could gather a bunch of them and use them for leveling blocks if nothing else).

I think, on the next one, I will — Have a “wet wall”.The wall between the cabin and galley was the perfect place to use as a “service corridor” – if I would have planned a bit more. So, the next one will have space inside this wall for almost all of the electrical wiring. In addition, I will move the battery to the galley and box it in so the battery and most of the electrical controls/fuses were accessible from a small panel on the outside of the tear (sealed off from the inside)

I think, on the next one, I will — Remember that, for me, it’s just a camper.I went overboard on the cabinet work on the first tear (not that it is that nice, it was just allot of extra work). On number two, I don’t think I will make as many drawers and doors. Most of the interior cabinets would work just as well using cutouts in place of doors. In the galley, I would probably keep a simplified version of my upper cabinets and one row of drawers. With the rest of the space open to store clear plastic bins or odd shaped items. Maybe on flat slide outs mounted to the floor. Oh, and the upper galley cabinets would be a bit deeper while the cabin storage could be a bit shallower.

Oh, and this time, I will definitely buy all the hardware before I need it. This may allow me to notice the little things like: The hurricane hinge requires nice square corners – in relation to the roof line (which most likely IS NOT perpendicular to the floor). Or, the perfect fittings I remember so vividly either went out of style years ago or have never existed.

Aluminum Trim

Today, I spent most of the day bending and attaching the exterior trim on the tear. Most of the trim pieces that I ordered from Lil Bear were soft aluminum, so I could easily bend it to fit the curves of the camper. The rest of it had to be annealed before it could be bent.

Is it a bad thing when the hardware weighs more then the frame?

Following the instructions from the Teardrops & Tiny Travel Trailers forum, I applied a light layer of soot from a household candle before heating the aluminum with a propane torch. The soot burns away at the correct temperature to prevent you from heating the aluminum to much. After the metal has cooled, it is much easier to bend to the desired shape. Of course, before I could bend the pieces, I had to drill the holes for the stainless steel screws every four inches along the length of each piece.

While I was driving all of the screws today (thank goodness for power tools) I began to wonder just how many screws go into a camper this size. By my estimate, I have right around 400 screws in the camper so far! Is it a bad thing when the hardware weighs more then the frame?

I also completed the installation and wiring of the battery this weekend. Now the camper has enough power to last for a few days of dry camping as well as a number of plugs inside and out for when the campsite has power. It even has a built in charger so I can keep the battery topped off and ready to camp at a moments notice. Now, if I can just get it finished before the snow files…