View
258
Download
0
Tags:
Embed Size (px)
Citation preview
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
What is Net.Commerce?
Net.Commerce The Shopper The Merchant The Administrator
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
IBM Net.Commerce
Allows merchants to showcase their products and services and enable immediate purchases globally over the internet's World Wide Web.
Allows for a single virtual store environment or a mall environment with many virtual stores
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce People Net.Commerce takes into consideration 3 types of user groups.
The ShopperThe MerchantThe Administrator
Merchant Shopper
Administrator
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Shoppers
Shoppers can :–browse on-line multi-media catalogues–register themselves with the store–join special shopping groups for discount prices–maintain their own electronic shopping carts–order items from their shopping cart–can pay directly using credit card payments–monitor the status of their purchases
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Merchants
Merchants can :–create their own electronic stores–modify the store appearance–directly modify the product & price information that is store in the database
–offer special prices to different shopper groups–accept credit card payments on-line–track demographic information
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Administrator
Administrator can :–Open and Close stores on the site–Administer user access and scope to other users
–Provide Shipping services–View Shopper information
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Dynamic, customizable, multi-media on-line catalog
Dynamic Content Shopper Tracking (Registration) Highly Customizable Environment
–Data Model–Powerful Macro Language–Flexible API's–Dynamic Error Handler
Summary of Features
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Knowledge Level
Required Skills–Comfortable with AIX, Solaris, AS/400, OS/390 or Windows NT platforms
–Internet Protocol (SSL, HTTP, HTTPS)–Webserver configuration (Lotus Go, Netscape)–Relational Database Concepts (DB2, Oracle); Basic SQL, SQL scripts
–WWW Knowledge, HTML, CGI–Net.Data, C/C++/Java, Javascript
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Functional Components of Net.Commerce Overall Picture Secure Web Server Database Management
System Net.Commerce
–Server–Administrator
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
The Net.Commerce System
Composed of 3 components Net.Commerce component
–Net.Commerce Serverincludes IBM Net.Data functionality
–Net.Commerce Administrator 2 other components
–IBM Lotus Go (or Netscape enterprise server)–IBM DB2 (or Oracle database server)
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce System DiagramThe Net.Commerce System
Merchant Shopper
Director Daemon
Netscape Enterprise Server Webserver
Oracle
Net.Commerce Server
Site Manager
Store Manager
Template Designer
Net.CommerceAdministrator
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Lotus Go (or the NES)The Net.Commerce System
Merchant Shopper
Director Daemon
Netscape Enterprise Server Webserver
Oracle
Net.Commerce Server
Site Manager
Store Manager
Template Designer
Net.CommerceAdministrator
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Security on the Internet
The nature of the internet is that it is an insecure network.
Information that travels across the network could potentially be examined, copied or altered by unwanted viewers
Thus, this information needs to be protected while it is traveling from the shopper to the merchant (or vice versa)
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Secure Web Servers
Control the flow of secure transactions over the internet.
–They provide us with the security we need to do business on the internet
There are several levels of security that are addressed by a secure web server
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Levels of SecurityConfidentiality
Integrity
Accountability
Authenticity
Message content remains private
Messages are not altered while being transmitted
Both parties agree the exchange happened
Both parties trust each other
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
SSL Ensures Security
Secure web servers use security protocols to secure transactions
Net.Commerce uses the SSL protocol SSL = Secure Sockets Layer Protocol
–Uses RSA public key technology–Uses the concept of keys to encrypt and decrypt messages
–128 bit encryption within North America
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
SSL - Facts and Features
SSL uses both symmetric key and public/private key techniques
Public/private key is used during the handshake phase to agree upon the symmetric key.
Symmetric key is used for encrypting the bulk data transmitted
SSL also uses secure hash functions to ensure data integrity
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Webserver - Communications
Browser1
Browser2
Browser3
Browsern
Webserver (Lotus Go or Netscape)
<host>/cgi-bin/ncommerce3/;LogonForm
<host>/cgi-bin/ncommerce3/;InterestItemDisplay
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Server DiagramThe Net.Commerce System
Merchant Shopper
Director Daemon
Lotus Go
DB2
Net.Commerce Server
Site Manager
Store Manager
Template Designer
Net.CommerceAdministrator
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Server
Controls the flow of information that is displayed to shoppers and provided by shoppers during their shopping trip
Consists of 2 components–Director–Daemon
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
The Director Allows 2-way communication between :
–IBM Webserver or Netscape Enterprise Server
–Net.Commerce Server Daemon With each request the web server connects to a separate instance of the Director
Communicates via TCP/IP with the daemon to quickly access the Net.Commerce database
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
The Director
Webserver (IBM or Netscape)
Director
ncommerce3
Daemon
Request
Director
ncommerce3
Request
Director
ncommerce3
Request
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
The Director = NCOMMERCE3
CGI program called "ncommerce3" on AIX, Solaris, or NT hosts.
When it receives a request:–Determines if the browser supports SSL–Takes care of session management–Parses the command (request) and passes it to the Daemon so that it can do the necessary work
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
CGI Programs
CGI = Common Gateway Interface–a standard interface between Web servers, external programs and databases
Can be written in any language supported by the OS of the server
–The Director (ncommerce3) is written in C++–Technically not really CGI - Webserver calls via API call and communicates via TCP/IP - and so is more efficient
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Session Management
The Web Server is stateless:–IN - OUT - FORGET!–Need a way to keep track of the different shoppers that enter your site
Each shopper is assigned an IDAn anonymous shopper is a assigned a temporary random string - ytre83hA registered shopper is identified by a login ID that they create at registration time - jtullis
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Session Management
When a shopper first visits the Net.Commerce site, they are assigned a temporary ID When the shopper registers or logs in, then their temporary ID is replaced with their Login IDWhen you are logged in with one ID, then that ID will stay with you throughout that entire Browser sessionTo change IDs, you must start a new Browser window
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Netscape CookiesNetscape cookies are used to identify the shopper
a file is kept on the client's machineenables the server to store client-specific information on the client's machine and use that information when a server on a particular page is accessed by the clientuser information passed to the server via a cookie allows the server to personalize pages according the information that is passed.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Commands
Net.Commerce commands are parameters which tell the daemon what to do
Commands have 3 parts–command & parameter type : indicated by a ;–values : indicated by a ?
/cgi-bin/ncommerce3/;<command & parameter>?<values>
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Commands
–/cgi-bin/ncommerce3/;InterestItemAdd?merchant_rn=123&product_rn=654
Command Parsing Example
<command> = InterestItem
<parameter> = Add
<values> = merchant_rn=123&product_rn=654
;
?
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Server - Daemon
They are background tasks that sit there in a process pool waiting for something to happen and then handle it
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
The Daemon
Maintains a continuous connection to the database
Displays store pages dynamically–Interprets Net.Data files to be able to do this - e.g, shopcart.d2w is processed for the HTML to display the shopping cart
–Also processes DLL API commands - e.g, ORD_PROD_TOT calculates total charges for an order
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
The Daemon
Daemon
mserverd
Daemon
mserverd
Daemon
mserverd
Director
ncommerce3
Main Daemon
... ...
Net.Commerce Database
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Used to allow the creation of macros Macros allow for dynamic generation of web pages by doing SQL queries to a database then formatting the results with HTML tags
Executes all store functions Integrates with Javascript, enables calls to C++ programs (however, working with the OverRideable Functions is the recommended approach)
Net.Data Functionality
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Server Overview
Net.Data as DLL in Daemon All together ...Browser
Browser
Browser
Browser
Browser
CGI/Director
CGI/Director
CGI/Director
CGI/Director
Web Server
Main Daemon
1 2 3 n
DB2 or Oracle DB
1 2 3TCP/IP
Permanent DB Connections
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Oracle (or DB2)The Net.Commerce System
Merchant Shopper
Director Daemon
Netscape Enterprise Server Webserver Oracle
Net.Commerce Server
Site Manager
Store Manager
Template Designer
Net.CommerceAdministrator
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Oracle/DB2 Database management system Contains all information about the :
–site (mall)–store–goods and services
shoppers and their purchases Database Tables are described in the
"Net.Commerce Customization & Reference Guide" Handles client/server communications
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce AdministratorThe Net.Commerce System
Merchant Shopper
Director Daemon
Netscape Enterprise Server Webserver Oracle
Net.Commerce Server
Site Manager
Store Manager
Template Designer
Net.CommerceAdministrator
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Commerce Administrator
A suite of tools to create and maintain Net.Commerce mall and stores
Consists of–Site Manager–Store Manager–Template Designer
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Site Manager
Used to perform the following tasks:–Create & maintain Site Information–Create & maintain User Access information–Create & maintain store records–View Shopper information–Create and maintain customized options–Create and maintain shipping providers
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Store Manager
Used to perform the following tasks :–Enter or change store information–Create & manage product categories–Create & manage product information–Create & manage Shopper groups–View Shopper information–Manage Shipping services
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Template Designer
Used to create and update page layouts for the mall and store
A graphical object oriented HTML Editor–Almost WYSIWYG–Has built in knowledge of database fields, builds SQL statements automatically
–Note: You are not forced to use this tool to create your page layouts
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Template Designer (Almost WYSIWYG)
$(V_iidesc)Hardware Store
Welcome! Come
Page Layout Page Result
<h2> Welcome!</h2>Come...
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Template Designer (Dynamic)
It is customized to link into the Net.Commerce database to create pages that are dynamically created at run-time with the latest information.
Hardware Store
Welcome! Come
Oracle
$(V_desc) Hardware StoreHardware Store
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Store Wizard (Dynamic)
Create 2 B2C and 1 B2B store. Chose different “styles” when creating store. Can use instead of Net.Commerce Store Manager when doing creation of store.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Installation and Configuration
Planning Firewalls Installation Configuration Security Test Maintenance
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Planning for your Web Site
Need to determine :–Performance setup
Single or Multiple machine setup–Security of transmission of information
Verisign vs Self-Signed–Protection of Server and Database
Firewalls Setup
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Single or Multiple Machine Setup
Single Machine Setup–Both Net.Commerce server and database are on the same machine
Multiple Machine Setup–Computer #1
Contains the Net.Commerce Server–Computer #2
Contains the Net.Commerce Database
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Single Machine SetupClient
Server
Internet World Wide Web
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Multiple Machine Setup
Database
Server #1 Server #2 Server #n
Network
Router
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Workload will be distributed among other machines
If one machine is down, the other machines can pick up the load (If configured)
The database can be installed on a more powerful machine, thus allowing more transactions to be processed in a smaller period of time
Multiple Machine Setup Benefits
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Setting up Security
Need to create a key ring file:–Certificate
Signed by a trusted third party such as Verisign –Client Key (Public Key)
Is used to encrypt messages for the server–Server Key (Private Key)–Used to decrypt message from the client
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Configuration
Several files need to be configured–ncommerce.ini (Net.Commerce daemons)–db2www.ini (Net.Data)–srvrctrl.ini (Server pool configuration)–obj.cnf (Netscape Webserver)–httpd.cnf (IBM Webserver)–The Net.Commerce database tables need to be created.
This is all done from the Browser
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ncommerce.ini configuration
Needed for proper daemon operation–DB_RETRY_LIMIT - the number of times to attempt to connect to the DB–DB_RETRY_INTERVAL - number of seconds between retry attempts–MACRO_PATH - the fully qualified names of the directories that contain the Net.Commerce macro files, separated by colons
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ncommerce.ini configuration
Needed for proper daemon operation–MERCHANT_KEY - the string the system uses to encrypt the password file and the passwords in the database–MS_DBINST - name of the instance that owns the database–MS_DBNAME - name of the database–MS_DBPASS - encrypted password used for database access
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ncommerce.ini configuration
Needed for proper daemon operation–MS_HOSTNAME - fully qualified domain name of your Net.Commerce host–MS_HTADMIN - must be set to: <path to>/htadm_ns.exe when running the Netscape Enterprise Server (NES)–MS_HTPASS - must be set to: <NES install path>/authdb/ncuser–MS_LOGPATH - fully qualified path to directory where logfiles are written
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ncommerce.ini configuration
Needed for proper daemon operation–MS_NUM_CHILD - number of daemons to run (default is 2 per CPU) - for performance, 4 per CPU is recommended.–MS_PORT - the port number the Director uses to talk with the parent daemon
See the NT installation documentation for other settings.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
DB2WWW.INI configuration
–MACRO_PATH - specifies the fully qualified directory paths, separated by colons, for the macro files–INCLUDE_PATH - specifies the fully qualified directory names for the files referenced by %INCLUDE statements in the Net.Data files–Also specifies calling C programs, e.g., for updating the shopcart.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
After successful install - using NCINST.PDF:– Go to Chapter 8 to create the store.– Click on Tutorials under the Online Help (in the
Administrator tool)– Ignore any references to Etill or SET - you don’t
care about a payment gateway
After Installation
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
NT 1) Ensure that your database management system is started. If you are using Oracle, refer to Oracle’s documentation.
2) On a Windows NT user ID with Administrator authority, click Start, point to Settings, and click Control Panel.
3) On the Control Panel window, double-click the Services icon.
Starting the Server
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
• 4) For each Net.Commerce instance that you wish to start, do the following:
–a. From the Service list, select Net.Commerce – instance_name, where instance_name is the name of the instance that you wish to start. By default, the instance name is mser if you are running only one instance.
–b. Click Start to start the instance.
Starting the Server
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Stopping the Server1) On a Windows NT user ID with Administrator authority, click
Start, point to Settings, and click Control Panel.2) On the Control Panel window, double-click the Services icon.3) For each Net.Commerce instance that you wish to stop, do
the following:a. From the Service list, select Net.Commerce – instance_name, where instance_name is the name of the instance that you wish to stop. By default, the instance name is mser if you are running only one instance.
b. Click Stop to stop the instance.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Skill categories to maintain site
Total Project Management
Innovative Site MarketingStrategies
Search engine registration& other web advertising
Creative Site Layout &Design
Graphics, Animation &Video Production
HTML, Javascript,Net.Data, C, SQL,shell scripting, Java
Site Hosting &Maintenance
Internet marketingand strategyformulation
Website design& development
Project management &business re-engineering
Integration of Web-collecteddata with existing legacyorder-entry systems
Multi-Platform APIProgramming - MQSeries, Java, C++; EDI
Database Design &Programming
Systems integration& programming
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Command informationCommand type - All buttons and hyperlinks on store pagesmap to commands that are embedded in URLs. Depending onthe kind of function it performs, a command is either auser-interface (UI), or a non-user-interface (non-UI) command.Non-UI commands - Process and write information to theNet.Commerce database. For some non-UI commands, theNet.Commerce system calls APIs for part of the processing.UI commands - retrieve information from the Net.Commercedatabase and display store pages. They achieve this by callingmacros that contain SQL statements, HTML tags, Net.Datastatements, and Javascript; all of which you can modify.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Command conventions
Ensure that there are no spaces between keywords, delimiters,and variables. Enter parameters in any order. Enter keywords in lower case. Enter variables that represent column names and table namesin lower case. Replace spaces in values with plus signs (+).
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Command conventions
The basic command syntax is diagrammed thusly:
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Address Command group
Address - performs all non-UI functions for the shopping process,"Working with the address book". The following are the addressbook commands:–AddressAdd?sanick=name. Some additional paramsare: SALNAME,SADDR1,SACITY,SASTATE ,SACNTRY,SAZIPC.The sanick is the nickname that represents the new entry.–AddressDelete?sarfnbr=adrbkref. This handles deletion. –AddressUpdate?sarfnbr=adrbkref&sanick=name. This updates an entry in the shopper's address book.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Address book command examples
http://<hostname>/cgi-bin/ncommerce3/;AddressAdd? sashnbr=9&sanick=default&saaddr1=600+N.+U.S.+Highway+45&sacity=Libertyville&sastate=IL&sacntry=USA&sazipc=60048&salname=Tullis {Add Mr. Tullis to address book}. See the table MACROS in the database to see which Net.Data macro file is associated with each task. You will need to cross reference to table TASKS to see the task name.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Display command group• The CategoryDisplay command displays a category page based on the shopper group--if any--of which the shopper is a member. Merchants can assign category templates to specific shopper groups using Net.Commerce Administrator.• merref - the store identifier• catref - the category identifier
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Display command group• The ProductDisplay command displays a product or item page based on the shopper group--if any--of which the shopper is a member. Merchants can assign product templates to specific shopper groups using the Net.Commerce Administrator.•merref - the store identifier•prodref - the identifier for the product or item to be displayed
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
EXECMACRO command group
EXECMACRO - The ExecMacro command executes the Net.Data macro that you specify. The macro can be one that is provided by the system or one that you create. input or report refer to the HTML_INPUT or HTML_REPORT sections of a Net.Data file, where execution should start. Note: use this for custom dynamic HTML page generation!
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
EXECTASK command group
EXECMACRO - The ExecTask command calls a view or exception task that you specify. taskname is the name of the task to be executed, merref is the store to which it is to be applied.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
InterestItem command group
You use the InterestItem commands to do any of the following:• Display the contents of the shopping cart• Add products and items to the shopping cart• Delete products and items from the shopping cart
• For example, the InterestItemAdd command adds a product or item to the shopper’s shopping cart.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ORDER command group
When working with order commands, you should understandthe following about the order process: –An order is created in the database when the shopper displays anorder or a list of orders for the first time. Before then, the shopperadds products and items to the shopping cart.When the shopper displays an order list, the list of merchantswhose products and items are associated with shipping info is compiled and an order number is assigned to each order.–When the shopper displays a specific order, all the product,item, and shipping information is assembled, including the currentprices, taxes, and shipping charges.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ORDER command groupThe Net.Commerce system uses the statuses P, X, and Cas follows: –In status P, the shopper has not yet placed the order. Theorder is referred to as a pending order. –In status X, the shopper has cancelled the order. The orderis referred to as a cancelled order. Shoppers cannot displaycancelled orders, but the merchant can scan the databasefor cancelled orders to analyze, archive, or delete. –In status C, the shopper has placed the order. The order isreferred to as a past order. The merchant can now fill the order.When an order is in status C, the merchant can update thestatus to meet any unique requirements. The Net.Commercesystem considers any status other than P or X to be a past order.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ORDER command groupWhen working with order commands, you should understand the order process. You use the Order commands to do any of the following:
•Display an order details page and lock the order•Display a list of the shopper’s orders•Place an order•Cancel an order•Unlock an order that is locked by the OrderDisplay command
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ORDER command groupThe OrderDisplay command displays the contents of the specified order. If no order reference number is specified, this command displays the first order that was created that matches the order status and merchant reference number (if any) that is specified.• s - The status of the order to be displayed. This can be any value other than X.•ordref - The reference number of the order to be displayed.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ORDER command groupThe OrderList command displays a list of the shopper’s orders that have been prepared but not placed.• s - The status of the order to be displayed. Usually ‘P’ to show list of pending orders.• merref - The reference number of the merchant for the orders to be listed. If you omit this parameter, the shopper’s orders for all merchants are listed.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ORDER command groupThe OrderProcess command processes an order that has been submitted.• ordref - The reference number of the order to be placed..• All other parameters are optional.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ORDERITEM command groupYou use the OrderItem commands to do any of the following:•Display a list of products and items in the shopping cart from which the shopper can order•Display a list of products and items that are assigned to a shipping address•Delete the products and items in an order that are associated with a shipping address•Associate any quantity of a product with a shipping address•Modify the quantities of products to be shipped, specify attributes for products, and delete produts and items from a shopping list
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ORDERITEM command groupThe OrderItemDisplay command lists all items for which the shopper has specified shipping addresses.•addref - The reference number of the address book entry for the items to be displayed.•merref - The reference number of the merchant whose version of the page is to be displayed. (May be omitted.)
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
ORDERITEM command groupThe OrderItemDelete command deletes the association between a shipping address and an item to be shipped to that address, and calls the URL specified. To delete multiple item/address associations, use multiple parameters.•shipref - The shipping reference number that corresponds to the association to be deleted..•url - Reference to next page to display.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
REGISTER command group
You use the Register commands to do any of the following:•Display a registration page.•Update an existing registration record.•Create a new registration record.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
REGISTER command groupThe RegisterForm command displays a registration page.Notes: It is recommended that this command be used in conjunction with SSL (Secure Sockets Layer), to ensure that the shopper’s logon password and personal information are encrypted. To do this, type the command with the https secure protocol and use Net.Commerce Administrator to assign the command to the SSL protocol.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
REGISTER command groupThe RegisterUpdate command modifies the shopper’s registration record.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
REGISTER command groupThe RegisterNew command creates the shopper’s registration record. It has another big humping flow diagram. See the DBTOFCMD.PDF document for details on all commands, macros, etc.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
TasksA task is a "contract" between a command and an overridable function, or between two overridable functions. It defines the rules that govern the relationship between the two.These rules dictate the following:•The work that the caller expects the overridable function to perform•The parameters that the caller passes to the overridable function•The parameters and other results that the caller expects the overridable function to return
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
TasksNet.Commerce defines three types of tasks, each of which is defines the rules for a different type of overridable function.:• View tasks are used for overridable functions that display the pages that shoppers normally see during the shopping process, such as product pages, registration pages, and ordering pages.• Process tasks are used for overridable functions that process information, such as calculating the total cost of an order.• Exception tasks are used for overridable functions that handle exception conditions, such as when a shopper tries to place an order before logging on as a registered shopper, or when a shopper tries to order an item that is not in stock.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Overridable Functions•An overridable function is program code that implements a task. It implements a behavior that is expected by the task, and deals with input and output parameters as defined by the task.•An OF is essentially a C++ method call.•See the DBTOFCMD.PDF document for details.•It is not expected that OF programming is required for this course. It is possible to kick off the shipment of a completed order from Net.Commerce to the MQSeries interface by overriding an OF. But some form of batch processing for new orders is also acceptable.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Database TablesThe database tables contain columns that correspond to the database field tags used on templates and other dynamic store pages to retrieve and display database information on Web pages.The database tables are organized into the following functional groups:•Tables about shoppers and users•Tables about merchants, stores, shopper groups, and customers•Tables about categories, products and items•Tables about price discounting•Tables about shipping•Tables about tax calculations•Tables about orders•Tables about system functions•Tables about Net.Commerce commands…etcetera….
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Database Data ModelsShoppers and other system users:
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Database Data ModelsAccess control tables:
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Database Data ModelsShoppers, shopper groups, merchants, & stores:
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Database Data ModelsCategories, products, & items:
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Basic Net.Data informationNet.Data is a free-form web macro language, which gives you flexibility as to how your macros are written.Unless specifically noted, extra white space charactersare ignored.The Net.Data macro statement contains two parts: The preamble, which includes comments, definestatements, and function declarations; and The HTML part, which includes the HTML input or report sections.The Net.Data macros exist in files that have the .d2wsuffix. The Net.Data interpreter is linked into the mserverdaemon. The db2www.ini file provides additional informationto the mserver daemons for Net.Data file execution.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data %DEFINENet.Data %define statements: defines variables and setsconfiguration variables. Variables must begin with a letter orunderscore (_) and contain any alphanumeric characters orunderscore. All variables are case sensitive exceptN_columnName and V_columnName. Use as a statement todefine one variable at a time or section to define severalvariables with one %DEFINEstatement.Examples:%define { SUBTOTAL = "0.0" %}%define {qty_in = QTY ? "$(QTY)" : "1"%}%DEFINE { qtycall = %EXEC "/nc/bin/updtqty $(DBNAME)$(INSTNAME) $(PASSWD) $(ACCESS) $(SHOPPERNUM)$(QUANTITY) $(PRODNUM) $(PRODREFNUM)" %}
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data COMMENTSNet.Data comments: any text on one or more lines.Net.Data ignores the contents of all comments.Context - Comments must be outside all other sections. Restrictions - Any text or characters are allowed.Examples:%{ Set to 1 to turn on DEBUG, set to 0 to turn off %}%define { DEBUG = "0"%}%{================================== File Name: getorderinfo.d2w Author: Team Z Project: ChemCo Extranet Project==================================%}
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data FUNCTIONSNet.Data functions: the function section defines asubroutine that can be invoked from the Web macro. Theexecutable statements in a function section can be languagestatements directly interpreted by a language environment,or they can indicate a call to an external program.
If you use %EXEC, it must be the only executable statementin the %FUNCTION section. Before passing the executablestatement to the language environment, the file name of theprogram in the %EXEC statement is appended to a path namedetermined by the EXEC_PATH configuration statement in theinitialization file (db2www.ini). The resulting string is passed tothe language environment to be executed.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data FUNCTIONS continued
Net.Data functions: can contain these elements: –%EXEC statement –function call –%MESSAGE section –%REPORT section–%ROW section –variable references
The %EXEC statement would be used to execute a systemcall to an external program. The function call would call anotherfunction in the same Net.Data file. %REPORT, %ROW, and%MESSAGE are all used in processing SQL data.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data FUNCTION example
Net.Data Example:%{ Get the shopper reference number. %}%function(dtw_odbc) get_shopper_rn(){select sashnbr from shaddr where sanick='$(SESSION_ID)'%REPORT{ %ROW{ @DTW_assign( ShopperRefNbr, V_sashnbr) %} %} %MESSAGE{ default: { %} :continue %}%}
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data %REPORT, %ROW,and %MESSAGE%REPORT - used to format output from a function callusing HTML.%ROW - used to display HTML formatted data once foreach row of data returned from a function call. For example,this is how the shopping cart is built and displayed usingthe HTML TABLE syntax. All data returned from the DBare placed between table cell and table row tags. %MESSAGE - defines a set of return codes, the associatedmessages, and the actions Net.Data takes when the functioncall is returned. An example might be a message if the SQLcall returns nothing. See next slide.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data %MESSAGE example%MESSAGE{ 100 : { <CENTER> <h3><tt>Your shopping cart is currently empty!</tt><p></h3> <font face="arial" size="2" Please click on the <B>"ONLINE STORE"</B> button above to continue shopping<br></font> </CENTER> %} : continue default: {<br> <CENTER> There were problems retrieving your Shopping Cart contents. <P>Please try again later. </CENTER> %}%}.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data HTML_INPUT, REPORTHTML_INPUT - contains HTML, along with Net.Data constructssuch as %IF/%ELSE/%ENDIF blocks, function calls (bothNet.Data built in function calls such as DTW_ASSIGN() andfunctions declared within the Net.Data file), and variablereferences.The purpose of the HTML_INPUT section is generally to createan HTML form that is displayed for user input. The results of theuser input are then processed in the HTML_REPORT section.This is done via the ACTION URL of the form.Note, however, that strictly speaking from the Net.Dataperspective, these actions can be reversed. HTML_INPUT andHTML_REPORT are just two "buckets" within the Net.Data file.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data HTML_REPORT ex.%HTML_INPUT{<HTML><HEAD><TITLE>Reports for ChemCo</TITLE></HEAD><BODY BGCOLOR=#ffffff TEXT=#000000 LINK=#0000ffVLINK=#8000ff ALINK=#ff0000><CENTER><TABLE WIDTH=100%><TR><TD BGCOLOR=#00FF00><H3 ALIGN=CENTER>Reports</H3></TD></TR></TABLE><CENTER><P><FONT SIZE=4><STRONG>Please enter the password for access!<FORM ACTION="/cgi-bin/ncommerce3;ExecMacro/req_rep.d2w/input"METHOD=POST><INPUT TYPE="text" NAME="doodlebug"SIZE="8" MAXLENGTH="16"></FORM></STRONG></FONT></CENTER></BODY></HTML>%}
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Net.Data HTML executionThe way that either the HTML_REPORT or HTML_INPUT sections are executed are controlled via the URL line macro specification. The default will be to call the REPORT section.
Therefore, a Net.Commerce URL like this:/cgi-bin/ncommerce3/;OrderDisplay?status=P will result in the Net.Commerce mserver daemon doing a database lookup to find the Net.Data file to execute, and then processing the HTML_REPORT section within that file - currently this file is orderdspc.d2w.
An example of specifying a particular file and section for processing in a form action might be:/cgi-bin/ncommerce3/;execmacro/repcss.d2w/input.
Copyrighted material
John Tullis
04/15/00 Net.Commerce Overview
Important support web sites
http://www.software.ibm.com/data/net.data - on line documentation for Net.Data. Check out the library for a 1.9Mbyte zip file holding PDF info.http://www.software.ibm.com/data - Data Management home page - links to DB2, Net.Data, Net.Commerce, ICSS web server, data mining, Java - very useful.http://www-4.ibm.com/software/webservers/commerce/web_press.htmlfrom here you can get to most important Net.Commerce info.http://www.redbooks.ibm.com - this page provides the best access to purchasing redbooks - THE authoritative and offical technical documentation source. Inexpensive, also!http://www.ibm.com/Help - search engine.http://www.ibm.com - the root location.