ASP. net mvc Framework

Source: Internet
Author: User
Tags xsl xslt

Are you looking for a suitable. NET development framework?
Are you a loyal supporter of the MVC structure?

Mavrick. NET is your best choice!
 
Mavrick.net is an open source. Net MVC Framework software. You can use

http://mavnet.sourceforge.net/download the latest version and instructions for use.
The following are descriptions of mavrick.net:
1. System Requirements:
1. operating System: win2000 (including IIS)
2. MS. net SDK
2. Installation Process:
1. unbind the downloaded marvice.net installation package
2. open IIS to set up three virtual directories
friendbook-> corresponding maverick \ examples \ friendbook directory
friendbook-XSL-> corresponding maverick \ examples \ friendbook-XSL directory
calendar-> corresponding maverick \ examples \ calendar directory
3. right-click the virtual directory friendbook and choose configuration. In the displayed window,
set
the executable file is:

C: \ winnt \ Microsoft. NET \ framework \ v1.0.3705 \ aspnet_isapi.dll
Add by name:. m

4. Access http: // localhost/friendbook

3. System Analysis

"Maverick. config" is the core of mavrick.net, and its functions are similar to those in struct.

Struts-config.xml functions are the same

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

----------
<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>

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

----------
In this example, only one command is defined as runquery, which contains two views: "success" and "error

".
 
<Controller class = "bar. Foo. query, foobar"/>

Indicates that the control class of this command is bar. Foo. query. This class is process control and mavrice. NET will automatically

In this class
Perform () method. Based on the returned results of this method, jump to the relevant view and execute the subsequent logic.

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

----------
// 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;
}
}
}

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

----------

Iv. PartProgramCode

<! -- 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"> </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>

Hope to improve together!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.