Tuesday, March 6, 2012

Adventures in Coding: ASP.NET

I have always been a bit of a "mr. scripty pants", as my friend and colleague David Hailey likes to call me. Whenever I came across a task that was repetitive or not "do-able" via the standard tools of a product (primarily Cisco Unified Communications Manager), I would just  put together some code that did what I needed it to do. It wasn't always pretty, but it was functional. Some of the tools I wrote years ago are still being put to good use today. 

Anyway, a few months ago we had a project where we needed to develop some custom XML application for Cisco IP Phones. We could have outsourced the effort but I kinda wanted to do it in-house. I have written a handful of XML apps for Cisco phones, so I knew what was needed. I decided to use C-sharp (C#) and ASP.NET, which I have never used before. So, now a new blog series is born. As I muddle my way through learning, I figured why not share my novice revelations? 


In October 2011 I wrote my first ASP.NET application in C#. I did it purely using a text editor (TextWrangler to be specific). Yeah, I could have used an IDE but for some reason I always force myself to write that first project purely by hand. It is my process. Of course, I was googling like a mad man and stringing code together but I was being mindful to try and make sure what I was doing made sense. 

That time investment was well worth it because just two weeks ago, another customer asked for a completely different application. This time around I loaded Visual Studio as a reward for myself. Of course, I have to give my company (Chesapeake NetCraftsmen) props for supporting me 100%.

For those who don't know me or what I do, I am not a programmer. I work with Cisco Unified Communications hardware and software. I just like to solve problems for my customers and it just so happens that this sometimes leads to some custom app development. I also like to have control over what is being deployed and I feel that if you have to get someone to write the code, you might as well do it yourself. 

In this blog series, I just want to relay things I pick up as I go. This is more "documentary" than "educational". So, let's get to it shall we!

Lesson 1

Use an IDE! What is an IDE? It stands for "Integrated Development Environment" and it basically is a piece of software that is "aware" of the language(s) you are using to write your code. It is a productivity tool. IDEs typically do dynamic syntax checking, highlighting key words, statements, etc. They can also be aware of libraries that you include in your code project and assist with auto-completion of methods, properties, etc. The robust IDE will also include tools for compiling code, debugging, etc. 

When working with an IDE, you have to give yourself some time to get familiar with the application. IDEs are actually quite complex pieces of software and the learning process can be lengthy. How long? Not sure, I am still learning and since I do this "part time", I will probably always be playing catch up. But that's fun too.

Since my core topic is ASP.NET and C#, using Microsoft's Visual Studio seemed like a no brainer. You can get a "free" copy of Visual Studio Express from Microsoft. I loaded the Express product a while ago, but I only tinkered with it. When I was actually asked to develop a project for production deployment, I went to Visual Studio Professional. I wrote a console app, a DLL, and a web app in the past two weeks and I have to say, I like Visual Studio. It made things much easier.

I am a Mac user, so I have to run Visual Studio in a Windows VM. That's fine and it helps keep my dev environment separate from my production environment, so it all fits together nicely. 

Of course, since I am a Mac user, I am thinking about exploring the Mono Project and the MonoDevelop IDE. MonoDevelop is an IDE designed for C# (and other .NET languages) that enables developers to write desktop and ASP.NET apps on Linux, Windows, and Mac OS X. If I get around to exploring these options, you can bet I will be blogging about it.

Anyway, bottom line: whatever language you are going to dabble in (or get serious with), I recommend investing time in choosing and learning an IDE. 

A little blurb about Mono

From the website:
"Mono, is a software platform designed to allow developers to easily create cross platform applications....Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime."
That's great, but that isn't the best part. The best part (for me) comes from their FAQ:

What does the name "Mono" mean?
"Mono is the word for 'monkey' in Spanish. We like monkeys."
Now, I can get behind that!

Thanks for reading. If you have time, post a comment!

No comments:

Post a Comment