asp.net MVC框架的有用性,而不是使用常规asp.net编写MVC样式?(Usefulness of asp.net MVC framework as opposed to coding MVC style with regular asp.net?)
我是asp.net世界的新手(但不是.net的新手),我一直在玩各种各样的东西,看看我是如何构建我正在开发的Web应用程序。 在我的游戏中我已经决定我不想使用asp.net的控件,因为我已经在rails上做了足够的php和ruby以熟悉常规HTML,以及相当数量的javascript。
我看到asp.net webforms和asp.net MVC之间有很多比较,但是当谈到它时,我没有看到那么大的差异(我承认可能是我错过了差异而不是它们没有在那里)。 我已经使用MVC类型的体系结构编写了我的asp.net应用程序(aspx有视图,aspx.cs有控制器代码,模型是app_code目录中的单独类)。
如果我不打算使用asp.net控件并打算使用纯html和javascript,那么使用MVC框架有什么好处? 截至目前,我所看到的唯一一个是路由,我敢肯定,如果我看起来更多,我可以找到简单的方法来进行自定义路由而不使用整个MVC框架。
无论如何,如果有人可以进入asp.net webforms的细节减去asp控件与mvc框架,我将不胜感激。
I am new to the asp.net world (but not new to .net) and I have been playing around with various things to see how I want to architect a web application I am developing. In my playing around I have decided I did not want to use asp.net's controls, as I have done enough php and ruby on rails to be decently familiar with regular HTML, and a decent amount of javascript.
I see a lot of comparisons between asp.net webforms and asp.net MVC, however when ti comes down to it I am not seeing that much of a difference (and I'll admit that it's probably me missing the differences rather than them not being there). I already have coded my asp.net application using a MVC type of architecture (aspx has the view, aspx.cs has the controller code, and models are separate classes in the app_code directory).
If I do not intend to use asp.net controls and just intend to use pure html and javascript, what are the advantages of using the MVC framework? As of right now, the only one that I am seeing is routing, and I'm sure if I look more I can find easy ways to do custom routing without using the whole MVC framework.
Anyways, if anyone could go into details of asp.net webforms minus the asp controls versus mvc framework, I would be greatly appreciated.
原文:https://stackoverflow.com/questions/1899075
相关问答
更多-
Openpyxl - 如何从excel文件中的单元格中读取int值(Openpyxl - How to read int value from cells in excel file)[2022-05-31]
你为什么使用cell.internal_value ? 通常, cell.value会为您提供所需的内容。 如果openpyxl返回浮点数,那么这是因为数字在文件中存储如下。 The issue was with openpyxl package which has been resolved. Now cell.value gives correct value as expected. -
你绝对不需要所有的代码。 试试这个 - 如果将“查找”部分拆分为单独的方法,则更容易管理。 Option Explicit Sub ImportDataFromMultipleFiles() Dim filenames As Variant, wb As Workbook Dim rngDest As Range, colFound As Collection, f, i As Long Set rngDest = ActiveSheet.Range("A2") '<< res ...
-
VBA循环遍历单元格并从Excel工作表中的单元格中提取文件名(VBA loop throught cells and extract the file name from cells in excel sheet)[2022-03-02]
尝试这个: ' Get the sheet Dim ws As Worksheet Set ws = ThisWorkbook.Worksheets(1) ' How you will slash it Dim strSlash As String strSlash = "\" ' Set the range for your tool Dim rngFiles As Range Dim rngCell As Range Dim lngMaxRow As Long lngMaxRow = Range(" ... -
除了讨论的其他内容之外,如果它们都在同一个文件中,您可以将工作簿路径存储为引用的变量: Sub Makro1() 'All Your Other Stuff Dim strPath As String strPath = ActiveWorkbook.Path ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _ strPath & "\" & file_number & ".mpeg", TextToDisplay:= _ ...
-
我认为这可行。 我假设您的URL和目标文件范围大小相同,并且第一个URL和目标位于一起。 换句话说,第一个URL保存到列表中的第一个目标,第二个URL保存到第二个目标,等等。 Sub getURLS() Dim x As Range, urlRange As Range, saveToRange As Range Dim i As Long i = 1 Set urlRange = Application.InputBox("Range of URLs", "URLS", Type:=8) ...
-
int maxNumOfCells = sheet.getRow(0).getLastCellNum(); // The the maximum number of columns Iterator rows = sheet.rowIterator(); while (rows.hasNext()) { HSSFRow row = (HSSFRow) rows.next(); Iterator c ...
-
不.Excel不支持在工作表的单元格中存储数据blob。 您应该将这些PDF分别导出到单个文件,并在导出的工作表中指定文件名。 No. Excel does not support storing data blobs in cells of worksheets. You should probably export these PDFs each to individual files, and specify the file name in the exported worksheet.
-
处理Excel中的TimeRecording文件(格式化单元格)(Handling TimeRecording-files in Excel (formatting cells))[2023-09-22]
Excel将以下列形式将日期时间值存储为浮点双精度值: 1天= 1 1小时= 1/24 = 0.0416666666666667 1分钟= 1/24/60 = 0.000694444444444444 如此格式化为时间所有大于或等于0但小于1的值将是从00:00到23:59。 大于1的值将是1 = 01/01/1900 00:00:00的日期。 但是,如果您仅使用hh:mm格式化此类值作为时间,则仅显示时间。 日期只是隐藏。 例如,使用hh:mm格式化的1.25将显示06:00尽管它是1 1/4天,即01/ ... -
您可以在VBA中使用IIF功能。 它类似于Excel IF [c1] = IIf([a1] = [b1], "Yes", "No") You can use the IIF function in VBA. It is similar to the Excel IF [c1] = IIf([a1] = [b1], "Yes", "No")
-
只需通过标准输出流从DIR命令检索输出。 比Dir$()快得多,不需要任何循环!: Sub Foo() Dim strFolderName As String Dim strFileType As String Dim pasteRange As Range Dim returnVals As Variant '// set parameters, change as required strFolderName = "C:\Users\NAME\Documents\Fo ...