Friday, September 18, 2009

.NET on the iPhone

Novell, who makes Mono - the open source, multi-platform .NET implementation, has not release MonoTouch. I was in the beta for this and found it to be extremely exciting.

You are able to use C# on the iPhone and iPod Touch. C# is the only .NET language supported right now. It uses MonoDevelop as the IDE for developing but uses the normal Interface Builder that you use from XCode, which is the default development platform for iPhone development. So if you are going ot use MonoTouch, you still need to have a Mac. I purchased a MacMini for my iPhone development. I know, I know, it is not a Microsoft product and I have drank the MS koolaid. I had put off doing this for a while but in reality it is the best way to get an iPhone app developed. It is not the only way but the simplest. Plus normally iPhone apps are written in Object-C. I can safely say that I really dislike Objective-C. C# is so much easier to use for me because I use it all day long and have for years.

Now this is the first version of the system. And on the iPhone you cannot have dynamically linked components. Everything is linked into the executable, so MonoTouch had to do that as well. They also provided a way to call a C library so that you can have things built in Objective-C and used in a C# based product.

Currently they have two versions available, Individual and the Enterprise. This is if you want to do enterprise releases or not. They are talking about an evaluation version soon, but did not get it out when they released. overall it is not a cheap tool for a single person, but if you look at it from the cost of your time, you will easily make it up in the first app that you develop.

Yes, I know that this is a post on iPhone development and I am actually spending alot of time on this myself right now, but it is also using .NET. It shows that .NET is a popular system that people want to use on many different platforms. And this is the first time it is available for the iPhone.

Sunday, May 31, 2009

Free Online Training with Microsoft Ramp Up

Chris Bowen posted a great link to some free online training from Microsoft.

Check out for info. It includes training on ASP.NET, changing from PHP to ASP.NET and other topics (including VS2008 and Windows Mobile 6)

Get training on things. Hopefully if you are looking for work it might help you out.

Friday, May 29, 2009

Certification Presentation

This week I gave a presentation on Microsoft certifications. I currently have 11 certifications and wanted to share some ideas to help others get their certifications as well. With the job market like it is, we can all use a boost up to help us. Here is the presentation for all to enjoy. If you need it in an older version of Powerpoint, let me know.

Microsoft Certifications

Wednesday, May 13, 2009

WPF Splash Screen

One thing that many people write for their programs is a small dialog that loads up when you start your application. Sometimes this is just an image file and other times it might show you the progress of the app loading, or even something else. Well now WPF applications can have a simple splash screen for free. This only applies to WPF since I tested it with Forms and it did not work at all. Well on to the coding....

Add an image to your project. I added simple.png to my little test app. from there, look at the properties of the image and it will say that the image is a resource. Just change the build action to be SplashScreen and you are done.

There are some down sides with this way of doing a splash screen. You do not get to control it. If you want to have a progress bar or to programatically change the version number, you cannot do it. Ok, I will say that there is no immediate way to do it. I am sure that one of the many smart people out there will be able to do it someday

The second thing is that it is setup to fade out in 0.5 seconds by default. There is no property on the image to allow you to change this. To make it more customizable you will have to set the image back to a resource and then in your App class create an instance of a ScreenSaver class. From this you can set the time to do the fading and the image resource to use. This gives you more flexibility, but still no handle to the dialog.

This should be simple enough for anyone to recreate it. If you want my sample project, just let me know.

This is a nice small start for WPF to get this type of feature. I like the new things that keep coming out for WPF and can't wait for VS2010 to be completed and released.

Thursday, May 7, 2009

Shameless plug for Whiteboards Can't Jump (my new iPhone app)!

Apple approved my iPhone application, Whiteboards Can't Jump, today, and I'm pretty excited about it! It's nothing earth-shattering, but developing it kept me busy for a bunch of nights the past two months.

So why am I posting about an iPhone app on a .NET blog? Well, I wrote the app, for one ;-) The biggest reason, though, is because the entire backend service layer of my app is written in C# using WCF. At some point soon I'll outline how it works, but it's a REST API using some of WCF's fun new functionality, hosted on a Windows Server 2008 VPS.

More later, but feel free to check it out if you have an iPhone/iPod Touch! US $1.99 at the App Store. You can find a link to it's iTunes page right on the home page of my website,!

Tuesday, May 5, 2009

Unemployed? Get some training!!

I went to a local .NET user group meeting a week ago. There was about 20 people in the meeting and it was sponsored by a recruiter and he asked how many people were looking for work. About half of the people raised their hands. Microsoft has a program that will help people to get training and certified. This is to help people get ready for the workforce. Some of it is low cost and other parts are free.

I wish I could hire alot of the people that I know that are looking for work, but I can't. Good luck.

Saturday, May 2, 2009

Where did my WPF Namespace go?

At work we are using a WPF gui but calling it from some old code. To get this to work we had to work around a few things with the application and the main window showing up. But this post is not about that. The new project that I am working on now is moving that same WPF application back to be the main app that gets run. But I found a small namespace issue when getting this to run.

Since the App.xaml was not being run, the old code actually called the App class directly and then created and showed the main window. During this time there was a new policy in place where we changed the namespaces to include the company name first. So MyProduct changed to MyCompany.MyProduct everywhere.

During my converting this WPF to be stand-alone again, I changed the project type back to WinExe and put a breakpoint in the constructor of the App class. The breakpoint never got hit and it went directly to the Window1 constructor. I had some important resource calls in that constructor that had to be called before things in the rest of the code were called. Why was it not hitting the breakpoint??

So in the Window1 class I got a copy of the current application and tried to call something on it to allow me to setup the resources that I needed. But when I did this:

MyCompany.MyProduct.App app = (MyCompany.MyProduct.App)Application.Current ;

I got an error that said that it could not convert MyProduct.App to MyCompany.MyProduct.App. This was strange. It took a while to figure out that the App.xaml file had a different namespace than the App.xaml.cs file. The xaml file never got the MyCompany name added to the namespace. This worked because of a could things. We were calling the App class directly and not letting the project file select it for us. The second thing is that if you look at the new App class in a new WPF project you will see that the constructor is empty. This means that there is nothing really connecting the xaml created partial class and the xaml.cs part of it. For any window class the constructor has a call to InitializeComponent. If the namespace gets out of sync the xaml.cs for the window will give an error on compiling. After fixing the namespace in the App.xaml file, all was good. The program ran and then I had a lot of other work to do. But that is a story for another time.

Tuesday, March 24, 2009

Get On the Bus!!!

The Microsoft Learning group is traveling to 12 cities around the country and inviting certified people to join them. Learn all about it by clicking on the image above. I wish they were abit closer to me so that I could meet up with them as well. Oh well, have fun meeting them and maybe you can join them on the bus.

Wednesday, March 11, 2009

Thank you .NET!!!

I have been playing with a new iPod Touch and a Mac Mini to develop some applications for the iPhone and iPod. All I have to say about it is Thank You .NET!!!!!

I have been a programmer for.... over 20 years now and have taught college, co-authored a SQL Server book and now I am looking at Objective-C for the iPhone/iPod. Oh my... this is a pain in the neck to use. You have to use a certificate from Apple to put a test application on a real device. And you have to PAY either $99 or $299 for the certificate.

Now I have a couple friends that are Mac people and they are helping me thru this. I may be missing something in this. The Mac world is new to me and sometimes it could just be something that did not see. I will keep the blog up to date on my trials and tribulations using Objective-C. I know it is not .NET based, but it is from the sense of me saying THANK YOU for .NET!!!!

Of course I do have Mono installed on my Mac to do some .NET development on the Mac to test some of my other apps out. More on that later.

Saturday, February 28, 2009

Certification: Benefit or Just Drinking the Kool-Aid?

I have had certifications from Microsoft for 10 years now and have heard many people think that it is useless. Others think it's a good thing. I wanted to share some of these thoughts and how I got started in certifications. I was a software developers with a BS and wanted to continue my education. I worked hard and got an MS in Software Development and Management. I thought it was a more useful MS than the other ones I looked at that had topics like A.I. and graphics. It had classes and topics like requirements, managing teams of developers, and understanding the entire software lifecycle. At this time in history, not many computer science programs had those classes. After I got my MS, I was asked if I wanted to go for a PhD. But Microsoft started a certification program for software developers. This was cool, this was something that would really help me in what I did day to day - a PhD would not do this.

Soon after this I changed jobs. When my new boss asked for me to make a career plan, I mentioned the new certification program. He was excited by it and looked the plan over. Originally I was looking at use Frontpage for my elective, but my boss suggested SQL Server instead. This would be more useful than Frontpage and would apply to what we did at work. From there I started doing alot of certification and SQL work. Just want to say thanks to Steve Z. for that.

Ok - fast forward to closer to today. I look at many different programming sites, like CodeProject and some people that are regulars hate the idea of certification for programmers. They think that it is a waste of time and pretty useless. Some have commented that why should they let Microsoft dictate what is a good thing for programming or SQL Server. For example, the exams wanted to cross reference tables in SQL to have an identity index instead of just a composite. If you answered with a composite it was the wrong answer. But this type of thing is a choice for the DBA to setup and recommend. It is a personal choice, but for this type of exam it makes you to HAVE to follow what Microsoft says. I argue with them and tell them that I have learned alot by working on my certifications, but they don't listen.

Now on to today - well a year or so ago now. I got a promotion partly due to my certification. It is not the only thing that gave it to me, but it is definitely a part of it. Plus all of the things that I have learned on my way to getting all of my certifications. I have talked with that manager that encouraged me to get a certification in the first place and I asked him if it would help someone to get a job with him, he said, no it would not help. Talking a bit more, he said that it would help a person to get into the short list, but it would not be a deciding factor in who gets the job. Just who gets a phone call or an in-person interview.

Of course if you are not looking for a new job, how does it help you? Many people have asked this question. One guy that works for me has said that he has learned so much with studying for the certification exams that he did not learn with day-to-day use of the technology. This allowed him to use other techniques or classes that he would not have used before studying for the exams. So this as definitely helped him. Not just because I promote certifications, but because he is learning and working with these things on his own.

So if all the certifications and exams do is to make you drink more of Microsoft's Kool-Aid, I say, pour me another large glass.

Tuesday, February 17, 2009

Upgrade Exam and Second Shot

This year marks 10 years of certification for me. Of course I look back and I have not gotten any new certifications in TWO years. TWO years is huge. Have I been too busy to get any new certification? Have I been a slacker? I felt it was time to continue with some certifications and decided to take the upgrade exam 70-553. This was the first time I ever did an upgrade exam and was abit nervous about it. But I want to share how it went and something else, Microsoft's Second Shot program - which I had hoped to never use.

I first went to the web page for the 70-553 exam to see what areas the exam is going to cover. Take a look at it, there is ALOT to cover. Three different sections of material and in each section huge lists of topics. I looked up all of the different sections and tested things out for a while. I studied for a long time. Dang there are alot of parts to this exam. Am I sure I want to do this upgrade exam? I have been using .NET 2.0 for my own things and for work, so I felt I was ready.

When I went to sign up at Prometric, I first went back and signed up for the Second Shot. I figured that if something happened and the test was harder than I expected I could take it again. Then I entered the Second Shot voucher code into the payment form when I paid for the exam.

I get to the test and go thru the normal things that we all do when the test starts. It was a long test, but I thought I did pretty well, I took my time, checked things over, wrote down some comments on a few questions, marked some for review, and finished up. Time to come to the results and...... I failed. I failed?? I have been doing .NET 2.0 Windows apps and ASP.NET apps for years. How could I fail? I get the results paper and it says something different than other ones. The results of the upgrade exam are the results from the lowest scoring exam (I am paraphrasing). It showed how I scored on each section and my grade was the grade of the lowest one. At first I was a bit upset. I never read anything that says that each section was graded separately. Any other test that I had taken was not like that. How could they do this without warning me?

In the afternoon after cooling off abit, I went back to Prometric to see about scheduling the makeup exam. But the Prometric website still had the test as pending so I could not sign up for it again. By 5pm, the results were on the Prometric website and also showing up on the Certification Planner on the MCP Member site. I mthen went to sign up for it again and got a slot on Friday 13th. That is a lucky day for me, so I figure it would be a good day to retake the exam. To get the right Second Shot code, I had to call Prometric to get the voucher code to enter. By now it was after 5 and was hoping they were open later than this. They were open until 8pm for phone support. I get the code, enter it, and get the makeup exam for free. Thanks for that Microsoft.

So remembering the areas of the exam that I felt I did bad in, I went back to studying and the exam web page to make sure I knew what areas were on the exam, because I did not know if I was going to get some of the same questions, all the same questions, or none of the same questions. I knew I did well on some things and on other parts I struggled. So I studied and studied, looked up things in the MSDN library, and wrote some sample test apps to see what I remembered if it worked one way or another from what I expected. Friday came, the test started, the questions were... hard, I second guessed myself here and there, and passed the test.

The upgrade exams for VS2005 up to VS2008 are actually separate for Windows and Web. I think that this will make them easier since not everyone does both web and Windows. I do both, but not everyone does.

So overall, this was my first experience with an upgrade exam. My first use of the Second Shot program. I wanted to blog about both of these things to show others what to expect. The upgrade exams 70-553 and 70-554 are scheduled to expire on March 31st, 2009, so if you need to take the exams, take them soon. Study hard, sign up for the Second Shot, and good luck.

Wednesday, January 28, 2009

Obfuscating Silverlight

One thing that people that develop .NET applications know is that users can use tools to decompile the app and get to your source code. This is good and bad. The good is that it is easy to look at source that people use and see how they do things. The bad is that people can look around at your source and steal what you do or even unlock functionality or sell it as theirs.

There are alot of .NET obfuscators and .NET protectors out there to buy. Most do a good job to at least obfuscate the code and at best totally stops the decompiling. When Silverlight came out people were concerned that their dlls would get downloaded and people could just see the code just like with any other .NET assembly. With Silverlight 2, things compile into a dll that gets put into a .XAP file, which is just a zip file. I even have a plugin for .NET Reflector that can look at a Silverlight URL and let you look at the source. If it is this easy to get the source how can developers protect themselves?

I have a protection system that I use for my .NET applications and wanted to see if it would work for a Silverlight 2 application. I ran it using the normal settings that I use for .NET apps and it just throws exceptions for Silverlight. Then I played with all of the options and finally got it to work. It is not as secure as I would like but it works. If you want details on what I use and the settings, please contact me.

I went and searched to see if any other systems out there support Silverlight 2. I found 2 systems out there that say they support Silverlight and 1 that says that it supports .XAP files directly. I mean they are just zip files, why should that be too hard to support. The first one is DeepSea Obfuscator. It says that it supports .XAP and Silverlight 2. The second that I found is SmartAssembly Professtion Edition. I have not used these since mine is working for me, but they are advertising that they support Silverlight and will obfuscate or protect it. Good luck with protecting your Silverlight applications. Let me know if you have success with either of these tools.

Wednesday, January 14, 2009

Shrinking Silverlight

One thing that is interesting about Silverlight 2.0 is that it makes a xap file which is really just a zip file. One thing that you can do to make a smaller xap file is to unzip it and rezip the files using your favorite zip program. On one app that we are working on, using the techniques mentioned in the article we save about 50%. This helps to make the file smaller for downloading and makes it faster for people with slower connections or systems. Take a look and see how much file size you can save....

Monday, January 5, 2009

Cool Tool

I was looking for a tool to mount an ISO image to a drive letter that works in Windows. I found a free one that works great in Windows (even x64).