PetShop4分析随手贴

PetShop4分析随手贴 PetShop4简析  跟踪顺序为1.Web/Controls/ItemsControl.ascx.cs2./BLL/Item.cs(此处用工厂实现下面的Item)3./IDAL/IItem.cs/DALFactory/DataAccess.cs(工厂)/Web/web.config(path)/SQLServerDAL/Item.cs(IItem的实

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

 

PetShop4
简析
 
 
跟踪顺序为
1.Web/Controls/ItemsControl.ascx.cs
2./BLL/Item.cs (此处用工厂实现下面的Item)
3./IDAL/IItem.cs
/DALFactory/DataAccess.cs(工厂)
/Web/web.config(path)
/SQLServerDAL/Item.cs(IItem的实现类)
 
 
具体代码实现如下(UI->BLL->DAL)

Web/Controls/ItemsControl.ascx.cs
using
System;
using
System.Web;
using
System.Web.UI.WebControls;
using
PetShop.BLL;
using
PetShop.CacheDependencyFactory;
 
namespace
PetShop.Web {
    public partial class ItemsControl : System.Web.UI.UserControl {
       
        ///<summary>
        /// Rebind control
        ///</summary>
        protected void PageChanged(object sender, DataGridPageChangedEventArgs e) {
            //reset index
            itemsGrid.CurrentPageIndex = e.NewPageIndex;
 
            //get category id
            string productKey = Request.QueryString[“productId”];
 
            //bind data           
            Item item = new Item();
            itemsGrid.DataSource = item.GetItemsByProduct(productKey);
            itemsGrid.DataBind();
 
        }
    }
}
 
/BLL/Item.cs
using
System.Collections.Generic;
using
PetShop.Model;
using
PetShop.IDAL;
 
namespace
PetShop.BLL {
 
    ///<summary>
    /// A business component to manage product items
    ///</summary>
    public class Item {
 
        // Get an instance of the Item DAL using the DALFactory
        // Making this static will cache the DAL instance after the initial load
        private static readonly IItem dal = PetShop.DALFactory.DataAccess.CreateItem();
                
         ///<summary>
         /// A method to list items by productId
         /// Every item is associated with a parent product
         ///</summary>
         ///<param name=”productId”>The productId to search by</param>
         ///<returns>A Generic List of ItemInfo</returns>
         public IList<ItemInfo> GetItemsByProduct(string productId) {
 
              // Validate input
              if(string.IsNullOrEmpty(productId))
                   return new List<ItemInfo>();
 
              // Use the dal to search by productId
              return dal.GetItemsByProduct(productId);
         }
 
        ///<summary>
        /// Search for an item given it’s unique identifier
        ///</summary>
        ///<param name=”itemId”>Unique identifier for an item</param>
        ///<returns>An Item business entity</returns>
        public ItemInfo GetItem(string itemId) {
 
            // Validate input
            if (string.IsNullOrEmpty(itemId))
                return null;
 
            // Use the dal to search by ItemId
            return dal.GetItem(itemId);
        }
    }
}
 
 
/IDAL/IItem.cs
using
System;
using
System.Collections.Generic;
 
//References to PetShop specific libraries
//PetShop busines entity library
using
PetShop.Model;
 
namespace
PetShop.IDAL {
 
     ///<summary>
     /// Interface to the Item DAL
     ///</summary>
     public interface IItem{
        
         ///<summary>
         /// Search items by productId
         ///</summary>
         ///<param name=”productId”>ProductId to search for</param>
        ///<returns>Interface to Model Collection Generic of the results</returns>
         IList<ItemInfo> GetItemsByProduct(string productId);
 
         ///<summary>
         /// Get information on a specific item
         ///</summary>
         ///<param name=”itemId”>Unique identifier for an item</param>
         ///<returns>Business Entity representing an item</returns>
         ItemInfo GetItem(string itemId);
     }
}
 
/DALFactory/DataAccess.cs
 
using
System.Reflection;
using
System.Configuration;
 
namespace
PetShop.DALFactory {
 
    ///<summary>
    /// This class is implemented following the Abstract Factory pattern to create the DAL implementation
    /// specified from the configuration file
    ///</summary>
    public sealed class DataAccess {
 
        // Look up the DAL implementation we should be using
        private static readonly string path = ConfigurationManager.AppSettings[“WebDAL”];
        private static readonly string orderPath = ConfigurationManager.AppSettings[“OrdersDAL”];
       
        private DataAccess() { }
 
        public static PetShop.IDAL.ICategory CreateCategory() {
            string className = path + “.Category”;
            return (PetShop.IDAL.ICategory)Assembly.Load(path).CreateInstance(className);
        }
 
        public static PetShop.IDAL.IInventory CreateInventory() {
            string className = path + “.Inventory”;
            return (PetShop.IDAL.IInventory)Assembly.Load(path).CreateInstance(className);
        }
 
        public static PetShop.IDAL.IItem CreateItem() {
            string className = path + “.Item”;
            return (PetShop.IDAL.IItem)Assembly.Load(path).CreateInstance(className);
        }
 
        public static PetShop.IDAL.IOrder CreateOrder() {
            string className = orderPath + “.Order”;
            return (PetShop.IDAL.IOrder)Assembly.Load(orderPath).CreateInstance(className);
        }
 
        public static PetShop.IDAL.IProduct CreateProduct() {
            string className = path + “.Product”;
            return (PetShop.IDAL.IProduct)Assembly.Load(path).CreateInstance(className);
        }
 
    }
}
 
 
/Web/web.config
 
<?
xml
version
=
1.0?>
<
configuration
xmlns
=
http://schemas.microsoft.com/.NetConfiguration/v2.0>
     <
connectionStrings
configProtectionProvider
=
RsaProtectedConfigurationProvider>
         <
EncryptedData
Type
=
http://www.w3.org/2001/04/xmlenc#Elementxmlns=http://www.w3.org/2001/04/xmlenc#>
              <
EncryptionMethod
Algorithm
=
http://www.w3.org/2001/04/xmlenc#tripledes-cbc/>
              <
KeyInfo
xmlns
=
http://www.w3.org/2000/09/xmldsig#>
                   <
EncryptedKey
xmlns
=
http://www.w3.org/2001/04/xmlenc#>
                       <
EncryptionMethod
Algorithm
=
http://www.w3.org/2001/04/xmlenc#rsa-1_5/>
                       <
KeyInfo
xmlns
=
http://www.w3.org/2000/09/xmldsig#>
                            <
KeyName
>
Rsa Key</KeyName>
                       </
KeyInfo
>
                       <
CipherData
>
                            <
CipherValue
>
NrTRoEqZ1heJDQKp5vLf/vfn+JwusYDwL7c9QFU3FJTeRikKLKaT5Rsa27NzCuU3N9ClxOXBc8hz8h9xO/2LRczJGqAopjhNF77YCV3n28oAXZEC44ePtUQpDhgq9u5EkLkRrBR8zuXidyhU5g0ORGYXtse05jRsZLiNWRpoAyg=</CipherValue>
                       </
CipherData
>
                   </
EncryptedKey
>
              </
KeyInfo
>
              <
CipherData
>
                   <
CipherValue
>
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</CipherValue>
              </
CipherData
>
         </
EncryptedData
>
     </
connectionStrings
>
     <
appSettings
>
         <!–
Pet Shop DAL configuration settings. Possible values: PetShop.SQLServerDAL for SqlServer, PetShop.OracleServerDALfor Oracle.
–>
         <
add
key
=
WebDALvalue=PetShop.SQLServerDAL/>
         <
add
key
=
OrdersDALvalue=PetShop.SQLServerDAL/>
         <
add
key
=
ProfileDALvalue=PetShop.SQLProfileDAL/>
         <!–
Enable data caching
–>
         <
add
key
=
EnableCachingvalue=true/>
         <!–
Cache duration (in hours-whole number only)
–>
         <
add
key
=
CategoryCacheDurationvalue=12/>
         <
add
key
=
ProductCacheDurationvalue=12/>
         <
add
key
=
ItemCacheDurationvalue=12/>
         <!–
Cache dependency options. Possible values: PetShop.TableCacheDependency for SQL Server and keep empty for ORACLE
–>
         <
add
key
=
CacheDependencyAssemblyvalue=PetShop.TableCacheDependency/>
         <!–
CacheDatabaseName should match the name under caching section, when using TableCacheDependency
–>
         <
add
key
=
CacheDatabaseNamevalue=MSPetShop4/>
         <!–
*TableDependency lists table dependency for each instance separated by comma
–>
         <
add
key
=
CategoryTableDependencyvalue=Category/>
         <
add
key
=
ProductTableDependencyvalue=Product,Category/>
         <
add
key
=
ItemTableDependencyvalue=Product,Category,Item/>
         <!–
Order processing options (Asynch/Synch)
–>
         <
add
key
=
OrderStrategyAssemblyvalue=PetShop.BLL/>
         <
add
key
=
OrderStrategyClassvalue=PetShop.BLL.OrderSynchronous/>
         <!–
Asynchronous Order options
–>
         <
add
key
=
OrderMessagingvalue=PetShop.MSMQMessaging/>
         <
add
key
=
OrderQueuePathvalue=FormatName:DIRECT=OS:MachineName/Private$/PSOrders/>
         <!–
Application Error Log
–>
         <
add
key
=
Event Log Sourcevalue=.NET Pet Shop 4.0/>
     </
appSettings
>
     <
system.web
>
         <
pages
theme
=
PetShopstyleSheetTheme=PetShop/>
         <!–
            Set compilation debug=”true” to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
       
–>
         <
compilation
debug
=
false>
              <
assemblies
>
                   <
add
assembly
=
System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089/>
                   <
add
assembly
=
System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089/>
                   <
add
assembly
=
Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A/>
                   <
add
assembly
=
System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A/></assemblies></compilation>
         <!–
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        
–>
         <
authentication
mode
=
Forms>
              <
forms
name
=
PetShopAuthloginUrl=SignIn.aspxprotection=Nonetimeout=60/>
         </
authentication
>
         <!–
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.
       
–>
         <
customErrors
defaultRedirect
=
Error.aspxmode=RemoteOnly/>
         <
sessionState
mode
=
Off/>
         <
anonymousIdentification
enabled
=
true/>
         <
profile
automaticSaveEnabled
=
falsedefaultProvider=ShoppingCartProvider>
              <
providers
>
                   <
add
name
=
ShoppingCartProviderconnectionStringName=SQLProfileConnStringtype=PetShop.Profile.PetShopProfileProviderapplicationName=.NET Pet Shop 4.0/>
                   <
add
name
=
WishListProviderconnectionStringName=SQLProfileConnStringtype=PetShop.Profile.PetShopProfileProviderapplicationName=.NET Pet Shop 4.0/>
                   <
add
name
=
AccountInfoProviderconnectionStringName=SQLProfileConnStringtype=PetShop.Profile.PetShopProfileProviderapplicationName=.NET Pet Shop 4.0/>
              </
providers
>
              <
properties
>
                   <
add
name
=
ShoppingCarttype=PetShop.BLL.CartallowAnonymous=trueprovider=ShoppingCartProvider/>
                   <
add
name
=
WishListtype=PetShop.BLL.CartallowAnonymous=trueprovider=WishListProvider/>
                   <
add
name
=
AccountInfotype=PetShop.Model.AddressInfoallowAnonymous=falseprovider=AccountInfoProvider/>
              </
properties
>
         </
profile
>
         <!–
Membership Provider for SqlServer
–>
         <
membership
defaultProvider
=
SQLMembershipProvider>
              <
providers
>
                   <
add
name
=
SQLMembershipProvidertype=System.Web.Security.SqlMembershipProviderconnectionStringName=SQLMembershipConnStringapplicationName=.NET Pet Shop 4.0enablePasswordRetrieval=falseenablePasswordReset=truerequiresQuestionAndAnswer=falserequiresUniqueEmail=falsepasswordFormat=Hashed/>
              </
providers
>
         </
membership
>
         <!–
Membership Provider for Oracle
–>
         <!–
         <membership defaultProvider=”OracleMembershipProvider”>
              <providers>
                   <clear/>
                   <add name=”OracleMembershipProvider”
                       type=”PetShop.Membership.OracleMembershipProvider”
                       connectionStringName=”OraMembershipConnString”
                       enablePasswordRetrieval=”false”
                       enablePasswordReset=”false”
                       requiresUniqueEmail=”false”
                       requiresQuestionAndAnswer=”false”
                       minRequiredPasswordLength=”7″
                       minRequiredNonalphanumericCharacters=”1″
                       applicationName=”.NET Pet Shop 4.0″
                       hashAlgorithmType=”SHA1″
                       passwordFormat=”Hashed”/>
              </providers>
         </membership>
          
–>
         <
caching
>
              <
sqlCacheDependency
enabled
=
truepollTime=10000>
                   <
databases
>
                       <
add
name
=
MSPetShop4connectionStringName=SQLConnString1pollTime=10000/>
                   </
databases
>
              </
sqlCacheDependency
>
         </
caching
>
     </
system.web
>
     <
location
path
=
UserProfile.aspx>
         <
system.web
>
              <
authorization
>
                   <
deny
users
=
?/>
              </
authorization
>
         </
system.web
>
     </
location
>
     <
location
path
=
CheckOut.aspx>
         <
system.web
>
              <
authorization
>
                   <
deny
users
=
?/>
              </
authorization
>
         </
system.web
>
     </
location
>
</
configuration
>
 
 
 
/SQLServerDAL/Item.cs

IItem
的实现类)
using
System;
using
System.Data;
using
System.Data.SqlClient;
using
PetShop.Model;
using
PetShop.IDAL;
using
System.Collections.Generic;
using
PetShop.DBUtility;
 
namespace
PetShop.SQLServerDAL {
 
    public class Item : IItem {
 
        // Static constants
        private const string SQL_SELECT_ITEMS_BY_PRODUCT = “SELECT Item.ItemId, Item.Name, Inventory.Qty, Item.ListPrice, Product.Name, Item.Image, Product.CategoryId, Product.ProductId FROM Item INNER JOIN Product ON Item.ProductId = Product.ProductId INNER JOIN Inventory ON Item.ItemId = Inventory.ItemId WHERE Item.ProductId = @ProductId”;
       
        private const string SQL_SELECT_ITEM = “SELECT Item.ItemId, Item.Name, Item.ListPrice, Product.Name, Item.Image, Product.CategoryId, Product.ProductId FROM Item INNER JOIN Product ON Item.ProductId = Product.ProductId WHERE Item.ItemId = @ItemId”;
 
        private const string PARM_PRODUCT_ID = “@ProductId”;
        private const string PARM_ITEM_ID = “@ItemId”;
 
        ///<summary>
        /// Function to get a list of items within a product group
        ///</summary>
         ///<param name=”productId”>Product Id</param>      
        ///<returns>A Generic List of ItemInfo</returns>
         public IList<ItemInfo> GetItemsByProduct(string productId) {
 
            IList<ItemInfo> itemsByProduct = new List<ItemInfo>();
 
            SqlParameter parm = new SqlParameter(PARM_PRODUCT_ID, SqlDbType.VarChar, 10);
            parm.Value = productId;
 
            //Execute the query against the database
              using(SqlDataReader rdr = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, SQL_SELECT_ITEMS_BY_PRODUCT, parm)) {
                // Scroll through the results
                while (rdr.Read()) {
                    ItemInfo item = new ItemInfo(rdr.GetString(0), rdr.GetString(1), rdr.GetInt32(2), rdr.GetDecimal(3), rdr.GetString(4), rdr.GetString(5), rdr.GetString(6), rdr.GetString(7));
                    //Add each item to the arraylist
                    itemsByProduct.Add(item);
                }
            }
            return itemsByProduct;
        }
 
 
        ///<summary>
        /// Get an individual item based on a unique key
        ///</summary>
        ///<param name=”itemId”>unique key</param>
        ///<returns>Details about the Item</returns>
        public ItemInfo GetItem(string itemId) {
 
            //Set up a return value
            ItemInfo item = null;
 
            //Create a parameter
            SqlParameter parm = new SqlParameter(PARM_ITEM_ID, SqlDbType.VarChar, 10);
            //Bind the parameter
            parm.Value = itemId;
 
            //Execute the query 
            using (SqlDataReader rdr = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, SQL_SELECT_ITEM, parm)) {
                if (rdr.Read())
                    item = new ItemInfo(rdr.GetString(0), rdr.GetString(1), 0, rdr.GetDecimal(2), rdr.GetString(3), rdr.GetString(4), rdr.GetString(5), rdr.GetString(6));
                else
                    item = new ItemInfo();
            }
            return item;
        }
 
        ///<summary>
        /// Get the SqlCommand used to retrieve a list of items by product
        ///</summary>
        ///<param name=”id”>Product id</param>
        ///<returns>Sql Command object used to retrieve the data</returns>
        public static SqlCommand GetCommand(string id) {
 
            //Create a parameter
            SqlParameter parm = new SqlParameter(PARM_PRODUCT_ID, SqlDbType.VarChar, 10);
            parm.Value = id;
 
            // Create and return SqlCommand object
            SqlCommand command = new SqlCommand(SQL_SELECT_ITEMS_BY_PRODUCT);
            command.Parameters.Add(parm);
            return command;
        }
    }
}
 
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/183389.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • SqlTransaction 数据库编程事务使用示例

    SqlTransaction 数据库编程事务使用示例在提交或回滚SqlTransaction时,应始终使用Try/Catch进行异常处理。如果连接终止或事务已在服务器上回滚,则Commit和Rollback都会生成InvalidOperationException。 下面的示例创建一个SqlConnection和一个SqlTransaction。此示例还演示如何使用BeginTransaction、Commit和…

  • 云计算平台构建与实验设计

    课程设计任务书一、作业目的  物联网的核心是应用,应用的核心是云计算。通过构建一个云计算平台,并利用这个平台设计云计算实验,将结果与普通的电脑计算比较两者的差别,感受云计算的优越性能,从而对物联网有更深刻的体验与认识。二、作业内容及要求    能够按照课程设计任务书按照相应的要求完成整个云计算平台的搭建,要完成这个任务,就要对云计算平台的架构和原理有一定的认识,对物联网的应用层有深入的学习,通…

  • mybatisPlus填坑之逻辑删除

    mybatisPlus填坑之逻辑删除网上大部分的关于mybatisPlus的逻辑删除的配置介绍都是有问题的,原因可能是官网已经做了更新!!!错误如图:正确的配置是:SpringBoot配置方式: application.yml加入配置(如果你的默认值和mp默认的一样,该配置可无): yml文件(区别是多了一个路径db-config,同学们细看了) mybatis-plus:global-c…

  • 数据库oracle和mysql的区别_sql和mysql哪个用的多

    数据库oracle和mysql的区别_sql和mysql哪个用的多1、Oracle是大型数据库,而MySQL是中小型数据库。但是MySQL是开源的,但是Oracle是收费的,而且比较贵。2、Oracle的内存占有量非常大,而mysql非常小3、MySQL支持主键自增长,指定主键为autoincrement,插入时会自动增长。Oracle主键一般使用序列。4、MySQL字符串可以使用双引号包起来,而Oracle只可以单引号5、MySQL分页用li…

  • 这10个Redis使用技巧,提升90%工作效率(建议收藏)

    前言 Redis 在当前的技术社区里是非常热门的。从来自 Antirez 一个小小的个人项目到成为内存数据存储行业的标准,Redis已经走过了很长的一段路。随之而来的一系列最佳实践…

  • 视觉SLAM——特征点法与直接法对比以及主流开源方案对比 ORB LSD SVO DSO

    视觉SLAM——特征点法与直接法对比以及主流开源方案对比 ORB LSD SVO DSO单目视觉SLAM可以根据其前端视觉里程计或是后端优化的具体实现算法进行分类:前端可以分为特征点法与直接法,后端可以分为基于滤波器和基于非线性优化。其中在后端上目前已经公认基于非线性优化的方法在同等计算量的情况下,比滤波器能取得更好的结果。而前端的两种方法则各有优劣。本文将具体分析直接法相较于特征点法的优劣处,并具体介绍目前主流的开源方案,以供大家参考。

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号