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