protected virtual void jaysonBlog { : Windows Live Writer News Feed 

It took me a couple of tries to get the new Windows Live beta package installed on my machine; the secret fix for me was to enable the Windows Firewall service (I disable it since I’m behind other firewalls), so if your install is failing, turn on the Firewall service. You can turn it off again after you’re done.

The previous version of Windows Live Writer hasn’t worked on any of my machines for quite some time now, so it’s nice that the new version actually works again. I might actually start keeping up with my blog again, although in a completely new mode of content since my tech days are long behind me (professionally at least). If you want to test drive the new Windows Live Essentials beta, you can download it from here. The new Windows Live Messenger is worth the download alone in my opinion. Much more polished, and you can plug it into social networks like Facebook, etc.

So let’s see if this new version actually works, and if it does look for more updates in this space. I have my blog linked to my FB notes, so this post should show up on my FB profile as well.

Today we announced first public release of our Windows Live Writer Plugins project which was codenamed Cyclone.

This collection contains six plugins as well as their source code.  Jayson is one of project coordinators and members and had a Winamp Currently Playing plugin to present via this project but didn't have time to add it to source control so we'll include it in next versions.

Cyclone's binary and source code files are available on CodePlex.

Today we announced first public release of our Windows Live Writer Plugins project which was codenamed Cyclone.

This collection contains six plugins as well as their source code.  Jayson is one of project coordinators and members and had a Winamp Currently Playing plugin to present via this project but didn't have time to add it to source control so we'll include it in next versions.

Cyclone's binary and source code files are available on CodePlex.


Wednesday, August 16, 2006  |  From protected virtual void jaysonBlog { : Windows Live Writer

Just stumbled across an interesting bug in WLW:  I can't copy text into the title of a post.  Anyone else seeing this behavior?

I also cannot find a place to submit bug reports to the WLW team.

Also, a little gotcha for Community Server users...if you are running in single blog mode (i.e. your blog is located at <yourSite.com>/blog/) and you aren't able to get the Web Layout/Web Preview options to work, point WLW to <yourSite.com>/blogs/MetaBlog.ashx and that should clear it up.  You'll still be able to post normally from WLW and you'll get the eye candy as well.


So, after realizing that Windows Live Writer is written largely in .Net (and has an SDK available for download (.msi)), combined with the fact that I can't sleep, I decided to hack out my first WLW plugin...append a "Currently listening to" block to the end of posts made in WLW (currently it only supports Winamp, but I will extend it to support all major media players in the very near future).  There's really not much to it right now; just drop the assembly into your WLW plugins directory and it will add a menu entry to the Insert menu named "Winamp Now Playing...", click it and whatever you're listening to in Winamp will be appended to your post (this option is also available via the Insert block on the right hand sidebar).  Easy enough.

The WLW API is dirt simple, but is also lacking in a few areas...of course I'm sure it's far from complete, but it's quite elegant in its simplicity.  I'm diggin' it.  You can download my WinampNowPlaying WLW plugin from here (to be considered alpha quality, but it does indeed work...also, it's compiled against .Net 2.0 so if you don't have 2.0 installed, you're SOL).  I plan on enhancing this plugin quite a bit over the coming weeks, but wanted to be the first cool kid on the block to post a WLW plugin ;-).  I'm also starting a new post category for all of my WLW endeavors, which hopefully will be many.

Currently listening to: DJ Bolivia - Hunt The Wumpus - downloaded from www.djbolivia.ca


 protected virtual void jaysonBlog { : Windows Live Writer News Feed 

 Keyvan Nayyeri : Windows Live News Feed 
Thursday, August 27, 2009  |  From Keyvan Nayyeri : Windows Live

In the first two parts of my new post series about Visual Studio add-in and integration package as two primary options to extend Visual Studio IDE I gave a quick overview of the past history of Visual Studio Extensibility with an emphasis on these two options, and talked about the technical structure of an add-in along with its applications.

Now in the third part I want to go over the technical structure of a Visual Studio integration package also known as VSPackage and talk about its applications to contrast it with add-in structure and applications.

What is a VSPackage?

The second extensibility option that is a part of our discussion is VSPackage.

First of all, let’s make it clear about the name. VSPackage stands for Visual Studio Package and some other guys call it VS SDK Package and it’s also known as Visual Studio Shell Integrated package in Visual Studio 2008 (after the birth of Visual Studio Shell technology). I usually refer to it as VSPackage which seems to be the well-known term.

A VSPackage, as its name suggests, is a component that integrates into Visual Studio environment like a built-in part of the IDE and here is the key point. It integrates with the IDE very well and can do things that add-ins can’t do and this is the primary advantage for it in comparison with add-ins.

VSPackage applies low level APIs of the IDE to accomplish things. These APIs are similar to those that development teams at Microsoft use to build many built-in parts of the IDE.

When you use a VSPackage, you’re actually using a built-in part of Visual Studio and when you develop a VSPackage, you’re developing something like what a Microsoft developer may develop inside the company.

A VSPackage consists of groups of some main elements including:

  • User interface elements
  • Projects
  • Services
  • Designers
  • Editors

You can develop each of these elements for your VSPackage to integrate a new feature or some new features with existing Visual Studio features.

One of the good examples of a VSPackage is an implementation done by Microsoft as Team Explorer. Team Explorer, a client to work with Team Foundation Server source control, is a VSPackage that integrates some features with Visual Studio.

VSPackage, like add-in, is one of the first level Visual Studio extensibility options that is already known as the most professional way to extend this IDE with a deep integration.

Technical Structure of a VSPackage

Like add-ins, VSPackages are also some components that are compiled in a way to be accessed by Visual Studio COM components that implement interfaces. A VSPackage mainly implements IVsPackage interface but since VS 2005, Managed Package Framework (MPF) is introduced to make things easier and now you just need to derive from a base class named Package that automatically derives from several interfaces including IVsPackage.

VSPackage structure

Although this is the main part of the package implementation but there are lots of things besides it that make a VSPackage include commands, designers, editors, tool windows, and related stuff that are beyond the scope of this context.

When you want to develop a VSPackage, you need to implement various parts of this component mainly the part that derives from VSPackage. As you can guess, the development of a VSPakcage takes more effort and requires a deeper knowledge in Visual Studio Extensibility and COM programming.

Note that the most suitable language to use in order to develop a VSPackage is VC++. Although other .NET languages such as C# can be used, in some circumstances you face with limitations with these languages.

Monday, August 24, 2009  |  From Keyvan Nayyeri : Windows Live

Two days ago I started a new post series to discuss Visual Studio add-in and integration package in order to introduce their structure, applications, differences, commonalities, and how to upgrade from an add-in to a VSPackage. My main goal is to cover some aspects of this discussion that have been an ambiguous part of Visual Studio Extensibility for a newbie.

In the first post of this series, I gave a quick overview of the past history of Visual Studio Extensibility, these two options, and how they evolved during the past decade or so. In this second part I want to review the technical structure of an add-in along with its applications.

What is an Add-in?

In fact, the term add-in refers to something general in Microsoft products including Visual Studio IDE and Office Suite and in Visual Studio it’s known as VSAdd-in. But it’s common among Visual Studio users and developers to simply call it “Add-in”.

But what’s the application of an add-in and why it’s designed as a part of Visual Studio extensibility?

Add-in is actually an extension to Visual Studio that lets developers apply high level APIs of the Visual Studio and Development Tools Extensibility (DTE) to extend Visual Studio in several ways but with some limitations that relate to the API that they can use.

Above paragraph states some important facts about add-ins:

  • Add-in is an extensibility option.
  • Add-in uses high level APIs. This is important when we talk about VSPackage that uses low level APIs.
  • The main APIs to use with add-ins are those that are part of the Development Tools Extensibility (also known as DTE). You’ll read a short overview of the DTE later in this series.
  • There are some limitations to build add-ins and use them. Add-ins use some high level APIs and this restricts them in some points. You’ll read more about these limitations later in this series.

Now that you read a quick definition of add-in and a short description about important aspects of an add-in, let’s dig into more details about add-ins.

Technical Structure of an Add-in

From a technical point of view add-in is a compiled package of code that can run by a mechanism in Visual Studio known as Visual Studio add-in system. This is in opposite direction to the definition of VSMacro that is not a compiled piece of code.

Add-in is a COM component. It means that add-in, like many other COM components, implements a programming interface for a component. In general Visual Studio Extensibility consists of lots of these interfaces and their corresponding implementations to enable interoperability between .NET and COM.

The development mechanism of add-ins is a built-in part of Visual Studio and there is a Visual Studio template for this purpose.

From a technical point of view add-in implements IDTExtensibility2 interface from EnvDTE80 namespace (this is of course what you see in Visual Studio 2005 and 2008 and names are different for prior versions). This interface contains five methods that can be implemented to handle events that let you implement your logic for these main events including OnConnection, OnDisconnection, OnAddInsUpdate, OnStartupComplete and OnBeginShutdown. The structure of an add-in is shown below.

Simple add-in structure

Beside this, there is an XML file with a .vsaddin extension that acts like a configuration file for your add-in and you must configure it.

Before Visual Studio 2005, the deployment of add-ins was a little hard and required the registration of COM assemblies on the machine but thank to the introduction of this .vsaddin file, now you just deploy the assembly and this configuration file to a specific path.

You’re able to integrate an add-in into Visual Studio as a part of some user interface elements. You can add a Visual Studio command for your add-in to the IDE and then use this command to achieve many things.

For example, you can add your add-in to the user interface as a new menu item for default Visual Studio menus or right-click menu.

Since add-ins have access to the automation model API, they can do many things that I outline some of them here:

  • Trigger your logic for various events
  • Manipulate some default Visual Studio windows like Tasks List, Output or Error List
  • Manipulate the text in documents regardless of being code or not
  • Manipulate the code in code files using the code model
  • Manipulate solutions, projects and project items
  • Manipulate and customize the build process
  • Work with source control and implement your own source controls or customize existing ones

These are some main tasks that add-ins can do but besides them, you’re able to design your own user interface for the add-in to show to the user in order to return outputs or get inputs. Moreover, you’re able to integrate a Tools Options Page in order to have dynamic configuration and settings for your add-ins.

There is a Visual Studio mechanism to load and run add-ins. This mechanism looks for add-in files in specific paths (that you can modify) and then loads all valid add-ins (that implement the interface and have a valid .vsaddin file). After loading these add-ins, it calls the specific method whenever that event type occurs. You saw that there are five main events that an add-in implements and can respond to them when Visual Studio calls such methods.

By implementing an extra interface called IDTCommandTarget and registering a command for your add-in, you’re also able to respond to the command whenever it’s called and this lets you do much more things than what you can do by default implementation of add-in. This also lets others to develop macros and add-ins that will apply your add-in.

Advanced add-in structure

In general, there are many goals that can be achieved with add-ins quickly and easily. The development and deployment process of add-ins has been made much easier in Visual Studio 2005 and 2008, and now it’s the fastest way to extend Visual Studio with high level APIs.

Saturday, August 22, 2009  |  From Keyvan Nayyeri : Windows Live

It’s been quite a long while since the last time that I wrote something about Visual Studio Extensibility as a topic that I used to write a dedicated book for. Therefore, to improve my blogging activity and feed those readers of my blog who are interested in VSX, here I’m going to publish a post series with a few posts that discuss add-in and integration package, contrast their similarities and differences, and talk about the process of upgrading an add-in to a VSPackage.


By the way, this is a good topic to elaborate because in many areas add-ins and VSPackages may overlap in their applications, and it may be difficult for a newbie to choose which of these two main extensibility options to use.

Overview


Visual Studio Extensibility consists of a set of different extensibility options available in Microsoft Visual Studio IDE to let developers extend this popular IDE for their requirements.


In this post series my main goal is to talk about two famous and common extensibility points included in the IDE: add-in and VSPackage.

Objectives


Let’s take a look at the objectives for this post series before digging into them:


  • Discovering the concept of add-in and VSPackage and their applications
  • Understanding the similarities and differences between these two extensibility options both in applications and in their access to VS API
  • Learning when to use an add-in and when to use a VSPackage
  • Learning how to upgrade an add-in to a VS SDK Package when necessary

An Overview of Visual Studio Extensibility, Add-In, and VSPackage


The first thing that I need to talk about is the role of add-in and VS SDK package in Visual Studio Extensibility and a short history of them. This can give a general understanding of the differences between these two options to you.


Visual Studio Extensibility (VSX) consists of a set of basic concepts, general API, and different options that form its foundation. Some of these options are very well-known for their role in VSX, and are actually a first-level extensibility option while others may be placed in the second and third level per their commonality in VSX.


Speaking of these three levels, we can split all Visual Studio Extensibility points into three levels based on their commonality in extensibility and their role.


The first level consists of some options that are specifically designed for extensibility like add-ins, macros, and VS SDK packages. The second level consists of some options that are designed for extensibility but are targeting other fields as well. Some examples are debugger visualizers or templates. And the third level of extensibility options contains some features of Visual Studio that are specifically designed for other purposes but can help the extensibility as a side-application.


But here our focus is on the first level and some very well-known extensibility points including add-ins and VS SDK packages. Both these options are primary extensibility options for Visual Studio. Add-ins have been with this IDE from the early days but VS SDK packages are introduced as a part of Visual Studio SDK in the newer versions.


As Visual Studio was built on top of COM technology, add-ins were introduced in the first version as an extensibility option and were implementing a COM interface. Actually add-in was the first extensibility option for Visual Studio that we know. Add-in has been improved in each new version of Visual Studio. Introduction of the .NET framework in 2002 had an important impact on add-in structure and changed the way that an add-in could be developed. So Visual Studio 2002 came with new structure for add-ins based on the .NET languages. While developers had to implement an interface (due to the COM nature of Visual Studio all the time), they could use cool new features introduced with the .NET framework. Microsoft made this possible via the interoperability between the .NET and its prior development technology, COM. Later with Visual Studio 2005 Microsoft improved add-in again and used XML to simplify its deployment process.


But the story of VS SDK package is a little different. The growing importance of Visual Studio in the past 10 years convinced Microsoft to start a new program called Visual Studio Industry Partner program (commonly known as VSIP program). This program targets bigger Microsoft partners that are working around Visual Studio and allows them to have access to many stuff related to Visual Studio.


As you’ll read later in this series, there were some limitations with add-ins in extending Visual Studio while many developers and partners wanted better ways to extend the IDE. The result was that Microsoft finally introduced a new extensibility feature called VS SDK package. VSPackages first introduced to VSIP members as a part of a private program and then became public to everyone.


These two options are nowadays the most common ways to build extensions for Visual Studio and many of the current extensions for the IDE are written as an add-in or VS SDK package, however, Visual Studio 2010 is supposed to change extensibility of Visual Studio significantly by introducing Visual Studio extensions as the new and great way to expand Visual Studio features.

Monday, August 17, 2009  |  From Keyvan Nayyeri : Windows Live

From Left: Milad, Mohammad, Mahdi, Keyvan, Soheil, Hamed, BehnamA few days ago I received some extra author copies of our newly published book, Beginning ASP.NET MVC 1.0, at my address. I was thinking about meeting with some old friends in Tehran for a long time, and decided to use this opportunity to have a presentation and meeting to share some copies with my friends. By the way, those who have read the book know that I have dedicated this book to all Iranians around the world.

Today we had a meeting with a few friends including Hamed Banaei, Mahdi Taghizadeh, Soheil Rashidi, Behnam Yusefi, Milad Karbasizadeh, Mohammad Reza Mohammadali, Farid Arzpeyma, and Pedram Pourhossein where I had an introductory presentation on ASP.NET MVC 1.0.

The presentation was an introduction to ASP.NET MVC 1.0 and I tried to give an overview of the ASP.NET MVC 1.0 including a historical perspective, the MVC pattern, reasons to have ASP.NET MVC, main components of ASP.NET MVC, and best practices for ASP.NET MVC.

Finally I had a random draw to share a few copies of our book with old friends and we talked about future plans to hopefully gather Iranian developers and organize better groups for future community activities.

Keyvan NayyeriMahdi has published some photos of this meeting and presentation where I had worn an anti-WebForms t-shirt designed and sent by Simone to me.

For your information some of these friends were among those who brought the knowledge of the .NET Framework to Iran, shared their expertise, and spread the word about the new technology as early as it was introduced by Microsoft. We were contributing to some local communities by writing articles and improving the common knowledge in this field. Unfortunately we missed each other for a long time and became busy with career and personal stuff, so couldn’t meet each other (except Hamed and I that meet regularly).

We’re looking to having more meetings after this and plan some nerd dinners, workshops, monthly talks, and hopefully technical conferences in the future, and welcome anyone who can help us in any way.

You can download the slides of my presentation from here.

Thursday, August 6, 2009  |  From Keyvan Nayyeri : Windows Live

Wrox Beginning ASP.NET MVC 1.0 Sometimes you stand in the middle point of several emotions, and you can’t distinguish happiness, sadness, anger, and fear! Unfortunately I’ve been at that point for the past weeks and all the events are driving me nuts! All in one, this may become the last post published on this blog.

Initially I expected to celebrate the release of our Beginning ASP.NET MVC 1.0 book, as the last book I wrote for a long time, with happiness and pride, but for me the situation is far from that point.

However, I thought that I have to break the silence and publish this post and spread the word about the final release of Beginning ASP.NET MVC 1.0 . Simone has written a post describing this release and thanking some friends and editors who helped us get this book out to the market.

It’s a long story about this book and you know it less or more. We worked on this book for over a year and went through unexpected editorial reviews that delayed the release for 2-3 months while our main goal was to meet the audience level and improve the flow of the text.

First of all, I’d like to note something about the audience level of Beginning ASP.NET MVC 1.0 that is released under Beginning series. Recently I wrote a blog post and explained different book series published by Wrox that can serve as a good guide for you to understand the differences between Beginning series and others.

Besides, I should strongly recommend you to read the introduction section of the book that describes many points about the content, leveling, and prerequisites which can help you decide whether this is an appropriate title for you or not. Based on the experience in the past years, I realized that a reasonable number of negative feedback on a technical book come from misunderstandings of its content and leveling, and readers pick the wrong book and get a wrong impression about that.

In essence, Beginning ASP.NET MVC 1.0 targets the reader who is familiar with ASP.NET WebForms development to some extent and is able to understand simple C# code (whether as a C# developer or a VB developer familiar with C-family syntax). This book tries to teach the principles of the Model View Controller (MVC) pattern and ASP.NET MVC and improve the knowledge of its reader to become an intermediate developer ready to develop real-world web applications. Like other Beginning books published by Wrox, this book applies a pragmatic approach with many examples to demonstrate the concepts.

While book includes many rudimentary but key examples in its content, it ends with two case studies as the front-end of a simple blog engine written by ASP.NET MVC, and a photo gallery that applies Flickr API. Both these chapters are written based on common real-world techniques (such as Dependency Injection and unit testing) to train the concepts exhibited throughout the book.

This book is structured in 19 chapters and 2 appendices. The table of contents for this book is available on Wiley website, and you can also read the first chapter as a free sample chapter about the MVC pattern. Here is a short summary of the flow of the chapters:

  • Chapters 1 to 3 talk about principles of the Model View Controller (MVC) pattern as well as basic concepts in ASP.NET MVC, and differences between ASP.NET MVC and ASP.NET WebForms.
  • Chapters 4 to 11 discuss the main elements and topics in ASP.NET MVC such as model, controller, view, routing, unit testing, components, and action filters.
  • Chapters 12 to 17 extend the discussion with specific topics that are common in web development such as AJAX, deployment, leveraging ASP.NET WebForms features, Authentication/Authorization, extensibility, and ASP.NET WebForms migration.
  • Chapters 18 and 19 give two case studies and discuss them to complement the content with a practical approach.
  • Appendix A lists some resources for further exploration, and the long Appendix B provides the solutions to all the exercises assigned at the end of the chapters.

Also it may be interesting to know that Phil Haack has done a favor and has written a foreword for our book.

As a positive point about the book, we have tried to use prominent community tools and components to develop some examples and teach some common tools and libraries in a few chapters and examples.

Many people helped us during the long process of writing and reviewing the chapters of this book and we have to thank them as we did in the acknowledgments section. However, I follow Simone on this and thank Kelly Talbot and Sydney Jones for their hard work as Development Editors of the book. As technical editors, Eilon Lipton and Ivan Porto Carrero had a huge impact on the quality of the content and helped us boost it, so I thank them, too. Jim Minatel, Katie Mohr, Paul Reese, and Kathleen Wisor were other editors at Wiley/Wrox who helped us with different stuff to deliver this book to the market and we thank them.

My thanksgivings shouldn’t end here because there were many friends, colleagues, and community leaders/members who helped us in different ways to improve the quality and promote the book. Many of them should have received (or will receive) a copy of the book as a small gift for their help and support.

I also thank Simone for cooperating with me during the writing process to pass all the hick-ups with communication and motivation. I’m glad that Simone had some wonderful news about himself during the writing process and it could become a good experience for him.

I have dedicated this book to all the Iranians around the world, and I hope that first we can find ourselves in the right position in the world independent from the eastern or western semi-powers, then regain our leading position that we had for thousands of years to bring back the peace and justice to the world.

Beginning ASP.NET MVC 1.0 is available on Amazon US, Wiley, and Wrox websites, and should be available on Amazon UK and Barnes & Noble very soon. Other formats such as PDF and Amazon Kindle should be available shortly as well.

There is no doubt that no matter how much we have worked on this book and tried to catch the flaws, it has much space for improvements and we’d be happy to hear your thoughts about the book to enhance its quality for the next editions. Therefore, we invite you to leave your comments on Wrox P2P forum dedicated to the book.

Friday, July 10, 2009  |  From Keyvan Nayyeri : Windows Live

Waegis - The Web Aegis These days I’m not having good days neither in the social life nor in the personal life, nor in the professional life, to talk about celebration and happiness, but as a coincidence, it’s also the time for birthday anniversaries of my sites, family members, and friends!

However, after the fourth birthday anniversary of my blog, today I marked the first birthday anniversary of Waegis, my professional anti-spam service for modern spam types. I feel that the past year has gone fast to me, at least faster than ever, because I can’t believe it’s been a year since I launched Waegis and Phil Haack reported the first problem with user activation system in a few minutes!

I’ve detailed some points about the service in my original anniversary post on Waegis blog, but here I want to say that Waegis has been a different experience for me. The special development scenario with its own requirements and huge number of tips, techniques, and tricks that I used to optimize and set it up was just the beginning because following the launch of the service, I earned new experiences and faced with new requirements on the site to keep the ball its rolling. Although there have been some minor problems that are regular with all the similar services in this level, Waegis has had an excellent progress both in statistics and quality which put smile on my face to see the positive results of my changes.

Here for this specific service, I don’t care about the fast-growing number of hosted sites on Waegis, and the most important point to consider is the tricky modifications in spam rules and algorithms to scale up the software and help it have such an excellent jump in accuracy rate.

As I wrote in that blog post, I’m not planning any change in the software codebase unless I feel it’s necessary to keep the quality of the service or its scaling, but once I find a stable position in my life, I’m going to take some actions in order to give Waegis a better credit and promote it to a better place that it deserves on the web.

I stated on Waegis blog and repeat it here that I should thank Hamid Shojaee and Axosoft for sponsoring the service and their support that has had a huge impact on keeping the service up and running. Also I thank all my friends and users of the service for their support and valuable feedback, and hope they keep my back for the second year as well.

Sunday, June 28, 2009  |  From Keyvan Nayyeri : Windows Live

A short while after hitting the 1000th post milestone, today my blog turns four to somehow become one of the mature blogs on the community! It’s really hard to believe that fours years are gone. I feel it was a few weeks ago when I began blogging here!


Prior to the events happened in Iran, I was thinking about celebrating this milestone by ordering a cake and having a small party, but these phenomena are sad enough to stop me from anything like that!


I have a tradition to go over the past year of blogging and talk about my future plans when my blog becomes older every year. Unlike the past couple of years (2007 and 2008), I don’t think there is much to say for this year as it’s been the lowest year of activity on my blog.

During the past year many things happened to me in the personal and professional life that should have affected this blog as well. First I ended my conscript, then tried to recover myself and my life from that long period of difficult life. I had been able to keep my blog up with at least 20 posts per months until the end of the service, but right after that and due to some reasons, I suddenly lost that record and my blogging activity hit its lowest rate in the latest months.


Facing with some unexpected tasks that ate my time such as the additional revision of the book, the general influence of Twitter on blogging, and apparently losing my old motivation for blogging, were all some reasons for this change in my blogging style.


On the other hand, I had a positive change to publish more detailed technical posts that received more acclaim by the community, so I don’t think that a linear statistical model based on the number of posts can completely reflect the quality and value of the blog.


However, here is a short overview of what happened around Nayyeri.NET during the past 12 months. By the way, it’s the shortest list that I’ve had to now. Not many upgrades and changes in the software and look and feel of the blog.


  • Attacked by hackers (August 9, 2008): Last year some ASP.NET blogs and websites received huge number of SQL injection attacks that I discussed in the post. Nayyeri.NET was also one of those blogs, but none of those attacks could take the blog down even for one second. Finally, I blocked those attacks by installing UrlScan.
  • Upgraded to Windows Server 2008 and SQL Server 2008 (September 19, 2008): I moved my blog from a Windows Server 2003 VPS with shared SQL Server 2005 database to a dedicated Windows Server 2008 with SQL Server 2008 database on MaximumASP to improve the quality and security.
  • Moved off the FeedBurner (October 15, 2008): After using FeedBurner and its MyBrand service for a long while, I felt that there are major problems with the service since Google started to move the feeds. So, I returned back to my own feed and recovered my addresses.
  • Upgraded to Graffiti 1.2 (December 20, 2008): As Telligent released the new version of Graffiti CMS, I upgraded the blog to the latest build.
  • Best posts 2008 (December 31, 2008): In the last day of 2008 I picked the best 25 posts that I had written in that year.
  • Updated blog theme to Envision (February 5, 2009): I changed the look and feel of the blog by importing another Styleshout free template called Envision to Graffiti CMS. However, after a while I recovered the Underground theme because Envision wasn’t very compatible with source code samples in my posts.
  • Published the 1000th post (May 10, 2009): After a very long time of blogging, I published the 1000th post on my blog which was a milestone for technical blogs like mine.

Talking about the future is difficult, especially this year, because there are many things going to happen to me which can change everything around my community activities including my blogging, but I can be certain that unfortunately I don’t think that my blogging activity will be better for the next coming year. There is also a high chance that I change the type of content that I publish here.


Also I’ve been thinking about switching from Graffiti to my own blogging engine or something community-driven specifically something written with ASP.NET MVC. As you know, Telligent has been experiencing some problems in the crisis and after many lay-offs, they also haven’t had an update on Graffiti CMS for a long while. I haven’t been able to find the time to choose my new engine and convert my data, but I try to do that as soon as possible.

Monday, June 22, 2009  |  From Keyvan Nayyeri : Windows Live

Photo taken from http://www.dailyadvance.com/multimedia/dynamic/00180/Mideast_Iran_Presid_180874f.jpg I’m going to celebrate the fourth birthday anniversary of my blog shortly but for the first time in this long while I really don’t know what to write. Sometimes you have many things to say and don’t know which one to write first, but you suddenly realize that no one has the time to read everything that you write!

I don’t think there is anyone who doesn’t know about the events happened in Iran during the past couple of weeks that put us on top news on almost all news websites and media. From the unique campaigning of presidential candidates to the huge contribution of people to vote, the long story of frauds in the election, and the protests that happened in response to them. Less or more, you know many things and of course, most of you don’t have a 100% correct perspective on the situation here as the overall media coverage had some serious weaknesses.

I’m not going to go over the description of events or my personal analysis of these phenomena because I’m deeply sad and don’t want to review whatever happened. Honestly, life has become very difficult here for many people including myself and it has led to a national depression in our society.

This green wave that relied heavily on technology and internet during the campaigning, voting, counting, and protesting is now known to many of you around this small world. You saw that how we, with the help of other people in the outside world, spread the word on Twitter, Facebook and other internet websites to directly talk to the world after almost 30 years of silence. For these 30 years our leaders and your leaders, our media and your media, didn’t allow us to have direct talks and let you know about our country and community. One of the best friends of the United States, UK, European countries, and many other countries turned out to be one of the few states that supports terrorism and those Iranians who were welcomed to any country became the biggest enemies and threats of the world in a few years. I’m still surprised by the power of media, and how they could turn a nation of millions of supposedly good people to the nation of supposedly bad people in a few years!

With this green wave we tried hard to talk to you and say that we’re not what you think, we’re not those who support terrorism, and we’re not those who hate you and your countries. We tried to tell you that there is a huge difference between our government and our people. We sacrificed blood to say that we don’t support our government for what they express. We tried to make a change for a better world, but unfortunately they didn’t let us to end that in peace.

In the best and worst days of these events I always was thinking about a way to thank all free people of the world for their support and keeping our back. Despite the bad coverage of western media (for several reasons that are beyond the scope of this post), most of the free people in the world kept our back and encouraged us to try for our freedom. After all, I don’t know any way to thank millions of people in the world with an action or at least I don’t have that power, but I’m sure that the future actions of Iranians all over the world can express our thanksgiving appropriately.

I should apologize if I’m not listing the name of my friends and followers even those who didn’t know me but found me on the web and made any kind of contribution to this green wave of Iranians. Fortunately or unfortunately the number of contact names is bigger than something that I can include here and name them one by one because most likely I’ll miss many names. But I must thank you all no matter where you live, what you do, and what you contributed to our green wave, for your support and the courage that you gave to our people. Seeing many famous leaders on the .NET community supporting our people was something that I never forget in my life.

Photo taken from Fox NewsThere may be a question mark in your mind about the next steps in Iran, but I’m sure that no one can answer this question for you. Many protesters and reformists are boycotted, so things have calmed down in the past couple of days, but there is no doubt that this won’t be the end. Obviously, it takes longer time and more effort, even more blood, to make the real change in Iran, but soon or late it happens, and the good news is that these events brought us an important accomplishment and that was dropping the fear from people’s face.

Doubtlessly, these events had another big victory for our people and that was the possibility to talk to the world and exhibit their real face, demands, and goals. Surprisingly, technology had a great influence and usage in this process and you saw the wide use of Twitter, Facebook, YouTube, blogs, and other social networking services in getting our voice out to you. Many of the foreigners were surprised by seeing the wide use of English signs and slogans by marchers, but they were there to assure that no translator by our local TV and/or western media is required to change our words for you.

Having these said and despite the sad days we have, I’m glad to see that my attempts in the past few years have had a good result to have a very small contribution to a progress that I call it internationalization which happened quickly in the past few years in Iran. There were some people like me who took serious steps toward the use of world-wide English language in communication and applying modern technology to express their opinions, skills, and daily experiences and share them with the world. As one of those vanguards, I’ve been witnessing this good progress to this point which had a huge impact on the success of green wave to make these events public. I hope that our youth keep this line and follow our footsteps even better than us to help themselves and their homeland stay out of the darkness that media is imposing on them.

In the end I wish a world in peace, liberty, and justice for all the nations in the world including Iranians. We begin our works by saying “In the name of God, the Merciful, the Compassionate”, but I use it in the end because I’m sure that this just the beginning of the end!

Tuesday, June 9, 2009  |  From Keyvan Nayyeri : Windows Live

Wrox Press I’m happy to say that after almost a year of hard-work on our Beginning ASP.NET MVC 1.0 book, last weekend Simone and I sent the last part of our chapters to Wiley/Wrox editors to be sent to the last stage, printing.

As I had written in the past, we had an unexpected round of reviews that delayed the book for a short while. This major review had targeted three primary goals including the better flow of content, audience level adjustment, applying the latest changes in the final version of ASP.NET MVC 1.0.

Fortunately this additional review helped us improve the content and quality to a good extent and we’re very satisfied with the end result.

But during that round of reviews, I noticed that despite the effort that we (as authors, editors, and reviewers) put into a book, our readers don’t have a good clue to choose the most appropriate title for them specifically when it comes to some big publishers like Wiley/Wrox that publish a series of books for a single topic. We try hard to meet the criteria of that specific series, but our readers don’t know much about them when choosing a book. At least this is my impression based on what I’ve seen on the community. Therefore, I decided to write a post and explain some stuff about Wrox book series and the area that they target, but per a recommendation by Simone, I waited until we get closer to the release date of the book, so we can spread the word about this stuff.

Of course, what I write is based on my experience in writing four titles for Wiley/Wrox and technical editing of a book, what I’ve read in the guidelines for each book series, and all my conversations with editors regarding this matter. Doubtlessly, Jim Minatel would be the best person to explain the criteria for Wrox series, and I wish he leaves his comments for what I write here.

Introduction

Some big publishers like Wiley have several brands in different fields of science and technology, and try to have a specialized team to focus on the specific topic for specific audience. The main Wiley brand for programming and software development topics is Wrox which is very well-known among .NET, Java, PHP, Ruby on Rails, and other communities.

Wrox has some principles to meet the quality and marketing both, and one of their main strategies to achieve these goals is to have book series in which they publish books for a specific target audience and purpose. There are some advantages for this such as allowing the reader to read the most appropriate content for its level and purpose to meet the quality goals, and helping Wiley to centralize its power and effort on different titles for an estimated sales and revenue to meet the marketing goals.

Wrox has published several titles in some series such as Beginning, Professional, Problem-Design-Solution, Programmer’s Reference, and Expert One-to-One. There are also some titles that don’t belong to a specific series that are usually discussing very specific and marginal topics that don’t have the potential to be distributed under a series. Also recently Wrox has published some electronic formats of short books for smaller discussions called Wrox Blox.

As many of you know, some other publishers have similar strategies as well, and they should have their own criteria and guidelines, but most of these guidelines should share many things in common.

Here I give a perspective about this and talk about different book series published by Wrox. There are some guidelines for each series that are shared with authors that explain the goals of each series in details, but I couldn’t find them on a public link to share.

The Problem

Based on what I’ve seen in the past years, one of the main sources of negative reviews for a book is the lack of knowledge and background in the audience level of that specific title. I have read many reviews in which reviewer has complained about the higher or lower level of content than what he or she has expected from the book. For many circumstances, authors are not responsible for this because I’ve seen that the reader has mistaken to choose that title to read for his or her purpose and level. Of course, I don’t deny the fact that for some titles authors haven’t met the audience level very well.

So it’s very important to know the audience level and purpose of a book specifically in the field of programming and more specifically when it’s published by some publishers like Wiley/Wrox. You can find such information from the book series guidelines as well as the back cover description and introduction section of the book. One of the negative points about Wrox books that I’ve tried to resolve in my titles is the uselessness of Introduction section for many books where author can clarify his audience and purpose to a great extent.

Unfortunately, the main criteria for many readers to choose a book at bookstore is the name of the technology, the name of the author, and sweetness of the book series. I explain each one further.

Some readers are going to learn a technology, but don’t have the necessary background to learn it, and basically they need to read some other titles in order to get started with that technology. In many cases, they ignore this fact and go for the more famous topic which in turn significantly reduces the usefulness of that title for them. So as they can’t understand many parts of the content, they get a false impression about the book. For example, I’ve seen many developers who want to start development with ASP.NET and it’s obvious that they need to know about C# or VB as well as a database technology (preferrably SQL Server). But as ASP.NET has a big name, they go directly and pick an ASP.NET title and can’t get much out of it!

For some other titles, the name of the author and his reputation has a significant amount on the sales of the book. Publishers consider this in their contracts and starting their projects as well. But in my honest opinion this is a very wrong strategy especially when you’re buying a book! The fame and technical level of an author cannot guarantee the quality and usefulness of the book. Even if the book is written very well, the level may not be appropriate for you.

The last parameter is the sweetness of the book series name which means that the higher the level of the series is, the better it is for some readers even if they don’t have that level of experience and knowledge! Some readers regret to read a Beginning book because they think that it disturbs their reputation and level! Many of the readers think that a Professional book is for a professional developer and a Beginning book is for a beginner developer, so it’s difficult for them to read a Beginning book!

It’s All About Usefulness

The other point to mention is that whole the leveling thing is about the better usefulness of the title for the reader. Even if you pick an advanced book and don’t have the necessary background, you’ll get something out of it, especially with Wrox series because authors try to give some background information for many sections of their book. Some readers may choose a Professional series book and learn much about it, but they could get more if they had read a Beginning series. I want to say that sometimes you even may not notice the difference, but choosing the most appropriate book can improve your knowledge.

Beginning

The Beginning book series targets principles and concepts and relies on a practical approach to expand them. The primary goal of the Beginner series is to get a newbie in a technology or someone with less amount of experience and train him to become a medium-level developer ready to face with real-world problems.

The main approach is to discuss concepts and principles in good details and expand them with rudimentary examples. Discussion of techniques, hacks, and advanced topics is limited to those that are common in daily development, and other techniques are not covered.

Professional

This series which is the most well-known series published by Wrox tries to get a developer with a good level of knowledge in a technology and teach him more professional topics to face with professional projects in commercial development. While there may be some short discussions about basic concepts and prerequisites, these books generally rely on more professional examples and the relationship of a technology with others such as the relationship between ASP.NET with database technologies or XML.

You have to note that a Professional book doesn’t teach everything about a technology even in a professional level, and its target is training the developer not acting as a reference.

Besides, it’s worth mentioning that the criteria and level of Professional series books varies significantly by technology that they discuss. For instance, my Professional Visual Studio Extensibility book was targeting a level higher than mastering Visual Studio to extend it, and the criteria was a little different from the general one that I mentioned above.

Problem-Design-Solution

Neither the Beginning series, nor the Professional books can effectively train a developer to solve a whole problem with a comprehensive technology. There are some comprehensive technologies and topics such as ASP.NET WebForms or ASP.NET MVC that are built to allow developers to build a a solution. Abovementioned series lack a good training to teach developers the whole development cycle for a real world project with a technology. We all know that this is a common problem for many developers who cannot build projects from the beginning to the end.

Problem-Design-Solution targets this area to fill in this gap, and uses real world case studies with side-discussions to relate the concepts and techniques to real world solutions.

Programmer’s Reference

As I said, none of the previous book series can act as a comprehensive reference for a technology or topic, but some programmers need such details, so Programmer’s Reference provides such thorough information for you. Although these titles are usually lengthy, they don’t go over details and discussions.

Expert One-to-One

The most advanced series that targets very high level of discussions is Expert One-to-One that is not as common as other series. As the name suggests, it targets more experienced developers to teach them some stuff that can’t be covered in other titles. The goals and audience level of these books varies from title to title, and I haven’t seen a consistency except the one in the audience level and the coverage of advanced topics.

Some Recommendations

Finally, I have some recommendations for you when picking a technical programming book from a bookstore:

  • Know the prerequisites for the technology and learn them first.
  • Read the back cover description and preface/introduction sections of the book carefully.
  • Try to learn about the guidelines for each book series and choose the most relevant one.
  • Do not rely much on the reputation of the authors. Many of the less-known authors have written the best books.
  • Even the blatant success of a book and several positives reviews can’t guarantee its usefulness for you. But some useful reviews can give you good clues about the level and quality of a book.

+ You already have noticed that I’ve been very active in blogging. Please let me know if you can’t keep up with my frequent posts, so I slow down!

Monday, May 25, 2009  |  From Keyvan Nayyeri : Windows Live

Back in December 2007, Simone published an online survey about the usage of AJAX technologies among the .NET developers and after a short while, shared its interesting results with the community.

This year after completing our work on the book, he has updated his survey for 2009 with better organization and quality, and calls you to take a few minutes and answer to his short survey to help him extract some facts about the usage of AJAX technologies on the .NET community.

Simone started the survey a few days ago, but he has received a good number of responses from the audience (over 1000 responses), so he has published a quick report of the results on his blog. Like the first survey, there are very nice points in his report specifically in regards to the fact that this latter survey is taken only 1.5 years after the first one.

Apparently the advent of newer technologies specifically ASP.NET MVC 1.0 and its compatibility with popular jQuery library have influenced the usage of AJAX technologies and libraries on the .NET community, and there has been a substantial turning point in the usage of these two technologies among ASP.NET developers.

Another bold fact that can be extracted from a quick comparison between the two surveys is that the web development world has had a very fast progress in the area of AJAX development, and it’s one of the areas with most significant changes and innovations.

Last year I had written about my answers, so I do it for this year as well:

  • I use AJAX both in development and production, and it’s a matter of a fact that AJAX interactions are a vital part of professional web development, so I wouldn’t expect a professional developer who doesn’t use such technologies.
  • Since the arrival of ASP.NET MVC, I’ve been using it along with ASP.NET WebForms to build online web applications, and both technologies have worked fine for their own cases.
  • For ASP.NET MVC, I use jQuery along with its plug-ins in conjunction with AJAX features available in ASP.NET MVC. But for ASP.NET WebForms, I still prefer to use ASP.NET AJAX and ASP.NET AJAX Control Toolkit as are. The main reason to prefer this combination is that for my WebForms projects I’m looking for a fast and straightforward method of development, and obviously ASP.NET AJAX and ASP.NET AJAX Control Toolkit are completely satisfactory for such projects.
  • Specializing in ASP.NET AJAX and ASP.NET AJAX Control Toolkit, I also prefer to use them as are, without any modifications or manual processing for the exact same reason that I have to use them with ASP.NET WebForms.

In the end, I’d ask you to spend a few minutes and take the survey to help Simone get better results and share them with the community.

Sunday, May 10, 2009  |  From Keyvan Nayyeri : Windows Live

In a few weeks I’m going to celebrate the 4th year of Nayyeri.NET existence, but now I’m hitting another milestone and that is the 1000th post of this blog! Previously I had marked my 500th post in February 2007 before starting my military service, and now it’s very sweet to mark the 1000th post after the service when I’m passing good times of my life.

For blogs like this that have posts with the same average length, 1000th post is an important achievement, and you would believe me how difficult it can be to keep the progress with them.

When I go back and forth and recall the past 47 months, I found myself in different situations. Studying at university, the era between graduation and starting my military service, military service training, military service duty, and the past few months after the service were all important stages of my life and mostly I was under the worst possible pressure from the outside which could make real obstructs in front of me.

It’s a matter of a fact that I haven’t been as active as the first 3.5 years in the last 6 months, and there should be some reasons for it, but I guess that things will be a little better for the next few months. Some friends have been asking me why I don’t update my blog like the past while I used to update it in much more difficult situations such as my military training or the actual duty.

To be honest, after the military service many things changed in my life. I have been trying to fill in the gap that this service has put in my life, and it requires double work on my side. Moreover, our Beginning ASP.NET MVC 1.0 book faced with unexpected editorial stages and took much of my time for community activities like blogging. Additionally, I had some changes in my blogging style, and would like to focus on more technical stuff specifically general software development topics and demanded .NET development discussions such as those about ASP.NET MVC. This criteria automatically filters out other posts. After a very long time, I’ve been cancelling the publication of some posts that I’ve written recently just to hide the personal stuff and improve the relevance of content.

Putting all these logical parameters aside, I have to confess that I don’t have the old motivation for blogging and it can’t be concealed from a regular reader’s eye. As I had said before, Twitter has challenged blogging activity, and I leave some stuff to be published on my Twitter account. On the other hand, technically I’ve been moving to a higher level of knowledge and expertise that has made many of these topics pointless to me. Of course, I’m not the godhead of anything, but when you start discovering new stuff, many of the old things seem rudimentary to you. What is going to happen to me in the next few months is something much deeper than what I’m used to blog about.

Also I have to confess that for the first time in the past four years I’ve been thinking about a permanent or temporary stoppage of blogging, but still couldn’t persuade myself to do that. Happily, many good things are happening in my personal life and I’m recovering from the past three years of trouble and stress which puts me on my way to draw a better future for myself. I simply can say that I’m rolling again, and have found my pre-service personality that I really missed for a long time!

Having these said, let me spread the word for my 1000th post! Sweet days I have after a very long time!

Saturday, May 9, 2009  |  From Keyvan Nayyeri : Windows Live

After discussing custom route handler and IRouteHandler as two extensibility points in ASP.NET MVC to customize the behavior of routing system, now I want to continue discussing thirteen major extensibility points in ASP.NET MVC by focusing on custom controller factories and building such controller factories.

When ASP.NET MVC receives a request, it needs to manage how to handle it with a specific controller and the action methods in it. The component that is responsible to map an incoming request to a specific controller and decide which controller to use is controller factory. There is a default controller factory in ASP.NET MVC that maps incoming requests to a controller with a Controller postfix.

The built-in controller factory is the registered controller factory by default and is implemented in DefaultControllerFactory class. Also it’s possible to extend its behavior with minor changes by deriving from this base class.

But in some circumstances you may need to have a fully customized behavior for your controller factories. One common example is when you use Dependency Injection frameworks where you need to use a customized factory. Fortunately, most of the DI frameworks provide such a customized controller factory out of the box, but if you were faced with a case to implement such a factory, you can implement the IControllerFactory interface and register your own custom controller factory.

IControllerFactory is an interface with two methods:

  • CreateController: Getting the RequestContext instance and the string value of controller name, returns the controller to be used.
  • ReleaseController: Gets a controller instance and releases this controller.

Implementation of a controller factory is comparatively easy, and can be done with less amount of work to be done.

In this post I implement a basic controller factory that loads controllers based on the user’s language, so a specific controller can be loaded for a specific language. In this sample application, I define the type name of controllers in web configuration file based on a pattern that corresponds to a specific culture, and implement a controller factory that loads the appropriate controllers group based on the client’s preferences.

First I define my type patterns in my configuration file as application settings. Here I have two cultures: if the user uses Farsi, then the Farsi controllers will be loaded, otherwise the default English language will be used.

<appSettings>

  <add key="EnglishControllerTypePattern" value="IControllerFactorySample.Controllers.En.{0}"/>

  <add key="FarsiControllerTypePattern" value="IControllerFactorySample.Controllers.Fa.{0}"/>

</appSettings>

Now I write my controller factory by implementing the IControllerFactory interface and its two methods.

using System;

using System.Configuration;

using System.Web.Mvc;

using System.Web.Routing;

 

namespace IControllerFactorySample.ControllerFactories

{

    public class CustomControllerFactory : IControllerFactory

    {

        #region IControllerFactory Members

 

        public IController CreateController(RequestContext requestContext, string controllerName)

        {

            if (string.IsNullOrEmpty(controllerName))

                throw new ArgumentNullException("controllerName");

 

            string language = requestContext.HttpContext.Request.Headers["Accept-Language"];

 

            string controllerType = string.Empty;

 

            if (language == "fa-IR")

                controllerType = string.Format

                    (ConfigurationManager.AppSettings["FarsiControllerTypePattern"], controllerName);

            else

                controllerType = string.Format

                    (ConfigurationManager.AppSettings["EnglishControllerTypePattern"], controllerName);

 

            IController controller = Activator.CreateInstance(Type.GetType(controllerType)) as IController;

 

            return controller;

        }

 

        public void ReleaseController(IController controller)

        {

            if (controller is IDisposable)

                (controller as IDisposable).Dispose();

            else

                controller = null;

        }

 

        #endregion

    }

}

In the CreateController function, I detect the client’s language using the HTTP headers of the request, and load the appropriate type name based on the user’s culture. Then I use reflection APIs to load the type and create an instance of the controller to be returned. Note that this implementation doesn’t mandate the Controller postfix for controller names, so rather than defining my Home controller as HomeController class, I just can use Home name. I have defined my controllers in Fa and En sub-folders inside Controllers folder, so my controller factory can load them based on the type name patterns. Besides, in the ReleaseController method, I dispose the controller as expected.

The third and last step is to add this controller factory as the default factory to ASP.NET MVC. This can be done in Global.asax and its Application_Start method where I use ControllerBuilder.SetControllerFactory to add my factory type as the default controller factory to ASP.NET MVC.

using System.Web.Mvc;

using System.Web.Routing;

using IControllerFactorySample.ControllerFactories;

 

namespace IControllerFactorySample

{

    public class MvcApplication : System.Web.HttpApplication

    {

        public static void RegisterRoutes(RouteCollection routes)

        {

            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

 

            routes.MapRoute(

                "Default",                                              // Route name

                "{controller}/{action}/{id}",                           // URL with parameters

                new { controller = "Home", action = "Index", id = ""// Parameter defaults

            );

 

        }

 

        protected void Application_Start()

        {

            RegisterRoutes(RouteTable.Routes);

 

            ControllerBuilder.Current.SetControllerFactory(typeof(CustomControllerFactory));

        }

    }

}

As you see, building a controller factory is very straightforward and you can get it done in a few simple steps. If I run the application and set my preferred language to Farsi, then Farsi controllers will be used to serve the requests, otherwise English controllers will be loaded.

As always, the sample application for this post is available for download.

Wednesday, April 29, 2009  |  From Keyvan Nayyeri : Windows Live

Wrox Beginning ASP.NET MVC 1.0 It’s been quite a while since Simone and I had published updates about our upcoming Beginning ASP.NET MVC 1.0 book. Of course, we had some updates on our Twitter accounts but not a detailed one.

The main update about the book in the past 2-3 months was an additional round of major reviews aiming to adjust the audience level, usefulness of content, and flow of chapters, that were proposed to improve the quality of the book. During this review we applied some significant changes in the content and rewrote some parts which also delayed the publication date of the book for a short while.

But finally we’re so close to the end of reviews and we expect to complete them by the end of this week which makes us more certain about the release date of the book in June.

However, today Simone broke the silence around the book by writing about the new sample chapter of our book. Jim Minatel published a sample draft of chapter 9 of our book entitled Testing ASP.NET MVC Applications on Wrox forums which is available for public download. Recently we had a Sample Chapter Flu on the community, so we decided to add our own chapter to the stream.

Of course, this draft is in the pure Word format and there is a high chance to be edited, but it can be a good start point to share the stuff with the community and receive the feedback. So we would be happy to hear your thoughts on this sample chapter on the forum. Also there is a forum dedicated to this title where we listen to any thought or comment that you have for us.

Besides, I’d like to congratulate Professional ASP.NET MVC 1.0 author team on the release of their book which is doubtlessly one of the best programming books available today. This team should have done a great job on this title. Also I have to especially thank Phil Haack for sharing his thoughts on our book that helped us improve it.

As the last note, I think that I’m going to write a post explaining the logic behind Wrox series and how these series are designed to target specific audience and needs. This is specifically helpful as we’re going to publish a Beginning series book there may be some readers who are not aware of its level and target audience.

Monday, April 27, 2009  |  From Keyvan Nayyeri : Windows Live

In my last post I covered one of the nice extensibility points in ASP.NET MVC to customize route constraints in your MVC applications. I also said that I’m going follow the rich set of extensibility options listed by Simone to write more posts about the topic of ASP.NET MVC extensibility.

Now it’s the second post that covers IRouteHandler interface as another extensibility point in the area of routing that provides a lower level of customizability for developers. This interface is actually an option that allows you handle a request without routing engine, and replace it with any handler that you want.

You may know that ASP.NET MVC has a built-in routing engine that is easy to customize as is. Additionally, you can use custom route constraint to modify it in a higher level. However, there are still some cases when you need to do something beyond the behavior of default routing engine, and need to handle the incoming requests to ASP.NET MVC with your own implementation. Of course, this should be as common as the first two scenarios but there are still some circumstances that may need such a level of customizability.

Here IRouteHandler interface comes to play and assist you to replace the default behavior of your routing system. As one of the common categories of the applications for this interface, you can use it to replace your controller factories. As a more practical example, you may have read a nice post by Phil Haack about using routing with ASP.NET WebForms.

This interface has a single GetHttpHandler function that gets a RequestContext object and returns an IHttpHandler instance. This can be a regular handler or an MvcHandler based on your requirements.

As you see, this is a very general interface that opens much space for your development and you can do many things with that. But to be honest, I couldn’t find very appropriate ideas to implement with it as an example for this post. So here I use a very simple example in which I write a handler that acts for URLs made to commercial orders section of the website, and checks for the country of origin of the visitors and blocks their access if they’re coming from a specific country. In real world recently this has become an entertainment for some jerks to prohibit others from free access to information thinking that world is responsible to give them all the knowledge and information, and they own it!

The first step is implementing IRouteHAndler interface. My implementation is very simple.

using System.Collections.Generic;

using System.Web;

using System.Web.Routing;

 

namespace IRouteHandlerSample.Routing

{

    public class CountryProhibitionRouteHandler : IRouteHandler

    {

        #region Fields

 

        private List<string> _countries;

 

        #endregion

 

        #region Public Constructor

 

        public CountryProhibitionRouteHandler(List<string> countries)

        {

            this._countries = countries;

        }

 

        #endregion

 

        #region IRouteHandler Members

 

        public IHttpHandler GetHttpHandler(RequestContext requestContext)

        {

            IpBlockHandler handler = new IpBlockHandler(this._countries, requestContext);

            return handler;

        }

 

        #endregion

    }

}

It gets a list of string values of country name abbreviations that should be blocked via its public constructor. In the GetHttpHandler method it creates an instance of an MvcHandler called IpBlockHandler and returns it. This handler gets the list of countries along with RequestContext object as its constructor parameters. The rest of the work is done by this MvcHandler to check incoming requests and block them if necessary.

But the IpBlockHandler is also a simple handler that checks the incoming requests based on their IP and blocks access to those who come from specified countries.

using System;

using System.Collections.Generic;

using System.Web;

using System.Web.Mvc;

using System.Web.Routing;

using System.Xml.Linq;

 

namespace IRouteHandlerSample.Routing

{

    public class IpBlockHandler : MvcHandler

    {

        #region Fields

 

        private List<string> _countries;

 

        #endregion

 

        #region Public Constructor

 

        public IpBlockHandler(List<string> countries, RequestContext requestContext)

            : base(requestContext)

        {

            this._countries = countries;

        }

 

        #endregion

 

        #region MvcHandler

 

        protected override void ProcessRequest(HttpContext httpContext)

        {

            string Query = "http://api.hostip.info/?ip=" + httpContext.Request.UserHostAddress;

 

            XDocument doc = XDocument.Load(Query);

 

            XNamespace defaultNamespace = doc.Root.GetDefaultNamespace();

            XNamespace xNamespace = doc.Root.GetNamespaceOfPrefix("gml");

 

            string country = doc.Root.Element(xNamespace + "featureMember").Element

                (defaultNamespace + "Hostip").Element(defaultNamespace + "countryAbbrev").Value;

 

            if (this._countries.Contains(country))

                httpContext.AddError(new Exception

                    ("Sorry! You can't order anything from your country. We recommend you to relocate!"));

        }

 

        #endregion

    }

}

The logic behind this handler is mainly located inside ProcessRequest method where some LINQ to XML operations are used to call a remote server by passing the IP address of the client in order to receive the geographical information about the IP. Then this XML file is traversed to find the country abbreviation and check for its existence in the blocked countries list. If it’s there, then an exception is thrown to notify the user. If you wonder why this error is presented in this pure and ugly manner, I’d say that I have inspired this from the same page on a big internet service company!

The last step is putting these things together and using them in routing system.

using System.Collections.Generic;

using System.Web.Mvc;

using System.Web.Routing;

using IRouteHandlerSample.Routing;

 

namespace IRouteHandlerSample

{

    public class MvcApplication : System.Web.HttpApplication

    {

        public static void RegisterRoutes(RouteCollection routes)

        {

            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

 

            RouteTable.Routes.Add

                (new Route("order/{0}",

                    new CountryProhibitionRouteHandler(new List<string>() { "XX" })));

 

            routes.MapRoute(

                "Default",                                              // Route name

                "{controller}/{action}/{id}",                           // URL with parameters

                new { controller = "Home", action = "Index", id = ""// Parameter defaults

            );

        }

 

        protected void Application_Start()

        {

            RegisterRoutes(RouteTable.Routes);

        }

    }

}

As you see, I’ve added a new route to the RouteTable which works for the order section and applies an instance of CountryProhibitionRouteHandler by passing the list of countries.

Now if I visit the order section with my local IP (that is presented as XX country), I’ll get the exception!

Output

As always, the source code sample for this post is available for download.

Wednesday, April 15, 2009  |  From Keyvan Nayyeri : Windows Live

In a recent blog post Simone did a great job by listing all the 13 major extensibility points available in ASP.NET MVC with a short description and references for further reading.

It’s been a while that I wanted to write more about ASP.NET MVC but like all other topics, it has been a decision only! However, I thought that it’s a good start point to go over these extensibility points with some introductory posts as starter guides. So here is the first part covering custom route constraints in ASP.NET MVC.

As you may know, ASP.NET MVC (and hopefully the next versions of ASP.NET WebForms) has a powerful routing mechanism to route requests to their corresponding controller and action methods with appropriate parameters with some basic constraint declaration mechanisms.

While there is a simple way to add routes to the routing engine, it’s also possible to validate requests based on your business scenarios and more complex constraints. This is an extensibility point in ASP.NET MVC routing mechanism that is called route constraint in which you define custom constraints that check the validity of requests, and notify the routing engine if it should route this request with this route object and pattern or not.

Let me clarify this with a very common example that you’ve seen in many sites. Many of the sites and blogs have an archive calendar where you can find posts for a specific year, month or day by navigating to a unique URL that includes the year, month, and day numbers. Of course, these numbers are integer but their range should be limited somehow. For instance, you don’t expect a year number to be smaller than 1900 or larger than 2100, or a month number to be smaller than 1 or larger than 12. In a more complex case, the range of day numbers can vary by month and there is a dependency between the month and day numbers. You would agree that it should be very good to check these ranges and validate incoming requests to make sure they contain valid values.

You can add a route constraint by implementing the IRouteConstraint interface in ASP.NET MVC, and adding it to your routes through a few steps that I’ll write in a moment. IRouteConstraint has a single Match function that returns a Boolean value which determines whether this request should be processed by the route object or not. It also has some parameters:

  • httpContext: The current HttpContext object in which this request is being processed.
  • route: The route object that is going to process this request.
  • parameterName: The name of the parameter in route pattern that is being validated by this constraint.
  • values: The key/value pair of request parameters and their corresponding values extracted from request URL based on the route pattern.
  • routeDirection: A RouteDirection enumeration value that determines if the route is requested by client or is created based on the route definition.

Here I write a simple ASP.NET MVC application that simulates such an archive system but only displays the year, month, and day numbers in the view. I write some constraints to check the abovementioned ranges and exclude invalid requests from routing engine.

First, I create an ArchiveController with an Index action method to display the values of year, month, and day parameters.

using System.Web.Mvc;

 

namespace RouteConstraintSample.Controllers

{

    public class ArchiveController : Controller

    {

        public ActionResult Index(int year, int month, int day)

        {

            ViewData["Year"] = year;

            ViewData["Month"] = month;

            ViewData["Day"] = day;

 

            return View();

        }

    }

}

I also create a view to display these values.

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"

 Inherits="System.Web.Mvc.ViewPage" %>

 

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

    Archive

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>

        Archive</h2>

    <p>

        Here are the information extracted from URL:

    </p>

    <br />

    Year:

    <%= ViewData["Year"] %>

    <br />

    Month:

    <%= ViewData["Month"]%>

    <br />

    Day:

    <%= ViewData["Day"]%>

    <br />

</asp:Content>

In the main step I need to create three separate constraints for year, month, and day validation that later I will apply in my routing definitions.

I start with a simple constraint for year values called YearRouteConstraint.

using System;

using System.Globalization;

using System.Web;

using System.Web.Routing;

 

namespace RouteConstraintSample.Routes

{

    public class YearRouteConstraint : IRouteConstraint

    {

        #region IRouteConstraint Members

 

        public bool Match(HttpContextBase httpContext, Route route,

            string parameterName, RouteValueDictionary values, RouteDirection routeDirection)

        {

            if ((routeDirection == RouteDirection.IncomingRequest) &&

                (parameterName.ToLower(CultureInfo.InvariantCulture) == "year"))

            {

                try

                {

                    int year = Convert.ToInt32(values["year"]);

                    if ((year >= 1900) && (year <= 2100))

                        return true;

                }

                catch

                {

                    return false;

                }

            }

            return false;

        }

 

        #endregion

    }

}

The logic behind this implementation is simple. I check to make sure that this request is coming from a client, and also check that the parameter name is equal to my expected value. Of course, this may not be a big deal because you can map the correct parameter to this constraint, but it’s always better to close doors to avoid unexpected issues in the lower levels of code. In the main body of the Match function I extract the value of the year parameter and check its range. If it falls in the range then I return the true value to process the request by the route otherwise ignore it.

The MonthRouteConstraint has a very similar logic that checks the value of the month to be between 1 and 12.

using System;

using System.Globalization;

using System.Web;

using System.Web.Routing;

 

namespace RouteConstraintSample.Routes

{

    public class MonthRouteConstraint : IRouteConstraint

    {

        #region IRouteConstraint Members

 

        public bool Match(HttpContextBase httpContext, Route route,

            string parameterName, RouteValueDictionary values, RouteDirection routeDirection)

        {

            if ((routeDirection == RouteDirection.IncomingRequest) &&

                (parameterName.ToLower(CultureInfo.InvariantCulture) == "month"))

            {

                try

                {

                    int month = Convert.ToInt32(values["month"]);

                    if ((month >= 1) && (month <= 12))

                        return true;

                }

                catch

                {

                    return false;

                }

            }

            return false;

        }

 

        #endregion

    }

}

The last constraint is a good example of constraints that validate the value of a parameter that depends on other parameter.

using System;

using System.Globalization;

using System.Web;

using System.Web.Routing;

 

namespace RouteConstraintSample.Routes

{

    public class DayRouteConstraint : IRouteConstraint

    {

        #region IRouteConstraint Members

 

        public bool Match(HttpContextBase httpContext, Route route,

            string parameterName, RouteValueDictionary values, RouteDirection routeDirection)

        {

            if ((routeDirection == RouteDirection.IncomingRequest) &&

                (parameterName.ToLower(CultureInfo.InvariantCulture) == "day"))

            {

                try

                {

                    int month = Convert.ToInt32(values["month"]);

                    int day = Convert.ToInt32(values["day"]);

 

                    if (day < 1)

                        return false;

 

                    switch (month)

                    {

                        case 1:

                        case 3:

                        case 5:

                        case 7:

                        case 8:

                        case 10:

                        case 12:

                            if (day <= 31) return true;

                            break;

                        case 2:

                            if (day <= 28) return true;

                            break;

                        case 4:

                        case 6:

                        case 9:

                        case 11:

                            if (day <= 30) return true;

                            break;

                    }

                }

                catch

                {

                    return false;

                }

            }

            return false;

        }

 

        #endregion

    }

}

DayRouteConstraint checks the value of day parameter based on the value of month, so it can’t exceed the valid value of the number of days in that months. To do this, it extracts the value of month from the RouteValueDictionary along with the value of day.

The last step is to connect all these things together so ASP.NET MVC can run the application. This step is nothing but defining the routes.

using System.Web.Mvc;

using System.Web.Routing;

using RouteConstraintSample.Routes;

 

namespace RouteConstraintSample

{

    public class MvcApplication : System.Web.HttpApplication

    {

        public static void RegisterRoutes(RouteCollection routes)

        {

            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

 

            routes.MapRoute(

                "Default",                                              // Route name

                "{controller}/{action}/{id}",                           // URL with parameters

                new { controller = "Home", action = "Index", id = ""// Parameter defaults

            );

 

            routes.MapRoute(

                "Archive",

                "archive/{year}/{month}/{day}",

                new

                {

                    controller = "Archive",

                    action = "Index",

                    year = "",

                    month = "",

                    day = ""

                },

                new

                {

                    year = new YearRouteConstraint(),

                    month = new MonthRouteConstraint(),

                    day = new DayRouteConstraint()

                }

                );

        }

 

        protected void Application_Start()

        {

            RegisterRoutes(RouteTable.Routes);

        }

    }

}

I add a new route to my route collection called Archive with “archive/{year}/{month}/{day}” pattern that everybody can understand. Like the regular routes I also set the default values for the route, but add a constraint object to it. This constraint object maps each parameter in the pattern to its constraint instance, so these values can be validated.

Now I run the application with a valid request pattern to get the result.

Output

I also can send a request for the 31st day of April that is not valid and I get an error. Obviously, the better implementation had to display a custom page with appropriate error message, but this is just a sample application!

Output

As the last note, you may wonder why I wrote three separate constraints for these three values while I could extract all the values in a single constraint and validate them. While this is possible, I avoided it because it’s not the proposed practice and usage, and also it’s not always the case.

You can download the sample code package for this post from here.

Friday, April 10, 2009  |  From Keyvan Nayyeri : Windows Live

Photo taken from http://1.bp.blogspot.com/_Stcf68HPvnI/ScUqP81GgnI/AAAAAAAACYM/gPmaXK_lZ1Y/s400/software2.jpg In the last few months I’ve been writing a post series about hiring experienced architects and developers and its impact on the success of projects and saving the resources.

So far I’ve written five posts to introduce the topic and discuss planning, architecture, development, and debugging stages in software development cycle. Now I’m going to wrap this discussion up and complete this series by talking about maintenance stage.

Of course, there could be a separate post about testing stage which is a common part of today’s software development practices, but it’s mostly a part of development and debugging stages, and could be supported by some similar reasons as them; therefore, I neglect adding that post as I also neglect including discussions about some other uncommon or minor development stages.

There is no doubt that you can’t guarantee the correct functionality of your projects forever, and interestingly, software systems become mature when they run on production for a while until good features can be added to the system and some hidden common problems can be resolved. The bigger your projects are, the more your chances are to have a maintenance contract for a project, so it’s your own responsibility to keep your software up. Of course, any weakness in this area can affect the overall success of your projects. Even the best developed systems are not thorough until they work for a while.

Quality of software maintenance directly relates to the quality of software development and debugging. The better you build software and the better you structure your code, the easier you maintain it, and this is a pretty simple principle in software development. Therefore, here you see the repetition of an important reason that you need skilled developers for development, debugging, and testing.

But aside from this, having an experienced developer for maintenance responsibilities is also very important. An experienced developer can master a project faster, and can resolve the issues in a shorter time. Besides, he’s able to apply better changes to the software during the maintenance to avoid further issues. I’ve seen many developers who add bigger issues to the production software just to maintain it.

Having a good developer on board can also save money from the project owners, and I’ve seen this with my own eyes. I was watching the progress of a project where some mediocre developers had developed the code, and the company had assigned an amateur developer to maintain and support it.

In action they experienced serious difficulties with the project and in fact that support guy had become a nightmare for the project. When he was asked to work on something, he was just calling the original developers to explain everything for them on phone. The worse case was when he had applied a change which caused bigger issues, and made the whole project down. All the development team were called to the office to resolve that issue for several hours!

One day I sat and did a simple calculation for myself and realized that the company is spending the exact same resources on original developers to help this maintainer, and in fact he was not maintaining the system. He was just playing with it!

Wednesday, April 8, 2009  |  From Keyvan Nayyeri : Windows Live

DZone DZone is a well-known professional community for software developers that targets multiple platforms and technologies including Java, PHP, Ruby on Rails, and the .NET Framework. The .NET section of DZone has become active in the past months and this activity is mainly conducted by Alvin Ashcraft who has taken this responsibility and has had a great impact on the .NET activities on this site.

Aside from the main link bookmarking features and content aggregation, DZone has a very nice section that is called DZone RefCardz in which they publish small reference cards as free cheat sheets for different technologies. In these cards they provide a quick overview of technology from a developer perspective to get the reader started with the fundamentals. Also when printed, these these cards are very well-organized and beautiful.

I just wanted to refer to the valuable index of these cards on DZone site where is recently embellished with .NET-related stuff.

Recently I had a quick review of the Core ASP.NET card authored by Holger Schwichtenberg, and I would say that hopefully we (Simone and I) are going to publish one about ASP.NET MVC in the upcoming months as well. Of course, we haven’t started our work yet, but our plan is to get our hands on this stuff after completing the last editorial stage of our book very soon.

In my opinion there is a nice idea behind RefCardz specifically for DZone because this site has a wide range of audience from different technologies and this can help novices to get a good understanding of the technologies. I think this is a common situation for many developers to need to explain the fundamental structure, advantages, and major highlights of their development technology to others who have a background in programming, and these cards can come very handy for such cases.

I know that Alvin and other DZone editors have plans for more .NET RefCards to publish in the near future, but there are already some valuable cards like Core .NET, Silverlight 2, and Windows PowerShell available.

Tuesday, March 31, 2009  |  From Keyvan Nayyeri : Windows Live

Persepolis First of all, I want to notify you that I’m going to start a blogging session specializing on active blogging and off-blogging techniques to share my experiences from the past few months with you, so if you’re interested, drop me a line!

But seriously, I was off enjoying my holiday times in Shiraz, one of the most historical areas in the world hosting many ancient places of one of the first human civilizations that ever has existed. Shiraz and the surrounding areas are known for their rich history and culture that belongs both to pre-Islamic early history and post-Islamic era.

I should confess that I really needed this short vacation to recover from the past 2-3 years and find myself again even though our short stay was full of visits from several places that were crowded by many domestic and international visitors.

During our short stay in Isfahan and longer visit of Shiraz, we visited several places but the most notable places that are also very well-known around the world were tombs of Hafez and Saadi, Eram Garden, Persepolis, and Pasargadae.

Despite the crowd and inappropriate weather, I had the opportunity to take many photos and have uploaded a huge batch of them on my Flickr account that can be found in this tag.

But the most interesting part of my trip was the visits that I had from Persepolis and Pasargadae as two famous UNESCO World Heritage Sites that were the capitals of Achaemenid dynasty in the early history. There were many places to visit and enjoy in these two sites especially the tomb of Cyrus the great who was the first governor who introduced the words of liberty, human rights, and peace to the world with his famous cylinders.

Pasargadae Regardless of the rich history and culture that could be seen in every place and cannot be destroyed with the below stuff, the most annoying point for me was, seeing the bad condition of these places and the ignorance by the government to maintain and recover them. Unfortunately during the Islamic revolution and after that, many of the invaluable parts of these places were stolen and brought to the western museums especially in the United States and United Kingdom, and the important remnants are disregarded by the government and no one is trying to keep them for the future.

It’s a matter of a fact that our current government doesn’t care about history at all and never has tried to do anything to build better attractions around these places. As far as I know, there are only a few countries in the world that have a real history and Iran can be considered as the richest one both in regards to the number of historical resources and to their variety in the history and type. It should take over 60 days for a visitor to visit all the first-level historical places in Iran. All other countries with less resources are putting the best efforts to maintain their history, but we’re just destroying it!

All in all, I think that I have found my sense of historical interest that I never had! It should be a good change! How about changing this blog to a history blog?

Friday, March 20, 2009  |  From Keyvan Nayyeri : Windows Live

Haft Sin (7S), One of the most notable Nowruz traditions - Photo taken from http://www.flickr.com/photos/hamed/2347366319/ As some of you may know, we’re going to start our new year in Iran which is called Nowruz (meaning the New Day in English) and starts right at the beginning of spring each year. The new year which is 1388th year of our Solar Hejri calendar starts in the next couple of hours on 20th March 2009 11:43:39 GMT time (6:43:39 Central Time). Not only Nowruz is marked as the beginning of new year by Iran, but also it’s observed by some other countries and nations.

As one of the first civilizations of the world and one of the most historic and cultural nations, Iranians have their own traditions at the end and beginning of each year which is already started a few weeks ago, and continues until the 13rd day of the new year when people get out to the nature to respect to it and end their holidays to start a new working year. The era between the first day and the 13rd day of the new year is called Nowruz and more specifically Nowruz is known as the beginning of the new year.

Nowruz traditions are formed based on some principles such as morality, renewal, happiness,  strengthening of relationships, and respecting to the nature. I can’t talk about all these traditions as they’re beyond the scope of a blog post, but you can find valuable information on Wikipedia and following the references, but for several reasons this anniversary is one of the most influential and richest events in the world.

We’re not passing good days in the world and almost all the countries are suffering from economic crisis, political conflicts, and the war, but I hope that this spring marks a good start point to end or ameliorate these pains.

One of the very nice things that happened a few hours ago and influenced the Iranian community was the direct video message of the United States president, Barak Obama, who sent his greetings and new year wishes to the people and leaders of Iran along with the message of friendship as “A New Year, A New Beginning” message.

Of course, no one can be that optimistic to consider this as something that can change the tight situation of both governments, but after some decades of the hostility that was imposed by the American government against the Iranian people, it was very cool to hear about the real face and position of Iran and Iranians in the world, and the words of respect and truth about the real and rich cultural, historical, scientific, artistic, and humanistic position of Iran and Iranians that has been growing in the world, but was being rejected by former governors as a reaction to Iranian government’s political views.

It’s arduous for me to imagine serious political relationships between our governments in the coming years, but I hope that both governments stay aside and let our people do what they’d love to do without exaggerating and advertising all those wrong beliefs by the media to exhibit Iranians as evils and a terrorist nation while allowing the real terrorists to get in and become the closest friends. It’s a matter of a fact that can be proven by many logical reasons that these two nations need to have the best relationships in the world to concur and move the world forward.

As Obama cited in his message, our famous poet, Saadi, has a very notable poem used by many humanistic organizations in the world including the United Nation as the grace of the entrance to the Hall of Nations in New York.

Human beings are members of a whole,
In creation of one essence and soul.
If one member is afflicted with pain,
Other members uneasy will remain.
If you have no sympathy for human pain,
The name of human you cannot retain.

Like all the other people, I and my family are gearing up to celebrate the new year very soon, and will use this opportunity to renew many things and start a new life in the new year. However, for several reasons this Nowruz is very especial for me as I haven’t had much opportunity to celebrate it in the past 3-4 years (being on duty in the army), and I may not be able to do that for the next few years as well. By the way, I’m going to use the new year holidays and this opportunity to spend some time with the family and traveling around the country to forget the past few years and all the pressure. Personally I’m definitely looking forward to seeing a good coming year for myself as I really haven’t had good times and need it next year!

All in all, I congratulate the new year and Nowruz to all fellow Iranians wherever they reside, and all to other nations who start a new spring hoping that it marks a positive point in resolving our today’s issues in the world.

Wednesday, March 18, 2009  |  From Keyvan Nayyeri : Windows Live

Back to pre-historic days, we had to wait for Scott Guthrie to let us know what’s new with Microsoft development products, but nowadays thank to economic crisis and loss of attention on download priorities on MSDN as well as a quick spying site called Twitter, people make it public before others!

Yes, as Simone and some other guys have pointed out, ASP.NET MVC 1.0 is finally released and is available for public access unless they disable the file download. There is no official announcement but we should expect to see it in MIX09.

ASP.NET MVC has been a product that has received much enthusiasm and applause from the community after its initial introduction, and as I had said before, it’s been a unique product in Microsoft development product stack both in the way that it was released with shared source since infancy, and also it has undergone many fundamental changes in its lifecycle.

We expected to see this release a few months earlier, but it’s finally available today after some Community Preview, Beta, and Release Candidate builds.

There are many things to say about this new product in ASP.NET area, and there will be much more to hear about it in the near future. ASP.NET MVC 1.0 has still a long way and there is a lot of space for future expansions and improvements, and I’m definitely looking to seeing some enhancements to automate some parts of development.

All in all, let’s talk about this thing in more details in the upcoming months, but for now, I can refer you to two recent posts written by me about the new ASP.NET architecture and the learning process of ASP.NET MVC that can be good start points for novices.

As of upcoming books, we should expect to see them coming out in the next couple of months. My Beginning ASP.NET MVC 1.0 is also passing the final reviews to meet the audience level and being tested with the latest bits, and I think that it will be out by May or June.

 Keyvan Nayyeri : Windows Live News Feed 

Last edited Dec 7, 2006 at 10:16 PM by codeplexadmin, version 1

Comments

No comments yet.