In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
The main content of this article is "ASP.NET MVC Engineering Analysis". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "ASP.NET MVC Engineering Analysis"!
ASP.NET MVC project
1, how to split the project without always having to combine the code, such as PetShop MVC by default depends on one person's project if the project has more people and the code is more tired.
Is there a way to make your own without combining the code? One subsystem on my side has nothing to do with each other. I still want them to finish a lot of things by themselves. Just go to the client and install it directly.
But now the project always needs to combine code, I still have to worry about sometimes lack of files, what can be separated in the end ah?
A: yes, of course, but the authorities didn't give it, but I used to do it (in 2003).
Splitting the project that needs to be compiled into several proj can basically solve this problem if it is MVC.
◆ Demo.Controllers.U00-Public
◆ Demo.Controllers.U01-as soon as developers use
◆ Demo.Controllers.U02-developer 2 use
If it is PetShop, you can do BLL.U01 BLL.U02 or Model.U01 Model.U02.
WebSite itself does not need split real-time compilation. You can copy your own page to the website and copy the dll divided above.
If it is in WebApplication mode, it can also be split into WebApplication1 WebApplication2 WebApplication3 as long as the compiled dll is under bin.
And it can be copied to a virtual directory, because WebApplication itself is also a class library project, and ASP.NET will look for classes that match aspx in all the dll in the bin directory.
However, as mentioned above, there may be too many engineering files in the namespace, but I think you can put up with this.
2. Can I convert ASP.NET MVC WebApplication to WebSite? In fact, this problem and the above related WebSite do not have to compile the loose pages and do not need to add files or other code to put into it!
A: at present, there is no official template for mvc website mode, but just add the differences in the web.config of WebApplication to the basic web.config of website. Ms may be lazy. Dynamic Data provides the site template, which is actually the same thing as mvc's url rewriting. WebSite and WebApplication are different projects with their own advantages.
3. Can I use those original controls such as GridView controls in the ASP.NET MVC project? the technical staff of our company told me that I couldn't.
A: what kind of technology is this? How could it not work? did I tell you not to recommend it? Aren't they all asp.net sites? MVC certainly has many advantages, but sometimes you can save a lot of time with controls, because now many projects the view layer should spend the most time on party affairs but there is not much code at the bottom. In this case, mixed mode can be adopted. If you dislike the fact that ViewState is disabled, it's okay to use mvc for a sql-by-grid page.
4. Is it possible to combine MVP mode or PetShop multi-layer approach in ASP.NET MVC project?
A: of course, you can even mix MVP with MVC. For more information, please see Demo. If multiple layers are not related to MVC, you can call mvp as much as you like in Controller. When the interface and backend are made by two people, mvp does have some advantages. In demo, it is not a full mvp mode but a mixed way with mvc. In mvp mode, I used to have so much time to play mvp in my previous blogs. If you can play locally, why do you play so many things when you are in such a hurry? Not afraid to play to death!
5. Can the Controller in the ASP.NET MVC project be moved under the Web directory?
A: of course, you can easily set up a class library project to set up a reference to the reference and then create a XXXXController under the class library. The mvc framework will find all the dll in the entire Bin directory. The Controller in the entire dll directory can be found in dll under bin, and the Controller can exist in multiple class libraries. Don't repeat the name (as expected). As for model, you can move it even if you want to. In fact, views can also refer to a question. Next time, I can't try this kind of problem by myself. I'll set up a project and put the default Controller into it.
At this point, I believe you have a deeper understanding of "ASP.NET MVC Engineering Analysis", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.