Using Razor Web Matrix to Replace Classic ASP Site

I have been looking at ASP.Net web pages and I think it will be a good replacement for some of the classic asp sites I'm working on. There are many of them, which is similar to the way classic asp did something, so I believe that I can drag other programmers into the present. My problem is that I have not yet been able to find any separate documentation to find out if there are any "gotchas" that I should know about if I want to go this route. Therefore, if anyone knows, I really could use this information. I think that right on MVC and Web Forms will be a bridge too far for the rest at the moment. Thanks.

Wade

I found a link from Mike Brind - should I use WebMatrix to create a real website?

+4
source share
5 answers

I would suggest that web pages as a structure are probably the best next step you can take, but I would also advise that at least one person on a team takes time to understand the basics of the MVC pattern. You can solve it too much for most of the team at the moment, and this is fair enough, but you can use your knowledge to plan the development of a web page site so that it can be more easily converted to MVC at some point in the future if you decide that way.

What I would like to see (based on the classic ASP background) are functions and helpers. Decide on a data access strategy - Entity Framework works well with web pages and can be easily ported to MVC. Avoid the database assistant. Use Visual Web Developer 2010 SP1 for the Intellisense option.

As Knox said, you have all the ASP.NET infrastructure available to you, so there shouldn't be any special gotchas web pages, and this is a massive step from classic ASP.

+4
source

I have been using Webmatrix / WebPages / Razor for a while and love it. Some time has passed since I used Classic ASP, but for me WebPages feels like a real successor to classic ASP and what ASP.net should have been from the very beginning. I actually move most of my small sites to WebPages from WebForms. Here are some things I've come across.

I'm not sure if this is a question or not, but I thought I wanted to mention that using WebPages the scope of your variables can behave differently. I know many classic ASP sites that were used to include files to run snippets of code. Many of them depended on global variables set in the parent document. In WebPages, if you use RenderPage or Helpers to replace, they run mostly outside the Parent scope. If you used Server.Execute instead of including, you may not notice much of a difference, but if you really used include and many global variables, you may notice this.

Another possible error in ClassicASP <% =%> does not encode output, but in WebPages the Razor @ syntax encodes output by default.

Another thing worth considering is to use C # vs VB.net with web pages. While vb.net works, you will find that most samples, tutorials, and people on forums use C #.

Finally, what bothers me is that it is called a web page map. It was difficult for me to do a good Google search using the term โ€œweb pagesโ€. Even โ€œasp.net web pagesโ€ return mostly web form results. I have more success using "webmatrix" or "razor".

+4
source

It is not possible to recommend any documentation, but here is an introduction to the web matrix on the blog mikesdotnetting.com, where he wrote a blog in a lot format about web pages with a web matrix.

+2
source

We have two production sites developed using a web matrix. One is serving our customers, the other is an intranet for our employees. They have been working for almost a year. I would say that about 95% of sites were developed exclusively in the WebMatrix environment with approximately 5% in Visual Studio, especially for hidden debugging. We are pleased with the WebMatrix / Web pages. I did not use WebForms because I was worried about WebForm's ability to make really light pages, as many of our users use cellular data on their iPad or iPhone. I did not use MVC because of the added complexity, as many of our pages simply show read-only user data from our production database. Since WebMatrix gives you access to the complete ASP.NET library, I did not feel delayed.

+1
source

We are currently converting our ASP pages to a web matrix. A few years ago, we tried to make conversions using WebForms, only ending disappointment. After a little learning curve of C # and Razor syntax, our development staff feels that we made the right decision when working with the web matrix.

0
source

Source: https://habr.com/ru/post/1387551/


All Articles