惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Webroot Blog
Webroot Blog
U
Unit 42
A
About on SuperTechFans
宝玉的分享
宝玉的分享
月光博客
月光博客
C
CERT Recently Published Vulnerability Notes
P
Privacy International News Feed
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
P
Privacy & Cybersecurity Law Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Securelist
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Spread Privacy
Spread Privacy
L
Lohrmann on Cybersecurity
Apple Machine Learning Research
Apple Machine Learning Research
K
Kaspersky official blog
Hugging Face - Blog
Hugging Face - Blog
B
Blog
I
Intezer
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
V
V2EX
L
LangChain Blog
AI
AI
G
GRAHAM CLULEY
T
Tor Project blog
人人都是产品经理
人人都是产品经理
D
Docker
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
I
InfoQ
Y
Y Combinator Blog
C
Comments on: Blog
GbyAI
GbyAI
www.infosecurity-magazine.com
www.infosecurity-magazine.com
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
N
News and Events Feed by Topic
MyScale Blog
MyScale Blog
H
Help Net Security
Vercel News
Vercel News
T
Tenable Blog
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿

博客园 - Jerry.liu

AspNetPager分页控件--使用方法 2 AspNetPager分页控件--使用方法 1 分析ASP.NET服务器控件开发-控件生命周期 用ObjectDataSource实现自定义分页的心得总结 DataTable操作中的性能问题 ASP.NET的 Session 详解4 ASP.NET的 Session 详解3 ASP.NET的 Session 详解2 ASP.NET的 Session 详解1 全面优化ADO ADO.net学习纪录 (二) ADO.net学习记录 (一) 彻底放弃IIS让Apache也支持ASP.NET 如何实现Asp与Asp.Net共享Session Asp.net生成htm静态文件的两种途径 ASP.NET2.0的控件状态和视图状态探讨 2 ASP.NET2.0的控件状态和视图状态探讨 1 压力监测程序sqlserver和MYSQL版 PetShop数据访问层之数据库访问设计
ASP.NET的 MVC框架
Jerry.liu · 2007-05-25 · via 博客园 - Jerry.liu

你是否正在寻找适合您的.NET开发框架?
你是否是MVC结构的忠实拥护者?

Mavrick.Net 是你最好的选择!
 
  Mavrick.net 是Open source的.NET MVC框架软件,你可以通过

http://mavnet.sourceforge.net/ 下载最新的版本及使用说明。
 
以下是Mavrick.net 的一些说明:
 
一 系统需求:
     1. 操作系统:Win2000 (含IIS)    
     2. MS .NET SDK
 
二 安装过程:
     1. 解开下载完成的Marvice.net安装包
     2. 打开IIS设置三个虚拟目录
         Friendbook  -> 对应 Maverick\examples\Friendbook 目录
         Friendbook-xsl -> 对应 Maverick\examples\Friendbook-xsl 目录
  Calendar -> 对应 Maverick\examples\Calendar目录
 
      3. 在虚拟目录Friendbook点击鼠标右键  点击配置,在弹出窗口,
        设置
           可执行文件为:

C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_isapi.dll
           添加按展名: .m 
          
      4. 访问 http://localhost/Friendbook 
       
 三 系统分析

   "Maverick.config"是Mavrick.net的核心,他的功能与Struct中的

struts-config.xml功能是相同的
 

-------------------------------------------------------------------------

----------
 <maverick version="2.0">
  <commands>
    <command name="runQuery">
      <controller class="Bar.Foo.Query, Foobar"/>
      <view name="success" type="document" path="queryResult.aspx">
        <transform type="xslt" path="lookAndFeel.xsl"/>
      </view>
      <view name="error" type="document" path="queryFailed.aspx">
        <transform type="xslt" path="lookAndFeel.xsl"/>
      </view>
    </command>
  </commands>
</maverick>
 

-------------------------------------------------------------------------

----------         
  此例中只定义一个command 即runQuery , 它包含两种Views即 “success”  和 “error

”。
 
  <controller class="Bar.Foo.Query, Foobar"/>
   
    表明此command 的控制类为Bar.Foo.Query, 此类为流程控制, Mavrice.NET 将自动

调用此类中的
    Perform()方法,并根据此方法的返回结果,跳转到相关的View去,执行后继的逻辑。

-------------------------------------------------------------------------

----------
   // Classname : Bar.Foo.Query.cs  
 using System;
 
 namespace Bar.Foo
 {
  public class Query : ControllerProtected
  {
   public override string Perform()
   {
    if (loginSuccessBool)
     return SUCCESS;
    else
     return ERROR;
   }
  }
 }
 

-------------------------------------------------------------------------

----------
 
  四,部分程序代码
  
    <!--default.aspx-->
    <%@ Page %>
 <%
  Context.Response.Redirect("welcome.m");
 %>

  
  
  
   <!--maverick.config-->
  
   <?xml version="1.0"?>

  <maverick version="2.0" default-view-type="document"

default-transform-type="document">
 
 <views>
  <view id="loginRequired" path="loginRequired.aspx">
   <transform path="trimOutside.aspx"/>
  </view>

  <view id="loginFailed" path="loginFailed.aspx">
   <transform path="trimOutside.aspx"/>
  </view>
 </views>

 <commands>
  <command name="welcome">
   <view path="welcome.aspx">
    <transform path="trimOutside.aspx"/>
   </view>
  </command>

  <command name="signup">
 
 ..................
 
 </commands>
 

  </maverick>
 


 
  <!-- welcome.aspx-->
 
  <%@ Page %>
  <%
 Context.Items.Add("title","Welcome");
  %>

  <p>
 Welcome to the Friendbook example.  This is a simple contact-list
 application which demonstrates how to create a membership-based
 website with Maverick.
  </p>

 <%
 Context.Items.Add("dest","friends.m");
 Context.Server.Execute("loginForm.aspx");
  %>


  <!--trimOutside.aspx-->

  <%@ Page %>
 <html>
 <head>
  <title> <%=Context.Items["title"]%> </title>
  <link rel="stylesheet" href="stylesheet.css"

type="text/css" />
 </head>

 <body>
  <table cellspacing="0" cellpadding="0" width="100%">
   <tr>
    <td class="pageTitle"

colspan="2"><h1><h1> <%=Context.Items["title"]%></h1></td>
   </tr>
   <tr align="center" style="text-align: center">
    <td class="navigationTop"> <a class="nav"

href="welcome.m">Login</a></td>
    <td class="navigationTop"> <a class="nav"

href="signup.m">Sign Up</a></td>
   </tr>
  </table>

  <%=Context.Items["wrapped"]%>
 </body>
</html>

望共同提高!