.NET
.NET
The Composite UI Application Block is designed to help you build these complex, enterprise ready Windows Forms—based solutions. It provides a proven architecture and implementation that helps you to build applications using the common patterns found in line-of-business front end applications.
Benefits
Building an application using the Composite UI Application Block provides the following benefits:
- Increased solution quality and consistency for architecture teams by providing a structured, prescriptive environment that fosters reusability and predictability to build user interfaces.
- Increased productivity and faster ramp-up time for large development teams, by hiding complexity and allowing them to focus on the business related components instead of on the underlying infrastructure and complex aspects of user interface development, such as threading and asynchronous processing.
- Consolidation of operational efforts for operations teams by standardizing services that result in consistent configuration management and instrumentation implementations across a suite of applications.
This Community Technical Preview of the Composite UI Application Block can be downloaded from the Community Site. Important updates to this component until its final release will be made available on this site.
Enterprise Library June 2005 now available!
The June 2005 release is a minor update to the original January release. It incorporates the patches and extensions previously released to the community, and also includes miscellaneous minor bug fixes. Although this release is still designed for .NET Framework 1.1, it is now possible to use this with .NET Framework 2.0 beta 2 - see the included Readme file for details.
I finally got some time to play with generics...
The most usable generic class I use is as follow :
[
Serializable]
public class EventArgs<T> : EventArgs
{
private T t;
public EventArgs(T t)
{
this.t = t;
}
public T Data
{
get { return t; }
}
}
Just cool!!!
I wrote a HotKey component a few month ago and some reported me a bug that suspend, shutdown or restart did not work while the Hotkey was in use.
This bug was fixed and I updated the code on the original post: http://dotnetjunkies.com/WebLog/principal/archive/2005/04/21/69872.aspx
I was trying to find a way to register a hotkey without the use of the form's handle and the code that was on that post was one of those tries...
What you would do when you see the following code:
public
object GetObject()
{
if (myObject != null)
return myObject;
else
return null;
}
For the last month I received over a 1000 spam emails from my blog. I guess it is a good time to remove the comments from my blog for a few weeks...
Service Locator 1.0 is an application block which integrates with Enterprise Library 1.0. It's a general-purpose, provider-driven object factory, which can be used to create instances of component servers, following the Service Locator design pattern.
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=41A621E5-3628-4C71-8985-710C4475F347
Second code drop of CAB ready to download
Check out this new code drop of the Composite UI Application Block that now includes most of the core services (like EventBroker, Module Loader, etc), the long awaited UI support services along with QuickStarts and draft introductory documentation. Please let us know what you think about it sending an email to: pagcabfb@microsoft.com Thanks! patterns & practices Smart Client Team
"The Data Mapper is a layer of software that separates the in-memory objects from the database. Its responsibility is to transfer data between the two ends to isolate them from each other. With Data Mapper the in-memory objects needn’t know even that there’s a database present; they need no SQL interface code, and certainly no knowledge of the database schema." (Fowler, Martin, Patterns of Enterprise Application Architecture, p. 165) Data Mappers equate to what is known as Data Access Logic Components (DALCs). This application block is intended to make it easier for producers of business DALCs to create common functionality that relates to managing "entities" with CRUD functions. The DataMapper also promotes the use of stored procedures as a best practice to abstract data access from the underlying data schema and increase performance. Finally, the DataMapper allows capabilities like the use of transactions, command timeouts, and caching properties to be added, removed, and modified through configuration when needed. For example, to add transactions or caching to a DALC, no code will need to be modified -- only configuration settings.”
Find out more here
“This sample illustrates an application built using the DataTierGenerator for Enterprise Library available at http://workspaces.gotdotnet.com/datatiergenerator. This tool generates a data tier that uses the Entlib data access block to update the database“
Find it here
“Have you just completed a project that uses Enterprise Library? We want to hear from you! The Exit Poll is a survey specifically aimed at people who have finished a project using Enterprise Library, so you can share your experiences on how it went from beginning to end. We will use this information to help improve future releases. If you are using Enterprise Library but have not yet completed the project, please hold off on completing the survey until the project is released. “
If you work with EntLib, tried EntLib or had anything to do with EntLIB. This is very important to fill out this poll :-)
Fill it here, via EntLib gotdotnet workspace
Some mystic way returned EntLib to my life this week. Am still trying to figure out the reason.
I got 2 questions from 2 different people regarding signing EntLib with a strong name (it is possible!). I helped Ohad Israeli with his EntLib web cast by answering all kind of questions... (I think the community still think that the ExceptionHandler is the same as the ExceptionPublisher which is 100% NOT!!!). Then I got to talk about EntLib somemore for a good friend who just promoted to a team leader and would love to work with EntLib. Finally to summerize it all up. MS released the long waited HOL for EntLib.
Hope you enjoyed my blah blah :-)
Oh, and the link for the HOL is here
Dan Amiga who is a great co-worker and a very tallent person showed me a very cool shortcuts application (C++) he wrote. I was so amazed about how easy it is to access any applications with few key strokes that I went home and wrote my own implementation for the same applciation, in C# of course.
The #1 thing I did was to implement this Component which fires a HotKeyPressed event when a desired windows HotKey was pressed.
Here is the implementation :
UPDATE: There was a mistake with the intptr Handle. Notice that now you need to supply the Form.Handle to this component. Suspend, Shutdown and Restart will work properly now...
public
class HotKey : Component , IMessageFilter
{
public event EventHandler HotKeyPressed;
private const int id = 100;
#region
Native win32 API
private const int WM_HOTKEY = 0x0312;
[
DllImport("user32.dll", SetLastError = true)]
private static extern bool RegisterHotKey(IntPtr hWnd, int id, KeyModifiers fsModifiers, Keys vk);
[
DllImport("user32.dll", SetLastError = true)]
private static extern bool UnregisterHotKey(IntPtr hWnd, int id);
[
Flags()]
public enum KeyModifiers
{
None = 0,
Alt = 1,
Control = 2,
Shift = 4,
Windows = 8
}
#endregion
public event EventHandler KeyChanged;
public event EventHandler KeyModifierChanged;
private IntPtr handle;
public IntPtr Handle
{
get { return handle; }
set { handle = value; }
}
private Keys key;
private KeyModifiers keyModifier;
private bool isKeyRegisterd;
public HotKey()
{
Application.AddMessageFilter(
this);
}
~HotKey()
{
Application.RemoveMessageFilter(
this);
UnregisterHotKey(handle, id);
}
private void RegisterHotKey()
{
if (key == Keys.None)
return;
if (isKeyRegisterd)
isKeyRegisterd = !(UnregisterHotKey(handle, id));<