Categories

Archives

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Windows splash screens from 1.01 to 7

Ever since the dawn of the Windows operating system, Microsoft has used Splash Screens as a means of distracting us while the operating system is loading.

In addition to their entertainment value, the Windows splash screens typically provide us with some sort of feedback on the progress of the sometimes lengthy startup process.

In this ZDNet.com’s gallery, you’ll be able to browse through all the splash screens from Windows 1.01 to Windows 7.

SOURCE ZDNET

Master Page Support in ASP.NET 1.1

We know that ASP.NET 2.0 has introduced the Masterpages.

but some us might be thinking is there any way to do this in ASP.NET 1.1.

ASP.NET 1.1 doesnot directly supports it. But you can do it using Spring.NET Web Application Framwork. The Spring.Web framework provides a nice set of features through which we can enable master page support in ASP.NET 1.1 applications.

The best link you can look in is (Chapter 22.6. Support for ASP.NET 1.1 master pages in Spring.Web)

A sample master page (MasterLayout.ascx) – A User Control could look like this:

[code lang=”html”]

<%@ Control language="c#" Codebehind="MasterLayout.ascx.cs" AutoEventWireup="false" Inherits="MyApp.Web.UI.MasterLyout" %>
<%@ Register TagPrefix="spring" Namespace="Spring.Web.UI.Controls" Assembly="Spring.Web" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" &amp;gt;
<html>
<head>
<title>Master Page</title>
<link rel="stylesheet" type="text/css" href="<%= Context.Request.ApplicationPath %>/css/styles.css">
<spring:ContentPlaceHolder id="head" runat="server"/>
</head>
<body>
<form runat="server">
<table cellPadding="3" width="100%" border="1">
<tr>
<td colspan="2>
<spring:ContentPlaceHolder id="title" runat="server">
<!– default title content –>
</spring:ContentPlaceHolder>
</td>
</tr>
<tr>
<td>
<spring:ContentPlaceHolder id="leftSidebar" runat="server">
<!– default left side content –>
</spring:ContentPlaceHolder>
</td>
<td>
<spring:ContentPlaceHolder id="main" runat="server">
<!– default main area content –>
</spring:ContentPlaceHolder>
</td>
</tr>
</table>
</form>
</body>
</html>

[/code]

We can have an ASPX page that uses this master page (Child.aspx) might look like this:

[code lang=”html”]

<%@ Register TagPrefix="spring" Namespace="Spring.Web.UI.Controls" Assembly="Spring.Web" %>
<%@ Page language="c#" Codebehind="Child.aspx.cs" AutoEventWireup="false" Inherits="ArtFair.Web.UI.Forms.Child" %>
<html>
<body>

<spring:Content id="leftSidebarContent" contentPlaceholderId="leftSidebar" runat="server"&amp;>
<!– left sidebar content –>
</spring:Content>

<spring:Content id="mainContent" contentPlaceholderId="main" runat="server">
<!– main area content –>
</spring:Content>

</body>
</html>
[/code]

The & control in the example uses the contentPlaceholderId attribute (property) to specify exactly which placeholder from the master page is to be overridden. Because this particular page does not define content elements for the head and title placeholders, the content elements are defined by the default content supplied in the master page.

Both the ContentPlaceHolder and Content controls can contain any valid ASP.NET markup: HTML, standard ASP.NET controls, user controls, and so on.

Cool right!!!. Hope this helps. Happy Coding Guys!!. You might wonder, is any one still using asp.net 1.1? Ya, It’s the very basic ASP.NET 1.1, you can learn about .NET 1.1 from the scratch. I love using .NET 1.1

Myths about Microsoft Enterprise Library 5.0

It is so long i am hearing about Microsoft enterprise library, initial days we used a part of it called Microsoft Data Access Application Block, or some of us might be familiar with the name SQLHelper class.

It is been there for years and evolved in to a perfect set of application blocks, that helps in enterprise application development. In out multi-tier architecture applications to complex transaction sensitive applications, we can use it any where we needed.

Each framework or tools will have it’s own advantages and disadvantages. The Spring.NET, Castle Project they are all set of consistent blocks helps in building robust, state of the art, reliable and flexible applications.  I am not saying that Enterprise Library replaces Spring.NET, & Castle Project.

If consider Spring.Web Framework  library it provides dependency injection between our ASP.NET webforms, master pages, which web form is dependent to which master page and passing the dependent mater page objec to the page etc. It even provides the Masterpage support for ASP.NET 1.1 applications, you can refer to  Spring.Web Framework – Article – Chapter 22 . I would love  Spring.NET in some cases like AOP(Aspect Oriented Programming), WCF Services and dependency injections for  ASP.NET Web Applications and even data access.  

But as i said earlier, Each framework has it’s own BEST way of doing it.

These frameworks are proven efficient for certain level of business applications, but i am introducing Enterprise Library as a good alternative.  Choosing between all these framework is up to the organization and project need.

What is all this about Enterprise Library 5.0

The Microsoft Enterprise Library is a collection of reusable software components (application blocks) designed to assist software developers with common enterprise development challenges. Application blocks are provided as source code plus documentation that can be used “as is,” extended, or modified by developers to use on complex, enterprise-level line-of-business development projects. (Taken from Code Plex & MSDN).

I am using some of the sections from MSDN – Patterns & Practices to give much more understanding about the Enterprise Library.

Benefits of Enterprise Library

The design of application blocks encapsulates the Microsoft recommended and proven practices for .NET application development. These good practices are demonstrated in the overall design of the Enterprise Library, as well in the context-specific guidelines in the design of individual application blocks and QuickStarts. Software developers can add application blocks to .NET applications quickly and easily. For example, the Data Access Application Block provides access to the most frequently used features of ADO.NET, exposing them through easily used classes. In some cases, application blocks also add related functionality not directly supported by the underlying class libraries.

Goals for Enterprise Library

Enterprise Library is a collection of application blocks intended for use by developers who build complex, enterprise-level applications.

Enterprise Library is used when building applications that are typically to be deployed widely and to interoperate with other applications and systems. In addition, they generally have strict security, reliability, and performance requirements.

The goals of Enterprise Library are the following:

  • Consistency. All Enterprise Library application blocks feature consistent design patterns and implementation approaches.
  • Extensibility. All application blocks include defined extensibility points that allow developers to customize the behavior of the application blocks by adding their own code.
  • Ease of use. Enterprise Library offers numerous usability improvements, including a graphical configuration tool, a simpler installation procedure, and clearer and more complete documentation and samples.
  • Integration. Enterprise Library application blocks are designed to work well together or individually.

Active Releases

Retired Releases

That’s just an introduction, Why so special about it. Every framework or library provides that?.

If i recollect the SQLHelper.cs , it was initially developed for SQL Server.

But the new Data Access Application Blocks(3.x,4.x,5.x) supports Multi Data Source support with some specially designed helper classes just by changing the connection string. This is really helpful if we are not depending on stored procedures and want to keep all data access queries within the application itself.

If we user Dynamic Queries or Text queries it would help us in multi data source, think about you have an SQL Server DB and have stored proceduces to provide data queries and some time later since you have very little user base or data needed to manage in your application., you are deciding to move to an ACCESS DB or MYSQL DB.

It would be difficult for your developers to ReWrite each and everything for supporting ACCESS DB or MYSQL DB. Since normally we used System.Data.SqlClient classes (SqlConnection,SqlCommand, SqlDataAdaptor).

But when you develop an application we have to think about future extensibility and possibility to have multiple data source support with minimal effort. This is where Microsoft Data Access Block comes in handy.

Support currently you have connection string like below, through which you are connection to SQL Server.

[code lang=”xml”]

<add name="DataConnectionString" connectionString="server=(local)sqlexpress;database=Northwind;User ID=nw_user;Password=voila;Application Name=Northwind" providerName="System.Data.SqlClient"/>

[/code]

Infuture if you migrate your DB to MSAccess, you can just change connection string like below and start using your application working with new database. How easy it is?. Cool na.

[code lang=”xml”]

<add name="DataConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0; User ID=myuser; Data Source=|DataDirectory|northwind.mdb; Password=" providerName="System.Data.OleDb"/>
[/code]

With minimal effort application start working on with another type of data source. How it happens and should be working like that?.

We are using Microsoft Data Access Application block library.

Add reference to

Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.ServiceLocation.dll – this lib is needed for locating the provider asssembly a light weight service locator
Microsoft.Practices.EnterpriseLibrary.Data.dll

import the following namespaces, in the data access logic class

[code lang=”c-sharp”]
using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;
[/code]

and here is the code for access the database

[code lang=”c-sharp”]

string DbConnConfigName = "DataConnectionString";
Database db = EnterpriseLibraryContainer.Current.GetInstance<Database>(DbConnConfigName); // a light weight locator

int orderCount = (int)db.ExecuteScalar(
CommandType.Text,
"select * from [Orders]");

string message = string.Format(
"There are {0} Orders",
count.ToString());
Console.WriteLine(message);

[/code]

This is pretty easy right. Since we using a Generic class for data access, Data Access Application block will locate the associated classes to provide data access internally, according to the providerName=”System.Data.OleDb” or providerName=”System.Data.SqlClient” or providerName=”System.Data.OracleClient” we mentioned in the connection strings section.

Similar way EntLib(a Short for Enterprise Libray) provides Policy based exception handling block which is widely used in .NET Enterprise application development. Anotehr useful block is Logging application block which helps us in providing logging based on policy set in our config file. If you want to suppress a certain logging in production environment, you can set up policy to not to log it. cool na.

Enterprise Library contains the following application blocks:

The Caching Application Block. Developers can use this application block to incorporate a local cache in their applications.
The Cryptography Application Block. Developers can use this application block to incorporate hashing and symmetric encryption in their applications.
The Data Access Application Block. Developers can use this application block to incorporate standard database functionality in their applications.
The Exception Handling Application Block. Developers and policy makers can use this application block to create a consistent strategy for processing exceptions that occur throughout the architectural layers of enterprise applications.
The Logging Application Block. Developers can use this application block to include standard logging functionality in their applications and systems administrators can use the configuration tool to adjust the granularity of logging at run time.
The Policy Injection Application Block. This block contains legacy code for backwards compatibility with existing applications. The new functionality is available by using the Unity interception mechanism and call handlers located in the related application block assemblies.
The Security Application Block. Developers can use this application block to incorporate authorization and security caching functionality in their applications.
The Validation Application Block. Developers can use this application block to create validation rules for business objects that can be used across different layers of their applications.
Unity Dependency Injection and Interception. Developers can use this to implement a lightweight, extensible dependency injection container with support for constructor, property, and method call injection; and to capture calls to target objects and add additional functionality to the object.

You can find lot of resources on EntLib codeplex here , it’s a treasure hunt for a .NET Developer.

My time is limited, so i am stopping about for now. I will write down more on this later some time. I hope you got a basic idea of the things.  I will correct mistakes in this article later. This is just a DRAFT release. Happy Coding Guyz….

You can find Microsoft Enterprise Library – HandsOn Labs  which a nice way to learn for a beginner or experienced. It provides a step by step instruction about how to use and configure each application blocks in your application.

EntLib5 Developer’s Guide – Release Candidate!

Share extensions via EntLibContrib Project

Enterprise Library on Windows Azure

& more and more visit Patterns & Practices – Enterprise Library Home

Discussion Forum

Exam 70-515: TS: Web Applications Development with Microsoft .NET Framework 4

Microsoft Visual Studio 2010 and .NET Framework 4.0 related certifications are available now.

Candidates for this exam are professional Web developers who use Microsoft Visual Studio. Candidates should have a minimum of two to three years of experience developing Web-based applications by using Visual Studio and Microsoft ASP.NET. Candidates should be experienced users of Visual Studio 2008 and later releases and should have a fundamental knowledge of the .NET Framework 4 programming languages (C# or Microsoft Visual Basic). In addition, candidates should understand how to use the new features of Visual Studio 2010 and the .NET Framework 4.
 
Candidates should also have a minimum of one year of experience with the following:
  • Accessing data by using Microsoft ADO.NET and LINQ
  • Creating and consuming Web and Windows Communication Foundation (WCF) services
  • State management
  • ASP.NET configuration
  • Debugging and deployment
  • Application and page life-cycle management
  • Security aspects such as authentication and authorization
  • Client-side scripting languages
  • Internet Information Server (IIS)
  • ASP.NET MVC

Other related certifications are

To create Windows-based applications that run on corporate servers or user desktop computers. MCTS: .NET Framework 4, Windows Applications Exam 70-511: TS: Windows Applications Development with Microsoft .NET Framework 4
To create Web-based applications that run on the ASP.NET platform and are hosted on Internet Information Server. MCTS: .NET Framework 4, Web Applications Exam 70-515: TS: Web Applications Development with Microsoft .NET Framework 4
To create applications that communicate with servers or other applications in a connected or disconnected state. MCTS: .NET Framework 4, Service Communication Applications Exam 70-513: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4
To create data-driven applications that access data from various sources, such as Microsoft SQL Server, Oracle, Microsoft Office Access, object data sources, XML, or other flat-file sources. MCTS: .NET Framework 4, Data Access Exam 70-516: TS: Accessing Data with Microsoft .NET Framework 4

These exams are now available in Prometric testing centers.

For more details visit Microsoft Certification for Visual Studio 2010 Home

DotnetSlakers – Ajax Data Controls Project (GridView, DataList,Repeater,Pager)

Recently i came across this project, while just searching for an ajax enabled grid view or data list kinda code. Just for craze. I came across Ajax Data Controls project by DotNetSlakers.com. Read more…..

The Ajax Data Controls is a DotNetSlackers open source project. Developed on top of Asp.net Ajax Extension, the main goal of this project is to provide rich set of data controls for Client Centric Development Model. Since the data controls of Asp.net like GridView, DataList, Repeater etc does not have any Client Side Object Model thus it is not possible to work with these controls with Web Service / Page Methods call. The included controls exposes same API in the client side as the Asp.net version with few more enhancements. Curently the project contains the following controls:

  • GridView
  • DataList
  • Repeater
  • Pager

You can download the latest bits from Codeplex.com site (download here)
It’s recommended you visit DotNetSlakers – Ajax Data Controls site, before implementing. You might feel it would be rather old bits, but you could give a try and see, how it is working.

Good Day!!!! Happy Coding Daysss!!!!

A Book Review :: Wrox Professional Enterprise .NET

Initially I was in a thought that what ever i am developing is an Enterprise Application. But with my experiences and reading books like Microsoft Press, 070-549 MCPD- Enterprise Application Developer long back has changed the way i think and do about application development. 

Each day I want to learn something new, atleast printing a line in Console in some other different way is informative. We all stupid software engineers working 8-10 hours a day, blowing out our minds thinking. At the age of 30-35, our mind will become like 60’s year olds.  But what we have to do we choose this profession, this is our passion, my passion atleast. Day by day new new finding willl happen in the technological world, we have no time to spend with family, cost of living is increasing day by day. Global warming and climate changes etc etc. The point is whatever happens we should get some basic idea about latest technologies.

This Wrox Publications -  Professional Enterprise .NET (ISBN: 978-0-470-44761-1)  is a book by Jon Arking, Scott Millett. I should say this is the best book you can use to learn about Enterprise Application Development.  How you can build an application effectively considering the following aspects of Enterprise Application Development.

  1. Reliability
  2. Flexibility

  3. Separation of Concerns

  4. Reusability

  5. Maintainability

 This is a good handy book. Every .NET developer should have a copy of your own.  Jon Arking and Scott Millett, explained everything in from their experiences on application development and i appreciate the contents in it. Thanks Guyz..

In INDIA it would cost  Rs. 449/- & US Edition would cost: Rs. 2500/- or 50-60$. 

 It’s available in most of the book stores in india. Come on Go on and grab it.

Comprehensive coverage to help experienced .NET developers create flexible, extensible enterprise application code

If you’re an experienced Microsoft .NET developer, you’ll find in this book a road map to the latest enterprise development methodologies. It covers the tools you will use in addition to Visual Studio, including Spring.NET and nUnit, and applies to development with ASP.NET, C#, VB, Office (VBA), and database.

You will find comprehensive coverage of the tools and practices that professional .NET developers need to master in order to build enterprise more flexible, testable, and extensible .NET applications with minimal upfront costs.

  • Helps C#, VB.Net, and ASP.NET developers who wish to migrate both their applications and their own skillsets to newer, more flexible enterprise methodologies
  • Describes each new pattern or feature along with its benefits, then outlines the pros and cons of its implementation
  • Includes an introduction to enterprise development and a comprehensive overview of the differences between new enterprise patterns and older, traditional Microsoft programming
  • Explains how to implement these patterns by upgrading an existing code base
  • Covers benefits including flexibility, automated testing, extensibility, and separation; modular code; test-driven development, unit test, test automation, and refactoring; inversion of control; and object relational mapping
  • Also covers enterprise design patterns: MVC including Ruby on Rails, Monorail, and ASP.NET MVC, MVP, observer, and more
  • Contains a primer on object-oriented design

Professional Enterprise .NET focuses on the often-inevitable compromise between forward-thinking design and the needs of business, helping you build applications that serve both.

Quotes: Taken from Wrox

Happy Learning & Coding !!! 🙂

Apart from posting blogs, i share some informative links and retweet things on Twitter @nithinmohantk. If you wanna follow me you can, i cannot offer anything but desperation. 🙂

PS: I haven’t covered entire book for sure. Ha ha. So do not get in to assumption that, i got the in and out of the book.