Joseph Guadagno

Rants, Raves and other stuff about ASP.NET development.

October 2007 - Posts

Expresso, A .NET Regular Expression Development tool you should not be without.

A while ago I decided to implement URL Rewriting for the next version of my web site using URLRewriter.NET (http://www.urlrewriter.net).  While implementing URLRewriter was a easy task, creating the correct regular expressions, at least for me, was not.  In the past I used RegExDesigner.NET to test my regular expressions in "trial and error" sort of way. This was OK to eventually come up with a valid expression but it did not help me understand what was wrong with my regular expressions.  So I went to Google to find a new tool or web site to help.  I searched around and tried a few different Regular Expression tools for .NET, then I found Expresso, not the coffee kind but a real development tool.

This is one tool that is difficult to develop without.

What Expresso does

The Expresso interface is quite nice and simple to use.  The interface has two modes, test mode and Design Mode.  Test mode allows you to try your regular expression to see if there are any full matches, partial matches, validate the expression or run a RegEx replace. The design mode provides an interface to build your regular expression for you.

Expresso also includes a library of included common regular expressions.

Best of all Expresso is free.

Nice Features

RegEx Analyzer

The RegEx Analyzer is probably the best feature, for me at least. This breaks down your regular expression its part in plain English.

regex_analyser

The results / matches are displayed in a similar window.

Code Generation

The product will generate C# or VB.NET code for the regular expressions you create.

Saving

The product allows you to save "projects" of regular expressions, as well as a history of your tests.

Feature Summary

This list is borrowed from the home page of Expresso.

  • Still free of charge!

  • Build complex regular expressions by selecting components from a palette

  • Test expressions against real or sample input data

  • Display all matches in a tree structure, showing captured groups, and all captures within a group

  • Build replacement strings and test the match and replace functionality

  • Highlight matched text in the input data

  • Test automatically for syntax errors

  • Generate Visual Basic, C#, or C++ code

  • Save and restore data in a project file

  • Maintain and expand a library of frequently used regular expressions

  • Dramatically enhanced Analyzer

    • Analyzes and describes your regular expression in a tree structure

    • Updated continuously in a separate thread

    • Edit portions of your regular expression by selecting nodes in the Analyzer view

    • Immediate feedback on syntax errors

    • Highlight portions of your expression for partial matching

  • Rich new Builder and editing features

    • Easier to use Builder

    • Support for .NET 2.0 features like character class subtraction and new Unicode classes

    • Extensive editing capabilities via context menus in both text view and Analyzer view

    • Builder can be docked or undocked from the Main Expresso window

    • Full Undo/Redo capability

  • Additional New features

    • Line by line validation testing

    • Test the Regex.Split() method

    • Export match results to Excel, XML, etc.

    • Carriage return, line feed, and other invisible characters are visible in the search results

    • Drag and drop files and text

    • Insert arbitrary Unicode characters in sample text or regular expression

    • Code generation for the new C++/CLI syntax in addition to the old MC++

    • Code generation for Replacement String and templates for Replace(), Split(), Match() and other regex methods

    • Turn Tooltips on or off

    • Support for very long data files

    • Startup tips to guide new users

  • Refactor Phoenix - First Meeting Recap

    We talked for most of the time about Version / Revision Control systems with James giving a quick (un-timed :) ) intro of Mercurial. Here are some of the other products we talked about:

    Version / Revision Control Systems:

    Mercurial: http://www.selenic.com/mercurial/
    SVN: http://subversion.tigris.org/
    Team Foundation Server (TFS): http://msdn2.microsoft.com/en-us/teamsystem/aa718934.aspx
    Visual SourceSafe : http://msdn2.microsoft.com/vstudio/Aa700900.aspx
    GIT: http://www/git.or.cz/
    DARCS:  Could not find

    Products discussed:

    TRAC: http://www.trac.edgewall.org
    JumpBox: http://www.jumpbox.com

    Future Events (some in planning):

    BarCamp on Dec 8th: http://www.barcamp.org/BarCampPhoenix
    DevHouse: Just starting the discussions on it.

    Using the Google AJAX Search API

    I have posted an article on my web site , http://www.josephguadagno.net, that demonstrates how to use the Google AJAX Search API using a custom JavaScript object called MyGSearch.  MyGSearch, simplifies the use of the Google AJAX Search API by  wrapping the setup in a single object.

    View the article here.

    Posted: Oct 18 2007, 11:06 AM by jguadagno | with 5 comment(s)
    Filed under: , , ,
    VS Live 2007 - Las Vegas is here

    I am at VSLive 2007 - Las Vegas today.  Look for a few post from me as I improve my skills and hope to improve yours.

    First break out: Architecting ASP.NET 2.0 Applications Workshop

    Posted: Oct 15 2007, 09:46 AM by jguadagno
    Filed under: ,
    Database Drivers not provided by Microsoft (Updated)

    I wanted save some people some time looking for providers for their non-Microsoft databases to use with .NET.  Please keep in mine I have not tried or used all of these providers / tools but have found them from searching and asking around. Based on some of the feed back and comments I added a few others.

    Oracle

    Oracle's .NET center can be found here: http://www.oracle.com/technology/tech/dotnet/index.html

    Oracle 64bit ODAC drivers can be found here: http://www.oracle.com/technology/software/tech/windows/odpnet/64-bit/index.html

    Very helpful for Oracle development and integrates directing into Visual Studio. Oracle Developer Tools for Visual Studio .NET: http://www.oracle.com/technology/tech/dotnet/tools/index.html

    Oracle ASP.NET Data Providers: http://www.oracle.com/technology/tech/dotnet/aspnet/

    MySQL

    MySQL ADO.NET Driver (Connector/NET): http://dev.mysql.com/downloads/connector/net/

    Step by Step Guide for using MySQL with ASP.NET: http://www.15seconds.com/issue/050407.htm

    MySQLRoleProvider: http://www.codeproject.com/aspnet/MySQLsuite.asp

    SQLite 3

    SQlite3 .NET Provider: http://sourceforge.net/projects/sqlite-dotnet2

    SQLite ASP.NET Membership Provider: http://www.codeproject.com/useritems/SQLiteProviders.asp

    SQLite 2007 Pro Enterprise Manager is a free GUI (Graphical User Interface) for working with SQLite database. I have used it's predecessor and found it quite helpful. http://www.osenxpsuite.net/?xp=3

    NHibernate

    Sort of a repost but I wanted to group them together

    NHibernate Data Layer Generation :http://sourceforge.net/projects/nhib-gen/

    This project is hosted on SourceForge.  This project requires CodeSmith to generate the code.  The project generates, C# classes for business layer, data layer, and DataSources.  In addition, these templates will generate some based Insert, Update, Delete ASP.NET pages.

    NHibernateDataSource: http://www.codeproject.com/useritems/NHibernateDataSource.asp

    PostgreSQL

    I did not find and Membership or Role providers but here are some ADO drivers.

    Courtesy of Loser-X

    Npgsql is de facto the ADO.NET provider. Performance and stability seems alright.

    PostgreSQLDirect .NET is a commercial provider, and its supposed to out-perform Npgsql while providing more features.

     

    Firebird

    I did not find and Membership or Role providers but here are some ADO drivers.

    Courtesy of Loser-X

    In any case, the .NET data provider is available for download, as well as a DDEX provider.

     

    Sybase

    I did not find and Membership or Role providers but here are some ADO drivers. 

    Updating the ASE ADO.NET Provider

    Sybase support for ADO.NET 

    Developing a Data Access Layer for Sybase Using ADO.NET: Essentials

    How do I format my GridView bound column differently?

    The answer is simple... Set the DataFormatString property of the BoundField to the desired format and set the HtmlEncode property to false.

    Replace the ColumnName value with the name of your column.

    Replace DataFormatString property with the format string of your choosing.  A good reference for .NET string formats is available at http://john-sheehan.com/blog/index.php/net-cheat-sheets/

    <asp :GridView ID=“GridView1″ runat=“server”>
        <columns>
            <asp :BoundField DataField=ColumnName
                DataFormatString={0:M-dd-yyyy}
                HtmlEncode=false
                HeaderText=ColumnName />

            </columns>
    </asp:GridView>

     

    NHibernate and ASP.NET

    Many people have asked from time to time about creating or finding a NHibernate Data Source to use with ASP.NET.  Here are a few that I have found.

    NHibernate Data Layer Generation

    http://sourceforge.net/projects/nhib-gen/

    This project is hosted on SourceForge.  This project requires CodeSmith to generate the code.  The project generates, C# classes for business layer, data layer, and DataSources.  In addition, these templates will generate some based Insert, Update, Delete ASP.NET pages.

    NHibernateDataSource

    http://www.codeproject.com/useritems/NHibernateDataSource.asp


    Hello World

    My first official blog post here at http://weblogs.asp.net/jguadagno/.  I intend for this blog to do two things...

    1. Provide tips and tricks I learned while rebuilding my web site (http://www.josephguadagno.net) using ASP.NET.
    2. Provide in sites to new / advanced ASP.NET development
    3. Provide answers to commonly faced problems / questions in ASP.NET development.

    If you have any questions or problems with ASP.NET check out http://forums.asp.net

    If you have any suggestions for topics: use the contact form on this page or comments.

    Posted: Oct 04 2007, 09:18 AM by jguadagno
    Filed under:
    More Posts