Showing posts with label .NET Framework. Show all posts
Showing posts with label .NET Framework. Show all posts

Thursday, February 01, 2024

Improvements and enhancements in .NET 8

.NET 8 is the latest version of .NET framework that includes numerous improvements and enhancements over its predecessors. Some of the key enhancements in .NET 8 include:

1. ASP.NET Core 2.0 - ASP.NET Core 2.0 is a significant improvement, as it includes features like built-in support for HTTPS, improved performance, and better support for built-in authentication.
2. JSON support - .NET 8 provides better support for working with JSON data, making it easier to parse and serialize JSON in your applications.
3. C# language improvements - .NET 8 includes several language improvements, such as better type inference, improved garbage collection.

Here are some of the improvements

  • Native Ahead-of-Time (AOT) Compilation.
  • Code Generation Enhancements.
  • Garbage Collector Improvements.
  • JSON Enhancements.
  • Compression enhancements
  • Randomness Tools.
  • Cryptography Fortifications.
  • Silicon-Specific Features.
  • Time Abstraction.

Monday, June 12, 2023

Exploring Pros and Cons of Factory Design Pattern

Software design patterns play a crucial role in creating flexible and maintainable code. One such pattern is the Factory Design Pattern, which provides a way to encapsulate object creation logic. By centralizing object creation, the Factory Design Pattern offers several benefits while also introducing a few drawbacks. In this blog post, we will delve into the pros and cons of using the Factory Design Pattern to help you understand when and how to effectively apply it in your software development projects.

Pros of the Factory Design Pattern:

1. Encapsulation of Object Creation Logic:
The primary advantage of the Factory Design Pattern is its ability to encapsulate object creation logic within a dedicated factory class. This encapsulation decouples the client code from the specific implementation details of the created objects. It promotes loose coupling and enhances code maintainability, as changes to the object creation process can be handled within the factory class without affecting the client code.

2. Increased Flexibility and Extensibility:
Using the Factory Design Pattern allows for the easy addition of new product types or variations without modifying existing client code. By introducing new concrete subclasses and updating the factory class, you can seamlessly extend the range of objects that can be created. This flexibility is particularly valuable in situations where you anticipate future changes or want to support multiple product variations within your application.

3. Simplified Object Creation:
The Factory Design Pattern simplifies object creation for clients by providing a centralized point of access. Instead of directly instantiating objects using the `new` operator, clients interact with the factory's creation methods, which abstract away the complex instantiation logic. This abstraction simplifies client code, making it more readable, maintainable, and less error-prone.

Cons of the Factory Design Pattern:

1. Increased Complexity:
Introducing the Factory Design Pattern adds an additional layer of abstraction and complexity to the codebase. With the creation logic residing in a separate factory class, developers must navigate and understand multiple components to grasp the complete object creation process. This increased complexity can sometimes make the code harder to understand and debug, especially for small-scale projects or simple object creation scenarios.

2. Dependency on the Factory Class:
Clients relying on the Factory Design Pattern become dependent on the factory class to create objects. While this provides flexibility, it can also introduce tight coupling between clients and the factory. Any changes or updates to the factory class might impact the clients, requiring modifications in multiple parts of the codebase. It's essential to strike a balance between loose coupling and dependency management when using the Factory Design Pattern.

3. Potential Performance Overhead:
The Factory Design Pattern introduces a layer of indirection, which may result in a slight performance overhead compared to direct object instantiation. The factory class must determine the appropriate object to create based on some criteria, which involves additional computational steps. However, in most cases, the performance impact is negligible and can be outweighed by the benefits of code maintainability and flexibility.

Conclusion:
The Factory Design Pattern offers numerous advantages, including encapsulation of object creation logic, increased flexibility and extensibility, and simplified object creation for clients. By centralizing object creation within a dedicated factory class, the pattern promotes loose coupling and enhances code maintainability. However, it's important to consider the potential drawbacks, such as increased complexity, dependency on the factory class, and potential performance overhead.

Like any design pattern, the Factory Design Pattern should be applied judiciously based on the specific requirements and complexity of your software project. By carefully weighing the pros and cons, you can make an informed decision on whether to incorporate the Factory Design Pattern in your codebase, leveraging its strengths to create flexible and maintainable software solutions.

Sunday, June 11, 2023

Explain Factory Design Pattern?

The Factory design pattern is a creational design pattern that provides an interface for creating objects without specifying their concrete classes. It encapsulates the object creation logic in a separate class or method, known as the factory, which is responsible for creating instances of different types based on certain conditions or parameters.

The Factory pattern allows for flexible object creation, decoupling the client code from the specific implementation of the created objects. It promotes code reuse and simplifies the process of adding new types of objects without modifying the existing client code.

There are several variations of the Factory pattern, including the Simple Factory, Factory Method, and Abstract Factory. Here's a brief explanation of each:

  1. Simple Factory: In this variation, a single factory class is responsible for creating objects of different types based on a parameter or condition. The client code requests objects from the factory without being aware of the specific creation logic.

  2. Factory Method: In the Factory Method pattern, each specific type of object has its own factory class derived from a common base factory class or interface. The client code interacts with the base factory interface, and each factory subclass is responsible for creating a specific type of object.

  3. Abstract Factory: The Abstract Factory pattern provides an interface for creating families of related or dependent objects. It defines a set of factory methods that create different types of objects, ensuring that the created objects are compatible and consistent. The client code interacts with the abstract factory interface to create objects from the appropriate family.

Here's a simple example to illustrate the Factory Method pattern in C#:

// Product interface
public interface IProduct
{
    void Operation();
}

// Concrete product implementation
public class ConcreteProduct : IProduct
{
    public void Operation()
    {
        Console.WriteLine("ConcreteProduct operation");
    }
}

// Factory interface
public interface IProductFactory
{
    IProduct CreateProduct();
}

// Concrete factory implementation
public class ConcreteProductFactory : IProductFactory
{
    public IProduct CreateProduct()
    {
        return new ConcreteProduct();
    }
}

// Client code
public class Client
{
    private readonly IProductFactory _factory;

    public Client(IProductFactory factory)
    {
        _factory = factory;
    }

    public void UseProduct()
    {
        IProduct product = _factory.CreateProduct();
        product.Operation();
    }
}
  

In this example, IProduct is the product interface that defines the common operation that products should implement. ConcreteProduct is a specific implementation of IProduct.

The IProductFactory interface declares the factory method CreateProduct, which returns an IProduct object. ConcreteProductFactory is a concrete factory that implements the IProductFactory interface and creates instances of ConcreteProduct.

The Client class depends on an IProductFactory and uses it to create and interact with the product. The client code is decoupled from the specific implementation of the product and the creation logic, allowing for flexibility and easier maintenance.

Overall, the Factory design pattern enables flexible object creation and promotes loose coupling between the client code and the object creation process. It's particularly useful when you anticipate variations in object creation or want to abstract the creation logic from the client code.

Saturday, June 10, 2023

Explain Repository Design Pattern

The Repository design pattern is a software design pattern that provides an abstraction layer between the application and the data source (such as a database, file system, or external API). It encapsulates the data access logic and provides a clean and consistent interface for performing CRUD (Create, Read, Update, Delete) operations on data entities.

The Repository pattern typically consists of an interface that defines the contract for data access operations and a concrete implementation that provides the actual implementation of those operations. The repository acts as a mediator between the application and the data source, shielding the application from the underlying data access details.

Here's an example of a repository interface:

public interface IRepository<T>
{
    T GetById(int id);
    IEnumerable<T> GetAll();
    void Add(T entity);
    void Update(T entity);
    void Delete(T entity);
}
  

And here's an example of a repository implementation using Entity Framework in C#:

public class Repository<T> : IRepository<T> where T : class
{
    private readonly DbContext _context;
    private readonly DbSet<T> _dbSet;

    public Repository(DbContext context)
    {
        _context = context;
        _dbSet = context.Set<T>();
    }

    public T GetById(int id)
    {
        return _dbSet.Find(id);
    }

    public IEnumerable<T> GetAll()
    {
        return _dbSet.ToList();
    }

    public void Add(T entity)
    {
        _dbSet.Add(entity);
        _context.SaveChanges();
    }

    public void Update(T entity)
    {
        _context.Entry(entity).State = EntityState.Modified;
        _context.SaveChanges();
    }

    public void Delete(T entity)
    {
        _dbSet.Remove(entity);
        _context.SaveChanges();
    }
}
  

In this example, the IRepository interface defines the common data access operations like GetById, GetAll, Add, Update, and Delete. The Repository class implements this interface using Entity Framework, providing the actual implementation of these operations.

The repository implementation uses a DbContext to interact with the database, and a DbSet<T> to represent the collection of entities of type T. The methods perform the corresponding operations on the DbSet<T> and save changes to the database using the DbContext.

The Repository pattern helps decouple the application from the specific data access technology and provides a clear separation of concerns. It improves testability, code maintainability, and reusability by centralizing the data access logic. It also allows for easier swapping of data access implementations, such as changing from Entity Framework to a different ORM or data source, without affecting the application code that uses the repository interface.

Monday, May 22, 2023

Explain Generic Repository Design Pattern

A generic repository is a software design pattern commonly used in object-oriented programming to provide a generic interface for accessing data from a database or other data sources. It abstracts the underlying data access code and provides a set of common operations that can be performed on entities within a data source.

The generic repository pattern typically consists of a generic interface, such as ‘IGenericRepository’, which defines common CRUD (Create, Read, Update, Delete) operations that can be performed on entities. It also includes a generic implementation of the repository interface, such as ‘GenericRepository<T>’, which provides the concrete implementation of those operations.

Here's an example of a generic repository interface:

public interface IGenericRepository<T>
{
    T GetById(int id);
    IEnumerable<T> GetAll();
    void Add(T entity);
    void Update(T entity);
    void Delete(T entity);
}
  

And here's an example of a generic repository implementation using Entity Framework in C#:

public class GenericRepository<T> : IGenericRepository<T> where T : class
{
    private readonly DbContext _context;
    private readonly DbSet<T> _dbSet;

    public GenericRepository(DbContext context)
    {
        _context = context;
        _dbSet = context.Set<T>();
    }

    public T GetById(int id)
    {
        return _dbSet.Find(id);
    }

    public IEnumerable<T> GetAll()
    {
        return _dbSet.ToList();
    }

    public void Add(T entity)
    {
        _dbSet.Add(entity);
        _context.SaveChanges();
    }

    public void Update(T entity)
    {
        _context.Entry(entity).State = EntityState.Modified;
        _context.SaveChanges();
    }

    public void Delete(T entity)
    {
        _dbSet.Remove(entity);
        _context.SaveChanges();
    }
}
  

By using a generic repository, you can avoid writing repetitive data access code for each entity in your application and promote code reusability. However, it's worth noting that the generic repository pattern may not be suitable for every scenario and should be evaluated based on the specific requirements and complexity of your application.

Saturday, May 13, 2023

Explain Unit of Work pattern

The Unit of Work pattern is a software design pattern that provides a way to manage transactions and coordinate the work of multiple repositories in an application. It helps maintain data consistency and integrity by ensuring that multiple operations are treated as a single unit of work and are either all committed or all rolled back.

The main purpose of the Unit of Work pattern is to abstract the underlying data access code and provide a high-level interface for managing transactions and coordinating changes to multiple entities. It ensures that all changes made within a unit of work are tracked and persisted consistently.

Here's a basic example of the Unit of Work pattern:

public interface IUnitOfWork : IDisposable
{
    void BeginTransaction();
    void Commit();
    void Rollback();
    void SaveChanges();
    IRepository<TEntity> GetRepository<TEntity>() where TEntity : class;
}

public class UnitOfWork : IUnitOfWork
{
    private readonly DbContext _context;
    private readonly Dictionary<Type, object> _repositories;
    private DbContextTransaction _transaction;

    public UnitOfWork(DbContext context)
    {
        _context = context;
        _repositories = new Dictionary<Type, object>();
    }

    public void BeginTransaction()
    {
        _transaction = _context.Database.BeginTransaction();
    }

    public void Commit()
    {
        _transaction.Commit();
        _transaction = null;
    }

    public void Rollback()
    {
        _transaction.Rollback();
        _transaction = null;
    }

    public void SaveChanges()
    {

        _context.SaveChanges();
    }

    public IRepository<TEntity> GetRepository<TEntity>() where TEntity : class
    {
        if (_repositories.ContainsKey(typeof(TEntity)))
        {
            return (IRepository<TEntity>)_repositories[typeof(TEntity)];
        }

        var repository = new Repository<TEntity>(_context);
        _repositories.Add(typeof(TEntity), repository);
        return repository;
    }

    public void Dispose()
    {
        _transaction?.Dispose();
        _context.Dispose();
    }
}
  

In this example, the IUnitOfWork interface defines the methods for beginning a transaction, committing or rolling back the transaction, saving changes, and retrieving repositories. The UnitOfWork class implements this interface and provides the concrete implementation.

The UnitOfWork class maintains an instance of the database context (DbContext) and a dictionary of repositories. The repositories are created lazily and stored in the dictionary to ensure that the same repository instance is used throughout the unit of work.

By using the Unit of Work pattern, you can ensure that multiple operations across different repositories are treated as a single unit of work. This allows you to maintain data consistency, perform atomic commits or rollbacks, and simplify the management of transactions in your application.

Sunday, December 11, 2022

.NET 7 features

.NET 7 is so versatile that you can build any app on any platform.

Let’s highlight some scenarios that you can achieve with .NET starting today:

What’s new in .NET 7

.NET 7 releases in conjunction with several other products, libraries, and platforms that include:

In this blog post, we’ll highlight the major themes the .NET Teams focused on delivering:

  • Unified
    • One BCL
    • New TFMs
    • Native support for ARM64
    • Enhanced .NET support on Linux
  • Modern
    • Continued performance improvements
    • Developer productivity enhancements, like container-first workflows
    • Build cross-platform mobile and desktop apps from same codebase
  • .NET is for cloud-native apps
    • Easy to build and deploy distributed cloud native apps
  • Simple
    • Simplify and write less code with C# 11
    • HTTP/3 and minimal APIs improvements for cloud native apps
  • Performance
    • Numerous perf improvements

.NET 7 is Available!!

Download .NET 7 today!

.NET 7 brings your apps increased performance and new features for C# 11/F# 7, .NET MAUI, ASP.NET Core/Blazor, Web APIs, WinForms, WPF and more. With .NET 7, you can also easily containerize your .NET 7 projects, set up CI/CD workflows in GitHub actions, and achieve cloud-native observability.

Thanks to the open-source .NET community for your numerous contributions that helped shape this .NET 7 release. 28k contributions made by over 8900 contributors throughout the .NET 7 release!

.NET remains one of the fastest, most loved, and trusted platforms with an expansive .NET package ecosystem that includes over 330,000 packages.

Download and Upgrade

You can download the free .NET 7 release today for Windows, macOS, and Linux.

.NET 7 provides a straightforward upgrade if you’re on a .NET Core version and several compelling reasons to migrate if you’re currently maintaining a .NET Framework version.

Visual Studio 2022 17.4 is also available today. Developing .NET 7 in Visual Studio 2022 gives developers best-in-class productivity tooling. To find out what’s new in Visual Studio 2022, check out the Visual Studio 2022 blogs.

Thursday, January 10, 2019

Difference between .NET Core and .NET Framework and Xamarin?

.NET Framework is a better choice if you:

  • Do not have time to learn a new technology.
  • Need a stable environment to work in.
  • Have nearer release schedules.
  • Are already working on an existing app and extending its functionality.
  • Already have an existing team with .NET expertise and building production ready software.
  • Do not want to deal with continuous upgrades and changes.
  • Building Windows client applications using Windows Forms or WPF

.NET Core is a better choice if you:

  • Want to target your apps on Windows, Linux, and Mac operating systems.
  • Are not afraid of learning new things.
  • Are not afraid of breaking and fixing things since .NET Core is not fully matured yet.
  • A student who is just learning .NET.
  • Love open source.

This is how Microsoft explains it:

.NET Framework is the "full" or "traditional" flavor of .NET that's distributed with Windows. Use this when you are building a desktop Windows or UWP app, or working with older ASP.NET 4.6+.

.NET Core is cross-platform .NET that runs on Windows, Mac, and Linux. Use this when you want to build console or web apps that can run on any platform, including inside Docker containers. This does not include UWP/desktop apps currently.

Xamarin is used for building mobile apps that can run on iOS, Android, or Windows Phone devices.

Xamarin usually runs on top of Mono, which is a version of .NET that was built for cross-platform support before Microsoft decided to officially go cross-platform with .NET Core. Like Xamarin, the Unity platform also runs on top of Mono.

.NET Framework, .NET Core, Xamarin

Xamarin is not a debate at all. When you want to build mobile (iOS, Android, and Windows Mobile) apps using C#, Xamarin is your only choice.

The .NET Framework supports Windows and Web applications. Today, you can use Windows Forms, WPF, and UWP to build Windows applications in .NET Framework. ASP.NET MVC is used to build Web applications in .NET Framework.

.NET Core is the new open-source and cross-platform framework to build applications for all operating system including Windows, Mac, and Linux. .NET Core supports UWP and ASP.NET Core only. UWP is used to build Windows 10 targets Windows and mobile applications. ASP.NET Core is used to build browser based web applications.

.NET Framework, .NET Core, Xamarin

Monday, November 21, 2016

Targeting .NET Platforms

You can build apps for many platforms and services by downloading .NET Framework targeting packs and SDKs and using them with Visual Studio.

Check this link for relevant platforms

Friday, October 24, 2014

How do you clear temporary files in an ASP.NET website project?

All you need to do is stop IIS from Services, go to c:\Windows\Microsoft.NET\Framework\v4.0.30319\ or respective Framework directory, open the Temporary ASP.NET Files and delete the folders

What happens when we delete these files? Is it safe?

Yes, it's safe to delete these, although it may force a dynamic recompilation of any .NET applications you run on the server.

For background, see the Understanding ASP.NET dynamic compilation article on MSDN.

Sunday, May 15, 2011

When to use .NET Framework Client Profile

The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications. It provides functionality for most client applications, including Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation (WCF), and ClickOnce features. This enables faster deployment and a smaller install package for applications that target the .NET Framework 4 Client Profile.

Check out following MSDN Page for Client Profile:.NET Framework Client Profile

Tuesday, December 28, 2010

Working with the ASP.NET Global.asax file

The Global.asax file, sometimes called the ASP.NET application file, provides a way to respond to application or module level events in one central location. You can use this file to implement application security, as well as other tasks.

Overview

The Global.asax file is in the root application directory. While Visual Studio .NET automatically inserts it in all new ASP.NET projects, it's actually an optional file. It's okay to delete it—if you aren't using it. The .asax file extension signals that it's an application file rather than an ASP.NET file that uses aspx.

The Global.asax file is configured so that any direct HTTP request (via URL) is rejected automatically, so users cannot download or view its contents. The ASP.NET page framework recognizes automatically any changes that are made to the Global.asax file. The framework reboots the application, which includes closing all browser sessions, flushes all state information, and restarts the application domain.

 

Programming

The Global.asax file, which is derived from the HttpApplication class, maintains a pool of HttpApplication objects, and assigns them to applications as needed. The Global.asax file contains the following events:

  • Application_Init: Fired when an application initializes or is first called. It's invoked for all HttpApplication object instances.
  • Application_Disposed: Fired just before an application is destroyed. This is the ideal location for cleaning up previously used resources.
  • Application_Error: Fired when an unhandled exception is encountered within the application.
  • Application_Start: Fired when the first instance of the HttpApplication class is created. It allows you to create objects that are accessible by all HttpApplication instances.
  • Application_End: Fired when the last instance of an HttpApplication class is destroyed. It's fired only once during an application's lifetime.
  • Application_BeginRequest: Fired when an application request is received. It's the first event fired for a request, which is often a page request (URL) that a user enters.
  • Application_EndRequest: The last event fired for an application request.
  • Application_PreRequestHandlerExecute: Fired before the ASP.NET page framework begins executing an event handler like a page or Web service.
  • Application_PostRequestHandlerExecute: Fired when the ASP.NET page framework is finished executing an event handler.
  • Applcation_PreSendRequestHeaders: Fired before the ASP.NET page framework sends HTTP headers to a requesting client (browser).
  • Application_PreSendContent: Fired before the ASP.NET page framework sends content to a requesting client (browser).
  • Application_AcquireRequestState: Fired when the ASP.NET page framework gets the current state (Session state) related to the current request.
  • Application_ReleaseRequestState: Fired when the ASP.NET page framework completes execution of all event handlers. This results in all state modules to save their current state data.
  • Application_ResolveRequestCache: Fired when the ASP.NET page framework completes an authorization request. It allows caching modules to serve the request from the cache, thus bypassing handler execution.
  • Application_UpdateRequestCache: Fired when the ASP.NET page framework completes handler execution to allow caching modules to store responses to be used to handle subsequent requests.
  • Application_AuthenticateRequest: Fired when the security module has established the current user's identity as valid. At this point, the user's credentials have been validated.
  • Application_AuthorizeRequest: Fired when the security module has verified that a user can access resources.
  • Session_Start: Fired when a new user visits the application Web site.
  • Session_End: Fired when a user's session times out, ends, or they leave the application Web site.

The event list may seem daunting, but it can be useful in various circumstances.

A key issue with taking advantage of the events is knowing the order in which they're triggered. The Application_Init and Application_Start events are fired once when the application is first started. Likewise, the Application_Disposed and Application_End are only fired once when the application terminates. In addition, the session-based events (Session_Start and Session_End) are only used when users enter and leave the site. The remaining events deal with application requests, and they're triggered in the following order:

  • Application_BeginRequest
  • Application_AuthenticateRequest
  • Application_AuthorizeRequest
  • Application_ResolveRequestCache
  • Application_AcquireRequestState
  • Application_PreRequestHandlerExecute
  • Application_PreSendRequestHeaders
  • Application_PreSendRequestContent
  • {{{{code executed}}}}
  • Application_PostRequestHandlerExecute
  • Application_ReleaseRequestState
  • Application_UpdateRequestCache
  • Application_EndRequest

A common use of some of these events is for security. The Global.asax file is the central point for ASP.NET applications. It provides numerous events to handle various application-wide tasks such as user authentication, application start up, application error and dealing with user sessions etc. You should be familiar with this optional file to build robust ASP.NET-based applications.

Tuesday, September 15, 2009

File Monitoring in .NET

File monitoring applications can be easily developed in .NET using the FileSystemWatcher class. This class listens to changes in files system and raises events whenever changes happen. This article explains how to monitor changes in files and subdirectories of a directory using the FileSystemWatcher class.
The FileSystemWatcher is available within the System.IO namespace. We need to include the System.IO namespace for accessing the FileSystemWatcher class. In order to specify the folder to monitor we have to set the Path property of the FileSystemWatcher as shown below:

FileSystemWatcher fsw = new FileSystemWatcher();
fsw.Path = "c:\\fileWatcher";
If you want to monitor changes to a specific file then the Filter property should be used along with the Path property. The Filter property should be set to file name and the Path property should be set to the path of the folder as shown below
fsw.Path = "c:\\fileWatcher ";
fsw.Filter = "TestWatchFile.txt";
Wild card characters can also be used to specify set of files as shown below
fsw.Filter = "*.txt";
The FileSystemWatcher to begin monitoring we have to set the EnableRaisingEvents property to true
fsw.EnableRaisingEvents = true;

As mentioned before the FileSystemWatcher raises events whenever changes like creation, deletion etc happens to the specific folder or file. The events that are raised by FileSystemWatcher are Changed, Created, Deleted, Error and Renamed.

We need to write appropriate event handlers to handle these events. The FileSystemEventHandler has an argument named FileSystemEventArgs, which provides useful event data. The data provided by the FileSystemEventArgs are ChangeType which gives the type of change that occurred and Path which gives the full path of the affected file or folder.

A sample Changed event handler is given below
fsw.Changed += new FileSystemEventHandler(fsw_changed);
fsw.Deleted += new FileSystemEventHandler(fsw_changed);
fsw.Created += new FileSystemEventHandler(fsw_changed);
private void fsw_changed(object Sender,FileSystemEventArgs e)
{
MessageBox.Show("The file" + e.FullPath+ " was " + e.ChangeType.ToString() + " on " + System.DateTime.Now.ToString());
}

FileSystemObject class can be used to monitor files or folders by setting appropriate properties and handling the events raised by the class.

Monday, October 20, 2008

Microsoft .NET Framework 3.0 (Brief Overview)

 

What is the Microsoft .NET Framework 3.0?
The Microsoft .NET Framework 3.0 (formerly WinFX), is the new managed code programming model for Windows.

It combines the power of the .NET Framework 2.0 with four new technologies:
Windows Presentation Foundation (WPF),
Windows Communication Foundation (WCF),
Windows Workflow Foundation (WF), and
Windows CardSpace (WCS, formerly “InfoCard”).

Use the .NET Framework 3.0 today to build applications that have visually compelling user experiences, seamless communication across technology boundaries, the ability to support a wide range of business processes, and an easier way to manage your personal information online. This is the same great WinFX technology you know and love, now with a new name that identifies it for exactly what it is – the next version of Microsoft’s development framework.

What is Windows Communication Foundation ?
The Windows Communication Foundation (previously codenamed "Indigo") is Microsoft's unified framework for building
secure, reliable, transacted, and interoperable distributed applications.

What is Windows Presentation Foundation ?

Windows Presentation Foundation (WPF) is the next-generation presentation sub-system for Windows.

It provides developers and designers with a unified programming model for building rich Windows smart client user experiences that incorporate UI, media, and documents.

What is Windows Workflow Foundation?

Windows Workflow Foundation (WF) is the programming model, engine and tools for quickly building workflow enabled applications.

WF radically enhances a developer’s ability to model and support business processes.

Windows Workflow Foundation is a part of the .NET Framework 3.0 that enables developers to create workflow enabled applications. It consists of the following parts:

Activity Model:
Activities are the building blocks of workflow, think of them as a unit of work that needs to be executed.

Activities are easy to create, either from writing code or by composing them from other activities. Out of the box, there are a set of activities provided that mainly provide structure, such as parallel execution, if/else, call web service.

Workflow Designer:
This is the design surface that you see within Visual Studio, and it allows for the graphical composition of workflows, by placing activities within the workflow model.
One interesting feature of the designer is that it can be re-hosted within any Windows Forms application.

Workflow Runtime:
Our runtime is a light-weight and extensible engine that executes the activities which make up a workflow.

The runtime is hosted within any .NET process, enabling developers to bring workflow to anything from a Windows Forms application to an ASP.NET web site or a Windows Service.

Rules Engine:
Windows Workflow Foundation has a rules engine which enables declarative, rule-based development for workflows and any .NET application to use.

Windows Workflow Foundation will be released as part of the .NET Framework 3.0 which is part of the Windows Vista release. The .NET Framework 3.0 will be available for Windows XP as well as Windows Server 2003

What is Windows Card Space ?
Windows CardSpace enables users to provide their digital identities in a familiar, secure and easy way.

In the physical world we use business cards, credit cards and membership cards.

Online with CardSpace we use a variety of virtual cards to identify ourselves, each retrieving data from an identity provider. Don't struggle with usernames and passwords, just choose an information card!

Saturday, July 07, 2007

How many types of JIT

How many types of JIT

Three types.
Pre-JIT (Compiles entire code into native code at one stretch)
Ecno-JIT (Compiles code part by part freeing when required)
Normal JIT (Compiles only that part of code when called and places in cache)