Read this on C-SharpCorner

Abstract

Many times this question comes to our mind that is one technology totally replaced by new release or new version of technology. In this article I will try to explain about such and similar issues and I will share my industry experience not only what I have seen in India (largest IT Solutions provider to the world) but also in USA.

I consider this to be a very hot topic and good candidate of debate rather; but I will try to share my thoughts on such a burning topic. In this article I am not going to highlight or defame any technology; I am just going to put my perspective as I have seen, experienced and advised to various clients and software teams.

Why new Versions

“Change is Only Constant” this principle applies very well to the Software Industry, and I respect this over-flow of information. Because this gives me reason to “Keep Learning and stay ahead of the Curve”. By saying so I didn’t mean that someone has to learn anything and everything you can get your hands on. NO, certainly not, but before I explain this any further let’s take a step back and understand “Why new Versions” keep coming.

We are fortunate that we have seen complete transition of the software industry from Desktop to Web to Mobile, upcoming generations may not witness this great and life changing shift. Also, I recall my days when I was working and studying software in 1995, no one imagined that there will be MVC, WPF, WCF, so many versions of .NET and SQL Server etc. Industry was happy with MS-Access, Fox-Pro, C, C++ and Oracle etc. But our needs keep changing, they evolved and then shell is broken to have huge expansion and today we have all kind of software technology and server products from client side to server side to mobile and hand-held and many more. We moved from on premise to Cloud, Machine Learning is helping to dictate patterns and suggest needs.

This is why software companies keep building latest and newest technologies to enable and empower the world to build for future. When they release a version of a technology or language and they discover some issues or new features in that then they release newer versions and this in a chain reaction process and it will not stop.

Oh, then I will die Learning

As per Darwin’s Evolution Theory “Survival of the Fittest”,”fit” refers to “best adapted to the current environment.Here you simply replace environment to Software Industry. I am one of you and I don’t recommend that everyone has to learn everything but what I suggest it stick to your technology of choice and have god knowledge on their offered tools and technologies and various versions and when to use which one.

Also, you don’t necessarily have to know every single thing. For example, I only focus on .NET and related technologies, if anything falls beyond this area then I am not bothered. To be more precise, I don’t know Microsoft CRM, SharePoint, System Center, SQL Server Database Administration and few more things like that.

But this is not my weak point because “I continue to build my .NET Muscle” and keep learning about what helps me build Enterprise solutions using Microsoft .NET.

So choose your area of interest and where you have invested and then keep learning in similar field and then you will no longer find it challenging; because if you observed new versions come after every few years and that has to be otherwise it will be No Fun!

Hmm, so Isn’t MVC Replacing ASP .NET Web Forms

Such decisions are not final and have no concrete answers. Yes, industry changed their needs and so new technologies such as MVC and WPF takes over. This definitely doesn’t mean that ASP .NET  Web Forms is replaced or it’s dead. If you know the Microsoft Web fundamentals MVC is based on ASP .NET and industry is trying to shift as and when they can from Web Forms to MVC and reap the benefits it offers.

Did you know that MVC is much older than ASP .NET? Yes, ASP .NET 1.0 was released in 2002 and MVC was created in 1979 originally named as “Thing-Model-View-Controller” but later simplified to be known as MVC.

In my view I consider that there are now two technologies to build Web Solutions using Microsoft and based on your need you can pick one which works well for you. Usually such technology selections are made by Architects assigned to the project.

So there is no such Golden Rule that every new or existing application has to be either created using MVC or migrated to MVC because MVC is latest and future of web. Though it is.

Architectural Thinking – Brownfield Vs

Greenfield Applications

All software applications you have worked or will work in future are either brownfield or greenfield.

Brownfield Development – When any existing or legacy applications needs to have new features or changes to address business needs; is known as brownfield. In such situations unless you are building new module or component you have less  / limited or no scope to use new architecture styles, patterns etc. Very reason of such limitations is because those old applications are build using old version of technologies and latest versions of one technology/framework many not be compatible with old versions.

Greenfield Development – When a brand new project is being envisioned and no previous work is done in that or related area then it’s called Greenfield. In software industry it doesn’t happen very often. But whenever it happens its Architect’s responsibility to figure out what is best technology to address business needs.

Hence, it’s not appropriate to say that because MVC is so new hence every new web application must be made using MVC or if WPF is available in addition to Windows Forms so every desktop application has to be made using WPF. Whatever is the case neither ASP .NET nor Win Forms can be totally ignored.

Why and Why not Latest Technologies

should be picked

First let’s discuss Why Not

  1. Its brownfield and new technology doesn’t fit anywhere.
  2. If new technology or versions are introduced it will case a lot of build errors due to outdates references of non-supported library references.
  3. Business goals and software quality are not compromised by continuing to use current and available technologies like ASP .NET Web Forms over MVC or Win Forms over WPF.
  4. You are not investing money in any extra off-the-shelf tools to handle issues which could have been handled by latest versions of similar area of technologies e.g., MVC instead of ASP .NET Web Forms, or WPF over Win Forms.
  5. Many times team might not have certain skill set which allow them to proceed with development using new technology options
  6. Many times budget allocation from client may impact your decision to use and develop using latest technologies.
  7. If core/bestselling features of new candidate technology (MVC or WPF) are not being used at-least up to 50% then you have not achieved anything.
  8. Considering how soon client and business wants to have application ready, turns out to be major factor o dictate technology of choice.
  9. Client and business doesn’t bother how you do it; what matters is end result and a workable / good – enough software.
  10. No way to use old legacy downstream applications with latest available technologies.

Why develop using Latest Technologies

  1. Greenfield software solution and no legacy or old piece of code is being used.
  2. Focus is more on Robustness, Testability, Object Oriented design and quality. (This doesn’t mean previous technology can’t accomplish these; it’s about ease and in-built features and offerings).
  3. Amazing team with great skills to learn new technologies and adapt the changes.
  4. Company’s vision is to showcase products build using latest technologies.
  5. Client themselves want the solution to be developed using latest technologies and have budget to support that.

Why MVC over ASP .NET Web Forms then

Note- this section assumes that you are aware of MVC benefits and general technical terms used below.

  1. Separation of Concerns is the core of MVC.
  2. Single Responsibility Principle is achieved by default.
  3. Unified and even better framework to work on WebAPI, Mobile, HTML 5, CSS3, Security, and Deployment (including Azure).
  4. Unit testing is easily achieved to have stable, robust and quality software solutions delivered continuously.
  5. Fast screen generation for CRUD operations via Scaffolding.
  6. Convention over configuration.

Summary

Based on my experience as an architect in industry I would like to summarize that it’s very hard for any organization to keep up with latest version and technologies all the time because by the time you become comfortable with one version the newer is around the corner.

So if you are working on MVC 4, then see if you can learn and try some application being developed on your own. Or if you just happen to be in ASP .NET Web Forms world until now then I would encourage you to try converting that application into MVC for your personal benefit.

This will enforce you to learn new technology and apply those learnings; if you made some progress in that then in next interview you can proudly showcase your MVC knowledge and say that you migrated ASP .NET Web Forms to MVC.

“Regardless of what you are using to make a living out of a job, you have to learn new ones to build a Career.”

 

Agenda

  1. What is Authentication and Authorization?
  2. Understanding Windows Authentication
  3. Types of Windows Authentication
  4. Programmatic Authentication
  5. Impersonation

What is Authentication and Authorization?

In simple words Authentication is the process that addresses the question “Who are you?“. Authentication is done by obtaining a valid username and password on an internet or intranet system. Once a user is authenticated, the system confirms that you match with the identity who you claim to be. However, authentication doesn’t confirm whether you are authorized to access the resource that you might be trying to access; that is done by Authorization.
Authorization addresses the question “What Can You Do?” and this happens after successful authentication. Authorization is the process of verifying that a user is allowed to access a requested resource. Read Full Article Here

 

 

There is a live .NET Web Service which offers all the curreny conversion eg. USD to INR etc.

This WS is available via live URL http://www.webservicex.net/CurrencyConvertor.asmx

This WS has a class CurrecnyConvertor which exposes one Function named ConversionRate and an enum named Currency which exposed the list of all the currencies like USD, INR, AED etc.

As you know Currency conversion will depend on two parameters ConvertFrom and ConvertTo and so the same is expected to be passsed while invoking ConversionRate function.

Here is a detailed list of steps:

1- Add a Web Reference to http://www.webservicex.net/CurrencyConvertor.asmx
2- Rename the Reference name to something more friendly like CurrencyConversionWS
3- In your project create an instance of the added Web service reference
4- On the created object invoke the ConversionRate function.
5- As mentioned above there is an enum which lists all the currencies and so access it directly from the object created.
6- Save the result into a double variable and multiply with your passed amount.
7- Multiply the amount you want to convert to the received conversion rate.

Here is the code you will require to have it all working:

CurrencyConversionWS.CurrencyConvertor objWS = new CurrencyConversionWS.CurrencyConvertor();

double usdToinr = objWS.ConversionRate(CurrencyConversionWS.Currency.USD, CurrencyConversionWS.Currency.INR);

double totalAmount = usdToinr * Double.Parse(textBox1.Text);

MessageBox.Show(totalAmount.ToString(),“Total Indian Rupees”);

This is how it will look like:

 

If you are looking for Web Service project template in Visual Studio 2010 under .NET Framework 4.0 as shown in the image below, you will not find it.

In order to create a WebService using Visual Studio 2010 you need to switch back to .NET Framework 3.5, as shown in the image below, and you will be able to crate a WebServeice project.

What are the contents of Service1.asmx

September 7th, 2010 | Posted by Vidya Vrat in ASP .NET - (0 Comments)

In any version of Visual Studio, when you create a WebService, it comes with a default Service1.asmx file. When you double-click on this file it opens Service1.asmx.cs file for you, why? and what is the content in this file then? and how do you view it?

In order to view what is inside Service1.asmx, select the file in Solution-Explorer, right-click, and choose “Open With…”

From the shown dialog, select the option “Source Code(Text) Editor, click OK, you will see content like this:

These are the instructions Service1.asmx have and so it opens the Service1.asmx.cs, whenever you double-click on Service1.asmx, as its .cs file is the CodeBehind.

 

Visual Studio 2010 provided “ASP .NET Web Form Application” has a new default layout (unlike a blank web page in VS 2008 or earlier versions).

New default features added to a VS 2010 Web Application

1- Site.Master page (MaterPage)

2- About.aspx page

3- Account folder, this folder by default contains following pages:

3.i-  ChangePassword.aspx

3.ii- ChangePasswordSuccess.aspx

3.iii-Login.aspx

3.iv-Register.aspx

4- Scripts folder- this folders have some .js files in it

5- Global.asax filse with empty templates of:

5.i – Application_Start

5.ii- Application_End

5.iii-Application_Error

5.iv-Session_Start

5.v- Session_End events.

6- Styles folder, containing Site.css in it

Once you have this application, you can remove unwanted features or remove master-page settings from the Default.aspx.

What happens when we add another form to this applocation

When you choose a new Web Form to be added to this web form application, it “offers you a new item in VS 2010 Add New Item dialog” it shows you a new template “Web Form using Master Page” along with old “Web Form” template; which is anyways available in all other previous version of Visual Studio.

Now if you pick the new template it opens a dialog where it will show you the default provided or if you have added your own MasterPage in a list, so you can apply the selected MasterPage setting on this being newly added web form.


click here to see larger image, use brower’s back button to continue reading post

The Web Platform Installer Beta (Web PI) provides a single, free package for installing and configuring Microsoft’s entire Web Platform, including IIS7, Visual Web Developer 2008 Express Edition, SQL Server 2008 Express Edition and the .NET Framework. Using the Web Platform Installer’s simple user interface, you can select specific components or install the entire Microsoft Web Platform onto your computer. To help you stay up-to-date with product releases, the Web Platform Installer always contains the most current versions and new additions to the Microsoft Web Platform.

Click here for Microsoft Web Platform Instller

The first time you open a Visual Studio 2005 website, you’ll be asked if you want to adjust it to use ASP.NET 3.5

If you choose Yes, the web.config file will be modified to target .NET 3.5. If you choose No, your website will continue targeting ASP.NET 2.0, but you can modify this detail at any time by choosing Website’s Start Options. Either way, you won’t be asked again, because your preference is recorded in the hidden solution file that’s stored in a user-specific Visual Studio directory.