zoukankan      html  css  js  c++  java
  • 微软宠物店的分析(转)

    微软宠物店的分析

    //---------页面表现层Web----------------------
    Product product = new Product();
    IList productsByCategory = product.GetProductsByCategory((string)ViewState[KEY_CATEGORY]);

    //----------业务逻辑层---------------------
    namespace PetShop.BLL
    public class Product


    IProduct dal = PetShop.DALFactory.Product.Create(); 
    return dal.GetProductsBySearch(keywords);
    }


    //---------接口层--------------------------
    namespace PetShop.IDAL

    {

    public interface IProduct


      IList GetProductsByCategory(string category); 
      }
    }

    //------------数据访问层--------------------
    public class Product : IProduct

    {
    public IList GetProductsByCategory(string category) {
    }
    }

    //----------静态工厂方法--------------------
    namespace PetShop.DALFactory

     {
    public class Product

    {
    public static PetShop.IDAL.IProduct Create()

    {
    string path = System.Configuration.ConfigurationSettings.AppSettings["WebDAL"];
    string className = path + ".Product";
    return (PetShop.IDAL.IProduct)Assembly.Load(path).CreateInstance(className);
      }
     }
    }


  • 相关阅读:
    Adobe Photoshop 常用快捷键及下载
    自定义定制排序
    requests之肯德基座位爬取
    requests之网页采集器
    requests实战之破解百度翻译
    爬虫基础知识笔记
    pymysql之模块增删该查
    pymysql模块之基本使用
    pymysql模块之sql注入
    mysql 知识点
  • 原文地址:https://www.cnblogs.com/lingxzg/p/1667455.html
Copyright © 2011-2022 走看看