Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
04/15/00 Net.Commerce Overview John Tullis DePaul Instructor [email protected] 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 Shopper The Merchant The 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 Summary of Features 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 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 Server includes 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 Diagram The Net.Commerce System Net.Commerce Administrator Site Manager Net.Commerce Server Director Daemon Store Manager Template Designer Netscape Enterprise Server Webserver Merchant Shopper Copyrighted material John Tullis Oracle 04/15/00 Net.Commerce Overview Lotus Go (or the NES) The Net.Commerce System Net.Commerce Administrator Site Manager Net.Commerce Server Director Daemon Store Manager Template Designer Netscape Enterprise Server Webserver Merchant Shopper Copyrighted material John Tullis Oracle 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 Security Confidentiality Message content remains private Integrity Messages are not altered while being transmitted Accountability Both parties agree the exchange happened Authenticity 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 Browser 1 Browser 2 Browser 3 Browser n Webserver (Lotus Go or Netscape) <host>/cgi-bin/ncommerce3/;InterestItemDisplay <host>/cgi-bin/ncommerce3/;LogonForm Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Net.Commerce Server Diagram The Net.Commerce System Net.Commerce Administrator Site Manager Net.Commerce Server Director Daemon Store Manager Template Designer Lotus Go DB2 Merchant Shopper 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) Request Request Request Director Director Director ncommerce3 ncommerce3 Daemon Copyrighted material John Tullis ncommerce3 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 ID An anonymous shopper is a assigned a temporary random string - ytre83h A 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 ID When you are logged in with one ID, then that ID will stay with you throughout that entire Browser session To change IDs, you must start a new Browser window Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Netscape Cookies Netscape cookies are used to identify the shopper a file is kept on the client's machine enables 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 client user 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 Command Parsing Example –/cgi-bin/ncommerce3/;InterestItemAdd?merchant_rn=123&product_rn=654 ; <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 Director Main Daemon ncommerce3 ... Daemon Daemon Daemon mserverd mserverd mserverd Net.Commerce Database Copyrighted material John Tullis ... 04/15/00 Net.Commerce Overview Net.Data Functionality 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) Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Net.Commerce Server Overview AllBrowser togetherCGI/Director ... Browser CGI/Director Browser CGI/Director Browser CGI/Director Main Daemon Net.Data as DLL in Daemon 1 2 1 3 2 3 Permanent DB Connections TCP/IP Browser Web Server DB2 or Oracle DB Copyrighted material John Tullis n 04/15/00 Net.Commerce Overview Oracle (or DB2) The Net.Commerce System Net.Commerce Administrator Site Manager Net.Commerce Server Director Daemon Store Manager Template Designer Netscape Enterprise Server Webserver Merchant Oracle Shopper 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 Administrator The Net.Commerce System Net.Commerce Administrator Site Manager Net.Commerce Server Director Daemon Store Manager Template Designer Netscape Enterprise Server Webserver Merchant Oracle Shopper 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) Page Layout Page Result Hardware Store $(V_iidesc) Welcome! Come <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 Hardware Store $(V_desc) Hardware Store Oracle Copyrighted material John Tullis Welcome! Come 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 Setup Client Internet World Wide Web Server Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Multiple Machine Setup Network Database Server #1 Server #2 Server #n Router Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Multiple Machine Setup Benefits 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 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 Installation 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 Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Starting the Server 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. Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Starting the Server • 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. Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Stopping the Server 1) 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 Internet marketing and strategy formulation Website design & development Systems integration & programming Total Project Management Creative Site Layout & Design Project management & business re-engineering Graphics, Animation & Video Production Integration of Web-collected data with existing legacy order-entry systems Innovative Site Marketing Strategies Search engine registration & other web advertising HTML, Javascript, Net.Data, C, SQL, shell scripting, Java Site Hosting & Maintenance Copyrighted material John Tullis Multi-Platform API Programming - MQSeries, Java, C++; EDI Database Design & Programming 04/15/00 Net.Commerce Overview Command information Command type - All buttons and hyperlinks on store pages map to commands that are embedded in URLs. Depending on the kind of function it performs, a command is either a user-interface (UI), or a non-user-interface (non-UI) command. Non-UI commands - Process and write information to the Net.Commerce database. For some non-UI commands, the Net.Commerce system calls APIs for part of the processing. UI commands - retrieve information from the Net.Commerce database and display store pages. They achieve this by calling macros that contain SQL statements, HTML tags, Net.Data statements, 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 names in 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 address book commands: –AddressAdd?sanick=name. Some additional params are: 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+4 5&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 understand the following about the order process: –An order is created in the database when the shopper displays an order or a list of orders for the first time. Before then, the shopper adds products and items to the shopping cart. When the shopper displays an order list, the list of merchants whose 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 current prices, taxes, and shipping charges. Copyrighted material John Tullis 04/15/00 Net.Commerce Overview ORDER command group The Net.Commerce system uses the statuses P, X, and C as follows: –In status P, the shopper has not yet placed the order. The order is referred to as a pending order. –In status X, the shopper has cancelled the order. The order is referred to as a cancelled order. Shoppers cannot display cancelled orders, but the merchant can scan the database for cancelled orders to analyze, archive, or delete. –In status C, the shopper has placed the order. The order is referred to as a past order. The merchant can now fill the order. When an order is in status C, the merchant can update the status to meet any unique requirements. The Net.Commerce system 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 group When 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 group The 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 group The 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 group The 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 group You 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 group The 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 group The 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 group The 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 group The RegisterUpdate command modifies the shopper’s registration record. Copyrighted material John Tullis 04/15/00 Net.Commerce Overview REGISTER command group The 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 Tasks A 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 Tasks Net.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 Tables The 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 Models Shoppers and other system users: Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Database Data Models Access control tables: Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Database Data Models Shoppers, shopper groups, merchants, & stores: Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Database Data Models Categories, products, & items: Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Basic Net.Data information Net.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 characters are ignored. The Net.Data macro statement contains two parts: The preamble, which includes comments, define statements, 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 .d2w suffix. The Net.Data interpreter is linked into the mserver daemon. The db2www.ini file provides additional information to the mserver daemons for Net.Data file execution. Copyrighted material John Tullis 04/15/00 Net.Commerce Overview Net.Data %DEFINE Net.Data %define statements: defines variables and sets configuration variables. Variables must begin with a letter or underscore (_) and contain any alphanumeric characters or underscore. All variables are case sensitive except N_columnName and V_columnName. Use as a statement to define one variable at a time or section to define several variables 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 COMMENTS Net.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 FUNCTIONS Net.Data functions: the function section defines a subroutine that can be invoked from the Web macro. The executable statements in a function section can be language statements 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 statement in the %FUNCTION section. Before passing the executable statement to the language environment, the file name of the program in the %EXEC statement is appended to a path name determined by the EXEC_PATH configuration statement in the initialization file (db2www.ini). The resulting string is passed to the 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 system call to an external program. The function call would call another function 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 call using HTML. %ROW - used to display HTML formatted data once for each row of data returned from a function call. For example, this is how the shopping cart is built and displayed using the HTML TABLE syntax. All data returned from the DB are placed between table cell and table row tags. %MESSAGE - defines a set of return codes, the associated messages, and the actions Net.Data takes when the function call is returned. An example might be a message if the SQL call 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, REPORT HTML_INPUT - contains HTML, along with Net.Data constructs such as %IF/%ELSE/%ENDIF blocks, function calls (both Net.Data built in function calls such as DTW_ASSIGN() and functions declared within the Net.Data file), and variable references. The purpose of the HTML_INPUT section is generally to create an HTML form that is displayed for user input. The results of the user 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.Data perspective, these actions can be reversed. HTML_INPUT and HTML_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=#0000ff VLINK=#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 execution The 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.html from 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. Copyrighted material John Tullis