Pages

October 22, 2010

Book Review: C# 4.0 How-To

I have recently started to attempt to learn more about the latest .NET 4.0 release, primarily where C# is concerned. I have been primarily a Java developer, but have dabbled in C# from time to time so I like to see some of the new things the language has added. Luckily, I won a contest on Ben Watson’s blog for a free copy of his book, C# 4.0 How-To. I received the book a week ago and have slowly been making my way through it.

C# 4.0 How-To is a book is written in the cookbook style. It provides numerous examples of how to do the most basic things using the framework. It has examples on WCF, WPF, Silverlight, and even includes a simple example on using ASP.NET MVC. I have really enjoyed it so far.  It is not a book for someone just getting started with programming, but is the perfect book for someone like me who has experience with modern OO languages, but does not know the ins and outs of the .NET framework. I am pretty sure that as I get started with some personal projects I have in mind, this book will sit by my side the entire time.

August 21, 2010

PhoneGap

I have recently started looking into getting into the mobile app development craze. I was looking for something that would possibly make this easier as I have no background in that area. A friend of mine told me to take a look at PhoneGap and so far I am pretty impressed. PhoneGap is a mobile development framework that lets you deploy your app across all the different phone types. Basically, you write your app using html and JavaScript and then PhoneGap takes care of the rest. I am looking forward to digging into it a little deeper, but thought I would go ahead and share it so others looking to get started on mobile apps might have a little help taking the first baby steps.

Links:

Getting Started with PhoneGap

.NET Rocks! Episode - PhoneGap with Jesse MacFadyen and Filip Maj

May 18, 2010

I Have Found The Holy Grails

Lately I have been doing a lot more web and UI development than I normally do. I generally do my best to stay away from anything that interfaces with an actual human, but sometimes you have no other choice.  During this work I have touched a few modules developed with Struts 1, some with the old school Java code inside of  JSP scriptlets, and some using Ext JS with Java servlets serving up JSON data.  I didn't like any of them, so once I finished my tasks I set out to do some research on web development frameworks and have come to the conclusion that if I have my choice of frameworks to use, I would use Grails.

Grails just seems so straight forward to me. In one night I made it through the Grails User Guide, and was able to get a small app up and running.  I have more learning to do with Grails, but I think we are going to become longtime friends.

With that in mind, I think it might be useful to actually do some posts on the various components of Grails. Would anyone be interested in that? Right now I am thinking something along the lines of a series of posts where in the end a full Grails app will have been built.

March 20, 2010

Where Are My Configuration Files???

I recently was tasked to migrate an application that was hosted in a Windows environment to a Linux environment.  It is a Java/JEE web application so I initially thought it would be a quick task.  I installed my JDK and JBoss Application Server on the Linux box and then deployed the WAR file. I pulled up my browser to hit the app and got nothing but stack traces… Not what I expected.

So I did the obvious thing and looked through the logs and found that some configuration files were missing. No problem, except the file names were all hard coded to locations on the Windows C: drive. This is where a big problem lies as there is no C: drive on Linux boxes. Initially, I thought the best solution would be to just use System.getProperty() to get the current OS and use a different path based on what as returned, but the more I thought about it, the more naive that solution appeared to be. It would add more if/else branches in the code and would require future changes if the decision was ever made to move to a different OS. So I went back to the drawing board, and eventually the most obvious and simple solution came to me. USE AND ENVIRONMENT VARIABLE FOR THE CONFIGURATION FILE DIRECTORY!!!

I don’t know why I didn’t think of it sooner. By using an environment variable to store the configuration file directory I can simplify the code and will never have to update it for future OS environments. In the meantime, to run the app all that will need to be done to ensure the app gets its configuration is just add another environment variable. I am pleased with this.

January 21, 2010

The Sun Sets

So it looks like the Oracle acquisition is finally going to be approved by the EC so the nerd shop that is Sun will be no more. Everyone is kind of waiting to see what will happen with Java and MySQL, but no one really has any idea what will happen. All of this really makes me wish that Java had truly been open sourced because there is no telling what will happen with the JDK.  As for MySQL, I see no way that Oracle doesn’t kill it.  Hopefully Monty’s branch of MySQL, MariaDB, is strong enough to support the current MySQL community if that happens.  I just wish Sun had found a way to stay afloat because that truly would have been the better option in this scenario.