Open Source: TAURUS.MVC Framework

Source: Internet
Author: User

Why to create TAURUS.MVC:

I remember being fooled by a company to be responsible for the company e-commerce platform, the situation is this:

The original project is outsourced to a third party, using: Webform+nhibernate, code nasty, Bug Unlimited, often point to hang up.

First recruit a few internship college students in that play, do not, finally fooled me, haha ...

At that time in the first feeling is to redo, but hehe, the boss's mind you do not guess not.

Then the first stage is in the old Project transformation dimension stabilized, as long as it is not necessary to hang hundreds of servers to solve the problem, can be weak and weak to deal with the Don't, after all, no 323, is not good beam pit.

In the second phase, it is natural to think again:

E-commerce backstage already have ASP. NET Aries frame, brush brushes don't worry too much;

What frame does the e-commerce front desk choose?

1:webform too conservative;

2:.net Core is too aggressive;

3:qblog (Autumn Garden) high threshold;

4: Re-write a set, business busy, not empty to think, and time is limited, has submitted plans to the boss.

Finally, there is no choice but to choose: ASP.

Think about it carefully. NET environment, the popular development framework in the market, are Microsoft's own (well-flowering? )

I also know that some of the older, but also the framework, but are created for themselves or their own company (and to create users with the perspective of thinking and the breadth of the involved is not the same).

There are some free for the masses, but propaganda 32 under the No sound;

Garden also never take the initiative to help third-party open-source framework to promote, relying on Bo's own passion and feelings, can support how long is an unknown, after all, the framework is not income.

Pen Wind One turn:

Later, the boss fell down ..... (Tears Rush ~ ~ ~).

Then, there is time to calm down to make a good use of feelings to create a framework!

Finally, Taurus.mvc out, and one out on the open source!!! Open source!! Open! three times.

About Frame name: Taurus

Ten years ago when the creation of Cyq.data, the name of the bad (blame me), resulting in a large extension of resistance.

So now create a new framework, must have a good name, after all, to take a like: Zidron, Zidong Strong, Zidrondon strong such a loud and thorough.

A small array of previous releases: ASP. NET Aries Business Development Framework: Name: Aries (Aries, gentle with a little pride).

So thinking, is the continuation of the White Sheep series called: Aries.mvc it?

Still is... To build the Golden 12 Palace?

And then the 13 constellation, the eight planets of the English word searched for a time, found that there is no satisfaction, jumping name has obstruction, then the order named it.

Taurus (Taurus), in fact, the reason for the final decision is the pronunciation of the word: Take off (very much to see the feeling of large, but also full of imagination, the feeling of a bit of color in the explosive force).

About the framework's application scenario:

The choice frame, for the master, is a science, for the novice, is just a choice.

When I was young, I was forced to choose a Microsoft-made framework, and now I am the Creator:

Cyq. Data+aries+taurus, almost adaptable to all business scenarios.

You can already use ASP. NET WebForm, ASP. NET MVC.

However, it is still inseparable from the ASP.

As stated above:

1:asp.net Aries is suitable for business systems and rapid background development.

The 2:TAURUS.MVC is suitable for front-end systems and webapi such as e-commerce with high performance requirements.

About the advantages of the framework:

Usually speaking of the advantages of the framework is to start to pull the eggs to blow B, as long as the market slogan shout loudly, the product as long as not a weak B is not a problem.

What are the advantages of the framework? Ordinary people are asked this first, you want to blow my heart, blowing my mind open, just back to you, and then silently download the source code to save the drive.

Because the market basic Microsoft a unified world, so the comparison is looking for the Microsoft home MVC.

In fact, compared to. NET MVC, it can only be said: One sky, one underground.

MVC4 installed: 800M (do not understand what is to be loaded so big);

TAURUS.MVC installation finished: 400K (TAURUS.CORE.DLL+CYQ. Data).

It is obvious: Microsoft these years have been doing addition, do not want to do subtraction, has been to do innovation, do not want to do compatibility, a lot of products are big thick leaves, let people mind.

Pull away, talk about the advantages, let me think, let me and quietly think about ...

Use a few overused words first: lightweight? Performance? High efficiency?

No, have to be different, a bit others did not do is called the advantage:

Oh, yes, it has to be shown in the picture, so that you can be professional, yes, so, that way, okay, all over,:

TAURUS.MVC Source:

1: Source Code SVN:HTTPS://GITHUB.COM/CYQ1162/TAURUS.MVC

2:demo Demo Station: http://taurus.cyqdata.com

The demo is like this:

Taurus.mvc Framework Introduction Method:

1: Search TAURUS.MVC on NuGet, quote (will introduce: Taurus.core and Cyq.data)

Then come out a Readme.txt, follow the prompts to configure the URL intercept and specify the controller where the DLL can be.

2: Direct use of the source project (the source project will have a demo).

TAURUS.MVC Framework: 1: Source code after download: Solution diagram:

2: Solution Description:

1:cyq.data: The main xhtmlaction when the template engine, in addition when the data layer can provide model or provide automatic binding syntax.

2:taurus.core: Mainly implements the core methods such as route rewriting, controller invocation, Viewengine and so on.

3:taurus.controllers method Entry, where the code is written.

4:taurus.view only store HTML and CSS and JS

3: Additional Notes:

1: Usually MVC's controller,modle,view files are placed in a single project, which is split into two projects.

2: For clarity at the project level, you can build model projects (put entities) and logic projects (write business logic Code) and utility (drop tool classes).

3: The framework provides the demo, just so-so completely put in the controllers project.

The following is a simple way to talk about the basic principles and how to use the MVC routine:

Routes for 1:TAURUS.MVC: 1: Stealth routes:

In. NET MVC, routing is a very important but troublesome feature.

The first step in simplifying MVC is to think about how to eliminate routing implicitly.

In the end, two routes are fixed internally by default:

1:{controller}/{action}/{para}

2:{module}/{controller}/{action}/{para}

The default is the first type.

2: Extended route:

When deployed as a sub-application, or the first user name, a prefix directory is created.

At this point can be over appsetting configuration Routemode value of 2, easy over.

The context provides three parameters for you to get information: Controllertype,action,para.

OK, the route is over, do you want to customize the route? No way! Oh, you can change the source ~ ~ ~

2:TAURUS.CONTROLLERS1: Find Controller:

The rules have been set, and the rest is to find the controller according to the rules.

1: Collect all the controllers.

2: Specify where to collect: The default is to go to Taurus.controllers to find inherited from the base class: Taurus.Core.Controller.

3: Custom holds the value of the controllers:appsetting configuration taurus.controllers, assuming: Taurus.view

4: Can not find the controller, all looking for defaultcontroller, if the wood has (the demo is there), throw an exception.

2: Call the Controller's action:

1: The method name is public void, and there are no parameters (overloaded with multiple parameters, only the first one is collected by default).

2: If it is an AJAX request, assign the processed value to the ajaxresult of the context.

3: When the action is not found, the default method will be found (the base class has, so there must be, you need to rewrite it).

3:taurus.view

1: Template: HTML (strictly XHTML)

2: Template loading mode: and URL corresponding to the addressing path: views/{controller}/{action}.html

3: How the master page is referenced: itemref= page. Node name. (itemref is a div attribute that no one uses to refer to node substitution .) )

4: Load substitution Syntax:

A: For input tags, you can use CYQ.DATA.MDATAROW.SETTOALL to bulk assign values.

B: For ${name}, you can use View.loaddata (data, "prefix"), and it will be formatted automatically.

C: For List loop Labels: You can use the CYQ.Data.MDataTable.Bind method binding.

Summarize:

1: This article does not explain in detail the use method, for the use way, will introduce in the next article:

Well, an introduction is enough, because there is really nothing to talk about, do not need to write a book.

2:demo to provide additions and deletions to check the list paging function, the ability to have a good point or MVC basis, the source will be used to sweep.

3: Today's focus is open source ... Open source... Open source... Important thing to say 123.

Finally say:

This framework of open source, gave. NET of the people more than a choice.

Have feelings of you, read, under the source, the next money to money, no money to praise, haha ...

Open Source: TAURUS.MVC 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.