Thursday, March 26, 2009

Stored Procedures tutorial article

A complete tutorial on how to use the StoredProcedure class in the SixPack library is now available on CodeProject: SixPack Library.
Why did we develop stored procedures support?

Stored procedure invocation is a very common activity in most enterprise or web development projects. Microsoft's ADO.NET technology makes it very simple to do, so why go through the hassle of using a library to do it?

Here are some reasons of why we implemented this feature of the library:

  • Even though it's powerful, ADO.NET is lacking a few features that you will likely need to develop when supporting large sites (for example, handling deadlocks).
  • As a best practice, a lot of people do not want developers to use all features of ADO.NET (typically, the DataReaders need to be handled very carefully).
  • We wanted the stored procedure invocation code to be database independent.
  • You have a large number of stored procedures to support and we want the developer to be able to generate the invocation code, instead of writing it.
  • We want to be able to easily trace stored procedure performance during development, while not having a performance bottleneck at release.
Read the full article, including source code, here: CodeProject: SixPack Library -- StoredProcedure

About the SixPack library

The SixPack rapid development library is a collection of classes for rapid development on the .NET/Mono platform. It is released under the Limited General Public License 2.1 (LGPL) and is available through Google Code.
http://code.google.com/p/sixpack-library/

Sunday, March 22, 2009

SixPack library beta 2 released!

SixPack library version 1.1 beta 2 has been released today!

Download here

Change Log:
  • SixPack/Web/UI/ControlFinder.cs: Added FindFirst and static version of the methods
  • SixPack/Drawing/TangoPalette.cs: Added
  • SixPack/Drawing/CaptchaImage.cs: Added a lot of new methods
Source files are in the trunk.

About the SixPack library
The SixPack rapid development library is a collection of classes for rapid development on the .NET/Mono platform. It is released under the Limited General Public License 2.1 (LGPL) and is available through Google Code.

http://code.google.com/p/sixpack-library/

Friday, March 20, 2009

SixPack release schedule until May 1st, 2009

Here's the release schedule for the SixPack library.
  • March 22nd - 1.1 beta 2
    CaptchaImage and ControlFinder improvements
  • March 29th - 1.1 final
  • April 5th - 1.2 beta 1
    SixPack.Configuration namespace
    Other contributions (freeze by April 1st)
  • End of April - 1.2 final
About the SixPack library
The SixPack rapid development library is a collection of classes for rapid development on the .NET/Mono platform. It is released under the Limited General Public License 2.1 (LGPL) and is available through Google Code.

http://code.google.com/p/sixpack-library/

Thursday, March 19, 2009

The new CaptchaImage

This is an example of using CaptchaImage. Note that this uses the new extensions of CaptchaImage in 1.1-beta2.

Typically, you would generate a random sequence of characters, store it in session, then use this class to serve the image from a handler.

On submit, you would then compare the value input by the user with the value in session.

Stating the obvious: do NOT use a parameter to pass the correct CAPTCHA value to the handler... that would make the CAPTCHA useless!

A not-so-obvious note: mono does not support the WarpPath method in System.Drawing that we use to scramble the text. The class works around this by distorting the image in other ways under Unix environments. This is not as effective as the Win32 method, unfortunately.

In future versions of the library we might create another CaptchaImage class based on ImageMagick, so we can provide a consistent user experience on both platforms.

using System;
using SixPack.Drawing;
using System.Drawing;
using System.Drawing.Imaging;

namespace sixpackexamples
{
class MainClass
{
public static void Main(string[] args)
{
CaptchaImage captcha = new CaptchaImage("foo-bar", 300, 100, "Times New Roman");
captcha
.BackgroundDark = TangoPalette.SkyBlue1;
captcha
.BackgroundLight = TangoPalette.SkyBlue3;
captcha
.ForegroundDark = TangoPalette.SkyBlue2;
captcha
.ForegroundLight = TangoPalette.SkyBlue1;
captcha
.FontStyle = FontStyle.Italic;
Image image = captcha.Generate();
Bitmap bitmap = new Bitmap(image);
bitmap
.Save("foobar.png", ImageFormat.Png);
}
}
}


This is a typical result under mono:


CaptchaImage - sixpack-library - Google Code

About the SixPack library
The SixPack rapid development library is a collection of classes for rapid development on the .NET/Mono platform. It is released under the Limited General Public License 2.1 (LGPL) and is available through Google Code.

http://code.google.com/p/sixpack-library/

Saturday, March 14, 2009

New logo for the SixPack library

We are proud to announce a new logo for the SixPack library. Enjoy!




About the SixPack library
The SixPack rapid development library is a collection of classes for rapid development on the .NET/Mono platform. It is released under the Limited General Public License 2.1 (LGPL) and is available through Google Code.

http://code.google.com/p/sixpack-library/

Tuesday, March 3, 2009

The beta version of SixPack 1.1 is now on GoogleCode!

New and improved
  • A new caching system with prefetching (SixPack.Caching)
  • A set of code generation classes (SixPack.CodeGen)
  • An XmlRpc client supporting advanced return types (like return as DataSet or class, possibly processing with an XSLT in the middle)
  • Various minor improvements (Control Finder, Text Utilities, Xml Serializer)

Downloads

Binaries:
http://sixpack-library.googlecode.com/files/SixPack-bin-1.1.zip

Help:
http://sixpack-library.googlecode.com/files/SixPack-1.1.chm

Source: via SVN

Errors

Please report errors, bugs, requests here:
http://code.google.com/p/sixpack-library/issues/list

About the SixPack library
The SixPack rapid development library is a collection of classes for rapid development on the .NET/Mono platform. It is released under the Limited General Public License 2.1 (LGPL) and is available through Google Code.

http://code.google.com/p/sixpack-library/