Now here is some actual hands on experience with the commerce server environment…
Well in my last blog, i commented on the commerce server. There is lot of actual coding you can go and see on the msdn help on the commerce server but here on my blog I’ll try and explain those which I think is more usable in what I call a programmatic environment. Now to start off, as I told before the hierarchy goes like the catalog has various categories which has various products.
Note: Now there also are entities called the virtual catalogs and the sub categories which I’ll be discussing at a later point of time probably in my next blog
Everything in Commerce Server 2007 is both programmatic and both in design view, however as a developer I feel that at every point of time there are things that need to be changed in the normal code so as to achieve the desired result. Now trust me, no where in an organization a normal scenario is reached because a software developer is known for designing codes.
Well, firstly I go into
Understanding Catalog Context and the fundamentals of catalogs
How to read a Catalog
Now to Deal with the Catalogs in the Catalog System we have a IDE known as the Catalog Manager. It is a graphical user interface to deal with the catalog and related definitions. Now you must remember that when I am dealing with catalog,category and products, I suppose that the appropriate definitions have been already made as explained in my earlier post. It is done through the Catalog and Inventory Schema Manager. It’s simple to make the definitions, it having a good user interface.
Now the Catalog Context is a entity above catalogs or rather I should say for accessing control to deal with a catalog, you have to use a catalog context object.
On the whole,The Catalog Context object provides the functionality to manage your catalogs. It can be created in one of two modes. These two modes are different in the sense of their declaration.
It can be in local mode, where the code accesses the Commerce Server objects and the database directly and does not use a Web service. Here it uses what is called as the catalogsiteagent. The CatalogSiteAgent class contains configuration for a connection directly to a Commerce Server site's catalog database. So here in the catalogsite agent only by defining the sitename we can actually pull out the whole of catalog context.
Now one of my personal view regarding sitename is to declare sitename in the GlobalConstants.cs file. This is a special feature of the .net 2.0. We had a global.asax in .net1.1 where we used to define global variables, likewise in .net 2.0 we have a class file called Global Constants where if we define a variable we can access this variable anywhere within the solution.
e.g defining
public const string SITENAME = "SumitSite";
in the GlobalConstants.cs file we can use this SITENAME anywhere within the solution.
So by this way of local mode we can get the catalog context.
public static CatalogContext CreateCatalogContextFromSiteAgent()
{
// Create a CatalogSiteAgent to connect to the database.
CatalogSiteAgent catalogSiteAgent = new CatalogSiteAgent();
catalogSiteAgent.SiteName = "StarterSite";
// Create the CatalogContext object.
CatalogContext catalogContext = CatalogContext.Create(catalogSiteAgent);
return catalogContext;
}
Alternatively, it can be in agent mode, where calls to the catalog system are made through the Web service with the help of an agent. Although this method is not used that common because here we inherit a webservice called the CatalogServiceAgent where we have to pass the URL of the service as a parameter.
Now reading a catalog is a very important thing in the catalog system. When we read a catalog, we actually call the inbuilt function of the catalog context called the Get Catalogs. This returns all the catalogs. Similarly we can get the root categories and so on.
private static CatalogsDataSet GetCatalogs(CatalogContext context)
{
return context.GetCatalogs();
}
Now this is the Catalog Part to get the catalogs, there is actually a lot on using the catalog, retrieving a category, product and lots more which will be there in my upcoming blogs. Also check out my other blog http://sumitatlas.blogspot.com, which I’ll be starting today itself.
Monday, September 18, 2006
Sunday, September 10, 2006
The Catalog System- A Brief Overview
Today, I am going write something about the catalog system in the commerce server 2007. The Catalog system not only is a very important feature of the Commerce Server 2007 but is also beneficial for large enterprise sites. Well it goes like this; the catalog system introduces the concept of putting all data in a well organized manner without actual logical interaction with the database.
This means that without interacting with the SQL server you can actually build the whole website.
A more elaboration on the topic will be that a catalog is nothing but a data entity at a large level. It is subdivided into categories and products.
CATALOG à CATEGORY à PRODUCT
This means that a catalog can be divided into several categories and each category can have various products. This is the main fundamental of the catalog system in the commerce server 2007.
Take an example of a large shopping mall site. The mall would certainly have a book store. So say we created a catalog for books.
In the Commerce Server Catalog Manager we go and make a new Catalog called Books. So the books can be said to be a catalog. The internet books, java books, novels, classics are the category of books whereas a particular book as in Unleashed .net 2.0 is a product. So here we see how the whole thing is so much sub-divided as to make things simpler. Now the question is what are the attributes and on what parameters each of these are made. So, here comes the role of the schema. For one minute just leave the example and lets study how the schema of an entity is handled in the commerce server.
XML data is considered to be favorite among some people as they say it is more structural data. Creating a xsd structure of the data is a very popular way of dealing with XML. Similarly the commerce server 2007 introduces the catalog and inventory schema manager. This manager gives the power to populate various structures or schema for various definitions of the catalog System. It is mainly divided into three parts. Let’s start from the smallest entity definition to a bigger one.
Property Definitions: The property definition gives the power to define properties. These are the Attributes of a Product in the catalog System. The Property is the smallest entity that is there is the catalog system. The property is a attribute of a product. For example for a particular book we have title and author, all these are the properties of a product.
Product Definitions: The Product Definitions is what the schema for a particular product is. This means that when we start to make a product then the catalog system asks for a product definition. This is basically the attributes of a product.
Note: Please don’t ge6t confused between the two definitions. The property definition is the general definition for all the attributes in the entire catalog system whereas the product definition is restricted to the schema for a product. It means that the product definition is mainly for a specific product whereas a property is a different universal thing. Moreover on creating a product definition we get a a property list to choose properties to make a schema for a product definition.
Category Definition: A category definition also involves choosing from a list of properties; On the contrary here we are selecting properties for the attributes of a specific category.
This was an abstract of what the Catalog System is in the Commerce Server 2007.
The Commerce Server introduces many such systems which are very beneficial for making good ERP sites. My next post will give you an idea of the coding involved in Catalog System.
This means that without interacting with the SQL server you can actually build the whole website.
A more elaboration on the topic will be that a catalog is nothing but a data entity at a large level. It is subdivided into categories and products.
CATALOG à CATEGORY à PRODUCT
This means that a catalog can be divided into several categories and each category can have various products. This is the main fundamental of the catalog system in the commerce server 2007.
Take an example of a large shopping mall site. The mall would certainly have a book store. So say we created a catalog for books.
In the Commerce Server Catalog Manager we go and make a new Catalog called Books. So the books can be said to be a catalog. The internet books, java books, novels, classics are the category of books whereas a particular book as in Unleashed .net 2.0 is a product. So here we see how the whole thing is so much sub-divided as to make things simpler. Now the question is what are the attributes and on what parameters each of these are made. So, here comes the role of the schema. For one minute just leave the example and lets study how the schema of an entity is handled in the commerce server.
XML data is considered to be favorite among some people as they say it is more structural data. Creating a xsd structure of the data is a very popular way of dealing with XML. Similarly the commerce server 2007 introduces the catalog and inventory schema manager. This manager gives the power to populate various structures or schema for various definitions of the catalog System. It is mainly divided into three parts. Let’s start from the smallest entity definition to a bigger one.
Property Definitions: The property definition gives the power to define properties. These are the Attributes of a Product in the catalog System. The Property is the smallest entity that is there is the catalog system. The property is a attribute of a product. For example for a particular book we have title and author, all these are the properties of a product.
Product Definitions: The Product Definitions is what the schema for a particular product is. This means that when we start to make a product then the catalog system asks for a product definition. This is basically the attributes of a product.
Note: Please don’t ge6t confused between the two definitions. The property definition is the general definition for all the attributes in the entire catalog system whereas the product definition is restricted to the schema for a product. It means that the product definition is mainly for a specific product whereas a property is a different universal thing. Moreover on creating a product definition we get a a property list to choose properties to make a schema for a product definition.
Category Definition: A category definition also involves choosing from a list of properties; On the contrary here we are selecting properties for the attributes of a specific category.
This was an abstract of what the Catalog System is in the Commerce Server 2007.
The Commerce Server introduces many such systems which are very beneficial for making good ERP sites. My next post will give you an idea of the coding involved in Catalog System.
The Start has begun
hello , everyone , I am Sumit Sethi, a Software Developer. More or less knowledge is a thing which is always a gr8 thing to share.. I work for a firm and everyday search sites and blogs for code snippets and info. Likewise, i now know it is a boon for us developers. So from today, ill be writing on topics i'm currently on touch with. Mainly on Commerce Server 2007, VS2005,.net2.0 and ATLAS. So be in touch and give comments if you feel like
Sumit
Sumit
Subscribe to:
Posts (Atom)
