Posted by W3Avenue Team on Oct 27, 2009 in
Javascript |
View Original Article
SimpleModal is a lightweight jQuery plugin that provides a simple interface to create a modal dialog. The goal of SimpleModal is to provide developers with a cross-browser overlay and container that will be populated with content provided.

Because SimpleModal is more of a modal dialog framework; by default it will create very basic, unstyled, modal dialogs. Styling can be done through external CSS or through properties in the options object. It also provides 3 callback options: onOpen, onShow and onClose; allowing you to completely customize the behavior and functionality of the modal dialog.
Developed by Eric Martin; SimpleModal jQuery Plugin is available for download under GPL & MIT License. You can find further information, demos & download on SimpleModal Website.
Similar Posts:
You can also stay updated by following us on Twitter, becoming a fan on Facebook or by subscribing to our FriendFeed.
Tags: Eric Martin, GPL, jquery, MIT License, Window/Popup/Tooltip
Posted by K. Scott Allen on Oct 27, 2009 in
Dotnet |
View Original Article
I’m looking at 5-7 files of data in CSV format. The columns and format can change every 3 to 6 months. What I wanted was a strongly type wrapper / data transfer object for all the CSV file formats I had to work with, and I thought this would be a good opportunity to try a T4 template.
If you haven’t heard of T4 templates before, then it is a technology that is worth your time to investigate. Hanselman has a pile of links in his post T4 (Text Template Transformation Toolkit) Code Generation – Best Kept Visual Studio Secret.
Each CSV file I’m working with has a header row:
PID,CaseID,BirthDate,DischargeDate,Status …
1001,2001,1/1/1970,6/1/2009,Foo …
… and so on for ~ 100 columns.
I wanted a template that could look at every CSV file it finds in the same directory as itself and create a class with a string property for each column. The template would derive the name of the class from the filename. Here’s a starting point:
<#@ template language="c#v3.5" hostspecific="true" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Collections.Generic" #>
using System;
namespace Acme.Foo.CsvImport {
<#
foreach(var fileName in GetCsvFileNames())
{
var fields = GetFields(fileName);
var className = GenerateClassName(fileName);
#>
public class <#= className #> : ImportRecord
{
public <#= className #>(string data)
{
var fields = data.Split(',');
<# for(int i = 0; i < fields.Length; i++) { #>
<#= fields[i] #> = (fields[<#= i #>]);
<# } #>
}
<#
foreach(var field in fields) { #>
public string <#= field #> { get; set; } <#
} #>
}
<# } #>
} // end namespace
<#+
private string GenerateClassName(string fileName)
{
return Path.GetFileName(fileName).Substring(0,2)
+ "_ImportRecord";
}
private string[] GetFields(string fileName)
{
using (var stream = new StreamReader(
File.OpenRead(fileName)))
{
return stream.ReadLine().Split(',');
}
}
private IEnumerable<string> GetCsvFileNames()
{
var path = Host.ResolvePath("");
return Directory.GetFiles(path, "*.csv");
}
#>
The template itself needs some polishing, and the generated code needs some error handling, but this was enough to prove how easy it is to spit out type definitions from a CSV header:
public class AA_ImportRecord
{
public AA_ImportRecord(string data)
{
var fields = data.Split(',');
ID = fields[0];
CaseID = fields[1];
BirthDate = fields[2];
}
public string ID { get; set; }
public string CaseID { get; set; }
public string BirthDate { get; set; }
// ...
}
What I Learned
- If you want to use the C# 3.5 compiler and LINQ features, make sure to use the correct template and assembly directives. Oleg Sych has the details: Understanding T4: <#@ template #> directive.
- When the template runs it is an object derived from the TextTransformation class. Oleg’s post that I linked to above also has details on this magic. Use the <#+ #> syntax to add members (a.k.a helper functions) to the class definition for this object.
- The Host property is of type ITextEngineTemplatingHost. You can use the Host to log errors, find referenced assemblies, and more. In the template I had to use Host.ResolvePath to get the absolute path to the directory where the template file lives.
- The biggest issue I had was using <# and #> instead of <% and %>, and <#= #> instead of <%= %>. I created at least 100 errors because my fingers are trained for ASP.NET views instead of text templates.
Posted by 4GuysFromRolla.com Headlines on Oct 27, 2009 in
Dotnet |
View Original Article
Each series in a chart is composed of a set of data points, which are modeled via the DataPoint class. For most chart types, the two key attributes of a data
point are its X and Y value. For example, in a line chart the X value indicates the position of the data point along the X axis, while the Y value represents
the position of the data point along the Y axis. Ditto for a column chart, although it may help to think of the Y value as the height of the column.
In addition to X and Y values, data points can include additional bits of information, including an associated URL. As you would expect, when a data point has an associated
URL it becomes click-able in the rendered chart image, and clicking the data point whisks the user to the specified URL. By specifying URLs, it's possible to create drill
down reports, which are reports that let the user click a particular data point in a chart to explore its details.
This article examines how to build drill down reports. Specifically, we'll walk through two demos that display the same data using a column chart. The charts' X axes list
the categories in the Northwind database's Categories table, with the height of each category's column indicating the number of products associated with said
category. Clicking on one of these columns in the chart takes the user to a second web page, which displays a grid showing the products that belong to the selected
category. The second demo enhances the chart to display the corresponding category's products when hovering the mouse over the category column.
Read on to learn more!
Read More >
Posted by Mehul Harry (Developer Express) on Oct 27, 2009 in
ASP.Net,
Dotnet |
View Original Article
Check out the CodeRush Metric Shader plugin video with Rory Becker. Rory’s created for you another useful plugin that helps you visualize code metrics!
Check out the video to see what I mean:
Then, be sure to leave us a comment below with your thoughts, questions or just praise for Rory.
DXperience? What's That?
DXperience is a royalty-free tool suite for rapid business application development for WinForms and ASP.NET apps.
Instantly enhance your WinForms and ASP.NET apps by dropping in new feature sets encapsulated in components. DXperience contains:
- IDE Productivity Tools - Make Visual Studio easier and more effective with IDE enhancements
- DXCore - IDE tools extensible engine
- CodeRush - Extensible swiss army knife of tools to make source code editing faster and easier, including code editing templates, code editing utilities (selection, navigation, clipboard), inline code visualizations and the upcoming unit test runner.
- Refactor Pro - Code editing tools specifically geared for refactoring source code.
- XAF - Business app framework for WinForms and ASP.NET
- XPO – Object-relational mapping for .NET
- Reporting - Reporting "platform" for WinForms and ASP.NET
- UI Components for WinForms, ASP.NET, WPF and Silverlight
Try a fully-functional version of DXperience for free now: http://www.devexpress.com/Downloads/NET/

Tags: CodeRush, DXCore, plugin, screencast, Video
Posted by Amy Blankenship on Oct 27, 2009 in
Flex |
View Original Article
I always enjoy Jesse Freeman's Flash Art of War column, and this week's, "Dynamically Creating(/Instantiating) Classes from XML," was especially intriguing. The thing that stuck out to me about that post is that if you are creating objects dymanically, you...
Tags: Blogs, designpatterns
Posted by RJ Owen on Oct 27, 2009 in
Flex |
View Original Article
“Quality Function Deployment,” or “QFD,” is a way of modeling business processes for good customer experiences. Sound like a lot of business jargon? Maybe it is, but it’s also very similar to something we in the interactive space are reinventing and rediscovering as “User Experience Design.” QFD was developed in the ’70’s and ’80s and continues to be refined today. In this entry we'll focus on requirements, and how QFD justifies the role of UX professionals in finding ways to wow users.
Tags: Blogs, qfd, UX
Posted by Silverlight Team on Oct 27, 2009 in
Pega Systems,
Silver Light |
View Original Article
Expression Web makes it faster and easier to create standards-based Web sites with rich Silverlight content. With Expression Web 3, you can easily add Silverlight content, in this case from Expression Blend, to your Web sites.
In this example, we’ll be adding a navigation menu bar and interactive slide show to the Web site by inserting this Silverlight content into an Expression Web page.
Users who come to your site will see your Silverlight 3 content as long as they have the Silverlight 3 Plugin; users who do not have the Silverlight 3 Plugin will be prompted to download it.
Modifying the Layout to Fit the Silverlight Content
HTML and CSS layouts are based on a box model and it’s important to keep this in mind when you plan to add Silverlight content. Silverlight content is imported into your pages with a fixed width and height and if the size of the Silverlight file is larger than the container it’s being added to it, may break the layout, become clipped or in some way create visual problems. Therefore, when possible, you should set the width and height of the container area in your web page to match the width and height of the Silverlight content.
In this case, we’ll modify the topnav div container for the page so that it is sized the same as the Silverlight content. First, I’ll select the div.
With Expression Web’s CSS Properties tab, I can display the CSS properties for this div. Although there are dozens of possible CSS properties, many of them will be empty; to make it easier to find the values for this particular container, I can change the way Expression Web displays the properties.
In the CSS Properties panel, I can click the third icon to show just the Set properties on top. This will sort only those properties that have a value to the top, in this case: background-color, height and width.

I’ll change the value for the div’s height by just clicking on it and typing, in this case, 418px. The Silverlight content has dimensions of 980 pixels wide by 418 pixels high. So this area now matches in size.
Inserting Silverlight Content
Now, I can choose Insert> Media> Silverlight from Expression Web’s menu and a window appears asking to select a Silverlight XAP file. In this case, I’ll select the Lucerne_navheader.xap file and then click Open.
I can also just drag and drop the Silverlight control from the Toolbox into the topnav div.
When you insert Silverlight content into a web page, Expression Web creates an inline frame to contain the Silverlight content and displays a blank placeholder.
Now, we need to set the width and height of that inline frame.
Click on the Silverlight placeholder to select it and then click on the tag Properties panel. You will see attributes for data, height, type and width. The height and width properties are set to default values of 480 and 640. This should be changed to match the size of the Silverlight content.
So, I’ll change the size of the placeholder to match the Silverlight content.
The Silverlight placeholder will now have expanded to fit the topnav section.
Once I’ve saved the Web page and CSS file, I can preview the Web page in the browser.
To preview your page in the browser press F12 or choose File > Preview in Browser.
Depending on which browser you are using and your security settings, you may need to allow the browser to run the Silverlight content.
The Silverlight content will appear in the top half of your page as an animated slide show as well as an interactive navigation bar.
For more information on how to add Silverlight content to your Web site, here is a set of tutorials that covers this example.
For a free 60-day trial of Expression Web 3, click here.
Please tell us what you think about Expression Web 3.


Tags: Application Packaging, Beautiful Examples, Product/Technology Deep Dive, ria, Silverlight, Virtualization
Posted by Jeff Smith on Oct 27, 2009 in
Database,
SqlServer |
View Original Article
... or is about time I got back to some blogging?


Posted by Michael Epstein on Oct 27, 2009 in
Flex |
View Original Article
Yesterday Adobe and Salesforce.com announced the preview release of Adobe Flash Builder for Force.com. It's an integrated development environment (IDE) designed to simplify the building of Flex or AIR applications that interact with back-end Force.com data and services.
Tags: flexflashair, News & Events, salesforce