I’m going to have to ramp up my HTML knowledge. I’ve only ever played around with it. I’m going to start with a simple HTML5 website. Then I’ll look at porting it into PhoneGap to make a downloadable app for the iPhone, Android, and Windows Phone.
I’ve been curious about writing an iPhone app lately. I’ve had a couple of simple ideas but nothing I think would sell or that wasn’t already done better someone else.
One of the limiting factors to getting started is that I don’t know Objective-C. Not that I couldn’t learn but I also lack a Mac which is necessary. I’ve spoken to people about MonoTouch which sounds good because it’s based on .NET which is my platform of choice but even that is $399 USD per year.
I’ve had one of those weeks. You know the ones. You spend entire days tracking down one stupid little problem and when you fix it you just dump straight up against the next problem. After spending hours searching for solutions to problems you’re reduced to guessing. Changing a parameter value here, and xml tag there and hope for the best. This is when you know you’re going to be doing this for a very long time. Admittedly, many of the problems I’ve had this week with the building and deploying of my current project haven’t been the fault of MSBuild but I did learn one very valuable thing about MSBuild this week that I’ll keep locked into my memory for a very long time – never, ever use MSBuild again.
I’ve had an iPhone for about 6 months or so now and it’s always bothered me that I couldn’t attach multiple photos to an email. From the email app there is no obvious way to attach files of any kind. From the Photos app you can browse to a photo, open the menu and select Email Photo but that creates an email with just the selected photo attached. I have always sent one email for each photo.
Just the other day, though, I had a bit of a face palm. You can simply copy & paste any number of photos into a single email message as you want. Open the Photos app, go to a photo you want to send, hold your finger down on it until Copy pops up. Tap Copy. Switch to the email app (start a new message) and paste the photo into the body of the message. You can keep switching between Photos and Email by double tapping the home key. Copy & paste as many photos into a single message as you like.
In a previous post I talked about digitally signing Silverlight Xap files. I came across a problem while deploying the solution which is the topic for this post. I was deploying the solution from Visual Studio 2010 by right clicking on the web project and selecting Publish from he menu. The problem was that when I made a change to the Silverlight project and republished, the change didn’t come through.
Publishing a web project from Visual Studio builds the web site and deploys the relevant files. The files can be copied to a local folder, sent to an FTP server, or deployed to the web server via HTTP. When it’s a web project for a Silverlight application, some of this files are Xap files that live in the ClientBin folder.
The problem I had was that I assumed that publishing the web project would cause the Silverlight project be rebuilt. The VS status bar told me it was building but it turns out that publishing a web site only causes that project and its dependencies to be built. It turns out that the web project doesn’t reference the Silverlight project. This makes sense actually because the web project is acting only as a container for the Silverlight app.
One solution is to always build the Silverlight project before publishing the web project. Another solution is to get Visual Studio to build the Silverlight project automatically when ever the web project is built. This can be done by telling Visual Studio that the Silverlight project is a dependency of the web project. This is done by right clicking on the web project and selecting Project Dependencies. This will open a dialog that allows you to add the Silverlight project as a dependency. This doesn’t create a reference. It only tells the compiler the order to build the projects. This way, when ever you publish the web project the the Silverlight project will be built too.
I’ve been looking around the web today trying to find out how to digitally sign a Silverlight Xap file. Signing is necessary for so an out of browser application can auto download newer versions of the Xap file. I’ve found an number of posts including this stackoverflow question and this post from John Papa that detail how to do it by using a number of command-line tools like certutil, makecert, pvk2pfx, and signtool. I thought there must be an easier way so I went poking around in the Project Properties page. There I found a simpler solution.
Castle DynamicProxy can be used to extend any .NET object without making changes to its code. It allows you to intercept any call to any member so you can extend it. This is an introductory post to get you started. There is a more detailed tutorial on Krzysztof Koźmic’s blog.
According to the DynamicProxy article on the CastleProject website –
Proxy objects can assist in building a flexible application architecture because it allows functionality to be transparently added to code without modifying it. For example, a class could be proxied to add logging or security checking without making the code aware this functionality has been added.
I’m going to work through a logging example to demonstrate the sort of power this tool provides. DymanicProxy is part of the Castle Core project and can be downloaded here. I’m using version 2.5.2.