Archives
Our Thought in One Place

  • Gooood morning, Vietnam! How fun would that be to walk into the office and hear Robin Williams belt out that memorable chant? :) I hope you’re having a good Monday so far. Let me know what time works for you this week to get together. We have a client photo shoot and a couple of other meetings scheduled, but I’d really like to get together soon. If you don’t have time, be sure to tweet me here and let me know how you’re doing.

    A quick note before getting into the recap of the short holiday week: If you’re battling the dilemma of needing that perfect marketing/advertising system for your small business or restaurant, check out these links. We’ve developed the perfect small business marketing system that’s truly effective and down right affordable. You won’t be disappointed.

    Monday, May 25th

    • Monday was Memorial Day, but more importantly it was my Mother’s 74th birthday. I cannot express in words how important she is to me in my life. I love you, Ma.

    Tuesday, May 26th

    • David spent his early morning on a .NET software project status update conference call with Mark of TRL, Inc. in Covesville.
    • On Tuesday we spent most of the day at Andrea’s La Bella in Ghent for a marketing materials photo shoot. I can’t even call it work spending a few hours with Andrea and Marti.  Plus Andrea whipped up a few special food items for brunch while we were there. Yum.
    • After the photo shoot, Cameron, Alvin and I stopped by A.W. Shucks for a late lunch and to say hi to Janine.
    • Cameron worked his content marketing magic for Janney Insurance Agency in Yorktown & Chesapeake, Gordy EyeCare in Phenix City [AL], and also Mark Pressed4Time in Hampton.
    • My cousin Joy and her son Brody were in town from Birmingham so Nicole and I took them to Bubba’s Seafood in Virginia Beach for dinner overlooking the Lynnhaven River.
    • Joy stopped by the studio on Tuesday afternoon and dropped off custom blocks made just for us. Check out the cool photo at the bottom of this message–great stuff from ABC Blockology.

    Wednesday, May 27th

    • The web development team continued their fabulous work on the new website redsigns for The Dirty Buffalo in Norfolk and also Andrea’s La Bella in Ghent.
    • I had a lunch meeting with the team from The Community Directory at A.W. Shucks. Paul and Jeff are cool people to chat with.
    • We published a new social article, Behind The Scenes At The Andrea’s La Bella In Ghent Photo Shoot (http://jasegroup.com/blog/?behind-the-scenes-at-the-andreas-la-bella-in-ghent-photo-shoot-where-has-jase-taken-you), with photos from Tuesday’s photo shoot at Andrea’s La Bella in Ghent. Did you see them?
    • We had a family dinner Wednesday evening at Chow in Norfolk. Fun times with Jeri, Nicole, Mom, Joy, Brody, Jennifer and Cameron.

    Thursday, May 28th

    • We did our second photo shoot of the week, this time at Philly Style Steaks & Subs in Norfolk. Debbie, Joe and the staff were so much fun to work with.
    • We publish a new social article, Microsoft Office on Android Tablets (http://jasegroup.com/blog/?microsoft-office-on-android-tablets). Will you be participating?

    Friday, May 29th

    • The creative team finalized the June advertising campaign for Nathan’s Lynnhaven Pawn Shop in Virginia Beach. Good stuff that will be seen soon.
    • We published a new social article, Just for Restaurant Owners & Managers: Did you hear? (http://jasegroup.com/blog/?just-for-restaurant-owners-managers-did-you-hear), about our very successful restaurant marketing system package. Be sure to spread the word to your favorite restaurant with that sucky website.
    • The team worked on new marketing materials for the JASE Small Business Marketing System and the JASE Restaurant Marketing System. Very exciting.
    • The creative team continued work on custom art for a detailed siteplan for Dragas Companies‘ newest condominium community Spence Crossing in Virginia Beach.
    • Nicole spent the weekend in the Outer Banks of North Carolina with girlfriends. So to kickoff the alone weekend, I stopped by A.W. Shucks for happy hour and dinner. It was fun to catch up with Keith, Hollie and Sharon.

    Be sure to stop by the studio for coffee this week. I’d like to see you–I’ll make time in the schedule.

    Keep your chin up, your eyes bright, and your ears open–you never know when a juicy bit of knowledge will come flying at you.

    Your friend in Christ,
    kp.

    JASE blocks from ABC Blockology

  • Several people asked me last week about our weekly recap newsletters. Why talk personal? Why talk business? Why mix them in the same conversation? If you know me on any level, you know that JASE is my life and my life is JASE. For starters, the company name “JASE” comes from my two daughters’ initials, hence the all caps. Second, our personal lives are intimately intertwined with company business. No matter how large we have grown over the years (since 1997), JASE will always be a family business that cares about our clients and welcomes them as part of our family.

    So there you go. That’s the reason we talk our complete world in the same conversation. It’s all the same–and it’s all good. Speaking of . . . have you stopped by the Studio for coffee or tea lately? We’re here all week so stop by. Let’s talk. If you can’t make it this week, be sure to tweet me here and let me know how things are going. I’m having a blast hearing from many of you.

    Monday, April 13th

    • Sometimes I feel like I preach this too much. But then questions come up and I feel like I don’t preach it enough. Content marketing is today’s SEO. I need to trademark that statement. Cameron worked a while on Monday on quality content marketing for several clients, including Gordy EyeCare of Phenix City, AL and also Janney Insurance Agency of Yorktown & Chesapeake, VA. A successful business on the Internet cannot have enough solid content on their blog, Facebook page, Twitter timeline, LinkedIn Company page, etc.
    • The creative team worked through several new design comps for our Restaurant Marketing System. Good stuff. Man, really nice designs. Our kids rock!
    • I followed up with my doctor on Monday afternoon checking blood pressure, sugar levels, cholesterol and all that cool stuff that’s going to keep me around for a while. I’ve promised my family that I’ll be here until at least 94 years old. And I intend to make good on that promise. When was the last time you had a thorough checkup?
    • We delivered drafts of exterior door signage art to Karla at Hampton Mental Health Associates in Hampton, VA. Walt has done a really nice job with this overall brand makeover for the company.
    • Our tech team continued working on two new apps for Todd at Williamsburg Coffee & Tea in Williamsburg, VA. I know that I brag on our creative team a lot, but our software engineers and data team are dynamite. Led by David, these guys are good!

    Tuesday, April 14th

    • I had to make another phone call to the billing department at Cox Business Services on Tuesday morning. These guys. I’m not sure about these guys. First they tried to bill us for a service call when their equipment failed outside of our building. Then they forgot to refund the charges. So I had to call them again to ask them to post the credit. Where is the competition? I detest that there is a monopoly in our area for this tech service for small business. Okay, I’m off my soapbox now. :)
    • Cameron and I met with Laura and Jocelyn of MyBizPPL at The Studio to discuss partnerships that would benefit both of our companies. These are some cool ladies with fabulous, creative ideas for the Hampton Roads small business market. Let me know if you need an introduction. I’ll be more than happy to set that up.
    • The creative team delivered design comps to Russ at Dirty Buffalo in Norfolk, VA. These bad boys are awesome. I can’t wait to see this new website live on the Internet. Their customer base is going to be ecstatic.
    • Big news! We received an signed Agreement from La Bella in Ghent in Norfolk, VA. We are now their official Creative Advertising Agency of Record. Nicole and I have been a big fan of Andrea’s cooking for many years, and now we get the privilege of working with them. Fun.
    • We had a Board of Managers meeting for the Cosmopolitan Club of Norfolk on Tuesday evening. The Board met at The Reynolds’ beautiful home in West Ghent where we were served filet mignon and also desserts from Chocollage Bakery in Downtown Norfolk. With such a delicious dinner, I almost forgot that we were there to fight diabetes together. :)

    Wednesday, April 15th

    • I met with Mark and Tom of FitBox365 early Tuesday morning at Panera Bread in Chesapeake, VA to discuss branding and marketing strategies for the new venture. We are very excited to be working with this talented, experienced and intelligent team.
    • We published a new social article, 5 Microsoft Excel Features You May Not Know About (http://jasegroup.com/blog/?5-microsoft-excel-features-you-may-not-know-about) on Wednesday. I sent the link out to a few of my bean-counter (and oh-so-freakin-smart)  friends, but I’m sure they thought me juvenile since I’m sure they already knew about these features. :)
    • Cameron and I had a wonderful conversation at The Studio with Deany of Executive Events in Norfolk, VA. The discovery session was perfect timing since we will be working a few joint projects. She is a very passionate and driven businesswoman and it was a pleasure to share the time with her.
    • Most of you know that Nicole is an accountant, specifically she is a Manager in the Retirement Plan Services division at McPhillips, Roberts & Deans PLC in Norfolk, VA. To celebrate tax day, I met her and our friend Christie after work at Press 626 for wine and appetizers. We had so much fun at this cool little spot in Ghent.

    Thursday, April 16th

    • We published another social article, Office 365 Supports Up To 150 MB Email Attachments (http://jasegroup.com/blog/?office-365-supports-up-to-150-mb-email-attachments) on Thursday from the tech team. If you aren’t already subscribed with your RSS reader, make sure you don’t miss these announcements on our blog.
    • Our PR Team published the press release to the media announcing our new La Bella in Ghent partnership. We received several replies and correspondences from the media push. Love it. Our public relations team is tops!
    • Denise worked through several design comps for upcoming May ads for Nathan & Maurice at Nathan’s Lynnhaven Pawn Shop in Virginia Beach. Her work with Cameron each month is amazing. I anxiously look forward to seeing their new ideas when they hit my desk.

    Friday, April 17th

    • To follow-up on the press release publication on Thursday, we published a similar social article, We Are Excited That La Bella in Ghent Signed With JASE Group as Their Advertising Agency of Record (http://jasegroup.com/blog/?we-are-excited-that-la-bella-in-ghent-signed-with-jase-group-as-their-advertising-agency-of-record), to that audience. Thank you everyone for reading our social activities on the Internet. I’m astounded at how many loyal followers we have and how many of you actively engage with us on and offline.
    • It’s Friday, right? Friday means fun-day. Kevin of Coelacanth Brewing and I went to La Bella in Ghent for lunch after he gave me a tour of the new Coelacanth brewery facility in Ghent. I can’t wait to taste his new brews when they go into production around August.
    • The marketing team worked through several of our pay-per-click accounts for Nathan’s Lynnhaven Pawn Shop, Janney Insurance Agency, and Dragas Companies. Weekly maintenance and upgrades are vital to their successes.

    Saturday, April 18th

    • Nicole, Cassidy and I made off to South County High School in Lorton, VA on Saturday morning. We were there to cheer on Delaney’s Gildersleeve Middle School of Newport News, VA Odyssey of The Mind team competing in the State Competition. They did so well representing their region after winning the Regional Competition a few weeks ago.

    Sunday, April 19th

    • Proud Uncle here (pointing at my chest). Nicole and I joined the rest of our family at City Life Church in Williamsburg, VA to celebrate Cassidy’s public profession of faith and baptism. I am so very proud of this young lady and all she has accomplished personally.
    • Our family had lunch Sunday afternoon at 2nd Street Cafe in Williamsburg. The best part of that–we got some quality Poppie & GCole time with Jeri. Being a grandparent is the most grounding and special feeling a person can enjoy. I think I have found my calling in life. :)

    Our JASE Restaurants Marketing System is booming. If you’re a restaurant owner and want to know more, head over to the landing page. Or if you want to make a little money on the side, do like Matt did and refer your favorite restaurant. When they sign up, you make cash. Sweet deal.

    I hope you guys have a great rest of this week. Stop in for coffee or tea at The Studio (click here for directions). I’m available any time.

    Keep your chin up, your eyes bright, and your ears open–you never know when a juicy bit of knowledge will come flying at you.

    Your friend in Christ,
    kp.

    Keith Parnell

  • A 4:30A journey to the office this morning gave me lots of time to reflect, because . . . well, I was the only one on the road. Last week was a sad week for our family while attending Nicole’s Nanny’s funeral out of town. Although it was exciting to see so many family members that we rarely get to enjoy. And the week at The Studio was amazing. I know–that’s a bit emotional. But, holy cow, between new clients coming onboard and so many exciting projects going on, I can hardly contain myself. :)

    How was your week? I want to hear about it–Tweet me here and give me the deets.

    Monday, April 6th

    • We delivered the final corporate logo design to Karla at Hampton Mental Health Associates as part of a major rebranding project. Walt did a fabulous job with creative.
    • Cameron attended a pre-bid meeting for an RFP that we are answering for a government-funded agency in Williamsburg. I can’t give too many details, of course, but this one is near and dear to my heart.
    • Cameron continued his amazing content marketing work for Janney Insurance Agency of Yorktown and Chesapeake and also for Gordy EyeCare of Phenix City, AL. Knowing that content marketing is today’s SEO, these tasks are critical to our client successes.
    • The first Monday of the month brings one of my not-so-fun tasks: project-to-billing flowdowns. We do have a very cool and very efficient custom-created software system that our team created for this monthly feat. But financials is just not my cup-o-tea.
    • The marketing team delivered monthly Client Performance Reports to each of our subscribed clients. If you don’t receive this very valuable report from your support team, you’re missing out!
    • The NCAA March Madness National Championship Game was Monday night. Did you catch the Duke win?
    • Our tech team continued their hard work on a couple of new apps for Todd at Williamsburg Coffee & Tea in Williamsburg. Our .NET software engineers are the best.

    Tuesday, April 7th

    • We received great news from Andrea at La Bella in Ghent of Norfolk that the restaurant will be joining the JASE family. Welcome aboard team!

    Wednesday, April 8th

    • Early on Wednesday morning Cameron met with Joe at Philly Style Steaks & Subs of Norfolk and Iggles Cheesesteaks & Burgers of Virginia Beach. He came back to The Studio with a smile on his face and more great news that Joe’s two teams will also be joining the JASE family. Welcome aboard teams!
    • We launched a new social article, Apple Watch Review: Will You Be Purchasing One? (http://jasegroup.com/blog/?apple-watch-review-will-you-be-purchasing-one). Be sure to check it out. I would love to see your feedback on the Apple Watch.
    • Nicole and I left for her Nanny’s funeral in Atkins on Wednesday afternoon. Although this was a sad trip, what a very beautiful drive through the mountains of Southwestern Virginia.

    Thursday, April 9th

    • Cameron attended the Stand Up 4 Transportation Rally at the Hampton Roads Transit Transfer Station in Newport News. The crowd was filled with dignitaries, government officials, and many local business leaders. Contacts. Contacts. Contacts.
    • Our marketing team ran a mobility analysis scan on our JASE and JASE client web entities preparing for an upcoming Google algorithm change. What? You haven’t heard about it? It’s time you sign up with JASE to take care of these details for you. :)
    • Nicole and I got the hang out with our family Thursday evening after the funeral. We had dinner at Macado’s in Marion with about 15 of them and then met for drinks with Scott, Angi, Carl, and Uncle Richard at 27 Lions there in Marion. We had so much fun seeing them–I wish we could do it more often.

    Friday, April 10th

    • We launched a new social article, Online Advertising & Newspaper Advertising for Nathan’s Lynnhaven Pawn Shop (http://jasegroup.com/blog/?online-advertising-newspaper-advertising-for-nathans-lynnhaven-pawn-shop), on Friday. Did you see the new artwork for the ad concepts?
    • Our marketing team continued their great pay-per-click work for Nathan’s Lynnhaven Pawn Shop in Virginia Beach, Janney Insurance Agency in Yorktown and Chesapeake, and Dragas Companies in Virginia Beach. Money. I love it when we make money for our clients.
    • Nicole and I (mainly Nicole) were showered with love from close friends (Jen & Brian, Laura & Frank, Christie & Jon) by bringing dinner for the crew to the house Friday evening. Good friends, good food and the firepit always make for a good time.

    Sunday, April 12th

    • Did you watch The Masters final on Sunday? How about that Jordan Speith?
    • Our Sunday was mainly filled with yard work and cleaning the siding on the house. The weather this weekend was awesome.

    I have to give a plug to our newest initiative, JASE Restaurants. We’ve been honored with a few new clients in the program already and would love to see you or your favorite restaurant hop onboard.

    I hope you guys have a great rest of this week. Stop in for coffee or tea at The Studio (click here for directions). I’m available any time.

    Keep your chin up, your eyes bright, and your ears open–you never know when a juicy bit of knowledge will come flying at you.

    Your friend in Christ,
    kp.

    JASE on brick wall

  • COVESVILLE, VA, FEBRUARY 24, 2014: JASE Group, LLC is proud to announce the renewal of TRL, Inc.’s contract with JASE to continue the 8-year partnership.  TRL has served the training needs of corporations and individuals since 1971 from their main offices in Central Virginia where they service the entire United States and Canada.

    TRL provides training programs from dozens of suppliers and hundreds of speakers on a variety of topics such as Sales, Management, Communication, and Self Development.  TRL’s online audio and video library provides a portal where subscribers can find a variety of speakers on almost any business topic.

    JASE has helped streamline the TRL online resource library application by developing a .NET framework with on-demand downloadable audio and video shopping.  Enhancements implemented include speed improvements, improved reporting, customizations to the user interface, and integrations with third party APIs.  JASE’s work for TRL has enabled the company to market their services to a wider variety of customers and has provided TRL users with a better user experience.

    ABOUT TRL, INC.
    Tape Rental Library (TRL) has been serving the training needs of companies and individuals since 1971.  TRL located in Central Virginia, and services the entire United States, and Canada.  They have programs from dozens of suppliers, by hundreds of different speakers on a variety of topics such as Sales, Management, Communication, and Self Development. For more information on TRL, Inc., visit http://trlonline.com.

    ABOUT JASE GROUP LLC
    JASE Group LLC is a creative, communications and technology studio based in Norfolk, VA, founded in 1997. JASE is a team of dedicated, enthusiastic and talented professionals creating and designing powerful and effective works for our clients. We are a one-stop-shop for all of our clients whether they are looking for advertising concepts, collateral, web design, mobile app development, software and anything in between. For more information on JASE Group LLC, visit http://jasegroup.com.

    ###

    TRL, Inc.

     

  • E. V. Williams Inc. Selects JASE Group LLC as Digital Agency of Record

    VIRGINIA BEACH VA, MAY 31, 2013: E. V. Williams, Inc. announced last week the selection of JASE Group LLC as their Digital Agency of Record. JASE Group, an innovative public relations, creative advertising & inbound marketing agency, was strategically chosen after a competitive review of the Virginia and North Carolina digital media landscape. E. V. Williams is a Site Development & Highway Construction contractor which specializes in site development, sub-division and commercial construction as well as major highway construction in Hampton Roads Virginia, Central Virginia, Northeast North Carolina and Central North Carolina.

    We are happy to have JASE Group join us in our effort to enhance the services we provide to our customers, employees, and other stakeholders,” said Jay Openshaw, President of E. V. Williams, Inc. “We are confident that JASE brings the expertise and innovation needed to move us forward in this effort.

    More information on E. V. Williams, Inc. can be found at evwilliams.com.
    More information on JASE Group LLC can be found at jasegroup.com.

    ABOUT E V WILLIAMS INC
    E.V. Williams Inc. is a full service Prime Contractor in the Hampton Roads/Tidewater area of Virginia with virtually unlimited bonding capacity. As a member of The Branch Group Inc. family of companies, our resource base of a $250 million a year company coupled with local Tidewater management brings your project “On Schedule, Within Budget” capabilities while dealing with people that have local knowledge and the service of a home town contractor. For more information on E.V. Williams Inc., visit evwilliams.com.

    ABOUT JASE GROUP LLC
    JASE Group LLC is a creative communications agency, brand studio and innovations lab based in Norfolk VA, founded in 1997. JASE is uniquely focused on digital technologies, and mobile, social and progressive media platforms. JASE’s talented team specializes in leading edge services such as inbound marketing, creative advertising, public relations, and technology, which include creative advertising campaigns, public relations platforms, brand management solutions, inbound marketing strategies, web design services, and eBusiness solutions. For more information on JASE Group LLC, visit jasegroup.com.

    ###

    EV Williams logo

  • Microsoft heralded the end of 2011 with the release of their first (and only) out-of-band Windows update of the year.  (Microsoft normally releases updates on the second Tuesday of each month, or, “Patch Tuesday”.)

    In its announcement on Technet, Microsoft gives details about these updates – it actually fixes several .NET vulnerabilities.  The most critical one is an “elevation of privilege” issue, in which a hacker could execute arbitrary OS commands.  It also fixes a separate “Denial-of-Service” vulnerability, where a hacker could send a specially crafted POST request to an ASP.NET web server causing it to utilize more CPU resources than it otherwise should.

    2011 brought us no shortage of security stories – from the numerous instances of stolen passwords to the news that Windows Phones are vulnerable to SMS-based attacks.

    So what can we expect to see in 2012?  Here are some of our thoughts?

    • Expect cyber security to be a hot topic for congressional action.  Congress typically demonstrates a woeful inability to understand any technical issue it considers, but one of the few things both sides seem to agree on right now is that cyber security constitutes a national security issue.  With high profile hacking stories constantly flooding the news and even a hacking threat against the election system, look for congress to step in.
    • Look for the days of cell phones and mobile devices being safe to come to an end.  Most of us wouldn’t dream of having a PC connected to the internet without a virus scanner, but we don’t give it a second thought with our cell phones. While iPhone apps are tightly controlled by Apple, Android devices use Google’s market, which is wide open.  One firm claims that there are 1000 malicious Android apps.
    • Expect shocking violations of privacy to become more frequent (and, thus, I suppose, less shocking).  In a world where what used to be personal is now plastered on social networking sites (is it really necessary for you to post a picture of me in my sleepwear for all the world to see?), we’ve come to accept that our groups of friends, products we buy, and videos we watch are all being mined for any tidbit of information it might yield.  But when phone carriers are installing spyware and Facebook is being taken to task around the world, we have to ask, what’s next?

     

    What are some of your thoughts about security issues in the near future?  Let us know in your comments.

    RSA SecurIDPhoto credit: Alexander Klink

  • Client Summary

    download the JASE Client Case Study: Tape Rental Library – TRLOnlineAudioQueue is an online audio rental service that specializes in business titles, training materials, and popular titles. AudioQueue’s clients include both business users who subscribe as a part of a company to hone their management or sales skills, and individual users who subscribe to take advantage of AudioQueue’s library of family help books, religious titles, and popular books. For a flat monthly fee, users are allowed to have out either a set number of disks or a set number of titles at any given time, depending on their subscription level.

    Project Background

    The AudioQueue website was originally created using a third party content management system written in ASP.NET and uses a SQL Server backend. The site makes copious use of ASP.NET user controls (.ascx files), which allow the same control – such as a credit card form – to be used in multiple places.

    The end-user front end allows users to subscribe to the service, view available titles, and maintain a queue of tapes and CDs. The site interfaces with a third party APIs for credit card processing, email, and other functions. The content management system provides AudioQueue staff with the ability to add titles to the library and fill orders. Automated SQL Server jobs govern billing and assigning copies of titles for shipment.

    Challenges, Solutions, and Ongoing Development

    JASE has provided numerous enhancements for AudioQueue, including increased speed performance, improvements to the billing process, and custom signup pages for individual customers.

    One of our new features was an automated report, which informs AudioQueue personnel of any errors that happened on the site, any billing discrepancies, or any users who have not been sent their full complement of CDs. This report gives AudioQueue the tools they need to rapidly address problems – before the customer complains.

    JASE is currently working to create a new version of the site, which offers the familiar look and feel, but from a more updated interface.

    Results & Projections

    JASE’s work for AudioQueue has provided their users with a faster and better user experience.

    Want to learn more about how these strategies can help your company? Contact JASE today, let’s sit down and talk.

  • Client Summary

    download the JASE Client Case Study: Tape Rental Library – TRLOnlineTape Rental Library, Inc. is an online audio and video rental service that specializes in business titles and training materials. TRL’s clients include companies from a diverse group of industries and their service is used by salespeople, managers, and other professionals. TRL offers both a standard catalog, as well as custom titles for individual customers or departments.

    Project Background

    The TRL Online website was created using ASP classic and has a SQL Server backend. It has a front end allowing users to order materials from the library and a CMS (content management system) used by customers to customize their catalog and by TRL staff to maintain the database and fill orders.

    Challenges, Solutions, and Ongoing Development

    JASE has provided enhancements for TRL, including on-demand downloadable audio, integration with third party content suppliers and with customer ordering systems, and customizable catalog display options.

    In our integration with a third party provider of digital content, we developed a NET application, which runs nightly to download the content provider’s database, import it into the TRL database, and offer TRL personnel a list of updated titles, which they may approve or reject.

    JASE is currently working to create a new .NET version of the website, which offers the familiar look and feel, but from a more updated interface. This .NET version will provide enhanced security and allow TRL to better support individual users.

    Results & Projections

    JASE’s work for TRL has enabled TRL to market their services to a wider variety of customers and has provided TRL users with a better user experience.

    Want to learn more about how these strategies can help your company? Contact JASE today, let’s sit down and talk.

  • Client Summary

    Tape Rental Library, Inc. is an online audio and video rental service that specializes in business titles and training materials.  TRL’s clients include companies from a diverse group of industries and their service is used by salespeople, managers, and other professionals.  TRL offers both a standard catalog, as well as custom titles for individual customers or departments.

    Project Background

    The TRL Online website was created using ASP classic and has a SQL Server backend.  It has a front end allowing users to order materials from the library and a CMS (content management system) used by customers to customize their catalog and by TRL staff to maintain the database and fill orders.

    Challenges, Solutions, and Ongoing Development

    JASE has provided enhancements for TRL, including on-demand downloadable audio, integration with third party content suppliers and with customer ordering systems, and customizable catalog display options.

    In our integration with a third party provider of digital content, we developed a NET application, which runs nightly to download the content provider’s database, import it into the TRL database, and offer TRL personnel a list of updated titles, which they may approve or reject.

    JASE is currently working to create a new .NET version of the website, which offers the familiar look and feel, but from a more updated interface.  This .NET version will provide enhanced security and allow TRL to better support individual users.

    Results & Projections

    JASE’s work for TRL has enabled TRL to market their services to a wider variety of customers and has provided TRL users with a better user experience.

  • One of my biggest pet peeves in .NET programming is that inefficiency is coddled, if not encouraged. This isn’t completely Microsoft’s fault – sometimes they provide great tools, but the tools aren’t used.

    A few weeks ago, I was handed a C# program with the complaint that it was taking around five seconds to load. I quickly found the biggest problem – this
    program had a set of around several hundred options that are loaded from an options table in the database. These options were loaded into a List<> class and then put into member variables.

    So the code looked something like this:

    List<program_setting> Settings = new List<program_setting>();
    using SqlConnection conn = new SqlConnection(strConn))
    {
       using (SqlCommand cmd = conn.CreateCommand())
       {
          cmd.CommandText =
             “SELECT property_name, property_value FROM program_settings”;
          cmd.CommandType = CommandType.Text;
          using (SqlDataReader rs = cmd.ExecuteReader())
          {
             Settings.Add(new program_setting(((String)rs[“property_name”]).Trim(),
                ((String)rs[“property_value”]).Trim()));
          }
       }
    }

    Properties were then referenced using a function FindProperty:


    String FindProperty(String Property)
    {
       foreach (program_setting setting in Settings)
       {
          if (setting.SettingName == Property)
          {
             return setting.SettingValue;
          }
       }
       return “”;
    }

    In this list class, the time required to locate a single item in the list is proportional to the number of items in the list. In asymptotic analysis, we refer to this as O(n).

    There are at least three improvements that can be made on this data structure. The first, most basic improvement is that we could sort the list. Sorting is itself a lengthy operation, which would eat up any gain we hope to make, but fortunately all of these values are coming from a database, which, one would hope, will have an index on property_name, so we can change our query to get a pre-sorted list:

    SELECT
    property_name, property_value

    FROM
    program_settings

    ORDER BY property_name

    Now, a simple binary search of our list would reduce our performance time to one based on log2 n, or, O(log n). Fortunately, Microsoft gives us a perfect binary search class for this need called SortedList. In a SortedList, elements are stored as a sorted array and searched using a binary search.

    A second potential improvement is to store elements in a tree. Now, in our particular example, where we are able to pre-sort our list elements, this isn’t particularly useful, but in the case where, not only are your list elements not presorted, but you are adding and removing them frequently, this gives you a substantial performance improvement. So to meet this need, Microsoft offers SortedDictionary. SortedDictionary elements are stored in a binary tree. The search tree, like the
    search array, has a search time of O(log n), but it makes insertion and removal faster when data is not presorted.

    A third potential improvement is to use what is called a hash table. Imagine if we had a separate bucket for each letter of the alphabet. Settings that begin with the letter “A” go in one list, settings that begin with the letter “B” go in another list, and so forth. However long it would have taken to look up our list element, we have just divided it by 26. Add a second letter and we have divided it by 676. But suppose that instead of using the first two letters, we just did some sort of mathematical operation on the property name that gives us a (relatively) unique value. This operation is called a “hash function” and it allows the search process to be a near constant time, with only a negligible increase as the number of items grows. For a hash search, Microsoft provides the Dictionary class.

    Do you have a process that is running slowly? Talk to our eBusiness Solutions team and let’s make sure your website is properly designed and running efficiently.

    Photo credit: Sese Ingolstadt

  • Languages often provide shortcuts for common functions, sometimes called “syntactic sugar” – a reference to how they “sweeten” the syntax and make code easier to code or read.  Today, we’re going to take a look at three shortcuts that involve the question mark (?).

    The ?? operator, introduced in Visual Studio 2005, is a null coalescing operator that will return the first non-null operand in a sequence.  Consider the following expression:

    x = a ?? b ?? c ?? d;

    If a is non-null, then it is returned; if a is null and b is not null, then b is returned; and so forth.  The ?? operator is actually binary – this expression is really ((a ?? b) ?? c) ?? d.

    Internally, when the ?? operator is compiled into Common Intermediate Language, it is translated into the ? … : conditional operator.  So x = a ?? b becomes:

    x = a.HasValue() ? a : b;

    The ? … : operator is a handy shortcut for an if statement and is the equivalent of the Visual Basic If operator. (If was introduced in Visual Studio 2008.  The Iif function is also available, but it lacks short-circuiting).  The syntax is:

    condition ? value_if_true : value_if_false;

    If the condition is true, then the left value is evaluated and returned; if it is false, then the right value is evaluated and returned.  There are at least three important points here.  One, unlike Iif in VB, only one of the expressions is evaluated.  So we’re not going to reformat your hard drive here:

    (1 == 2) ? FormatCDrive() : DoSomethingUseful();

    The second important point is that in C#, unlike in C++, the ? … : operator is not valid by itself.  You can pass its return value to a function, you can return its value, or you can set a variable equal to its value, but the above statement containing only the ? … : operator and its operands is not a legal C# statement.

    The third important point is that strictly speaking, this operator is not a shortcut for an if statement.  Though functionally it behaves as an if statement, it does actually get compiled to different CIL.

    The final shorthand we will consider is the ? shorthand for Nullable.  The Nullable template class allows scalar types like int and DateTime to have null values.  These two statements are equivalent?

    Nullable<int> i = 5;
    int? j = 5;

    In both cases, i and j are “nullable” types, meaning that they can receive null as their value, allowing the programmer to distinguish between zero and not set.

    Photo credit: Adam Ciesielski

  • JASE has an immediate need for a full-time / contract software engineer with extensive experience with the .NET Framework, including C# and VB.NET. The engineer will also have extensive experience and be proficient with Microsoft SQL Server.

    Position: .NET / SQL Server Developer
    Location: Norfolk – Virginia Beach – Chesapeake, VA
    Company: JASE Digital Media
    Type: Full Time / Contract
    Job Categories: Computer – IT Services, Consultant, Information Technology, Software Engineering

    Job posted on 8/24/2011

    Job Description

    JASE has an immediate need for a full-time / contract software engineer with extensive experience with the .NET Framework, including C# and VB.NET. The engineer will also have extensive experience and be proficient with Microsoft SQL Server.

    Compensation to match experience level. Must be available to work on location during 1st shift in the Norfolk – Virginia Beach – Chesapeake, VA area. Initial contract is 4 weeks with strong possibility of extension dependent on performance. Start date is immediate.

    Send resume to info@jasegroup.com

    Job Skills

    * Excellent communication skills
    * .NET
    * C#
    * VB.NET
    * ASP.NET
    * SQL Server
    * Visual Studio
    * ASP, JavaScript, HTML, DHTML

    Company Description

    JASE Digital Media is a SWaM certified, Norfolk, VA based, progressive, interactive digital media agency specializing in creative advertising campaigns, brand management solutions, inbound marketing strategies, web design services, and eBusiness solutions. To learn more about JASE Digital Media, please visit http://jasedigitalmedia.com/about

    Enjoy Your 30-day Free Trial!
    inbound marketing software free trial Learn how Inbound Marketing Software can help your business grow!Click here to get started with your free trial.

  • Microsoft LightSwitch is a rapid application development tool for creating three-tier cloud-based applications.  We are going to examine the process of creating a simple application in LightSwitch and then answer the question of how this development tool can be used in your organization.

    When a new project is created, LightSwitch initially invites the user to “start with data” and either create a new table or attack to an existing data source.  (The external data sources can be a SQL Server or other database connection, SharePoint, or a WCF service.)

    The table editor is fairly easy to use and allows the user to choose some predefined formatted types such as “phone number” and “email address”.

    Now that we have created a table, we look over to the solution explorer and see that we can create screens.

    The editor presents several pre-defined screen types.  For our sample, we are going to create a “List and Details” screen, which will give the user a list of records and allow them to edit those records.

    Next, we can click on “Add Data Item” and add a new query for our address_books table.

    Now, we can click the “add” button and choose the “address books” table.

    With no additional work, the application we have created can now be run.  In less than five minutes, we have created this application.

    So what have we actually created?

    First off, we have a three-tier application.  The application above is the front end.  It uses a web service to post and retrieve its data.  The third tier is the SQL Server database.  LightSwitch contains a publishing wizard that can be used to publish the application to an IIS web server.

    Like other Silverlight applications, the application itself is contained within a .xap file.  This file is actually a plain old zip file – you can rename it to have a .zip extension and then open it with Windows explorer.

    LightSwitch is clearly not versatile enough to replace .NET for Enterprise-level software, but for a light-weight data-driven application, say, something that you would have created with Microsoft Access in years gone by, LightSwitch provides a useful tool.  It is important, though, to understand that rapid development tools are not a replacement for the software engineering process – application should still be properly and thoughtfully designed.

    image credit: Paul Cutler


  • One of the major new features in SQL Server 2008 was a revamping of the date-related data types.  In previous versions, SQL Server only offered datetime and smalldatetime.

    Datetime supports dates from 1753 until 9999, with precision to approximately one quarter of one-hundredth of a second. Internally, it is stored as two four-byte integers.  The first stores the number of days before or after January 1, 1900.  The second stores the number of three hundredths (1/300) of a second since midnight.

    Smalldatetime supports dates from 1900 until 2079, with precision to one minute.  Two of its four bytes store the number of days since January 1, 1900 and the other two store the number of minutes since midnight.

    Now, if you do the math, you can see that both of these data types waste a certain amount of space.  Datetime uses four bytes to store a day from 1753 to 9999.  There are around three million days between 1753 and 9999, but the four bytes used to store the number of days can represent four billion (with a b) unique values.  Similarly, with smalldatetime, there are only 1440 minutes per day (60*24) and two bytes can store 65536 unique values, so obviously there is some room to store more information in four bytes than smalldatetime uses.

    SQL Server 2008 introduced four new data types – time, date, datetime2, and datetimeoffset – that store and represent data more efficiently than the previously existing data types.  All of these types other than date accept an optional precision that specifies to how many decimal places the number of seconds will be stored.

    Data Type Range Bytes Introduced in
    time(0 … 7) 0:00:00 – 23:59:59.9999999 3-5 2008
    date January 1, 1 A.D. – December 31, 9999 3 2008
    smalldatetime January 1, 1900 – June 6, 2079 (precise to the nearest minute) 4 6.0
    datetime January 1, 1753 – December 31, 9999 (precise to the nearest .000, .003, or .007 seconds) 8 Present in all versions
    datetime2(0 … 7) January 1, 1 A.D – December 31, 9999 (precise to a number of decimal places after the second specified by the parameter) 6-8 2008
    datetimeoffset(0 … 7) Same as datetime2, -14:00 – 14:00 for the offset 8-10 2008

    There is one word of caution that needs to be exercised when using the more precise data types with .NET.  When using SqlConnection, all of the date times (date, smalldatetime, datetime, datetime2) are rendered as System.DateTime, which is only precise to the nearest millisecond (three decimal places).  Time is rendered as System.TimeSpan, which is accurate to the nearest “tick”, or, .0001 milliseconds.  So if you are storing data in a datetime2 and you need the extra precision in a .NET application, be sure to convert it to an appropriate type.

    Anywhere in your databases where you would have used a datetime, you should now consider using one of the new types.  If you only need to store a date (e.g. birthdates), use the date type.  If you only need data to the nearest second, use datetime(0) – this will give you an object that uses less storage (six bytes instead of eight).

    image credit: Calendar of the French Revolution, from Wikimedia Commons

  • Spaghetti spiralIf you have ever taken a programming class in college or been on a job interview as a prospective programmer, you have likely been subjected to intentionally confusing code segments and given the task of determining what they do.

    Sometimes the code segments appear simple, but have a catch to them.  For example, in C++, what is the return value of this function?

    #define square(a) (a*a)
    int TestFunction()
    {
    return square(8+2);
    }

    If you said 100, you are incorrect.  The reason is that when square is called, it expands to 8+2*8+2.  Order of operations dictates that this expression is evaluated as 8+(2*8)+2, which adds up to 26.

    Now, when you encounter confusing code, or, spaghetti code, in real life, that is obviously a bad thing.  So here are some of our tips on how not to code:

    1. Repeatedly query the database when one query will suffice. Sometimes, you only need data conditionally.  For example, maybe you only need to look up the state associated with a zip code if the customer is from the US.  The right way to handle that need is with an OUTER JOIN.  The wrong way to handle it is to loop through your result set and then one by one look up the state where applicable.
    2. Create an object at the top of a function and delete it at the bottom. Unfortunately, .NET gives you no choice in the matter – one of its least appealing features when compared with C++ is that it eliminates a lot of your opportunities for writing efficient and proper code.  But for those who still enter the C++ world from time to time, if you don’t plan to persist an object after the function terminates, declare it on the frame, not the heap.
    3. Don’t comment your code – if only you know how it works, it’s job security! Well, the better job security is to deliver a good product to your customers – it will make them want to come back.
    4. Create 1000-line functions. While there is no magic number on how long is too long for a function, if you are seeing 1000-line functions on a regular basis, you may need to think about dividing them up.
    5. If it compiles, ship it! Whether it is the pressure of deadlines or the arrogance that “my code is perfect”, time and again software is published with bugs that leave you wondering, “did they even try it before sending it out?”

    What are some other bad coding habits you encounter?  Let us know in your comments.

    image credit: Paolo Piscolla

  • phone bookActive Directory is the service used to manage security on Windows domains. In .NET, Microsoft makes available to us a number of classes for accessing Active Directory data.

    One thing that is extremely important when dealing with Active Directory is to make sure that you have exception handling. Different domains have different security restrictions. On some domains, you may find yourself unable to use certain objects, such as the directory searcher, if you are not an administrator.

    The most fundamental Active Directory object is DirectoryEntry. It represents an object on the domain. Consider this function, for instance, which can be used to enumerate all of the available Active Directory objects and populate a tree with them:

    private void CreateADTree(TreeNode node, DirectoryEntry de)
    {
    try
    {
    if (null == de)
    {
    de = new DirectoryEntry();
    de.Path = “WinNT:”;
    }

    foreach (DirectoryEntry deChild in de.Children)
    {
    TreeNode nodeChild = null;
    if (null == node)
    {
    nodeChild = tvAD.Nodes.Add(deChild.Name + ” (“ + deChild.SchemaClassName + “)”);
    }
    else
    {
    nodeChild = node.Nodes.Add(deChild.Name + ” (“ + deChild.SchemaClassName + “)”);
    }
    nodeChild.Tag = deChild.Path;

    CreateADTree(nodeChild, deChild);
    }
    }
    catch
    {
    return;
    }
    }

    If you create a form containing a TreeView called tvAD, add a reference to System.DirectoryServices, and call the above function from your form load event, you should now see your tree view populated with all of the objects on your domain. (Note: if you are on a domain of any size, this function will take a VERY long time to execute. You may want to modify it to ignore objects of schema class “Computer”. Or, for extra credit, use the BeforeExpand event to load children as needed.) Now, this is exciting, but let’s take it a tad bit further and view some properties for these items. Add a list view to your form called lvAD and add the following code to tvAD’s selected node event:

    private void tvAD_AfterSelect(object sender, TreeViewEventArgs e)
    {
    lvAD.View = View.Details;
    lvAD.Clear();
    lvAD.Columns.Add(“Property”, 150);
    lvAD.Columns.Add(“Value”, 350);

    DirectoryEntry de = (DirectoryEntry)tvAD.SelectedNode.Tag;
    try
    {
    foreach (String strProperty in de.Properties.PropertyNames)
    {
    ListViewItem item = lvAD.Items.Add(strProperty);

    try
    {
    item.SubItems.Add(de.Properties[strProperty].Value.ToString());
    }
    catch (Exception ex)
    {
    item.SubItems.Add(“Exception: “ + ex.ToString());
    }
    }
    }
    catch(Exception ex)
    {
    ListViewItem item = lvAD.Items.Add(“Exception”);
    item.SubItems.Add(ex.ToString());
    }
    }

    One of the properties you will notice is the “objectSid” property. The SID is a number like S-1-5-15 that uniquely identifies an object. There is a Windows API function called ConvertSidToStringSid that we can use to convert the SID from the unreadable byte array to a (more or less) human readable value.

    [DllImport(“advapi32″, CharSet = CharSet.Auto, SetLastError = true)]
    static extern bool ConvertSidToStringSid(IntPtr pSid, out string strSid);

    internal static string SidToText(DirectoryEntry objGroup)
    {
    try
    {
    string sSID = string.Empty;
    byte[] SID = objGroup.Properties[“objectSID”].Value as byte[];
    IntPtr sidPtr = Marshal.AllocHGlobal(SID.Length);
    sSID = “”;

    System.Runtime.InteropServices.Marshal.Copy(SID, 0, sidPtr, SID.Length);
    ConvertSidToStringSid((IntPtr)sidPtr, out sSID);

    System.Runtime.InteropServices.Marshal.FreeHGlobal(sidPtr);
    return sSID;
    }
    catch (Exception ex)
    {
    MessageBox.Show(“Error reading SID:rnrn” + ex.ToString());
    return “”;
    }
    }

    We can then modify the AfterSelect handler to use this function to use this function to display our SID:

    if (“objectsid” == strProperty.ToLower())
    {
    item.SubItems.Add(GetTextualSID(de));
    }
    else
    {

    Technology, active directory, network security in general are passions of our JASEtech team. How smoothly does Active Directly integrate with the rest of your network and your daily work tasks? Let’s talk about how Active Directory can make your life easier.

    image credit: recyclethis.co.uk

  • Chain link fence

    In the news over the last week, names, birth dates, email addresses, and encrypted password hashes were stolen from Sega’s “Sega Pass” network.  (In other news, Sega still exists.)  Several weeks ago, 180 passwords were stolen from an organization called InfraGard that partners with the FBI.  Last month, over one million passwords were stolen from Sony and, shockingly, they were stored in the database in plain text.  In another story, Google was hacked by Chinese hackers, who obtained data on senior United States officials.

    These stories have become so frequent that it is almost possible to become numb to them.

    The Sony incident is probably the most interesting of these four.  There is no reason ever to store passwords in plain text – that’s just asking for something bad to happen.  If you never have a need to retrieve your user’s password (which is usually the case), then you should store a “hash key” – a sequence that is derived from the password.  (See our discussion of the cryptography services in .NET.)  A cryptographic hash function is a “one-way” function that can be used only to encrypt and, ideally, cannot be used to recover the original password other than by brute force hacking.

    Equally shocking about the Sony incident is that the data was obtained from a SQL injection attack – just three years after they experienced another SQL injection attack.  (Fool me once, shame on you; fool me twice, shame on me.)  SQL injection attacks are among the easiest problems to prevent.  A normal SQL query might look like this:

    SELECT * FROM tablename WHERE value = ‘abcd1234′

    In this example, “abcd1234” is data that the user provided in a form on your website.  In an injection attack, the hacker, instead of entering abcd1234, will “inject” code into the statement.  So they might replace “abcd1234” with something like this:

    abcd1234′ AND exists (SELECT * FROM sys.sysusers WHERE [name] like ‘a%’) AND ‘a’ = ‘a

    When this input is “injected” into the SQL statement, it results in:

    SELECT * FROM tablename WHERE value = ‘abcd1234′ AND exists (SELECT * FROM sys.sysusers WHERE [name] LIKE ‘a%’) AND ‘a’ = ‘a’

    A hacker could repeatedly submit queries like this and eventually derive all of the user names in the database (or table names, or column names, or server names, or any other data of interest).

    Injection attacks are completely prevented very easily through the use of bound parameters.  With a bound parameter, the query is changed to use a named variable like this:

    SELECT * FROM tablename WHERE value = @val

    The named variable is then “bound” to the value in question, so even if a user enters malicious data, that data is never executed.   (It is at least important to note that stored procedures sometimes use dynamic SQL and if you are calling such a stored procedure, you also need to ensure that you are not dynamically generating a query that is subject to injection.)

    What are some of the security issues you encounter?  Let us know in your comments.

    image credit: D. Sharon Pruitt

  • Magic 8 ballLast week, Microsoft previewed Windows 8.  We don’t know when it will be released.  Microsoft said in October 2010 that Windows 8 was then roughly two years away.

    The central feature previewed is the new “start” screen (shown in the video below), which is displayed when a user logs into Windows that allows the user to run applications specifically designed for Windows 8.  This interface is very much designed with touch screens in mind and at least vaguely resembles Windows Media Center.

    New Windows 8 apps have a “widget” interface that displays a small amount of information on the start screen itself and then launch into full screen mode.  Microsoft’s demo said that these apps are written in HTML5 and JavaScript, which could start to get rather limiting to developers.  This begs the question whether it will be possible to consume legacy components. Presumably, at least Silverlight will be available, but only a subset of .NET classes are available in Silverlight, to say nothing of using old C++ COM DLLs.

    Don’t be afraid that your pre-Windows 8 applications are going to stop working – the demo does show other applications (notably Excel) running in a separate interface that looks very similar to the existing Windows shell.  Other leaked screenshots seem to suggest that the regular Windows 7 interface – desktop and all – is still available.

    What do you think of the Windows 8 preview? Let us know in your comments!

    image credit: Rodolfo Clix

  • crashed carWhen an error occurs in your application, it creates an “exception” – a disruption to the normal course of execution of the program.  Most modern languages support a way to handle these exceptions – in .NET, there are three portions of an exception handling block – the try block, the catch block, and the finally block.  It is only required that you use either the catch or the finally block – you are not required to use both.

    So we would like to share with you some of the exception handling pitfalls we have seen:

    1. Make sure that if the code in your catch or finally block can fail, you have that code itself in a try … catch block. For instance, Microsoft’s own C# sample on the try-catch-finally page in MSDN makes me cringe a bit.  If there were somehow (perish the thought) the potential that the StreamReader .Close() method could throw an exception, then this exception handling block would not work.
    2. Should you be using a “using” statement instead of “finally”? In the aforementioned MSDN example, StreamReader implements IDisposable.  So it makes for tighter code to use “using” instead of a finally block.  With “using”, there is no chance that you can accidentally refer to the destroyed object later in your code.
    3. When an exception is thrown, it will get caught by the exception handler closest to the exception – regardless of how far away it is. For instance, suppose you are function that processes financial transactions.  During transaction #43, you need to prompt the user for additional information.  An exception is thrown reading the file the user provides.  If you trap the exception in this interior function, then you can prompt the user for another file.  If you don’t, then it’s going to go all the way up the stack until it finds a try block.
    4. Update your legacy VB exception handling code. In VB6, you had two options for error handling, both of which are maintained in VB.NET for backwards compatibility – On Error Resume Next, which means that when an error occurs, the application simply moves on to the next statement – and On Error GoTo labelname, which sends the error to a predefined location in code.  Both of these legacy methods of handling exceptions get translated into monstrous try … catch blocks when your application is compiled.
    5. Generally, place your exception handling inside of a loop, not outside of it. If you place the try … catch block outside of a loop, then you have potentially lost the looping variable, making it more difficult to report to the user a meaningful error.  You also lose the option of resuming your operation.
    6. The specific exception types are there for a reason – use them. If you conducting a file operation, trap FileIOException.  If you are conducting a web request, trap WebException.  Don’t just use Exception for everything.  Sometimes, the exceptions have meaningful information and don’t necessarily mean “error”.  For example, with some web servers, a redirect throws a WebException and the new URL is given at WebException.Response.ResponseUri.

    Want to talk to our eBusiness team about programming tips or how we can more efficiently handle your application build? Contact us here at our tech home on the web.

    image credit: Peter Suneson

  • When a .NET forms-based application is launched, the default behavior is to display it in a cascading fashion from the upper left corner of the screen down towards the middle.

    This is useful if you want to open multiple copies of your application, but less so if your users like to have windows arranged in a particular way.

    So we can easily add code to the Load and FormClosing events to store and reload the window position from the user settings.

    private void Form1_Load(object sender, EventArgs e)
    {
    // Restore the window state and size from the settings file
    if (((int)FormWindowState.Normal) ==
    Properties.Settings.Default.frmMainWindowState)
    {
    WindowState = FormWindowState.Normal;

    if ((Properties.Settings.Default.frmMainWidth > 0) &&
    (Properties.Settings.Default.frmMainHeight > 0))
    {
    Left = Properties.Settings.Default.frmMainLeft;
    Width = Properties.Settings.Default.frmMainWidth;
    Top = Properties.Settings.Default.frmMainTop;
    Height = Properties.Settings.Default.frmMainHeight;
    }
    WindowState = FormWindowState.Normal;
    }
    else if (((int)FormWindowState.Maximized) ==
    Properties.Settings.Default.frmMainWindowState)
    {
    WindowState = FormWindowState.Maximized;
    }
    }

     

    private void Form1_FormClosing(object sender, FormClosingEventArgs e)
    {
    Properties.Settings.Default.frmMainLeft = Left;
    Properties.Settings.Default.frmMainWidth = Width;
    Properties.Settings.Default.frmMainTop = Top;
    Properties.Settings.Default.frmMainHeight = Height;
    Properties.Settings.Default.Save();
    }

    This code worked great during the 1990s.  But what if your user is using their laptop at their desk with it hooked up to a second monitor, then they leave and your window is “stuck” on a monitor that no longer exists?  Before moving our window to outer darkness, we can use an API function EnumDisplayMonitors to make sure that this window position at least overlaps a monitor that currently exists.

    The attached class (EnsureWindowVisible.cs) uses this function in EnsureRectVisible to first check to see if the given window position overlaps at least one monitor and, if it does not, to grab the location of the first monitor and move the window onto it.

    We can modify our Load function to call EnsureRectVisible to validate that the window is going to be visible before displaying it:

    private void Form1_Load(object sender, EventArgs e)
    {
    // Restore the window state and size from the settings file
    if (((int)FormWindowState.Normal) ==
    Properties.Settings.Default.frmMainWindowState)
    {
    WindowState = FormWindowState.Normal;

    if ((Properties.Settings.Default.frmMainWidth > 0) &&
    (Properties.Settings.Default.frmMainHeight > 0))
    {
    int intLeft = Properties.Settings.Default.frmMainLeft;
    int intWidth = Properties.Settings.Default.frmMainWidth;
    int intTop = Properties.Settings.Default.frmMainTop;
    int intHeight = Properties.Settings.Default.frmMainHeight;

    EnsureWindowVisible.EnsureRectVisible(ref intLeft, ref intWidth,
    ref intTop, ref intHeight);

    Left = intLeft;
    Width = intWidth;
    Top = intTop;
    Height = intHeight;
    }
    WindowState = FormWindowState.Normal;
    }
    else if (((int)FormWindowState.Maximized) ==
    Properties.Settings.Default.frmMainWindowState)
    {
    WindowState = FormWindowState.Maximized;
    }
    }

    For this and other cool tech tips, contact our eBusiness Solutions team. We love talking cool, new, fun technologies and methods.

    image credit: Steve W

    Enjoy Your 30-day Free Trial!
    inbound marketing software free trial Learn how Inbound Marketing Software can help your business grow! 

    Click here to get started with your free trial.

  • WindowsIf the numbers from Netmarketshare are accurate, Windows 7 currently holds only a 23% market share.  XP holds a 55% market share.  Stunningly, there are still people using Windows 98 (0.03%) and Windows NT (0.19%).

    The lack of Windows 7 adoption to this point is not particularly surprising – adoption of new operating systems in large companies might not even begin until 18 months after release.

    With the public availability of the first Windows 7 service pack last month, the operating system has reached a step in its maturity that should help it see more adoption within the business community.

    Internet Explorer 9, which came out Monday, and supports HTML5, is not available for Windows XP.

    For the software engineer, wide-scale adoption of Windows 7 means that it is the fourth quarter for resolving compatibility problems.

    If anecdotal evidence is anything, not everyone is ready.  Purely from anecdotal evidence, here are a few of the top compatibility problems we have seen that coders have to resolve for Windows 7:

    1. Third-party toolkits. If you use a third-party toolkit in your software, you cannot just assume it will work or that the vendor is actively testing it.  Just last week, I found an issue with a major image processing toolkit from one of the larger vendors – even the current version of this particular toolkit, which came out less than a year ago, crashes when used on Windows 7.
    2. Registry security. For some reason, it used to be fashionable to open registry keys using the access right KEY_ALL_ACCESS.  This may be a recipe for failure in Windows 7 – you should only use the access level that you require.
    3. 64-bit problems. As we noted a few weeks ago, if you compile your .NET programs using AnyCPU (which is Visual Studio’s default), there is a good chance they will fail when you run on a 64-bit machine.  If you incorporate any C++ modules or if you ever make the assumption that pointers are 32 bits, you must make sure you compile as x86.
    4. DLL registration. In most cases, registering a DLL requires that a process be run with administrative rights.  If you register a DLL as a part of your install, you are probably ok.  But if you try to register it outside of an installer, you may have problems.
    5. Folder access. Don’t assume that you can write to the program files folder.  Data should be stored under the c:users folder and you can use the .NET function GetFolderPath() to get the location of the user’s application data folder.

    How ready are you for mainstream Windows 7 adoption?  Please share with us in your comments below.

    Photo credit: David Morris

    Enjoy Your 30-day Free Trial!
    inbound marketing software free trial Learn how Inbound Marketing Software can help your business grow!

    Click here to get started with your free trial.

  • plasma lampOne of the least appealing features of BASIC was that it was a weakly typed language.  “Weak typing” or “informal” typing means that the language lacks restrictions on declaring variables or that the language will implicitly convert variables behind the scenes.  This typing system can facilitate (or even encourage) sloppy coding or, worse, potentially hide serious problems from being caught during testing.  When Microsoft moved towards the .NET paradigm in the early 2000s, they began to clean up their fork of BASIC (Visual Basic) and make it into a language better suited to correct programming practices.  Its .NET sibling C# was introduced as a language that provided the ease of use of Visual Basic, but with the superior semantics of C++.

    One of the new features in C# in Visual Studio 2010 is the “dynamic” type.  This type behaves, well, dynamically.  It can be assigned any value or object.  Any function name may be called on it.  It may be passed as a parameter to any function. This necessarily means that any function involving a “dynamic” variable is late bound and not resolved until run time.  For instance, all three of the code segments below will compile, but only the first one will run without an error.

    dynamic str = “Hello world!”;
    MessageBox.Show(str);

    dynamic num = 42;
    MessageBox.Show(num);

    dynamic x = 15;
    x.HiThereThisIsNotReal();

    For obvious reasons, it is not a best practice to write code with “late binding” – if you make a mistake, the compiler has no way of knowing.

    Microsoft has a blog entry explaining the reason for the addition of this type – it allows you to easily consume legacy objects without mounds of code to handle antiquated constructs.  While this is all well and good, Microsoft introduced a similar feature in Visual Studio 2010 for C++ called “auto”.  With an “auto” variable, the actual type is automatically inferred at compile time based on the value assigned to the variable.  So suppose a C++ programmer writes these two lines of code:

    auto x = “hello”;
    x = 2;

    The second line is a compile error because the variable took upon itself the type of const char * when the first assignment occurred.  This provides the flexibility of not having to write confusing code for legacy interoperability, but maintains a strongly typed language.

    The moral of this story is that just because “dynamic” exists doesn’t mean that you have to use it.  Proper coding practices prevent problems.  It is important to remember that just because it compiles doesn’t mean it is right.

    This, and other tips, tricks and special methods, are only a small sample of how our software applications engineers stay on top of new technologies and can help make your applications easier to use for your staff and clients. Talk to our eBusiness Solutions team today.

    Enjoy Your 30-day Free Trial!
    inbound marketing software free trial Learn how Inbound Marketing Software can help your business grow!

    Click here to get started with your free trial.

  • Wednesday - January, 19, 2011

    .NET Code Obfuscation

    JASE Creative - - No Comments.

    An obfuscated wristwatch displaying the timeOne of the key features of the .NET is that assemblies (a fancy name for DLLs and EXEs) created in a .NET language are compiled to an intermediate step and use a common language runtime, or CLR, rather than being compiled to machine code.  This creates the downside of making it child’s play to reverse engineer a .NET program using the .NET Reflector.  This utility reads a compiled .NET DLL or EXE and displays the underlying source code.  This makes it far too easy for an unscrupulous person to steal trade secrets, hack license keys, or, worse, recreate your program as though they had written it.

    To clarify a point, .NET code obfuscation is NOT an issue for web-based applications (with a single exception – Silverlight).  Web-based applications are executed on your web server and they generate an HTML file that is sent to the user’s browser – the underlying .NET source code is not sent.  (Obviously, if you use Javascript in your web application, that code is sent, but Javascript obfuscation is an entirely separate topic.)  Now, we mentioned Silverlight.  Silverlight is a bit of an exception.  The guts of your Silverlight application are contained in a .xap file.  That file is actually just a plain old zip file.  You can rename it to have a .zip extension, open it up, and extract anything that interests you (including its CLR-based DLL).

    So what most programmers concerned with preventing their code from being stolen will do is to feed their assemblies to an obfuscator, for example, the Dotfuscator which is included with Visual Studio.  These programs make several changes to hide the intent of the code.  The first is obvious – they rename all function names and variables so that someone looking at it will not immediately realize its purpose.  Some will encrypt literal strings.  Others will change your code from using intuitive structures like for loops and switch statements to using confusing and hard-to-follow code sequences with lots of goto statements.

    An alternative is to place any particularly sensitive formulas in C++ DLLs.  In C++, you can turn off the common language runtime for an individual source file, resulting in the generation of machine binary code for that file.  (Even machine binary code can be reverse engineered, but at least it requires effort and isn’t something that you can do in thirty seconds with a free, widely available utility.)  Unfortunately, this can cause problems depending on your circumstances.  For example, applications using C++ modules require additional Microsoft run-time libraries, which can be annoying to install under certain circumstances (think one-click install).  But for environments that don’t have such restrictions, writing CLR-free C++ can offer you a good solution to keep your technology secure.

    For more about .NET code obfuscation and the .NET Framework in general, contact our eBusiness Solutions team of software engineers, database administrators, web application programmers, web developers, and systems engineers in their bat cave here.

    image source: tom purves on flickr

    Enjoy Your 30-day Free Trial!
    inbound marketing software free trial Learn how Inbound Marketing Software can help your business grow!

    Click here to get started with your free trial.

  • Adobe AcrobatIt comes up from time to time that we need to generate a PDF from within a .NET application.  There are plenty of PDF tools out there – free and paid.  Our favorite is one called iTextSharp.  Unfortunately, its developers recently changed its licensing model from the commercial use-friendly LGPL to the Affero GPL, which does not permit use on a public web server without releasing your own code under a similar free license.  However, older versions of the library can still be used under the old license and so we am using version 4.1.6 for our example.

    This toolkit provides a class called PdfStamper that allows you to set field values of a form-based PDF, then draw those fields to static text, in essence, “flattening” the form.  This gives you a very quick solution for generating a PDF for your users – you can create a form-based PDF in Adobe Acrobat Professional with fields as placeholders to be filled in programmatically.

    The example function below accepts a PDF form and an array of field names and values and will generate a “flattened” PDF that can be returned to users.

    /// <summary>
    /// Fills in the fields of a PDF
    /// </summary>
    /// <param name=”strInputFileName”></param>
    /// <param name=”strOutputFileName”></param>
    /// <param name=”arrInputFields”></param>
    /// <param name=”arrOutputFields”></param>
    private void GeneratePdf(string strInputFileName, string strOutputFileName,
    string[] arrFieldNames, string[] arrFieldValues)
    {
    // Verify that we have file names
    if (null == strInputFileName || null == strOutputFileName ||
    “” == strInputFileName.Trim() || “” == strOutputFileName.Trim())
    {
    throw new Exception(“Please provide input and output file names.”);
    }
    if (arrFieldNames.Length != arrFieldValues.Length)
    {
    throw new Exception(“The names and values arrays must match.”);
    }
    using (FileStream fileOut = new FileStream(strOutputFileName,
    FileMode.Create, FileAccess.Write))
    {
    PdfReader reader = new PdfReader(strInputFileName);
    PdfStamper stamper = new PdfStamper(reader, fileOut);
    AcroFields fields = stamper.AcroFields;
    // Fields on the form will be rendered as text
    stamper.FormFlattening = true;

    for (int i = 0; i < arrFieldNames.Length; i++)
    {
    fields.SetField(arrFieldNames[i], arrFieldValues[i]);
    }
    stamper.Close();
    }
    }

    This, and other tips, tricks and special methods, are only a small sample of how our software application engineers can help make your applications easier to use for your staff and clients. Talk to our eBusiness Solutions team today.

    Enjoy Your 30-day Free Trial!
    inbound marketing software free trial Learn how Inbound Marketing Software can help your business grow!

    Click here to get started with your free trial.

  • software development

    JASE offers web application programming expertise in building enterprise solutions for inventory control, shipping processes, Intranet and Extranet portals, eCommerce websites, secured transactions and communication, scheduling, or customer satisfaction tracking.  You name it – the JASE team can build it to help your company be more effective and efficient.

    JASE can improve your existing database efficiency or design a new, scalable SQL Server-based solution to fit your needs. You can track client activity, website views and details. JASE also creates the ability to increase your company website’s download speeds for faster access to the information you need and use.

    Let JASE Digital Media help with your technology & software development needs

    JASE’s programing and database technology experience includes ASP.NET, PHP, Visual Basic .NET, C#, SQL Server, and integration with third party toolkit technologies.

    In addition, JASE Digital Media offers several complimentary services for your convenience such as, website hosting, email hosting, blog hosting, database hosting and desktop support.

    JASE can work with your existing technological platform or work to build a new system to fits your needs. Contact JASE for a free consultation and estimate.

    image credit: mob warner of flickr