Archive for development

How To: Create a Web Service with WCF

Man it has been crazy busy as of late…lots of projects…not enough time. Sorry for the lack of articles!!

Ok…so one of my latest projects has been a bit different. They have an old Access database that they have been using for years as an admin tool to keep track of their clients. A lot of work has been put into this system so they didn’t want to throw it away, but at the same time they wanted to ease the load of the admins by allowing the clients to update their own information over the web.

So basically what they needed was a website that talked to their server and updated their info behind the scenes. Sounds like a job for web service right? Yup, but times are changing with the whole MS web service thing…with .NET 3 and 3.5 the new concept of WCF has been introduced. Now WCF (Windows Communication Foundation) can do A LOT of different stuff, but today I am going to give a quick lesson on how to setup and use WCF services in place of a traditional web service.

Its not all that tricky, and once you get it, you can really expand what a website can do…so lets get started. Read the rest of this entry »

Why you should never build another website or app without LINQ

So you have this great idea for a new web application. You are all excited because you know this thing will be the best thing since Al Gore invented the internet. You know from experience that the best way to get started is at the bottom and work your way up…so you start with your Database…then you get to your stored procs…data classes…function libraries…zzzzz.

This is a part of just about every web app that is more than just a brochure. You need a good architecture, but building one is keeping you away from building the fun stuff that is what got you all excited in the first place. Its frustrating, but necessary because not having an architecture is a recipe for disaster.

Whats a saavy web developer to do? Use LINQ.

What is LINQ? From the 30,000 foot view, LINQ (or Language INtegrated Query) is a new way to model and interact with data. It makes it 1000 times easier and gets you doing what you actually want to do without have to hassle with the tedium of getting your architecture straight.

The goal of this article is not to explain to you HOW to use LINQ (I have links to some great tutotials at the end), but rather WHY you should be using it on every web project you build from now on (at least until something even cooler comes along).

Read the rest of this entry »

How to create a dynamic, hierarchical accordion with .NET

Recently I was working with a client who wanted to display a product catalog with an accordion. I have worked with accordions on several other projects in the past so I said “No problem!”. Once I got to work I noticed that there was a big difference between the accordions I had worked with before and this beast…this one was going to be dynamic. Worse yet…each level of the accordion depended on the one above it (known as hierarchical data). Yuck.

Early on I was still optimistic about the whole thing, but as the hours rolled on and my solution still didn’t work, I began to get frustrated. What started as a tale of woe ends on a happy note because I did get it all working. In order to spare you the pain I will explain how I got it working with a pretty easy solution.

Off we go. Read the rest of this entry »

How To Handle Large Amounts of Data Quickly and Easily

So the last few weeks have been crazy busy. I have been completely swamped with client work, and while that is a good problem to have, it does take away time to do other stuff (like blogging!).

One of the things I have been working on deals with handling large blobs of data. Its a bit of a tangent since it has absolutely nothing to do with UI, but I figured that since there are a lot of developers reading this site, it might be helpful.

So what do I mean by large amounts of data? Well, for the app I am building we were testing our theoretical limits for performance reasons. Imagine a grid or an Excel spreadsheet that has 700 columns (Excel itself only allows 256) and 30,000 rows. That basically equates to 1.65 million cells in the grid. Now if you compare that lump of data to what, say, Google throws around, its pretty insignificant; however, when it comes to keeping it in memory and accessing it quickly it is a bit beefy.

Most of the time you would get around this problem by paging through the data somehow, or having some sort of filter. Unfortunately for us, we didn’t have this luxury. The application needed the whole kit and caboodle accessible to it at all times. With that as the challenge we went to work.

Read the rest of this entry »