Let me ask a painful question: Who has done ASP's MVC? How to make this fucking language popular again?
仅有的幸福
仅有的幸福 2017-05-16 17:06:51
0
2
616

asp magically supports two syntaxes: JScript and VBScript
I've never seen anyone do ASP's MVC haha, I guess it must be a pain in the ass for those who implement it:
My opinion is:
Unified entry point
Analysis module and action
Then use regular expressions and FileSystemObject to process the module and action asp files and generate them in the runtime directory,
Then call these files under runtime every time.
Of course you have to implement things like import require include etc.
Don’t ask me this question: Does it hurt or not? I only know that I feel bad. Haha
Of course, those who use ASP are generally small-scale systems. For example, cms or something, don’t expect it to be large-scale, so I am doing this under small-scale conditions

仅有的幸福
仅有的幸福

reply all(2)
给我你的怀抱

In fact, it is not necessary to unify the entry points. Let asp analyze the url... If there are many url rules, the efficiency will be too low... If you don't care about the url, you can also use get to get the action.

In fact, the purpose of mvc is to divide labor into layers. If this purpose can be achieved, it will be ok.

If there is a script with the URL /articles.asp and the corresponding file is D:projectwebarticles.asp, then this file can be regarded as a controller. If there is a model file D:projectmodelarticles.asp that can obtain data, and this file defines There are several methods to obtain articles data, and the view file D:projectviewarticles.asp, the controller can be written like this:

<!--#include file="..\model\articles.asp"-->
set articles = getArticleList();
<!--#include file="..\view\articles.asp"-->

In fact, the same is true for other languages. If you want to implement a single entry framework that is missing from mvc, it is necessary. If performance is an important consideration, it is much more efficient to let the webserver decide the controller than to let the interpreter decide.
小葫芦

Have you tested it? I thought about doing this (single entry) in 2005, but after testing, ASP 3.0 does not support dynamic include. Writing like this will not take effect, include will not pay attention to the previous if/else:

if (condition a)
include a.asp
else if (condition b)
include b.asp

I wonder if the new version of ASP supports this feature after 6 and a half years

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template