August 2007 - Blake Niemyjski

  • Are your flash objects stealing your screen?

    The past week here, in Dallas, has been the busiest so far. I have been working on a new navigation bar for Community Server Enterprise Reporting.  I also have been making phone calls and getting everything in place for when school starts.

    In other news, Telligent is flying in all the remote employees. They should all be here by tonight, so tomorrow will be a really fun day; meeting all the Telligent employees. One might wonder what will take place tomorrow. We will be working all day and then were having a game night, plus an all-night hack a thon! I'm putting money on the fact that Wednesday will be a very slow work day.

    Today's Lesson

    If you have a flash object and have a drop down menu that needs to be placed on top of the flash object instead of being cut off behind it. You need to set the wmode (window mode) parameter to Transparent like this

     

    fo.addParam('wmode', 'transparent');

    I have come across a lot of documentation today that had

     

    so.addVariable('wmode', 'transparent');

    This is completely wrong and will not work. So I advise anyone who is having problems to use addParam.

  • The G35 experience

    Some of you might be thinking of a top secret Logitech product. I know I was when I heard the utterance "G35."  The G35 is a pretty sweet car and thanks to Donnie, in sales, I was lucky enough to get my first ride in one today. I have noticed that a lot of people here in Texas own a G35. Back home no one has one.  In fact, I saw my first one when I arrived in Dallas.

    Today I was in the documentation dungeon except for the short time where I needed to work and help on the task framework. I was also informed of a configuration issue that we are going to have to add into our documentation, warning users to remember to configure their SQL Recovery model appropriately.

    So remember to read our documentation!

     

  • The FileSystemWatcher class and medium trust.

    This morning I sat down and started looking at why Community Server Enterprise Reporting was having problems running under medium trust. I kept on thinking something is majorly wrong if Community Server can run under medium trust and we can't. I figured that all the reflection we use in Community Server Enterprise Reporting was causing the problems. Then I remembered that Community Server uses reflection. If Community Server uses reflection in a couple places then that's not the reason Enterprise Reporting is blowing up. I decided I better do some research.

     I started reading a document I found on MSDN. I was quite shocked when I read the following line: "Medium trust applications have no registry access, no event log access, and no ability to use reflection" ( How To: Use Medium Trust in ASP.NET 2.0 ).  A part of this statement is incorrect because one can use reflection to a certain extent under medium trust. In this case, the only thing reflection can't accomplish is getting access to protected members.  Please note, that this document is being updated as we speak.

    Now that I know we don't ever try accessing protected members in our reflection code, I can take that off the list. Next, I decided that I should check out the FileSystemWatcher class. Anything that watches a whole directory for you has to be doing some sketchy black magic under the hood ;). As it turns out this was the root cause of the trust issue. After reviewing the documentation for FileSystemWatcher class I noticed the following:

    NET Framework Security

    ·         SecurityPermission  for calling members of ProcessStartInfo. Demand value: LinkDemand; Named Permission Sets: FullTrust.

    • SecurityPermission for deriving from the ProcessStartInfo class. Demand value: InheritanceDemand; Named Permission Sets: FullTrust.

    After looking in Reflector at the FileSystemWatcher class, my guess is the reason the class requires full trust is that it uses pointers.  Since pointers are classified as "unsafe" code, the class is automatically needs full trust to run.

    The Workaround

    Please note that there is always more than one work around to any given problem.  This is how I accomplished getting the same functionality that the FileSystemWatcher offered, while running under medium trust.

    I knew from the start that I would only ever be checking one file and not a whole directory. Knowing this I created a Timer (from System.Timers), and set the interval to ten seconds.

     

    Timer myTimer = new Timer(10000);

    myTimer.Elapsed += WatchFileTimer_Elapsed;

    myTimer.Enabled = true;
     

    Every ten seconds I checked inside the Elapsed event to see when the last time that file was modified. The code is pretty simple and the most importantly it runs under medium trust!
     

    FileInfo fi = new FileInfo(file);                                             

    int result = DateTime.Compare( fi.LastWriteTimeUtc, DateTime.Now.ToUniversalTime().AddSeconds( -10 ) );

     

    if (result > 0)

    {
     

    PS. If you have a better solution to this problem, let me know because I am always willing to learn something new.

  • Product Documentation

    This afternoon I started on creating the documentation for how to customize Community Server Enterprise Reporting.  I'm going to be working on this for a while, because there are so many things one can customize, like:

    • Multiple database connections,
    • Declarative report model,
    • Enabling and disabling reports,
    • Configuring reports,
    • And much more!

    One thing that I have noticed over the past couple of years is that a lot of the documentation running in the wild is usually not that good.  Personally, I believe that this is a horrible thing because people now tend to not check the products documentation and will just contact support. I know a few support people and used to be in support.  I have noticed firsthand, that hardly anyone reads documentation.

    So I have a proposition: We will not stop until our documentation rocks!

    Today, Telligent treated everyone with Ice Cream after they had catered in Bone Daddy's.  This ice cream was in celebration for all the employees who have birthdays this month! Happy Birthday everyone at Telligent whose birthday is in the month of August!

    Thanks Telligent!

  • Caching and What It Can Do For Your Product

    Today I updated Community Server Enterprise Reporting caching framework to use Telligent's updated caching framework.  This updated caching framework is truly amazing; it can handle many more requests and data than the previous version.

    After updating Community Server Enterprise Reporting, I started to see if the caching framework could handle more than what we were previously testing. Let me be the first to say that you can run every report we have and cache all of it with ease.

    I believe that anyone who uses Community Server Enterprise Reporting will appreciate not having to wait that extra few milliseconds for a report to be generated. The great thing about this new caching framework is it is also going to be in the next release of Community Sever. So if you don't get to check out Community Server Enterprise Reporting caching, you will definitely notice it whenever you visit a site running an updated version of Community Sever.

     

  • I am beginning to like the idea of shipping…

    I bet you all thought that I was going to talk about shipping Community Sever Enterprise Reporting. I would, but then I would be lying and I don't lie.  This morning I shipped a fifty pound package back home. I am so happy that Adam and I decided that we would ship clothes and extra stuff that we have acquired down here, back home.  My return flight should now be about fifty pounds lighter!

    I worked on fixing a small bug today which has been plaguing us for some time. Basically, some of the data that Community Sever stores in the database is not in a consistent format. Like some fields in the database have ' instead of ' and vice-versa. This is a big pain because the browser renders these (what?) different. When we generate queries on the fly, one has to have the text field exactly how it was returned from the database. I tried using UTF8 encoding but quickly found out that didn't do very much. It helped in some cases. The solution that I used was to replace the ' with a completely different character only where it was needed.  It was an easy fix... almost too easy!

     

  • Automated Unit Testing

    Automated Unit testing is one subject that I do not know too much about. I was wishing this summer that we would get the chance to unit test the Community Server Enterprise Reporting project.  We will see what the near future brings; I think we are not unit testing because the code is constantly changing.  Once we get a little further down the road, I can see us running some unit tests on our project.

    If you are in the North Dallas area tonight and have some time to kill. Please feel free to stop by the Intuit "Quicken" headquarters around 6:00 PM. David O'Hara will be giving a speech on Automated Unit Testing for the North Dallas .NET User Group. I'm expecting to learn quite a bit from his presentation, so if he lets me down you will hear about it in tomorrow's post. The North Dallas .NET User Group website says that he plans on covering the following unit testing software:

     

    More Information

    Speaker: David O'Hara

    Topic: 8/1/2007: Automated Unit Testing

    Date: 08-01-2007

    When: 6:00 pm

    Where: Intuit Headquarters ( 5601 Headquarters Dr., Plano, Texas 75024 )

windowscoding.com;
Copyright © 2008 Windows Coding
Microsoft and Microsoft logo's are trademarks of Microsoft Corporation.