REQUEST A DEMO

Author: Sam Tyson

Senior Software Engineer

Sam Tyson
Sam Tyson
About:

Sam works in many different roles, including software design/development/support, testing, documentation, administration, web design, and management. Most focus is on web application development and maintenance.

 

Expertise

jQuery, HTML, JavaScript, Usability, CSS, Certified Scrum Master (CSM), C#, VS.NET, ASP.NET, ASP, XML


Subscribe to Sam Tyson's RSS feed and never miss a post.

Posts by Sam Tyson:

Using jQuery to Sort a List

August 25, 2009 I needed to add a new feature today, and wanted an easy client-side solution. Since I use jQuery in the project already, I searched and found a good starting point in a blog post by Bill Richards.   The code I found adds a function and a sort handler that can be applied to a list.   jQuery.fn.sort = function() {     return this.pushStack( [].sort.apply( this, arguments ), []); }; function sortAlpha(a,b){     return a.innerHTML > b.innerHTML ? 1 : -1; };     Here is a simple example of the HTML I am working with:   <ul id="caseListing"> <li> <div id="1"> <a href="/Cases/Show/1">Case 1</a>: need help with VPN connection </div> </li> <li> <div id="3"> <a href="/Cases/Show/3">Case 3</a>: blue screen of death upon login </div> </li> <li> <div id="6"> <a href="/Cases/Show/6">Case 6</a>: Computer has no power </div> </li> </ul>    …

Using SqlHelper in a .Net application

June 24, 2009 In the Dovetail SDK, there is a very useful SqlHelper class. SqlHelper provides a convenience and data provider-agnostic wrapper around ADO.NET. This allows an application to execute SQL commands in a database.   SqlHelper has various ways of being initialized, which all depend on a DbProvider instance to make a connection to the database. In most applications the DbProvider is separately instantiated based on configuration, so the examples here will not detail that process.   SqlHelper can execute a variety of SQL commands. SQL SELECT statements are usually performed by the ExecuteDataSet method. The ExecuteNonQuery method can be used to perform other SQL commands such as UPDATE or DELETE statements. ExecuteScalar is used frequently to get a value returned from a SQL statement for use later in the application.   public void SqlHelper_example() {     var sqlCommand = "select title, id_number from table_subcase";    …

Getting Dates Localized in Dovetail Agent

March 3, 2009 The abilities to have global users and a centralized server is an important feature of Dovetail Agent. Making localized date handling for all of the users is an important part of getting the right date format displayed to the users, and making sure the dates are stored correctly in the database. Dovetail Agent recognizes the computer and browser settings for each user. Dovetail Agent allows each user to input dates in their localized date format, and relies on Dovetail SDK to convert the dates into a consistent format for storage in the database.   Regional Options From the Control Panel for each client, the Regional Options tab of the Regional and Language Options has a big impact on Dovetail Agent functionality. Dovetail Agent uses the standard Visual Basic FormatDate routine, which uses the Regional settings to determine the client's preferred…

jQuery 1.3 is now official!

January 14, 2009 jQuery just released its latest version, and celebrates its 3rd birthday as a JavaScript Library. The big features of this release are: Sizzle: A sizzlin’ hot CSS selector engine. Live Events: Event delegation with a jQuery twist. jQuery Event Overhaul: Completely rewired to simplify event handling. HTML Injection Rewrite: Lightning-fast HTML appending. Offset Rewrite: Super-quick position calculation. No More Browser Sniffing: Using feature detection to help jQuery last for many more years to come.   jQuery at Dovetail Software Almost all of our current development projects are using jQuery, so upgrading to the new version to take advantage of the new features and performance will be an exciting improvement. The performance gains in the selector engine and HTML injection should help us improve our software. The benefits of using jQuery is already apparent, and we continue to use it more…

Announcing a New Product Release…

January 12, 2009 This is always a good sign for a software company, and here at Dovetail Software this has just become an easier task. It is important for us to get the news about a new product release to our customers. By automating some of the steps in this task, we can get the information to the customer faster, and also add some business value to the process. Now when a new release is ready, we can use the new Product Announcement tool to prepare the message for our customers. Opening this application from within our in-house version of Dovetail Agent, we can see a list of all of our products that are currently under contract with any of our customers. Clicking on one of the products will retrieve all of the customers under contract, and show a second grid filled with…

Getting Things Done – with Dovetail ArchiveManager (DIET)

October 24, 2008 I am currently working on a project where I need to take a database from empty to usable with a script file. I am at the point where I need to import data files, and the data files I need to import don't exist. The customer has the data, and luckily they have a tool to create nice, tidy data files for me - Dovetail Software's Data Import Export Tool (DIET).   The challenge for me is to make it easy for them to use DIET, so I can get the data files that I need.   DIET is the perfect tool for the job, because it is designed to do exactly what I need. I need data from three related tables in the database for this file, so I created a directives file to specifically control what information to…

Run-Time Query Parameter Evaluation

September 22, 2008 Overview One of the new features coming soon in Dovetail Agent 4.1 is the enhanced capability of using parameters in fcQuery that will be evaluated when a query is executed. This allows queries to be designed with much more flexible structure. Dates are a very important parameter to be evaluated at run-time, and being able to build the query to do this automatically keeps the user from having to enter the date manually when running the query. Queries can be created to look at specific date-oriented information (i.e. This Week) without having to change to values of the date parameters each time the query is run. Shared queries are also a very easy place to see where run-time evaluation of a query parameter will be helpful. For example, if a query is created (and shared to all users) to find…

Spell Check feature added to Dovetail Agent

August 26, 2008 As part of the continuous effort to enhance and improve our applications, a new Spell Check feature was added for the next release of Dovetail Agent. This feature was added for every text area input in the pages of Agent. Currently there are almost 100 different pages in Dovetail Agent that use text area controls. Adding the new functionality to every page individually would be one way of implementing the change, but certainly not the most efficient. Instead, the new functionality is added dynamically to each page as it is opened in the browser. This approach makes a lot of sense. Since the code that adds the link under each text area is contained in one file, any future modifications will be very easy as well. The Spell Check feature is made available to the user by adding a Check…

Opening View Objects from Query Results

August 7, 2008 In Dovetail Agent, it is very easy to build a query against a table in the database, and there are standard routines to open most of the table objects to view the items returned in the query. Drilling down to view objects is a little tougher, but it can be done in a few easy steps. In this example, I will show you how to build a query object for the queelm_case view, which will allow us to open each of the cases in the queue for inquiry. Building the fcQuery object in Dovetail Admin is the first step, so follow along. After logging in to Dovetail Admin, click on the fcQuery Objects menu link to open the Manage fcQuery Objects page. Typing in queelm_case and clicking the List button locates the view object, and double-clicking the queelm_case row will…

jQuery = Simplification

July 11, 2008 I came across this code today, and it took me a second to figure out what it was doing: strSortOrder = document.getElementById("ad").options[document.getElementById("ad").selectedIndex].value; To break it down, it locates a Select control on the page (FindElementById), finds the element again and gets its selected value's index (selectedIndex), and sets the variable to the value of the option at the specified index (options[index].value). There is a jQuery plugin that really simplifies this process. Using jquery.selectboxes.js, the code now is as simple as this: strSortOrder = $("#ad").selectedValues(); This code now does the same thing, but it is also easy to read, and understand. It shortened from 86 characters to 26, and now requires no explanation. There are many different cases where jQuery can simplify the code.