伤脑筋啊,有什么好的办法把前台程序员变成单纯的编码机器呢?
伤脑筋啊,有什么好的办法把前台程序员变成单纯的编码机器呢?
给前台开发人员定义的接口
但总感觉控制不够深入
public interface IFrontPage
{
string MakeHead1(); //页眉部分
string MakeHeadAD1(); //页头广告1
string MakeHead(); //页头部分
string MakeHeadAD(); //页头广告
string MakeNavigation(); //菜单导航部分
string MakeNavigationAD(); //菜单导航广告
string MakeBodyAD1(); //内容部分广告1
string MakeBody(); //内容部分
string MakeBodyAD2(); //内容部分广告2
string MakeFooter(); //页尾部分
string MakeFooterAD(); //页尾部分广告
string MakeFooter1(); //页脚部分
string MakeFooterAD1(); //页脚部分广告
}
现在通过抽象类和接口来强制规范,但是总觉得控制的力度还不够
namespace WebSystem.Framework.FrontBussiness.Bo
{
public abstract class BasePageBo : IFrontPage
{
public Page page;
public HttpRequest Request;
public HttpResponse Response;
public BasePageBo()
{
}
public BasePageBo(Page mPage)
{
page = mPage;
Request = mPage.Request;
Response = mPage.Response;
}
public virtual void OutPut()
{
Response.Write(MakeHead1());
Response.Write(MakeHeadAD1());
Response.Write(MakeHead());
Response.Write(MakeHeadAD());
Response.Write(MakeNavigation());
Response.Write(MakeNavigationAD());
Response.Write(MakeBodyAD1());
Response.Write(MakeBodyAD2());
Response.Write(MakeFooter());
Response.Write(MakeFooterAD());
Response.Write(MakeFooter1());
Response.Write(MakeFooterAD1());
SiteStatisticsLite.AddLog();
}
#region IFrontPage 成员
public abstract string MakeHead1();
public abstract string MakeHeadAD1();
public abstract string MakeHead();
public abstract string MakeHeadAD();
public abstract string MakeNavigation();
public abstract string MakeNavigationAD();
public abstract string MakeBodyAD1();
public abstract string MakeBody();
public abstract string MakeBodyAD2();
public abstract string MakeFooter();
public abstract string MakeFooterAD();
public abstract string MakeFooter1();
public abstract string MakeFooterAD1();
#endregion
}
所有页面输出只要二行代码,例如
protected void Page_Load(object sender, EventArgs e)
{
INDEXFBO INDEXbo = new INDEXFBO(this);
INDEXbo.OutPut();
}
但是总觉得控制的力度还不够,后台的程序员已经机械化劳动了,现在要实现前台编码机械化
对于前台开发我都想定义一个 IWebDocument 来好好规范一下
伤脑筋啊,有任何意见联系我 来自: http://www.bwsyq.com QQ 99923309