Lucas,.net Web Framework

Source: Internet
Author: User

#Lucas
Lucas
The Lucasweb framework is a framework created based on the new magic sugar idea.
This framework has two major features. 1. The simplest and easiest to configure in all frameworks. 2. The most efficient in all frameworks.
Instead of using IOC injection and reflection, the 1.UrlRouter generates router code directly from the controller layer, which is not comparable to any. NET Framework.
2. Only one folder, without any configuration, can be used to copy to the Web site project.
3. Re-implemented some of the features in the WebForm template engine.
4. The HTML code is compressed in the CSharp source file, which makes the HTML code compress 0 loss.
5. This framework is open source.
Https://git.oschina.net/LucasDot/Lucas.git
Svn://git.oschina.net/lucasdot/lucas
If you have any questions, please contact qq:348764327.

How to use:
Configuration:
1. Put Lucas in the Web root directory. (The Lucas directory is under the WEBMVC project.) The rest is used for development-time testing.)
2. Set the lucas/webcompiler.aspx as the startup item and run it. (The framework will automatically complete the configuration)
Development:
1. After the configuration is complete, the root directory will automatically appear in the app directory, under Controllers to create a class that ends with a controller and inherit it from Lucas.baseaction
Cases:
Using System;
Using System.Collections.Generic;
Using System.Web;

Namespace WebMvc.Man.Controllers
{
public class IndexController:Lucas.BaseAction
{
public void Index ()
{
String text = "Welcome to the Lucas MVC framework. ";
View ("Indexcontroller/index");
}
}
}

2. Then create a new index.aspx page under App/views/default/indexcontroller. The folder name is the class name of the controller, and the file name is the method name.
To modify a template:
<%@ page language= "C #"%>
<!doctype html>
<body>
<%=text%>
</body>
Where <%=%> is the output of the value in the text variable, as long as the variable within the method can be output here. Of course also support <%%> directly add CSharp code.
Additional template files can also be introduced for example: <%@ Reference page= "~/app/views/default/public/header.aspx"%>

3. Magical sugar thought. Run the lucas/webcompiler.aspx file again, the system will automatically generate two files under app/web/default/indexcontroller/, Index.cs and index.html
The contents are as follows:
Using System;
Using System.Collections.Generic;
Using System.Web;

Namespace WebMvc.Man.Web.Default.IndexController
{
public class IndexAction:Lucas.BaseAction
{
Public indexaction (System.IO.TextWriter TW): Base (TW) {}
Public indexaction (String fileName): base (filename) {}
public void Index ()
{
String text = "Welcome to the Lucas MVC framework. ";
Write ("<!doctype html>Write (text);
Write ("</body>}
}
}
You see? The most efficient write function is generated directly, and the HTML in this code is all compressed.
Bingo, this is what I call the magic sugar idea!
And look at index.html.
<! DOCTYPE html>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title></title>
<body>
<script>
Window.location.href = "/man/indexcontroller/index.htm";
</script>
</body>
There is only one jump statement. When you set this page as the startup item, you can debug the Index.cs file without worrying about the URL clutter when the MVC test occurs.
Catalogs in a generic MVC module are not hierarchical, and this framework can be infinitely graded.
The general MVC framework requires an annoying setup, or template support, which is self-configuring when the framework is run.

Lucas,.net Web Framework

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.