Journey of a Software Developer
HTML | CSS | JavaScript | ASP.NET | PHP | C# | Java | VB.NET | MS SQL | MySQL | Flash
HTML | CSS | JavaScript | ASP.NET | PHP | C# | Java | VB.NET | MS SQL | MySQL | Flash
Jun 24th
I’ve watch a few sessions and the content is pretty good, and it’s FREE. Go check them out. Until next time…
Happy Programming!
Feb 13th
Last week I got a tip from a co-worker about a free online course in developing Android applications. I have been looking into Android development ever since I got my Motorola Droid a few months ago. I wasn’t able to attend the session LIVE; but they do offer you to option to purchase the session videos for download for $49 (A special price for this series ). I bit the bullet, and coughed up the $50 because I thought it would help me in my journey and I actually got around to watching the first part of the series yesterday.
In other interesting news, recently I found out that my employer is also looking to developing an Android application for our customers, so I may be able to get in on some of that action over the next few months if I really can wrap my head around this new platform. Anyways, I just though I would share that with you incase you were looking for an adventure in mobile application development. Until next time…
Happy coding!
Dec 15th
So, if you haven’t heard yet about T4, it’s a built-in DSL tool that comes pre-packaged with Visual Studio starting with the 2005 version. Even though T4 can look a bit scary, it can be very useful if you need to generate code on the fly within Visual Studio. I will leave it up to Scott Hanselman to fill you in on all the details since he has an excellent blog post on what T4 is an where you can go for more information.
Last week I wanted to generate a object wrapper around the <appSettings> section in my web.config/app.config file and after doing the same thing over and over again by generating a public read-only property for each setting, I decided to use T4 to read the <appSettings> section and generate a class all the properties that would become the wrapper around the ConfigurationManager.AppSettings[“…”] calls to retrieve the settings. To my surprise, this was pretty easy to do. I did a C# and VB.Net version and here is the C# version of the T4 template.
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Xml" #>
<#@ assembly name="System.Xml.Linq" #>
<#@ import namespace="System" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Xml.Linq" #>
<#@ import namespace="Microsoft.VisualBasic" #>
<#@ template language="VBv3.5" debug="True" hostspecific="True" #>
<#@ output extension=".g.cs" #>
<#
Dim projectNamespace as String = "SettingsGenerator"
Dim fileName as String = "app.config"
Dim path as String = ""
Try
path = Host.ResolvePath(fileName)
Catch
Try
If fileName.ToLower() = "app.config" then
fileName = "web.config"
Else If fileName.ToLower() = "web.config" then
fileName = "app.config"
End If
path = Host.ResolvePath(fileName)
Catch
path = "<< App.config or Web.config not found within the project >>"
End Try
End Try
#>
//------------------------------------------------------------------------------
// FileName = <#= path #>
// Generated at <#= Now.ToLocaltime() #>
//
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// NOTE: Please use the Add a Reference to System.Configuration assembly if
// you get compile errors with ConfigurationManager
// </auto-generated>
//------------------------------------------------------------------------------
using System.Configuration;
public static class AppSettings {
<#= RenderApplicationSettings(path) #>
}
<#+
Public Shared Function RenderApplicationSettings(ByVal path as String) as String
If Not File.Exists(path) Then Return ""
Dim sb as New StringBuilder()
Dim doc as XDocument = XDocument.Load(path)
For Each result as XElement in doc...<appSettings>.<add>
sb.Append(vbTab)
sb.Append("public static string " + result.@key + "{")
sb.AppendLine()
sb.AppendLine(vbTab + vbTab + "get {")
sb.AppendFormat("{0}return ConfigurationManager.AppSettings[""{1}""];{2}", vbTab + vbTab + vbTab, result.@key, vbCrLf)
sb.AppendLine(vbTab + vbTab + "}")
sb.Append(vbTab)
sb.AppendLine("}")
sb.AppendLine()
Next
Return sb.ToString()
End Function
#>
Click the download images below to download the templates for both VB and C#. Until next time…
Happy Programming!
Dec 2nd
If you missed the Microsoft PDC that was held about 2 weeks ago, then all is not lost. You can watch all the sessions online. For starters, I would watch the keynotes if you want to get a overview of the big announcements that were made. Yes, you can fast forward through a lot of marketing stuff; but you will find some good demo’s of Windows Azure and Microsoft Silverlight 4, which I though was the two biggest announcements. You then can proceed to view the breakout sessions and that is where you will find all the developer focused talks. What are you waiting for? Start watching now! Until next time…
Happy Programming!
Nov 7th
For those that attended my Lucene.Net talk at the Tampa Code Camp, thank you! I hope it was a informative session and if you do happen to use it in your application, please share the details. Do give you a head start, I have included a download of my session material which includes the PowerPoint presentation and the code for all the demo’s. I hope you enjoyed the event. Until next time…
Happy Programming!
Sep 22nd
In my last post I told you that I was going to work on a project that was “for me–by me”. The project idea that I eventually decided on was a job board application that was very Web 2.0 centric and played nicely with the social networking websites that are so popular today. I finally got around to finding a “code” name for this project and doing some initial project setup work.
So, what’s up with the name Cheyenne? Good question. Well, after a few days I couldn’t find a good name I like so I decided to use my 20 month old daughters middle name. Yes, Daddy has a soft spot and she is it!
This web application will be built using the ASP.NET MVC framework. I will be using a SQL 2008 Express database and using LINQ to SQL as my data layer. I will be using the Repository Pattern to provide some layer of abstraction over my data layer just in case I want to easily swap out my data access implementation.
Here are some screen shots of what the project looks like in Visual Studio 2008:
Here is what the Entities and the Repository classes look like:
I want to see the code! Ok…I was just getting to that. I uploaded the first installment to my Windows Sky Drive account and you can download it below:
Let me know what you think. There is currently no user interface! Actually, the MVC project don’t currently run at the moment; but the project does compile. I removed all the defaults that the MVC project gave me since I wanted to start out from scratch. Hopefully, by the next installment I will have a basic UI and have some data loaded on the screen. If you have any suggestions or comments, let me know. Until next time…
Happy Programming!
Sep 16th
Yeah, that’s what software developers do right? For a while I have been thinking about building a web application where I can simple have some fun doing it and not have to worry about deadlines or business users changing the requirements every other week. Don’t get me wrong, that’s all a part of being a professional software developer; but I think it is time to do something, “for me — by me”.
So, I’ve decided on building a job board application. No, I’m not trying to be the next Monster.com, although that would be nice. I just want to provide something that is simple to use and plays nicely with the social media networks that have gotten so popular over the past few years. Here are a list of features that I have so far:
Ok. Easy enough? Well, If I’m going to pull this off then I will have to get familiar with many of the social media integration API platforms since this will be the first time using any of them. But; have no fear. There is a lot of resources out there to look at and most of all, I have YOU here to help me.
I’m not sure how long this is going to take. I do have a full-time job and I do have to spend time with my family and like I said, no deadlines! I will try to provide a part one to this series of blog post within a week. Oh, I just broke my rule about no deadlines. Until next time…
Happy Programming!
Aug 27th
So, the other day I came across a situation where I needed to provide a link to a user to a specific page within my web application; but that link also required that I provided specific values for a couple query string parameters which would take them right to the data they was looking for. I wanted to avoid the messy looking querystring at the end of the URL so I wondered if there was some way around it. I started thinking and the first thing came to mind was a URL mapping feature. After some poking around on Bing, I was taken to a MSDN page that reminded me that ASP.NET starting with version 2.0 came will a simple url mapper that would be perfect for what I was trying to accomplish.
To get the feature to work, all you have to do was add configuration element to your web.config and then you are off and running. Here is what it looked like:
<urlMappings> <add url="~/SomePageThatDidNotHaveToExist.aspx" mappedUrl="~/SomePageThatHasToExist.aspx?id=123&cat=somecat" /> </urlMappings>
Once you place this section in the <system.web> section, all your users would have to access is the SomePageThatDidNotHaveToExist.aspx page and ASP.NET would translate that url into the actual url with the additional querystring parameters at the very end. So, I didn’t have to use any third party components since my needs were very simple. Hope you find some use for this forgotten feature. Until next time…
Happy Programming!
Aug 25th
You know, every day I become more and more impressed about the amount of information that is freely available on the internet. Recently, I came across two online learning sites that may help you brush up on some of those old college or high school courses and it was amazing how a little refresher will get your brain going again. The Khan Academy and MIT’s Open Courseware.
As you know, MIT is one of the best technology institution in the nation and anything they can offer for free is invaluable. The Khan Academy on the other hand is not affiliated with any college or university; but the individual that provides the free resources is a MIT graduate and a Harvard Business School MBA graduate. I have enjoyed many of his math courses and he does a far better job explaining things than the majority of my undergraduate professors.
I do intend to go back to school someday; however I have not decided on any program as yet and no doubt I would have to brush up on a few things. So these resources will come in very handy for me. I hope you find some use for these as well. There is that saying that “knowledge is power”. Until next time…
Happy Learning!
Aug 8th
Earlier this week I watch the latest episode of dnrTV on MSBUILD and I must say I can’t wait for part two. MSBUILD is one of this hidden gems in .NET and this tool can be a real timesaver if you know how and when to use it. If you got a hour or so to spare I would encourage you to watch this episode and maybe you will have the same reaction that I did. Until next time…
Happy Programming!