What is the right way to develop a .NET web application?

Months ago, I was made responsible for a web application from scratch. I never programmed in vb.NET and was only familiar with classic ASP. In this case, I put together a very functional site and yet I feel that I'm not much better than a newbie.

What is the right or best format for building a .net website.

Main pages? When to use javascript? Code Behind javascript or click it on the .aspx page.

etc. etc.

+4
source share
5 answers

It's hard to say what the โ€œbestโ€ way is, because it depends on your specific application. There are many ways to organize and develop a .NET web application. The most important aspect is that it works. If you are on a tight deadline, getting it to work is critical, even if it's not the most elegant solution.

If you are interested in optimizing design or refactoring, then again this will depend on the scale and scope of the project. Do not optimize for optimization, but try to make everything clear and concise so that future changes are less painful.

+1
source

I would suggest downloading sample web applications like NerdDinner and MVC Music Store ...

http://nerddinner.codeplex.com/

http://mvcmusicstore.codeplex.com/

See how they structured their examples and where they changed logic ...

The Driven Driven Design and MVC project is what I used somehow at the end ...

+3
source

The main problem is that you can choose between two approaches: ASP.NET WebForms and ASP.NET MVC. If you have not chosen one, the question does not make sense, because for each of them a good design is different.

+2
source

I can relate to your situation almost exactly (except C #).

This is a very subjective question as to which is better, because it all depends on your exact settings, circumstances and requirements. I'm still pretty new to deciding what works best for the project, but based on my experience, I can tell you what I did.

We went with the N-level configuration so that we could separate the user interface, logic and data. This will make it easier for us to maintain code with an additional separation of problems.

We went with Masterpages (using WebForms) so we can work on the consistent look and feel of the application. You can further customize themes with themes, as well as your standard CSS and Javascript. You want to easily manage the layout and not force yourself to copy / update the code on each page.

When Javascript arrives, itโ€™s usually best not to use it directly on the aspx page itself (if itโ€™s not very small), since you will use caching in the browser, plus you can also minimize the file to speed up / simplify the downloads. I personally recommend using jQuery for the platform, as it is easy to work with, has a huge community and is well documented.

These, of course, are just a few of the things I have done. It doesn't matter if it helps you or not, it depends on your circumstances. I still have a long way to go, and I personally try to read as many blogs as possible on topics that interest me, if possible, teach videos or just ask focused questions here (if you cannot find the answers). There is plenty of good information and many sample applications that can help you learn new design patterns and techniques. After all, there is no absolute โ€œrightโ€ or โ€œbestโ€ way. :)

+1
source

There is no right way. There are several best practices, some of which may be more or less applicable to your situation.

There are also many really bad ways to do it. There are some tactical approaches between them that can be good enough.

0
source

All Articles