zoukankan      html  css  js  c++  java
  • 软件研发公司,外观设计模式(Facade)

    一个研发公司就如外观设计模式,它有诸多开发团队(子系统),前端开发团队,程序开发团队,数据库开发团队,测试团队等等。
    为各个开发团队能高度协调,公司定义一个协调接口,使得各个开发团队更加协调。

    前端开发团队:

    FrontEndDevelopmentTeam
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    /// <summary>
    /// Summary description for FrontEndDevelopmentTeam
    /// </summary>
    namespace Insus.NET
    {
        public class FrontEndDevelopmentTeam
        {
            public FrontEndDevelopmentTeam()
            {
                //
                // TODO: Add constructor logic here
                //
            }
    
            public void FrontEndDev()
            {
                HttpContext.Current.Response.Write("前端开发...");
            }
        }
    }


    程序开发团队:

    ProgramDevelopmentTeam
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    /// <summary>
    /// Summary description for ProgramDevelopmentTeam
    /// </summary>
    namespace Insus.NET
    {
        public class ProgramDevelopmentTeam
        {
            public ProgramDevelopmentTeam()
            {
                //
                // TODO: Add constructor logic here
                //
            }
    
            public void ProgramDev()
            {
                HttpContext.Current.Response.Write("程序开发...");
            }
        }
    }


    数据库开发团队:

    DatabaseDevelopmentTeam
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    /// <summary>
    /// Summary description for DatabaseDevelopmentTeam
    /// </summary>
    namespace Insus.NET
    {
        public class DatabaseDevelopmentTeam
        {
            public DatabaseDevelopmentTeam()
            {
                //
                // TODO: Add constructor logic here
                //
            }
    
            public void DatabaseDev()
            {
                HttpContext.Current.Response.Write("数据库开发...");
            }
        }
    }


    测试团队:

    TestTeam
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    /// <summary>
    /// Summary description for TestTeam
    /// </summary>
    namespace Insus.NET
    {
        public class TestTeam
        {
            public TestTeam()
            {
                //
                // TODO: Add constructor logic here
                //
            }
    
            public void Testing()
            {
                HttpContext.Current.Response.Write("测试...");
            }
        }
    }


    研发公司(外观类Facade):

    SoftwareDevelopmentCompany
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    /// <summary>
    /// Summary description for SoftwareDevelopmentCompany
    /// </summary>
    namespace Insus.NET
    {
        public class SoftwareDevelopmentCompany
        {
            FrontEndDevelopmentTeam objFrontEndDevelopmentTeam;
            ProgramDevelopmentTeam objProgramDevelopmentTeam;
            DatabaseDevelopmentTeam objDatabaseDevelopmentTeam;
            TestTeam objTestTeam;
    
            public SoftwareDevelopmentCompany()
            {
                objFrontEndDevelopmentTeam = new FrontEndDevelopmentTeam();
                objProgramDevelopmentTeam = new ProgramDevelopmentTeam();
                objDatabaseDevelopmentTeam = new DatabaseDevelopmentTeam();
                objTestTeam = new TestTeam();
            }
    
            public void DevelopmentAndOperation()
            {
                objFrontEndDevelopmentTeam.FrontEndDev();
                objProgramDevelopmentTeam.ProgramDev();
                objDatabaseDevelopmentTeam.DatabaseDev();
                objTestTeam.Testing();
            }
        }
    }


    asp.net网页运行:

    FacadeDemo.aspx.cs
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Insus.NET;
    
    public partial class FacadeDemo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SoftwareDevelopmentCompany objSoftwareDevelopmentCompany = new SoftwareDevelopmentCompany();
            objSoftwareDevelopmentCompany.DevelopmentAndOperation();
        }
    }

      

  • 相关阅读:
    mysql-Invalid use of group function-聚合函数不能直接使用在where后面-使用exists,外查询与子查询应条件关联
    python-数据库之pymysql模块(连接对象-游标对象-执行-获取值或者提交事务)
    python作业-99乘法表作业,注意制表符合print结束符以及外层和里层怎么确定的,以及闰年
    python学习笔记-if_while_for_break_continue
    python-python中的Debug大法
    python-常用的几种格式化方法
    python学习一周总结
    python学习笔记-列表,字典,以及函数返回值
    python-注释,变量命名和规范笔记
    OpenJudge 求重要逆序对数
  • 原文地址:https://www.cnblogs.com/insus/p/2936061.html
Copyright © 2011-2022 走看看