Let's take together our DOTNET architecture - DotNetStruts

xiaoxiao2021-03-06  42

Architecturally name DotNETStruts______________________________________________ is still not known why the architecture is named DotNETStruts, because I saw a Java Struts feel good, but the Java IDE flattered, so I wanted to achieve with DotNET Struts framework, so named

DotNetStruts,

Copyright 唠: _____________________________________________ This program is not protected by any legal protection, I only hope that our Chinese programmers will actively do the open source on the DOTNET, do the architecture on the DOTNET. I only hope to keep their name DotNetStruts, author Haha

Introduction ______________________________________________________________________________________________________________________________________________________________________ A table teacher (ID, name, gender, class), where ID is the primary key and automatically adds the value, can be used with this class DIM TE AS New Entity ("Teacher") TE.Property ("Id") = 10001TE. Property ("name") = "zhangsan" TE.Property ("gender") = "f" '' TE.Property ("agn") = 23 This sentence is abnormal because the configuration file (ie the database is required), the table TEACHER '' No Age Field '' '' below is some operations T.Insert () TE.UPDATE TE.DELETE TE.SELECT () where INSERT operation ignores the automatic value of field (indeed) INSERT TEACHER (Name, Gender) VALUES (' ZHANGSAN ',' F ') Update Operation The primary key is the condition of WHERE. That is, the generated SQL is Update Teacher Set Name =' zhangsan ', GENDER =' F 'WHERE ID = 1000 DELETE operation will ignore any properties outside of the primary key, SQL is delete from teacher where id = 10001 select operation Utilization "and" operation filter record, SQL is SELECT * from time WHERE ID = 10001 and name = 'zhangsan' and gender = 'f' master slave table operation '' print number 10001 Teacher's So Dim St AS Entityif TE.Haschilds ("Studnet") THEN for Each St in Teacher.getChilds () Console.Write (St.get ("Name") NEXTEND IF '' printing student number is102 Teacher's Name Dim St AS New Entity ("StudNet") St.Property ("ID") = 102IF St.Hasparent () THEN Console.write (st.getParent.get ("name") Endiff

For ASP.NET support to increase the main content of the recording Teacher_insert.htm .........

// This url do.do is mapped through Web.config Navigation class Write this static file, you can insert the record into the database without writing any code, where three hidden domains meanse Name =" Table]] "Value =" Teacher "indicates that the entity class to be operated is teachername =" [[Operation] "value =" INSERT "means that the implementation is inserted, the supported operation is INSERT, UPDATE, DELETE, SELECTNAME = "[[Forward]]" value = "tacher_list.aspx" indicates that the configuration file that jumps to the teacher_list.aspx database after the insert is successful, and the WriteXML () method provided by dbschema is extracted from SQLServer.

Hopefully to expand function _____________________________________________________________________________________________________________________________________________________________________________________________________________________________________writing, Writing, Writing WINFORM Form) includes data authentication of the client, providing some styles can choose

Permission system, implement authority limitations for various operations of each table, configured by configuration files

Template system, artist uses some "tab" in the page, such as Teacher.Name, program can replace the information of the database here, generate an HTML static page or to generate an executable ASPX file with a template file with special "labels" , More difficult than the production of static pages, support paging

Compatible now ASP.NET controls now this structure is now very much ASP or JSP structure. Now the advantage of ASP.NET is to achieve similar interactions with WinForm. How to use this advantage of ASP.NET, now the idea is not Very clear

The implementation of business logic is now just a hard-deleted change of the hard-deletion. The next step is also trying to implement business logic through the configuration file.

*********************************************************** *********************************************************** *********************************************************** ********************************* This post will continue Update, I put the existing code, I passed it in a few days. I hope that every DOTNET fan who sees this post will collect it. The next year's wisdom will be hoped: open the website and forum, open source, jointly commented by the majority of enthusiasts Plan its structure, everyone writes a little (now a little chaotic, right, my UML is not good) I hope that three Chinese people will develop it as Linux (can't be more than it. 嘿. ..) Haha, January 4, 2005, 12 o'clock

转载请注明原文地址:https://www.9cbs.com/read-73115.html

New Post(0)