Share. Net code generator (Zap)

Source: Internet
Author: User

A. netCodeBuilder, which can automatically generate websites, including front-end pages, and code and databases based on links. This software is zap, and more importantly, it is openSource codeI don't know if you have used it. The following is a brief introduction.

Installation Method:
1. Software and source code: http://www.superexpert.com/code/zap/zapinstall_032307.zip.
2. decompress the downloaded package to your hard disk.
3. Open vs2005 and select an external tool from the tool menu. In the external tools dialog box, click Add.
4. Name the new tool named "zap" and select the executable file of the command. Here, select zaptool \ zap.exe on your hard disk, change the initial directory to "$ (projectdir)", select the output window dialog box, and click OK. As shown in:

Usage:
1. Open vs2005 to create a website and select an empty project.
2. Select zap in the tool to generate a website.
After the website is generated,. Net ide does not automatically refresh the project directory. To view the results generated by zap, click Refresh in Solution Explorer. The result is as follows:

These classes of zap are generated according to the configuration in zap. config. We can modify them to generate the required classes and controls. The default Zap. config code is as follows:

< Project
Xmlns = " Http://superexpert.com/zap "  
Name = " Project1 " >

< Classes >
< Class ID = " Class1 " >
< Properties >
< Property
Name = " ID "  
Type = " Int32 "  
Isprimarykey = " True "  
Isidentity = " True "   />
< Property name = " Title " />
</ Properties >
</ Class >
</ Classes >

</ Project >


The modifiedZap. configCode:

< Project
Xmlns = " Http://superexpert.com/zap "  
Name = " Project1 " >

< Classes >
< Class ID = " Moviecategory " >
< Properties >
< Property
Name = " ID "  
Type = " Int32 "  
Isprimarykey = " True "  
Isidentity = " True "   />
< Property name = " Name " Label = " Name " />
</ Properties >
</ Class >

< Class ID = " Movie " >
< Properties >
< Property
Name = " ID "  
Type = " Int32 "  
Isprimarykey = " True "  
Isidentity = " True "   />
< Property
Name = " Title "  
Label = " Title " />
< Property
Name = " Director "  
Label = " Director " />
< Property
Name = " Categoryid "
Widget = " Dropdownlist "  
Foreignclassid = " Moviecategory "
Foreignvaluepropertyname = " ID "
Foreigntextpropertyname = " Name "   />
</ Properties >
</ Class >

</ Classes >

</ Project >


After the modification, refresh the solution Resource Manager and check the code, pages, and controls generated by Zap. I believe they will surprise you, for example:

Open the moviecategorylist. aspx file in zap, press Ctrl + F5 to run the project, add the category of movies to the system, and then run movielist. aspx. The result is as follows:

For more information about zap configurations, see http://www.superexpert.com/Blog/Archive/17.aspx

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.