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
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!
Jan 9th
I recently was given the opportunity to comment on a blog post which discussed a method of using Strongly-Types Session Properties with ASP.NET. After reading it, I noticed that the implementation was quite similar to something I have been using for months now. I was able to provide some feedback on how his implementation differed from mine. Anyway’s, the link below will take you to the blog post which I am referring to and you could decide for yourself.
UPDATE: 1/11/2008
For those who would like to see my implementation here it is:
1: using System;
2:
3: using System.Web;
4:
5: [Serializable]
6:
7: public sealed class SessionManager {
8:
9: private const string SESSION_MANAGER = "SESSION_MANAGER";
10:
11: private Product _product = null;
12:
13: private SessionManager( ) {
14:
15: }
16:
17: public static SessionManager Current {
18:
19: get {
20:
21: HttpContext context = HttpContext.Current;
22:
23: SessionManager manager =
24:
25: context.Session[ SESSION_MANAGER ] as SessionManager;
26:
27: if ( manager == null ) {
28:
29: manager = new SessionManager( );
30:
31: context.Session[ SESSION_MANAGER ] = manager;
32:
33: }
34:
35: return manager;
36:
37: }
38:
39: }
40:
41: public Product ActiveProduct {
42:
43: get {
44:
45: return this._product;
46:
47: }
48:
49: set {
50:
51: this._product = value;
52:
53: }
54:
55: }
56:
57: }
58:
59: //And to access this property
60: SessionManager.Current.ActiveProduct = new Product();
If you would like to see what others have implemented, see the article below:
Strongly-Typed Session in ASP.NET – Chris Stewart’s ASP.NET Blog
Until next time…
Happy Coding!
Dec 11th
I have been using the .NET Framework heavily since 2002, and sometimes I have to sit back an marvel at a good, well-designed the API. I say this because just today I had to write some code to write to the file system, and it’s remarkable how simple it is to create a text file and write information to it. You can all do it in just 2 lines of code using the System.IO.File class. Simply put, this class is a façade (or a wrapper) around the classes in the .NET Framework that work together to provide access to the file system on a Windows machine. All the methods are static (shared for VB.NET) and it provides the most common functionality that you would normally need from the file system. Here is a little code to show you what I mean:
1: using System;
2: using System.IO;
3: using System.Text;
4:
5: namespace SimpleFileWriter {
6: class Program {
7: static void Main( string[ ] args ) {
8: using (StreamWriter writer = File.CreateText( @"c:\temp\test.txt" ))
9: writer.WriteLine( "Hello World!" );
10:
11: }
12: }
13: }
I have posted the entire program just for your reference; but only lines 8 and 9 are needed to write data to the file system. You can find more information on the other members of the File class here. I’m sure this may not be new to some of you; but the intent of this post was to emphasize how a well-designed API goes a long way. Until next time…
Happy Coding!
Nov 16th
If you have been using the new features of the ASP.NET 2.0 web framework like Membership, Roles, SiteMap, Profiles and others, you have probably heard about the Provider Model. If not, have no fear, you have been using it all along. The Provider Model is a set of API’s that were build into the .NET 2.0 Framework that gives both windows and web developers the ability to build applications that allow certain features/functionality to be replaced, at runtime, via the application’s configuration file. The only requirement is that the new feature must implement all of the interfaces of the feature being replaced. This is all done through a set of abstract classes.
Without going through much detail, Miguel Castro was a guest on DnrTV and he really goes into detail on a real word example ( Credit Card Processing ) on how you would use the Provider Model for this senario. This was a really great show and it’s the real reason why I was encouraged to blog about this.
Happy Coding!