I’ve always had an interest to upgrade to ASP.net from classic ASP. When you do a google search of the topic ASP.net, you’ll receive the following top four responses, one of which states it is NOT an upgrade but rather the next generation. I would take this as it is a completely new development of framework.
· Microsoft’s site and links to information, and community resources. www.asp.net/
· A place to start with Microsoft ASP.NET & ASP.NET www.asp.net/get-started
· ASP.NET is a web application framework developed by Microsoft for building dynamic web sites and web applications. en.wikipedia.org/wiki/ASP.NET
· ASP.NET is the next generation ASP, but it’s not an upgraded version of ASP. It is part of the Microsoft .NET framework, and a powerful tool. http://www.w3schools.com/aspnet/default.asp
On the get-started page of asp.net, I found a link to the MVC which you can download visual studio express using razor for as viewing engine and has a debugger. http://bit.ly/6vq2R I believe this is very useful for users who do not have visual studio (a microsoft product). There is also a link for the install of the mvc for developing in ASP.net.
The power behind ASP.net
What I believe is the power in .net is that you can build modules and reuse them in mulitple applications. This provides flexibility as well as speed in development. The other aspect of .net that is attractive is that works with the mark-up languages and can easily build dynamic sites. With ASP.net, you can use Visual C# or Visual Basic, which are both Microsoft languages. The visual studio express will provide you with a working framework template that you can easily build on. This MVC-based application contains (http://bit.ly/gKZ0lM):
- Controllers: Classes that handle incoming requests to the application, retrieve model data, and then specify view templates that return a response to the client.
- Models: Classes that represent the data of the application and that use validation logic to enforce business rules for that data.
- Views: Template files that your application uses to dynamically generate HTML responses.
Using the controller
The mvc application provides the skeleton similar to the ide, eclipse, which does this for Java. The default MVC mapping is “
/[Controller]/[ActionName]/[Parameters]. ” This looks a bit confusing, but if you pull this apart it is really simple to understand. In the url you will have the web address such as http://www.localhost.com then the controller would follow. Let’s say we created a controller called “hello.cs.” Within this file you have the action name, which “index” would be included in this. It’s action is similar to that of index.html for a website. Servers know to use this as the default page. Index would be called upon as the default action calle. You can specify other actions such, but you would have to directly type those into the URL. For each action, you can have parameters that would provide additional functionality and can be further enhanced by using C# parameters.
What we’ve not covered
So far we’ve only covered the controller aspect of the MVC. Additional aspects that need to be learned are:
- Adding a View
- Adding a Model
- Accessing your Model’s Data from a Controller
- Examining the Edit Methods and Edit View
- Adding a New Field to the Model and Table
- Adding Validation to the Model
- Improving the Details and Delete Methods
There are many already developed pieces of code out there such as progress bars that can be repurposed. When you look to code something, see if it has been done already and modify for your purposes. There is something to weigh in this matter though, if the code you will be working with isn’t document well, it may take more time for you to understand the code than it would to develop it yourself.
Other aspects (not an all encompassing list) of .net that are beneficial but not covered here are:
- XML integration,
- Simple compilation,
- Multiple language implementation, and
- Data driven.
You can check out more of these on the W3CSchool.