Welcome to Sol 3 Sign in | Join | Help
CS Search | Live Search Search

Sol 3

Home of Barrows Software Solutions, LLC

Keith Barrows - StarPilot

Subjects range from Personal to Technical.

  • VS 2008 and .NET FX 3.5 SP1 (Beta)

    The beta has been released.  Scott Guthrie has a huge list of what to expect.

    (The image should link you directly to the download page.)

     
  • ALT.NET?

    alt.net-Big

    Do you know what happens when you read blogs?  You mine expands, dude!  Like Woaoooo...

    Something Scott Hanselman posted caught my attention.  He posted about Alt.Net.  I am now searching out all things ALT.NET to make sure my head was wrapped around the ideas in a way that makes sense to me.  Pass the word...

  • Using multiple config files in one application

    I'm supporting an ASP (Application Service Provider) style application for my company.  Instead of putting each client's settings into a single config file, I wanted to have the main config file point to each clients configuration.  After a bit of digging, I came up with a solution that works.  I don't know if it is the best solution but it does work.  My main config file now looks like:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <configSections>
    <section name="FeedProvider"
    type="Sol3.Feed.Provider.FeedProviderConfiguration, Sol3.Feed.Provider"
    allowDefinition="MachineToApplication" />
    </configSections>
    <FeedProvider defaultProvider="FeedProvider01">
    <providers>
    <add name="FeedProvider01"
    type="Sol3.Feed.FeedProvider01, Sol3.Feed"
    connectionStringName="ConnString"
    description="Client 01 Feed Provider" />
    <add name="FeedProvider02"
    type="Sol3.Feed.FeedProvider02, Sol3.Feed"
    connectionStringName="connString"
    description="Client 02 Feed Provider" />
    </providers>
    </FeedProvider>
    <appSettings>
    <add key="EnvironmentName" value="dev"/>
    <!-- add key="EnvironmentName" value="qa"/ -->
    <!-- add key="EnvironmentName" value="uat"/ -->
    <!-- add key="EnvironmentName" value="prod"/ -->
    <add key="Clients" value="3"/>
    <add key="Client 1" value="Client Name 01"/>
    <add key="Client 2" value="Client Name 02"/>
    <add key="Client 3" value="Client Name 03"/>
    </appSettings>
    </configuration>

    A client config file now looks like:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <connectionStrings>
    <clear />
    <add name="connString" connectionString="[client connection string]" />
    </connectionStrings>

    <appSettings>
    <add key="WatchPath" value="C:\Feeds\ClientN"/>
    <add key="FileName" value="sample.csv"/>
    <add key="FileType" value="*.csv;*.txt"/>
    <add key="StartTime" value="05:00"/>
    <add key="EndTime" value="05:00"/>
    <add key="ArchiveDays" value="30"/>
    </appSettings>
    </configuration>

    I have a service that will iterate through the appSettings and setup a file handler for each client. The service creates a new ClientInfo object for each client:

            #region Constructor
    public Service()
    {
    _clientInfo = new Dictionary<string, ClientInfo>();
    _clientList = new List<string>();

    _clientCount = Convert.ToInt32(ConfigurationManager.AppSettings.Get("Clients").ToString());
    _environmentName = ConfigurationManager.AppSettings.Get("EnvironmentName").ToString();
    for (int i = 0; i < _clientCount; i++)
    {
    string appKey = String.Format("Client {0}", i+1);
    string clientName = ConfigurationManager.AppSettings.Get(appKey).ToString();
    ClientInfo thisInfo = new ClientInfo(clientName, _environmentName);
    _clientList.Add(clientName);
    _clientInfo.Add(clientName, thisInfo);
    }
    }
    #endregion

    This is the ClientInfo Class and contains the code to read from another config file:

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Configuration;
    using Sol3.Feed;
    using System.IO;
    using System.Diagnostics;

    namespace TestHarness
    {
    public class ClientInfo
    {
    #region Declarations
    private Dictionary<string, object> _config;
    private Handler _handler;
    #endregion

    #region Constructor
    public ClientInfo(string clientName, string environmentName)
    {
    clientName = clientName.Replace(" ", "_");
    ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap();
    fileMap.ExeConfigFilename = String.Format("{0}_{1}.config", clientName, environmentName); // relative path names possible

    if (!File.Exists(Environment.CurrentDirectory + "\\" + fileMap.ExeConfigFilename))
    {
    EventLog.WriteEntry("
    TestHarness.ClientInfo"
    , String.Format("
    {0} was not found!", fileMap.ExeConfigFilename)
    , EventLogEntryType.Information);
    return;
    }

    // Open another config file
    Configuration config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None);
    // Get the app settings section...
    AppSettingsSection section = (AppSettingsSection)config.GetSection("
    appSettings");

    // Get configuration settings and start file watcher for this client...
    _config = new Dictionary<string, object>();

    // read/write from it as usual
    _config.Add("
    connString", config.ConnectionStrings.ConnectionStrings[0].ConnectionString);
    _config.Add("
    WatchPath", section.Settings["WatchPath"].Value.ToString());
    _config.Add("
    FileType", section.Settings["FileType"].Value.ToString());
    _config.Add("
    StartTime", Convert.ToDateTime(section.Settings["StartTime"].Value.ToString()));
    _config.Add("
    EndTime", Convert.ToDateTime(section.Settings["EndTime"].Value.ToString()));

    _handler = new Handler(_config);
    _handler.Start();
    }
    #endregion
    }
    }

    There is still a lot I can do to this but this is the basics of handling a config file that is not your app or web config.  Enjoy.

  • Latest build of the ASP.NET MVC source on CodePlex

      
     

    Come and get it!  If you are a MVC developer and really want to dig into the core of MVC then go directly to CodePlex and get the codeScott Guthrie has a LOT more details on his blog.

  • DDD Ireland

    Looking for events?  Are you in Ireland on May 3rd?  What better way to spend a Saturday than at an event with some funny charismatic notable characters like Plip and Sussman!  With Plip's permission I've duplicated his blog entry for this event


    Developer Event? Ah go on, go on, go on.

     

    DDD Ireland

     

    Check it out at www.DDDIreland.com

     


  • Getting started for the long haul...

    I've worked in everything from startups to multi-billion dollar companies plying my trade as a software engineer (head geek, architect, tester, developer, business analyst, janitor, etc).  There seems to be 2 defining characteristics that define successful ventures and flailing ventures.  One is the individual doing the work and the other is documentation.

    How do you go about picking someone to work for you?  Is it a gut feeling or is it an in depth interview process.  It's always a bonus when you find that rock star out of that mound of applicants.  But how do you define rock star in a rapidly evolving industry?  Read Write Web has an interesting article on the top 10 traits of a rock star software engineer

    Now that you have your rock star how do you get the most from them?  If your shop is like 80% of the shops I've worked in over the last 20 years, documentation is still on the To Do list, the last guy never finished it before he left or plain not available.  There is nothing like working on a mature system with a database that has nearly 1,000 tables and 5,000 stored procedures.  The UI is running strong at 1,500 pages, 250 reports and a change in direction for the underlying framework - not once but 5 times so far.  I just read an article on Found/Read titled 10 Reasons Why Documentation is a Startup Secret Sauce.  Believe me, not having the documentation extends my time on the order of 10 or 20 times when it comes to large systems.

  • ASP.NET MVC Source Code Now Available

    Scott Guthrie just announced the availability of the ASP.NET Model-View-Controller source code.  And believe me when I say this - the ASP.NET team is doing their darndest to make sure this works for you.

    Our plans are to release regular drops of the source code going forward.  We'll release source updates every time we do official preview drops.  We will also release interim source refreshes in between the preview drops if you want to be able to track and build the source more frequently.

    You really need to read everything Scott wrote on this. For me, it is an exciting time when I can download the code and make fixes to it myself to get around something that does not work. And if you truly are a geek you'll be going through the code base to see how the ASP.NET team implemented the MVC pattern.  You also have a mode of feedback on CodePlex!

  • Microsoft Mix 08

    mix08

    If you did not make it to Mix 08 this year the keynote speeches are now available online.  If you don't know what mix is you may want to take a look at:

    del.icio.us Tags: ,
  • ASP.NET Wiki (Beta) has just launched

    Scott Hanselman just announced the launching of the ASP.NET Wiki (Beta).  If you are wondering why a Wiki this is what Scott has to say:  "To provide a targeted, categorized, human-hand-edited, and living Wiki for finding answers to ASP.NET questions."

    If you have some great content on your blog that is not in there, get it in there.  :)

    del.icio.us Tags: ,
  • Humor for the week

    Every once in awhile I get videos, jokes, etc that I just need to hang onto.  So, hopefully you don't mind if I share them out here.  :)


    Quote of the Day:
    Who in their right mind would ever need more than 640K of RAM!?
    --Bill Gates, 1981

    del.icio.us Tags:
  • Notice of violation

    DogViolation2

    My wife and I grew up with and owned dogs pretty much our whole lives.  We've been in our house for 20 months and have had 2 dogs that moved in with us.  All of a sudden they have become a nuisance to "someone" in the neighborhood.  We've had the cops at the house now twice.  Now, we live on a shy 1/3 acre lot with similar sized lots around us.  We have one lot to the north (long side of property line) which is not moved into yet, one lot to the south of us with their own dog and 2 lots that abut our back yard of which one is a vacant lot.  (See image below.)

    property

    Our house is the one with the yellow arrow pointed at it.  The development has sold the house on our north side and they are doing the final cleanups to let the new owners move in.  As you can see, everyone within 100 yards of us owns at least one dog, if not more.  We can go out at any point of the day and at least one of them is barking.  No big deal.  Once I go inside and close the door I cannot hear any of the dogs barking.  If I am in the dining area (slider door to backyard) or in the main room or master bedroom (both have windows onto our backyard) I can sometimes hear our dogs bark.  And yes, they are dogs, they bark on occasion.

    I am trying to figure out, with no other changes over the last 18 months, why now we are getting these notices.  I can only chalk it up to our new next door neighbor to the north.  Either the actual family moving in or the workers doing all the work.  We've had people in the next door backyard walking up and down and it drives our Border Collie a bit nuts - until they are introduced of course.  What I hate is no one had the decency to come talk to us.  Instead, they hide behind anonymity and the police force.  So, we are left trying to guess what is really going on.

    From the Town of Frederick Municipal Codes - (Section 7):

    Sec. 7-122. Disturbance.
    (a) It shall be unlawful for any owner or keeper of any animal to fail to prevent the animal from disturbing any person by barking, howling, yelping or any other audible sound.
    (b) No person shall be charged with violating this Section unless a written warning was issued to the owner or keeper of the animal within twelve (12) months preceding the first date alleged as the date of violation in the complaint. The written warning shall advise the owner or keeper of the animal of the nature of the violation, the date and approximate time of the violation, and that in the event a second violation occurs within a year of the date of the written warning, a summons and complaint may be issued. The written warning shall be provided to the owner or keeper of the animal by personal service, posting upon the property of the owner or keeper of the animal or mailing first class to such person. A copy of the written warning is prima facie evidence that the warning was issued and served properly. (Ord. 383, § 34, 1994; Ord. 550, § 1, 2000; Ord. 712 § 2, 2003)

    My wife is picking up a couple of bark collars for our dogs.  We'll see if that is enough to keep them quite because God forbid our dogs be allowed to be, uhm, well, dogs.  And quite frankly, the way this ordinance is written we will have to get rid of the dogs, or worse, to not face court.  But, in reality, I would like to see this go to court.  This ordinance is stupidly written.  And if we do go to court there will probably be an outbreak of complaints of dogs farting and other "audible sounds" that we find disturbing.

    My wife and I have found it a sad state of man when this type of #@7&! goes on.  A person can have their vehicles going at 126 db all day long but a dog cannot bark.  I'm just wondering if I will be able to face my accuser if this does go to court.  Ridiculous!

    del.icio.us Tags: ,,
  • Making the single box and multiple box disappear

    I don't keep up with all the latest trends, breakthroughs and buzz in every corner of the industry.  Wish I could!    I've been a fan of Virtual PCs for quite awhile.  While they have their pain points they allow one to have a complete environment separate from the physical PC it runs on.  Virtual Server does the same for Servers (and you can run Virtual Server on a PC for those really complex environments from your client.)  Microsoft and VMware are the two leaders that I am aware of.

    One of the things I've wanted was the ability to run virtualized applications on my physical machine.  To me, this comes in 2 flavors.  First, running just the window for an app from a remote connection instead of the whole desktop of that distant machine.  Second, launch an app in it's own virtualized instance so it's hardware needs are contained in that instance.  This would allow me to, for instance, run Ubuntu as my main OS, have a WinXP window open, a SQL window (from the server itself!) open, have any number of native Ubuntu windows open and so on.

    Some of the items I've been reading on this include:

    Once this technology catches up to the mainstream, even if it is more on the bleeding edge of things, I can see many uses for it.  For instance, I could be at work and have an email app running, from home, on my work desktop.  This is, in it's own way, the other side of GRID computing technologies.  Instead of allowing the app to run across several machines, like Seti Search does, this will allow many separate apps from separate hardware instances to be displayed on one piece of glass.

    Sounds like some exciting times are just around the corner!

    del.icio.us Tags: ,
  • Windows Live Writer and multiple machines

    FolderShare

     

    I recently started using Windows Live Writer and have pretty much fallen in love with it.  I also operate on a couple of computers throughout each week.  I've poked around a few forums looking for a solution as WLW is not portable (yet).  I was pointed to a blog entry by Dave Donaldson which gives me a partial solution.  By using FolderShare I am able to keep my drafts and posts synched as well as my templates (see image).  I won't go through the setup again as Dave did a fine job of that already.  For anyone looking for a solution like this I've found that it works quite well.  Next step is to get Microsoft to turn this into a pen app!  ;)

    Happy blogging...

    del.icio.us Tags: ,,
  • Book Review: ASP.NET Data Presentation Controls Essentials

    While this is not a book for beginners in the ASP.NET world I found the book to be very informative.  Joydip Kanjilal has taken a section of data handling and display, dug into the internals and brings it to the pages of his first book.  Even though I've been in the ASP.NET world since it's inception I've never been a strong UI type developer.  With this book I have the essentials for using Win UI data display components.

    Now, for the little nits:  While all the bits and parts were covered the book and the author displays a very clear understanding of the subject it was a little rough in parts.  Some of it was due to inconsistent indentations in code examples, some code bits that would obviously (to a seasoned developer) not compile due to syntax errors (using upper ASCII instead of quotes, line wrap issues not marked, etc).

    For a first dive into LINQ Joydip did an excellent job.  While many people are trying to determine if LINQ is the right fit I see many uses for it in current and future development.  While some are against writing inline SQL in their business objects and others are all for it I think LINQ is the middle part of data <--> business that has been missing.  Yes, you can go directly against a data store with LINQ but I think the versatility of LINQ will shine in the middle layers.  Joydip does a good job of tickling your creative juices with his samples and helps open up some possibilities that have been lacking for a long time.  Not only can LINQ go directly against data sources like SQL and XML it can be a querying object against arrays, lists, generic collections and more.  It makes a great data source for a Model View Controller/Presenter approach as well.  Check out the LINQ Forums for more ideas.

    Overall I liked the book.  I would recommend anyone interested in displaying data in ASP.NET to at least peruse the book and determine if there is enough for what they need.  I look forward to more books by Joydip. 

    del.icio.us Tags: ,,,
  • Send To and RegSvr32

    SendToFolder

    My new job requires work with Classic ASP which means registering DLLs.  Glad I remembered this little trick:

    1. Open the Send To folder in Windows Explorer (usually C:\Documents and Settings\[yourName]\SendTo on an XP box)
    2. Create a shortcut and point it to C:\[windows]\system32\regsvr32.exe
    3. Give it a title like "DLL Register"
    4. Change the icon to something that makes sense to you

    Now, you can navigate to any registerable DLL, right click on it, Send To, Register DLL and it will do that for you.

    SendToFolder02

    You can also create another shortcut to the same DLL in your Send To folder, call it DLL Unregister, edit the properties of the shortcut and include the /u switch and you can now take a DLL and "send to" DLL Unregister.

    Happy shortcuts.

    del.icio.us Tags:
More Posts Next page »

This Blog

Syndication

News

Disclaimer
About me

Locations of visitors to this page
weblogs.asp.net/kbarrows
BlogMailr Enabled <script type='text/javascript' src='http://track3.mybloglog.com/js/jsserv.php?mblID=2008010310421330'&gt;&lt;/script> <script type="text/javascript" src="http://pub.mybloglog.com/comm2.php?mblID=2008010310421330&amp;c_width=180&amp;c_sn_opt=y&amp;c_rows=5&amp;c_img_size=f&amp;c_heading_text=Recent+Readers&amp;c_color_heading_bg=005A94&amp;c_color_heading=ffffff&amp;c_color_link_bg=E3E3E3&amp;c_color_link=005A94&amp;c_color_bottom_bg=005A94"></script>
CS Build: 2.1.61129.2
1999
Listed on the CS Listings Powered By Community Server Themed by nb development