Skip to main content

Posts

Showing posts from November, 2005

try ruby! (in your browser)

Got 15 minutes? Give Ruby a shot right now!

This tutorial is only partway complete.. but it's getting better! Now you can hop chapters, you know? That's decent!

Ruby is a programming language from Japan (available at ruby-lang.org) which is revolutionizing the web. The beauty of Ruby is found in its balance between simplicity and power.

Video Series: Visual Web Developer for Beginners

This video series is designed specifically for individuals who are interested in learning the basics of how to create dynamic Web applications using ASP.NET 2.0 and Visual Web Developer 2005 Express Edition in either Visual Basic or C#. The series includes over 6 hours of video-based instruction that walks you through creating and deploying your first Web page to creating a fully functioning Quiz Engine Web site.

Mondrian Ruby IDE

Mondrian is a cross-platform project-manager and editor for the Ruby language. Written in 100% native Ruby using the FOX GUI toolkit, Mondrian has the familiar look and feel of a modern IDE while remaining dedicated to the uniqueness of the Ruby language and its community. Some features include:

* a dynamic object browser
* runtime error integration
* a full-featured project manager
* syntax highlighting
* runs identically on Windows and Linux

Using System.DirectoryServices to Configure IIS

System.DirectoryServices can be used to get and set String and DWORD properties in the IIS metabase, and invoke most methods. However, you cannot perform the following tasks unless you are using Windows XP Professional with Service Pack 2 or Windows Server 2003 with Service Pack 1. Doing so results in errors like "The directory cannot report the number of properties":

OTRS::Email Management::Trouble Ticket System::Welcome!

OTRS is an Open source Ticket Request System (also well known as trouble ticket system) with many features to manage customer telephone calls and e-mails. The system is built to allow your support, sales, pre-sales, billing, internal IT, helpdesk, etc. department to react quickly to inbound inquiries. Do you receive many e-mails and want to answer them with a team of agents? You're going to love the OTRS!

Web service test data generator

Description

TestOracle is a very powerful program that allows developers to quickly generate test data for their web-services before publicly or internally releasing the web service for production. Having a code tested has many intrinsic advantages, including less buggy code and reduced time in fixing and finding these bugs later. There are many products in the market today to automate generating test data, including DataTect. However, some of the major disadvantages and limitations of all these commercially available products make TestOracle a unique-first of its kind-product. For instance, commercial program are not only expensive (at least $600+ per license) but are also limited to producing only scalar data (i.e. records of a database table), and thus can not produce data for complex data objects. Complex objects include are formal function parameters, which can include complex n-level object hierarchy(s).

Nini: Manual - Storing configuration data in a database

Nini: Manual: "5.2 Storing configuration data in a database

If you are running an ASP.NET application then you probably have multiple users in each system. You will probably also have a bunch of user settings to edit. Most web applications are entirely configured with a database so the following is an example of using Nini along with your database.

Here's a very simple example with a SQL Server table. This can easily be adapted to any other database. Here is the structure of the database table:

CREATE TABLE UserSettings
(
UserId ID,
Settings TEXT
);

The ConfigSettings field stores a Nini configuration value. Now you can load a Nini configuration values like this:

string userId = GetUserId(); // retrieve the user id somehow

SqlCommand command = new SqlCommand('SELECT Settings FROM UserSettings WHERE ID = '
+ userId, connection);

connection.Open();

SqlDataReader reader = command.ExecuteReader();

if(reader.HasRows) {
reader.…

Visual Studio 2005 Web Deployment Projects (Beta Preview)

Visual Studio 2005 Web Deployment Projects (Beta Preview)

Visual Studio 2005 Web Deployment Projects provide additional functionality for building and deploying Web site applications that you create in ASP.NET 2.0 and Visual Studio 2005. This add-in includes a new tool that enables you to merge the assemblies created during ASP.NET 2.0 precompilation, and it provides a comprehensive UI within Visual Studio 2005 for managing build configurations, merging, and pre-build and post-build task using MSBuild.

Using Visual SourceSafe for ASP.NET--Start to Finish

Use Labeling for Your Versions of Software
Instead of relying on these internal version numbers that SourceSafe assigns to files, you will most likely want to create your own "label" for a set of code that defines a release for your software. A release could be your first beta milestone, your first version of the product, an incremental release, or the second, or third release of a product.
Each file will get its own internal version number, and depending on how often a file is modified, these numbers will never match up across a whole project. So instead you can apply your own label to a complete project to identify all of the files checked in at the point in time when you create this label.

You might create a label (up to 31 characters) with the text: "1.0," "2.01b," "Final Beta," or "Approved for QA." After you apply a label, you can retrieve all the files associated with this label from the History dialog box. While individual fil…

Web Services Made Easy with Ruby

It's easy to develop Web services using Ruby. This article looks at how to develop a Web service client to access the Web services that are hosted in the Internet and how to develop a Web service with simple steps using Ruby.

Automated Smart Client Deployment and Update - Today and Tomorrow

Smart client application architecture is gaining ground as a replacement for many intranet and some internet web applications. Smart client architectures have many considerations that you need to take into account to build a well robust, reliable, scalable, performant, and secure app. However, building the application is only part of the battle. Once you get the smart client application designed and tested along with its supporting middle tier components, you need to deploy the application to client machines and support it with (possibly frequent) updates while it is there. This article will discuss some of your options, including capabilities that exist today with .NET 1.1 such as Windows Installer, No Touch Deployment, and the Updater Application Block, as well as those that will soon arrive with the release of .NET 2.0, specifically ClickOnce.

Using the Ruby Development Tools plug-in for Eclipse

Why Ruby?

Why would any self-respecting Java developer care about Ruby? Ruby is a general-purpose scripting language created 10 years ago in Japan. Contrary to popular belief, it is a pure object-oriented language. Unlike Java technology, Ruby has no scalars, so everything, including integers, are first-class objects. Ruby's syntax borrows heavily from Smalltalk, Python, and Ada. Like the Java programming language, Ruby is a single inheritance language, but it offers some advanced features that Java technology does not, such as closures (think anonymous inner classes on steroids) and mix-ins (similar to interfaces, but less tightly bound to the class). Ruby is also highly portable, running on all major operating systems.

Ruby is also red-hot right now. People are starting to use it for the types of applications where it excels. Because it is interpreted and uses dynamic typing, you can do all sorts of magic tricks at run time that are very difficult in Java. One of the surprising …

Hack the Build: Programmatically Converting Older VS .NET Projects to MSBuild

<a href="Hack the Build: Programmatically Converting Older VS .NET Projects to MSBuild <br /> <br />Jomo Fisher--There are plenty of reasons you might want to programmatically convert projects from VS .NET 2003 format to MSBuild format. Maybe you have a bunch of old .csproj files and you'd like to convert them in batch. Maybe you'd like to keep your projects in VS7 format and convert them to MSBuild format on the fly. These are definitely Hack-the-Build-worthy pursuits, so let's dig in. <br /> <br /> <br /> <br />MSBuild ships with an assembly called Microsoft.Build.Conversion.dll which contains the code that Visual Studio .NET 2005 uses to convert older C# and VB projects into MSBuild format (unfortunately C++ is not supported). <br /> <br /> <br /> <br />The code for calling this API is so simple, I can paste it right here: <br /> <br /> <br /> <br />/* <br /> <br />…

MSBuild Wiki

Visual Studio 2005 will radically improve the software build process with the introduction of Click to read this topic

4/28/2005 11:23:10 PM - Neil
MSBuild. This new build platform:

Will deliver an XML-based file format that is well-documented and backed up by a published XML schema definition,
Will be a core component of the .NET Framework redistributable (i.e. will not require VS for build lab scenarios),
Will allow developers to customize, augment or completely redefine the build process, and
Will provide seamless integration with the Visual Studio 2005 IDE.

JIS : Rake - Ruby Build System

JIS : Rake - Ruby Build System: "The main task is build. It is defined by the call task :build. Then we pass an array of dependencies to task that :build depends on (in this case only one “:clean”). Then we simply shell (sh) out to csc to build everything for me. Not much different from a BAT file in its current state. Here is a piece of my real build that handles versioning...

task :version_main do |t|
versions.transaction do |o|
v = versions['main'].increment
File::open('Main.AssemblyVersion.cs', 'w') do |av|
av.write '[System.Reflection.AssemblyVersion(\'#{v.major}.#{v.minor}.#{v.build}.#{v.revision}\')]'
end
end
end

task :version => [:version_main] do |t|
print 'Everything versioned'
end

The versions variable is an instance of PStore. It is a hashtable that holds a bunch of Version objects for each project. It is pretty similar to the tag in NAntContrib as I show it above. But the …

NAnt - Conditional Execution

NAnt - Targets: "Conditional Execution

A target also has the ability to perform its execution if or unless a property has been set. This allows, for example, better control on the building process depending on the state of the system (OS, command-line property defines, etc.). To make a target sense this property, you should add the if or unless attribute with an expression that the target should react to. For example:





If no if and no unless attribute is present, the target will always be executed.

Note: the dependencies of a target are always executed before testing the target's condition."

Steve Hebert's Development Blog : NAnt-ing my database build

I finished the process of performing my database build using NAnt (actually NAntContrib). I dusted off an old class library I used with a .Net plug-in I built for automating the database build and modified it so it could handle the NAnt.Core.Project object for floating messages, warnings and errors.

Our database project under VS contains all of our stored procs, functions and trigger scripts (among others). Each script is responsible for testing if the contained object currently exists and takes appropriate steps. Because the processing is order-critical, I've created an XML file format that enforces creation order and also allows for individual files or entire projects to be processed using a given line.

I could have gotten this to run using only my class library instead of NAntContrib's SourceSafe additions (for grabbing the BuildScript), but I'll need some of NAntContribs functionality beyond the database build. My NAnt script does the following:

Nant build files using his style sheet

Gordon Weakliem has some good info on using VS.Net and NAnt:

http://radio.weblogs.com/0106046/stories/2002/08/10/supportingVsnetAndNant.html


He also has a Nant build script to convert existing VS.Net projects into Nant build files using his style sheet:
http://radio.weblogs.com/0106046/VSConvert.xsl


Jeffrey McManus on when and why to use Nant over VS.net:
He also has a Nant build script to convert existing VS.Net projects into Nant build files using his style sheet:


http://www.ondotnet.com/pub/a/dotnet/2003/01/27/nant.html?page=1


Using NAnt you can also tie your build process into a daily build tool such as CruiseControl.Net(http://www.continuousintegration.net/)


Just some options for those that dislike the VS.Net 1.0 build features :-)

Hippo.NET BuildFile Builder Beta

The Hippo.NET BuildFile Builder will generate NAnt buildfiles, bases upon Visual Studio project files. This tool will become integrated in the Hippo.NET Build Tool which can be used to automate the build process in team environments. If you want to be informed about updates or you want to give feedback, report bugs, ... visit my weblog (RSS Feed).

15 Seconds : Automated Deployment for Side By Side .NET Web Apps for Visual Studio .NET 2003

I had been asked by a client to find a way to "silently" auto-deploy a web app to a remote server everyday as a result of a daily build process. The objective of this was to regularly deliver the application to a testing team for regression testing. I decided I wanted to use MSI (Windows Installer) 2.0 technology to do it, mainly because that's what is built in to the Visual Studio .NET 2003 deployment projects. There was also the requirement to have multiple versions of the same application auto-deployed to the web server, with only one version being active at any given time, and a simple way to switch between versions. This is what the Web Server would look like:

Expose MSN Messenger Events Using C#

Tutorial on how to use the MSN Messenger API in C#. This includes a fix for exposing the events of Messenger so that developers can have full function of the API as in COM based development environments. The article keeps it quite simple and shows how a developer could receive email alerts and chat session text.

Running Transact-SQL Script Files Using osql

Accessing and Changing Relational Data
Running Transact-SQL Script Files Using osql

Topic last updated -- January 2004

You can use osql to execute database script files, which are text files containing a mix of Transact-SQL statements and osql commands. osql works with the statements and commands in the script file in a manner very similar to how it works with statements and commands entered interactively. The main difference is that osql reads through the input file without pause instead of waiting for a user to enter the statements and commands.

There are different ways to create database script files:

* You can interactively build and debug a set of Transact-SQL statements in SQL Server Query Analyzer, and then save the contents of the Query window as a script file.

* You can create a text file containing Transact-SQL statements using a text editor such as notepad.

* You can use SQL Server Enterprise Manager to generate scripts for creating objects in a database. For …

BULK INSERT

Copies a data file into a database table or view in a user-specified format.
Syntax

BULK INSERT [ [ 'database_name'.] [ 'owner' ].] { 'table_name' FROM 'data_file' }
[ WITH
(
[ BATCHSIZE [ = batch_size ] ]
[ [ , ] CHECK_CONSTRAINTS ]
[ [ , ] CODEPAGE [ = 'ACP' | 'OEM' | 'RAW' | 'code_page' ] ]
[ [ , ] DATAFILETYPE [ =
{ 'char' | 'native'| 'widechar' | 'widenative' } ] ]
[ [ , ] FIELDTERMINATOR [ = 'field_terminator' ] ]
[ [ , ] FIRSTROW [ = first_row ] ]
[ [ , ] FIRE_TRIGGERS ]
[ [ , ] FORMATFILE = 'format_file_path' ]
[ [ , ] KEEPIDENTITY ]
[ [ , ] KEEPNULLS ]
[ [ , ] KILOBYTES_PER_BATCH [ = kilobytes_per_batch ] ]
[ [ , ] LASTROW [ = last_row ] ]
[ [ , ] MAXERRORS [ = max_errors ] ]

Directory Class: calculate the size of a directory

[C#]
// The following example calculates the size of a directory
// and its subdirectories, if any, and displays the total size
// in bytes.

using System;
using System.IO;

public class ShowDirSize
{
public static long DirSize(DirectoryInfo d)
{
long Size = 0;
// Add file sizes.
FileInfo[] fis = d.GetFiles();
foreach (FileInfo fi in fis)
{
Size += fi.Length;
}
// Add subdirectory sizes.
DirectoryInfo[] dis = d.GetDirectories();
foreach (DirectoryInfo di in dis)
{
Size += DirSize(di);
}
return(Size);
}
public static void Main(string[] args)
{
if (args.Length != 1)
{
Console.WriteLine("You must provide a directory argument at the command line.");
}
else
{
DirectoryInfo d = new DirectoryInfo(args[0]);
Console.WriteLine("The …