CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Brendan Tompkins [MVP]

Blog First. Ask Questions Later.

September 2005 - Posts

  • Two Years in the Life of an ASP.NET Website - What Worked and What Didn't

    It’s been two years since we first launched our public ASP.NET web site here at work.  Along the way, we’ve implemented a host of .NET related technologies, some with good success, and others less successful.  Here’s a re-cap of what worked and what didn’t for us, and why:

    What Worked

    Test Driven Development

    TDD with NUnit was one of the most valuable additions to our development process here.  I’ve mentioned this before, but our development time has been reduced, and we spend less time debugging with layers that were designed using TDD.

    Application Layering

    With a half-dozen solutions re-using business components, layering has enabled us to get a great deal of re-use from our code, simplify Visual Studio project management, and organize and simplify our coding process. We have 4 layers, UI, Business, Data and Common.  Simple, but works great.

    Web Services

    With ASP.NET Web Services we’ve very easily extended our business layer to our customers and partners.  They work like promised, and we’ve integrated partners in cross-platform environments.  We’ve also integrated 3rd party services into our architecture with equal success.

    VS Installers

    Early on, we made the decision to create installers for all of our applications, in order to push them into production environments. This has allowed us to keep our production application settings in one place, in an easily portable format.   In the past two years, we’ve changed servers a handful of times, and had to recover from hardware failures. Each time, our installers allowed us to setup new servers in a matter of minutes, not hours.

    WSMQ

    I would say that this worked wouldn’t I?  I wrote it, and yes, it’s working well for us.  A great alternative, IMHO, to MSMQ for simple queuing.

    Cisco Systems CSS (Load Balancer)

    If you can get a hold of one of these bad boys, I’d recommend it!  It works great for updating production code: Just starve traffic from a server, update it and bring it back into the mix.  Your end-users are none the wiser!

    3rd Party Tools

    Red-Gate and Resharper = Coding Bliss. I’m not even going to write about them here, because you owe it to yourself to find out why they’re so good. See www.red-gate.com and www.jetbrains.com for more information.

    DataSets AND Business Objects

    Yep.  We use em both, and they both have their place.  DataSets are a great method for quick data binding and updating, especially with one-off sets of data.  Business Objects are the way to go with your base business entities that are going to see lots of re-use.  But don’t take my word for it, read through the CodeBetter.Com archives and get into the debate.

    ASP.NET Mobile Controls

    These work exactly as promised, and are a great way to extend your current framework onto mobile devices.

    MapPoint Web Services

    If you need to provide GEO location and map data in your applications, Map Point Web Services are the place to look.  Very cool and full-featured SDK and Framework.

    What Sorta Worked

    Active Directory Integration

    This has worked okay, and has it’s advantages such as single-sign on, and security management. It’s a hassle though, keeping the AD store in sync with your local SQL database, and updating and querying AD.  If I had to do it again, I’d use the Enterprise Library’s Security Application Block.

    What Didn’t Work

    Custom UI Controls

    In the last two years, I’ve developed a whole host of custom UI controls for ASP.NET.  A TabStrip, a TreeView etc. These have been buggy and have had such bad code smells that they’ve smelled up other code around them. Now, in my defense, the tools available at the time were not all that great, but now with companies like Telerik and ComponentArt, don’t waste a second developing custom UI tools.  I’m currently in the process of ripping out all of my dumb code and replacing it with ComponentArt’s suite.

    App Updater Application Block

    I blogged about how to implement this once, and actually deployed some code with it.  Even when I figured out this complicated code, it was still buggy and difficult to maintain.  I’ve recently ripped all this code out, and manually updated all the clients that are using it. Let me just say that I can’t wait for ClickOnce.

    Crystal Reports

    Ugh. We’ve ripped out all Crystal Reports except one, and this one report still causes us headaches.   All I can say is ugh.

    What Works and Works and Works, and keeps on Working…

    ASP.NET and the .NET Framework. Really, what a joy it is to work with this technology. Thanks .NET, we have, IMO one of the best port sites in the world.

    -Brendan

  • Starting a Company? Corporations versus Sole Proprietorships

    Don XML just wrote a post titled Perfect Time to Start an IT Consulting Firm?:

    On the surface, joining up with a couple of your friends that are well known bloggers and MVPs might seem the right thing to do, but here are some random things that I’ve learned over the years about the IT consulting business.

    He goes on to mention a few great reasons to be wary of creating a consulting company.  Funny that he’s posting about this now, because just yesterday I spent the better part of the afternoon down at city hall registering a new business entity to handle my consulting and other odds and ends that I’m involved with at the moment. After doing a lot of research, I decided to create a Sole Proprietorship versus an LLC or S-Corp.  I made this decision for a variety of reasons.  Here’s a few of them.

    Taxes Are Roughly The Same
    If you intend to take all the "profit" in cash or draw from the company then there is not much tax advantage to an LLC or any corp.  I was a little confused by the “Self Employment Tax” you have to pay as a Sole Proprietorship, which is a whopping 15%.  When I looked into this however, it turns out that it’s the same Social Security and Medicare taxes you’d be paying as as a corporation.

    LLCs Don’t Provide Much Liability Protection Anyway
    An LLC MAY provide some protection,  but if you are the sole owner and make all the decisions, there might not be as much of a shield for your personal assets as you'd like.  Many suggest that if you’re worried about liability, that you instead invest in a good liability insurance policy.

    Reporting Requirements are Easier with Sole Proprietorships
    Everything I read said that reporting is much simpler with sole proprietorships.  In fact, since all taxes pass through to your personal tax return, all you need is TurboTax, and some easy way to keep track of expenses. You will have to make estimated quarterly tax payments, but TurboTax can help you with that.

    Sole Proprietorships are Cheaper And Easier to Obtain
    The cost of creating an LLC in some states can be up to $500 per year, and this doesn’t include any money you have to pay a lawyer or other company to prepare the paperwork.  With a sole proprietorship, all you need is a business license.  I obtained mine for about $75 and it took about 2 hours at city hall.

    Do the Research and Talk With an Accountant
    If you’re going to create your own business, my advice would be to do your own research.  You wouldn’t believe the crazy stuff that I’ve heard from all sorts of business owners as I’ve been talking to people. I’ve decided that no one really understands it fully, and that your best bet is to do the research yourself so that you can better understand the issues.  If you really want to make sure you understand all the issues, talk with an accountant.

    If you’re setting up a business, good luck!

    -Brendan

  • WSMQ Open Source Feedback?

    Last Sunday, I released the Beta 2 Version of WSMQ 

    It's been over a year since I first started the WSMQ project. Today, I released WSMQ 1.0 Beta 2. This version contains a lot of new features, and the bulk of the code has been re-factored since the Beta 1 release.

    Since then, I’ve had over 100 downloads, which nearly equals the number of downloads for the Beta 1 version. I’m pretty excited about this. I’m allowing this beta to be freely downloaded, and also providing the source code.  I’m planning to release this software under the  MIT Open Source license.

    Why I created WSMQ…

    You always hear about the need for a solution to address a “Point of Pain” … Aside from this being one of those annoying business phrases,  we gotta do more with less, and work smarter, not harder. To stay ahead of the curve we gotta be pro-active, think outside the box, and follow thru with this paradigm shift. If there are issues, ping me with an email, but let's discuss them off-line, and please be sure to keep me in the loop.

    Just kidding.

    Really, there were  “Points of Pain” for me which led me to create WSMQ.  I couldn’t manage my MSMQ queues very well.  I wanted a simple queue that I could use to send serialized messages to (XML), have them stored in a file store I could see and edit (xml files, SQL) remotely connect to in an easy way (WSE Web Services) and easily manage (Web Manager) and easily write embedded code for (WSMQ Triggers).

    I saw a need for a simple, open queuing solution, so I began working on one.  A few months later, Amazon announced it’s Queue Service, and I was thrilled!  This was a big validation for me that the idea was worth some salt.

    My Plan, Serious Up

    I’m going to give the bulk away open source.  If after the beta, there’s legitimate interest in going forward, I’ll formalize the documentation, launch a new site with downloadable triggers.  I’m going to license the SQL Queue Provider separately, and try to make a little money in this.  I’m hoping that others will be able to do the same.  I’m going to look into some other possible directions as well:

    • Downloadable Triggers
    • Mono version
    • soap:wsmq Transport
    • WSMQ Tcp Service
    • .NET 2.0 and WSE 3.0

    106 Downloads and no Feedback

    I need to understand why people are interested in downloading this software. If you’ve downloaded it and have it installed, do me a big favor and leave some feedback here about the product. Are there legitimate “Points of Pain” around the current queuing solutions out there that are addressed by WSMQ?  How’s the source look?  What did I do wrong?  What did I do right?

    Thanks! And if you haven’t yet, go download WSMQ 1.0 Beta 2  What do you have to loose? 

    Or you can ping me off-line  [;)]

    -Brendan

     

  • WSMQ 1.0 Beta 2 - Open Source Release

    It's been over a year since I first started the WSMQ project.  Today, I released WSMQ 1.0 Beta 2.  This version contains a lot of new features, and the bulk of the code has been re-factored since the Beta 1 release.  Some of the more notable features of WSMQ are

    WSE 2.0 Queue Service Endpoint
    Send and receive secure, encrypted messages through WSE Web Service endpoints. 

    Web-Based Queue Management
    Easily manage your queues with this  with this web-based queue management tool. Through the manager, you can create users and queues, send and monitor messages and logs and  manage message triggers.

    WSMQ Screenshot

    Pluggable Queue Providers
    This release ships with  the  XML Queue provider configured by default, but the *SQL Server queue provider and database are also included for beta testing.  Queue providers can be easily configured through a web.config setting, and new queue providers can easily be developed for the backend storage operations of the queue.  *The SQL Server queue provider will be released separately from the open source product when version 1.0 ships.

    Pluggable Message Triggers
    Message triggers allow you to plugin to the queue operation at the messaging level, so that you can write custom code to handle when a message arrives on a queue, is journaled, or arrives on a dead letter queue.  Triggers can easily be developed by inheriting from a simple base class and implementing three methods, OnMessageSent, OnMessageRecieved and OnMessageDead.   By implementing message triggers, you can do much of the work that needs to happen when messages are sent to a queue.  This can greatly simplify your application architectures by alleviating the need for custom windows services to do queue processing.

    Test Client
    I’ve included a test client that allows you to queue and dequeue simple messages. 

    Source Code!
    I've included a solution project and source code.  WSMQ is going to be released under MIT Open Source licensing. Currently the beta is being released under a beta agreement, to keep control of the code base for the time being.

    Download WSMQ 1.0 Beta 2

    -Brendan

  • And now, Over to our Man at PDC - DonXML

    None of us here at CodeBetter could make it to the PDC this year, and it occurred to me that we needed to call in a heavy hitter.  Someone who was already there, and may be inclined to do some blogging for us.  As luck would have it, I got an IM from none other than DonXML saying that he was at the PDC.  I got the courage up to ask him to blog for us for the week.  The conversation went something like this.

    ME:

    Don, I have a favor to ask.  We need you to blog the PDC for CodeBetter.Com

    DON XML:

    We've known each other many years, but this is the first time you came to me for counsel,  for help. I can't remember the last time that you invited me to your house for a cup of  coffee, even though my wife is godmother to your only child. But let's be frank here: you  never wanted my friendship. And uh, you were afraid to be in my debt.

    ME:

    I didn't want to get into trouble.

    DON XML: 

    I understand. You found paradise in America, had a good trade, made a good living. The  police protected you; and there were courts of law. And you didn't need a friend of me. But uh, now you come to me and you say -- "Don XML give me blogging." -- But you don't ask with respect. You don't offer friendship. You don't even think to call me Godfather. Instead,  you come into my chatroom on the day of the start of PDC, and you uh ask me to blog, for no money?

    ME: 

    I ask you for justice.

    DON XML: 

    That is not justice; your blog is still alive.

    ME: 

    Then they can suffer then, as my blog suffers. How much shall I pay you?

    DON XML (stands, turning his back toward Brendan):

    Brendan.. Brendan... What have I ever done to make you treat me so disrespectfully? Had  you come to me in friendship, then I would be blogging  this very day. And that by chance if an honest man such as yourself should make enemies, then they would become my enemies. And then they would fear you.

    ME: 

    Be my friend --

    (then, after bowing and the Don shrugs)

    -- Godfather?

    DON XML (after I kiss his hand) :

    Good.

    (then)

    Some day, and that day may never come, I'll call upon you to do a service for me. But uh,  until that day -- accept this blogging as a gift on the start of PDC....

    ME (as I leave the chatroom) :

    Grazie, Godfather.

    Or at least that's what I remember... The man needs no introduction, but I'd like to introduce DonXml's PDC Coverage for CodeBetter.

    - Brendan

  • Creating a Plugin Architecture for WSMQ and Dynamic AppDomains in ASP.NET

    I’m finally done with the code for WSMQ Beta 2!  Whew!  If you’re not familiar with WSMQ, it’s a simple, open queue application with a WSE 2.0 endpoint that is easy to manage, deploy and scale. This latest versoin represents a huge refactoring effort from the Beta 1 version.  I’ve also added a bunch of new features. 

    Providers within Providers

    One that I hope will allow it to be more useful is pluggable data and queue providers.  If you wish to customize the handling of the queue operations, you can simply create a new QueueProvider, drop into the application’s bin directory, configure it and the Queue Web Service and Web Manager will use your new provider.  I’m going to release the source with two queue providers, one for Xml (XmlQueueProvider) and one for Relational Databases (DbQueueProvider).  The DbProvider also uses an additional provider model that will allow you to plugin db-specific data providers (Oracle versus SQL).  The SQL Server provider will also be made available.  I’m not expecting most to develop their own Queue or Data providers, but for those who need to do this, I think this new design will work well.

    Message Trigger Plugins

    The other,  more generally useful  new features I’ve added are pluggable “Message Triggers” that you can upload to a queue, through the WSMQ web manager.   These triggers allow you to embed custom code into a queue to handle certain queue events, such as messages arriving on a queue or being recieved.

    I ran into a host of issues with trying to design a good plugin architecture.  My final design involves spinning up a new AppDomain for the message triggers, so that they can be easily loaded and unloaded when a new trigger is uploaded, deleted or re-versioned.  I found a bunch of great resources on how to do this, so I thought I’d post them here:

    Eric Gunnerson’s  AppDomains and Dynamic Loading  is the place to start, as far as I can tell. Great overview and downloadable project.

    CodeBetter’s good friend Roy Osherove has a similar, but easier to swallow version of Eric’s example in his series on adding plugins to your app.  Add Plugins to Your App 2: Search dynamically for plugins without Config Files

    And Suzanne Cook's .NET CLR Loader Notes are just awesome.  Subscribed!

    I’m hoping to have the installer, and source code available for downloading early next week. I’ll try to blog a bit about what I went through to get dynamic AppDomain loading to work with ASP.NET, where things are a little different from standard executables.

    -Brendan

  • Our Google Adsense Revenue to the Red Cross..

    Just a quick note to say thanks for supporting our site, and enduring the Google Adsense ads on some of our pages. We've donated all of our Adsense revenue so far received to the Red Cross, to aid the victims of Hurricane Katrina.  Thanks to WebHost4Eric (Eric Wise) for  providing our current hosting package.  He's not charging us very much at the moment and is what has allowed us to afford to do this.

    On a personal note, I spent this weekend with family and extended family who are displaced from this disaster.  In fact, most of my family are from the area, and all are obviously displaced.  Fortounately, they are all fine, and in safe, dry places to live for the time being - they are the lucky ones.

    I've always considered New Orleans like a second home, and I'd like to personally thank everyone who has dontated to this cause.

    -Brendan

More Posts

Our Sponsors

This Blog

Syndication

News

MVP
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.