Title: BroadVision 4.0
1BroadVision 4.0
- Ganesh Siddhamalli
- http//gsspageat.webjump.com
2Agenda
- Introduction and Overview
- BV Component - I
- BV Component - II
- BV Database
- Targeted Content
3Pre-requisites
- UNIX
- C
- Javascript
- Basic OO A D
- Basics of RDBMS
- CORBA
- Basics of Web Architecture
- HTTP
- CGI
- HTML
4What is BV ?
- System designed for Rapid Application Development
and Real Time operation of large web based
business solutions. - High Transaction volumes and can easily
integrated with existing systems. - Application Server Framework Application
Development Environment. - Can Build Applications that are Secure, Powerful,
Scalable and Flexible.
5What is one-to-one
- Marketing Model
- 1-1 focuses on the individual and tailors the
marketing to individuals interest and need. - The content displayed to a user can be
individualized based on pre-defined rules. - These rules use the user profile or the previous
visit history of the user.
6BV - Web Apps
- Pre-built web application frameworks that can be
customized to the needs. - Commerce Web App
- Financial Web App
- Knowledge Web App
- Commerce Web App is the most mature.
7BV - Commerce Web
- Personalization
- Observed Info
- Stated Info(Profile)
- Transaction Info
- Matching
- Shopping
- Anonymous Registered
- Shopping Cart
- Shopping List Shared, Personal
- Search Parametric, text, category
8BV - Commerce Web (..Contd)
- Marketing, promotions, incentives
- Discussion Groups
- Alerts Web, email more
- Transactions
- Order management
- Payment Processing
- Pricing, shipping, handling, tax
- Security
- APIs
9BV - Commerce Web (..Contd)
- Administration/ Tools
- Content Administration
- Reporting
- Rules Administration
- Template Creation
- User Administration
10BV - Financial Web
- Core Banking transactions
- Bill Payment
- Adapter to Checkfrees remittance Pipeline
Processing(RPP) engine for payment processing - Download data into Quicken, spreadsheets
- Alerts Stock Quotes
- Customer Service
- Financial Server
- Sample Application
11BV - Financial Web
- Core Banking transactions
- Bill Payment
- Adapter to Checkfrees remittance Pipeline
Processing(RPP) engine for payment processing - Download data into Quicken, spreadsheets
- Alerts Stock Quotes
- Customer Service
- Financial Server
- Sample Application
12BV - Architecture
13BV Component Architecture
CR
CI
External Services
JS
- JavaScript Layer
- allows BV components to be used in pages
- Component Reference Layer
- passes messages between JS Layer and
implementation - Component Implementation Layer
- does the heavy lifting
14Benefits of BV Comp. Arch.
- Abstraction
- separation between application logic (scripts)
and implementation (components) - Portability
- scripts are portable across platforms
- Performance
- can architect distribution of app logic between
scripts and components to optimize performance
15Benefits of BV Comp. Arch. (..contd)
- Productivity
- Component developers, script developers and GUI
designers can each do their own thing. - Scalability
- can add components without distributing existing
system
16BV Arch - Components
- Components are standalone entities
- Components may be very light, or may represent an
entire vertical slice of your system - Components may run in several different
environments interfaces are key
17BV Built-in Components
- System
- Process
- Similar to Application Variable
- BV stores the process data
- Control Info.
- Session
- Logging
- Logs only BV Logs
- Request
- Response
- Error Handling
18BV Built-in Components
- Application
- Visitor
- Will help to log as who, when logs to BV
- Content
- to create dynamic web pages
- Observation
- can use 3rd party Report generators
- Search
- Text, Content-base search
- Alert
- Email - HTTP Content - MIME type
19BV Process Architecture
20Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
- Browser
- Visitor Point of Contact with site HTTP Server
21Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
HTTP Server Sites connection with WWW BV adds
the interface that forwards visitor request to an
IM running on a specific machine.
22Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
Dynamic Command Center (DCC) UI for creating and
maintaining Business Rules
23Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
JSP Files (Page Scripts) text file .jsp
containing server-side Javascript, HTML, text,
Component Reference
24Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
Interaction Manager(IM) Comm. Process control
for handling HTTP requests Controls processing
page scripts Controls interactions with
underlying 1-to-1 servers
25Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
Embedded Javascript Engine NS JS engine embedded
directly into the IM
26Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
Script Pre-Processor Converts a Page Script into
pure SSJS
27Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
Script Cache Cache of compiled page scripts
28Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
Component Interface Files Defines interface
between C and Javascript defines methods
Attr. Accessible from pge scripts file .jsi
29Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
Component interface Compiler Generates C Source
code with callbacks of JS engine
30Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
C Component Files Javascript - Visible C
31Script Pre-processor
JSP Files
Browser
Interaction Manager with Embedded Javascript
Engine
Script Cache
HTTP Server
Shared library of Components
Supporting Files Tools
Component Interface File
Component Interface Compiler
One - to-One Server
Dynamic Command Center
C Component Files
C Compiler
DB
Shared Library of Components Shared object
libraries loaded by IM when it fires up
32Flow of the Application
- Visitor requests for the Page from the Browser
- HTTP server processes request via BV CGI or NSAPI
interface, connects to IM - IM gets path from CGI environment and validates
it - IM checks script cache for a compiled script
- if no script, IM runs pre-processor and caches
compiled script
33Flow of the Application (..contd)
- IM runs compiled script in embedded JS engine
- Embedded JS engin processes component invocation
- IM sends back result to HTTP server
- HTTP server delivers HTML page to server.
34Interaction Manager
- Manages application requests from site and
returns the requested information - Maintains association between visitors and
browser requests - Loads and runs scripts
- Works with secure HTTP servers to process
encrypted information - Maintains conn. between app and BV servers.
- Manages caches(profiles, content, categories,
scripts)
35Interaction Manager (..Contd)
- Multi-threaded Process
- connection Manager handles multiple, simultaneous
tasks - Requests are sent to the connection Manager,
which tracks the status of the various engines - IM can run multiple engines to distribute the
workload. - It is scalable and is limted only by the hardware
of the host machine.
36BV Components
37BV Component
- What is a BV Component
- How to Use BV component
- Commonly used BV Components
38What is BV Component
- BV does everything with SSJS.
- All the Javascript components are executed in IM.
- The Javascript layer of the BV architecture
allows BV components to be used in Javascript
scripts.
39What is BV Component (..contd)
- All the dynamic page scripts utlize Javascript
Components exclusively. - All Presentation logic should be performed in the
Javascript Layer and not the business logic. - Sorting and searching, you should write in C
rather than Javascript.
40What is BV Component (..contd)
- Javascript Componet Prefix
- BVI
- C Components Prefix
- BVC
41How to use BV Component
- Creating BV components is done via the new
keyword rather than accessing creator method - var oContMgr new BVI_ContentManager(on_line)
- oCont oContMgr.contentbyQuery()
42Commonly Used Components
- BVI_Request
- BVI_Response
- BVI_Session
- BVI_Visitor
- BVI_Properties
- BVI_Content
- BVI_ContentList
- BVI_ContentManager
- BVI_Category
- BVI_Multivaluetable
43BVI_Request
- Why Use it ?
- Get values sent from client
- Get values sent from web server
- Encode special characters in URLs
- Where to Use it
- Whenever the input from the client or web server
is required.
44BVI_Request (Contd)
- How to Use it
- Instantiating a BVI_Request obejct
- automatically instantiated by BV once for each
JSP - Object Name Request
- Globally vailable within all SSJS functions
- Get variables sent from client in ltFormgt tages or
URL arguments - Use .value() or .values() accessor methods
- Pass in name as a string
- Receive back the value as a string or
BVI_StringList - .url_encode() to escape the special characters in
urls before placing on HTML page.
45BVI_Request (Contd)
- How to Use it
- Examples
- var firstname Request.value(first_name)
- var listcolors Request.values(colors)
- Add new ites to Request Object
- Request.add_attribute(tempval,5)
- CGI Environment Variables
- HTTP_COOKIE, HTTP_HOST
- var cookies request.HTTP_COOKIE
- will return the string and will have to parse the
string.
46BVI_Response
- Mirror image of BVI_Request
- Way to communicate back to the client.
- Whatever goes into Response buffer gets passed
back to the web server and passed back to the
client. - Why Use it ?
- Send output to client
- Redirect page processing flow
47BVI_Response (Contd)
- Where to Use it ?
- JS routines that directly write output to the
output buffer. - The HTML is wrapped up into a Response.write
automatically by BV. - Instantiating a BVI_Response Object
- automatically instantiated by BV once for each
JSP - Object name Response
- Globally available within all SSJS functions
48BVI_Response (Contd)
- Send output to the client
- Response.write(Last Name lastname)
- Redirect Page Processing
- .localRedirect()
- pass relative file reference
- Do not pass any query string parameters
- Session and Request objects are preserved
- BV processes redirection on server
- Use Return() to halt processing of currect page.
- Clients URL doesnt change.
- Response.locatRedirect(main/home_page.jsp)
49BVI_Response (Contd)
- Redirect Page Processing
- . redirect()
- pass full URL http//server/path/filename?que
ry - Results in additional call to serverr by client
- Clients URL changes
- Response.redirect(http/bin/my_im/main/home_page.
jsp) - If no server name is used, by default, the
browser will use the last referenced server.
50BVI_Response (Contd)
- .redirect() and .localRedirect() flush the
headers before redirecting - HTTP header can be used to set cookies on the
browser. - If you set a cookie on Page A then redirec to
page B the cookie is lost from the HTTP
response header.
51BVI_Session
- Identifies a unique connection to the application
and maintains state across pages. - Session is consistent across each of client
requests - parameters along on the URL is must. - Can store info. As a property of a session
object, then access the same from another page
script.
52BVI_Session (Contd)
- Why use it ?
- Set current visitor after authentication
- Save application State on server
- Get session parameters to preserve session for
- URLs
- HTML forms
- Where to use it
- Pages that need to Maintain
- user authentication or
- application state
53BVI_Session (Contd)
- How to Use it
- Automatically instanticated by BV once for each
JSP - Object Name Session
- Globally available within all SSJS functions
- Automatically preserved when BV_EngineID and
BV_SessionID parameters are passed between pages. - Set Current visitor after authentication
- Can be saved on the session to use in later pages.
54BVI_Session (Contd)
- How to Use it
- Get session parameters to preserve session for
URLs and HTML forms - To maintain session across Javascript pages the
BV_EngineID and BV_SessionID parameters must be
passed - on the URL query string or
- as hidden fields on HTML forms
- Can Store Primitive datatypes and BVI objects
- Cannot store Javascript objects
- To Free the Memory
- Session.myvalue null
55BVI_Session (Contd)
- initSessionState()
- will initialise useful session data onto the
session object. - setCurrentVisitor()
- Will set the Id of the Visitor
- makeScriptURL()
- Puts session parameters onto a URL.
56BVI_Visitor
- Encapsulates methods and properties of the
visitor. E.g. passowrd, visitor Id etc., - Why Use it ?
- Get/set single/multiple visitor attributes
- Register Guests
- Where to use it ?
- Registration
- Authentication
- Profile updates
57BVI_Visitor (Contd)
- How to Use it ?
- Instantiating a BVI_Visitor Object
- Transient Guests
- created for free, when a new session is created.
- are visitor objects created automatically with
new session objects - their profile is only in RAM, lost when session
objects - useful for sites that do NOT require registration
but track user information during visits - Permanent Guests
- are visitors whose profile information is stored
in the db but cannot be used to login ever again
58BVI_Visitor (Contd)
- How to Use it ?
- Instantiating a BVI_Visitor Object
- Members
- are registered visitors whose profile information
is stored in the database and can be retrieved on
subsequent visit to the site. - Registered visitors can be retrieved using
BVI_VisitorManager.visitor() - Examples (Single Attribute)
- var username visitor.USERNAME
- visitor.CITY Atlanta
59BVI_Visitor (Contd)
- How to Use it ?
- BVP_Properties object can be used to quickly
update multiple visitor attributes in one
operation - Examples (Multiple Attributes)
- propertyList new BVI_Properties()
- propertyList.CITY Wahsington D.C
- propertyList.STATE DC
- propertyList.COUNTRY USA
- visitor.updateProperties(propertyList)
60BVI_Visitor (Contd)
- How to Use it ?
- Registered Guests
- using .registerGuest() method
- visitor.registerGuest(username,password,true)
- .PASSWORD is write-only
- Is a setter and not a getter.
- Use .isPasswordValid() to authenticate visitors
61BV Component II
62BVI_ContentManager
- What is Content ?
- Is the stuff, that is dynamically generated to
make up the website - Products, Tables, Catalogs
- Content is displayed in the browser as the result
of a database Query. - Tool that is used to access items in the
database. - Examples
- For shopping cart catalog
- Customer content types
63BVI_ContentManager (Contd)
- Returns a BVI_ContentList or BVI_Content object
- BVI_ContentList - zero or more content items
- BVI_Content - zero or one object - Single item.
- contentByCondition()
- method that requires a list of attributes
(columns) to return. - Use a BVI_StringList object and use the .append
method to set desired attributes.
64BVI_ContentManager (Contd)
- Example
- var oAttrList new BVI_StringList()
- oAttrList.append(price)
- oAttrList.append(description)
- var oContList oContMgr.contentByCondition(devic
e_type CD_ROM, RAC,Devices,oAttrList)
65BVI_ContentManager (Contd)
- ContentByJoin()
- references multiple tables and does a SQL JOIN
command - contentByOID()
- When a particular BV Object ID is know
- returns a single BVIContent object
- maxReturn property controls the maximum number of
rows returned from any single query.
66BVI_ContentList
- Represents a list of contents
- Each element in the list has the same content
type and belongs to the same service. - List can sorted.
- Returned from BVI_ContentManager
- Returned by other BVI_ContentList methods
- .length method returns the number of elements in
the list
67BVI_ContentList (Contd)
- .get method is used to retrieve an individual
- Example
- for (iNdx 0iNdxltoContList.lengthiNdx)
- oCurCont oContList.get(iNdx)
- .cursor property to set the current location in
the list - List is 0-based
68BVI_Content
- Represents the content - Table
- Used to get columns from a database.
- When a specific values of an objects is required.
- Returned from BVI_ContentManager.contentByOID()
or from BVI_ContentList.get() - .get() method to retrieve an attribute (column)
as a BVI_Value object.
69BVI_Content (Contd)
- New Content objects can be created and added to
the database - var oNewCont new BVI_Content(RAC,Editorials)
- Changes made to BVI_Content object are not
transmitted to persistent storage - Database - To update the content values
- BVI_ContentManager.updateContent() method
70BVI_Value
- Use it to receive results when the return type is
not known in advance. - Can be used to read data off of fields once you
have a Content Object instantiated. - Why use it ?
- To access field values of database table using BV
objects such as - BVI_Visitor
- BVI_Content
- BVI_Category
71BVI_Value (Contd)
- Where to use it ?
- Anywhere database reads and writes are performed
using BV objects - Any database values can be accessed.
72BVI_Category
- It is the interface to a hierarchical storage
area for content. - It has the methods to retrieve content and
subcategories based on category membership. - Allows you to create a hierarchical organizations
of similar products. - Why to Use it ?
- Navigate through the hierarchical tree of
categories for a content type. - Retrieve the content stored in a given category.
73BVI_Category (Contd)
- Where to use it ?
- Applications where content is grouped or
organized hierarchically. - Used to retrieve a list of things that have been
stored in the category. - Example - Shopping Cart
- Computer - gt Monitor/Printer/Keyboard
- Selecting the root category can be done with
- BVI_ContentManager.categoryInfo
74BVI_Category (Contd)
- Example
- var contentManager - new BVI_ContentManager()
- var category contentManager.categoryInfo(/cloth
ing/shirts/rugby,myservice,mycontenttype) - var parent category.parentOID // rugbys
parent id - var parentCategory contentManager.categoryInfo(p
arent,myservice,myContentType) // same as
saying /clothing/shirts
75BVI_Category (Contd)
- Navigate category hierarchy using
parentCategory() and childCategory() - Example
- var childCats rootCategory.childCategories()
- var category childCats.get(1)
- var parentCat category.parentCategory()
- Get list of all content in a category using
childContent() - Retrieves all content in a category. (DCC
off-line) - Var childlist category.childContent()
76BVI_Category (Contd)
- Get list of all content in a category or its
descendents using memberContent() - Useful to get a list of all content in a given
branch of all category tree. - Var descendentList category.memberContent() -
will return all content on all categories below
and including the current one.
77BVI_MultivalueTable
- Why Use it ?
- To access child tables associated with visitors
or content - Where to Use it ?
- Wherever detailed records are required.
- Visitor preferences
- Allows to create child tables associated with a
given piece of content.
78BVI_MultivalueTable (..Contd)
- How to use it
- Retrieve the detail record for content using
.multiValueTable() - var table content.multiValueTable(PRODUCT_COLOR
S) - Retrieve the detail records for a visitor using
the name of the multivalue attribute - var table visitor.COLOR_PREFERENCES
- multiValueTable will return a BVI_MultiValueTable
Object.
79BVI_MultivalueTable (..Contd)
- How to use it
- Get the number of records in the table using
.length - var recordCount table.length
- for (var I0 IltrecordCountI)
-
- table.cursor I
- var nameList table.name ,
-
- .cursor is used for locating the row.
80BVI_MultivalueTable (..Contd)
- How to use it
- Retrieve an entire row from the multvalue table
using .get() - Example
- var row table.get(2)
- var name row.name
- Jump to a particular row using .locate()
- var message The shirt is in stock
- var row table.locate(color,red)
- If (row gt -1) // -1 no match
- message we have it in your favorite color
81BV Database
82What in BV Database
- BV Schema
- Designing a Data Model Extension
- Implementing a Data Model Extension
- Data Loading
- Dynamic Command Center
83Using BV Database
- Two kinds of Information in a BV system, that are
stored organized in a series of tables in BV
schema - Profile
- Information contains all the attributes for site
visitors such as demographics, preferences,
buying patterns. - Content
- Information consists of all the information that
can be presented on the site.
84BV DB Schema
- Creating a new visitor reecord results in the
creation of one record in each of the following
tables - BV_USER
- BV_ACCOUNT
- BV_USER_PROFILE
85BV_USER
- Information needed for a user to logon to the
system. - New User - insertion
- User_ID - Integer - Unique for each visitor
- Account_ID - Integer - Identifies the visitor
Account - Password - varchar(255) - Only BV comp can access
it. - PMT_PREFERENCE - varchar(50) - Payment method
preferred.
86BV_USER (..Contd)
- USER_STATE - Integer - 0 - active/ 1 - Inactive
- Modif_Time - DateTime - when the user_state was
last modified.
87BV_USER_PROFILE
- Stores the additional information associated with
a user. - USER_ID - Key from BV_USER
- NAME - varchar(50) - Name of the visitor
- ADDRESS, CITY, STATE, ZIP, COUNTRY, EMAIL,
- LAST_LOGIN_DATE - Useful to avoid the updates to
this table, at every login. - AVG_LOGIN_DAYS - days between login
- NUMBER_LOGIN - count of logins
88BV_USER_PROFILE (..Contd)
- Also includes the following fields as
- home_phone, bus_phone, age_range, gender,
income_range, no_household, marital_status,
employ_status, occupation, education_level,
want_message, invalid_email - You can also modify this table, but BV recommands
the Users not modify BV_USER table
89BV Content
- BV allows system designers to create their own
data structure - Each BV content requires the following six fields
- OID - Unique BV generated ID - Number(28)
- STORE_ID - to Identify the Store
- CREATION_TIME - A date field populated by BV
- STATUS - whether the content is on-off line.
- DELETED - Flags, When deleted with DCC and a DBA
can remove it. - LAST_MOD_TIME - BV will update automatically.
90BV_DISCUSSION
- Enables you to store discussion group
information. - Discussion group includes
- Title
- Description
- Author Information
- Publication Information
- Rating Statistics
91BV_EDITORIAL
- It is for a publication system where several
primary publishers present information to
consumers. - On-line articles, includes
- Publication information
- Media references - images, audio files or URL
- Billing data
- Rating Statistics
92DESIGNING A DATA MODEL EXTENSION
- What are attributes ?
- An attributes describes a single characteristics
about a visitor or content item such as - Name
- favorite color
- Attributes are properties of Visitor or Content.
- Adding new attributes to Visitor Profile and
Content tables - Can Add a attribute
93DESIGNING A DATA MODEL EXTENSION (..Contd)
- Easy to add null able attributes to an existing
table. - Non-null fields require a data conversion
strategy - You can add attributes to the existing BV table.
- BV recommends to create an extension table and
associate to the existing table.
94DESIGNING A DATA MODEL EXTENSION (..Contd)
- To maintain the multi-value attributes
- BV provides related attributes list
- These are child tables in a one-to-many
relationship. - The content or visitor is a parent.
- Example
- A User has multiple color preference.
95DESIGNING A DATA MODEL EXTENSION (..Contd)
- BV_USER
- User_ID User_Name Shirt_Size
- 585 John Smith XL
- USER_COLOR_LINKS
- USER_ID COLOR_LINKS
- 585 RED
- 585 GREEN
- 585 BLUE
- BV_USER to USER_COLOR_LINKS is one to many
96DESIGNING A DATA MODEL EXTENSION (..Contd)
- Multi-value tables have to be explicitly loaded.
- Explicitly insert and update should be done to
the table. - BV is not a regular RDBMS, so there are not
always corss-references between tables. - You need to maintain referential integrity.
97DESIGNING A DATA MODEL EXTENSION (..Contd)
- Issues
- In Current version of BV 4.0, you cannot develop
rules on multi-value extensions. - BV 4.1 will overcome this limitation.
98Implementing a Data Model Extension
- When to Implement ?
- Once the Single Attributes or Multivalue
attributes are decided for you application. - You must first have the required fields as
USER_ID and six other fields. - Where to specify ?
- Source File (.SRC)
- Structured text file that describe the parts of
BV database.
99Implementing a Data Model Extension
100Implementing a Data Model Extension
- Used to define content and visitor profiles
tables. - Each SRC file defines one or more BV database
tables. - Some SRC files contain definitions for extended
data types. - A parsing process will register the Content Type
and generate SQL that can be applied to the
database.
101Implementing a Data Model Extension
- SRC Files
- Required Information
- CLASS - identifies a unique name for the content
and will be used inside of BV. - STORE - Which store will access this or ALL_STORE
- CONTENT - The string used to refer to this from
application code. - CONTENT_KIND - Name that will be visible to the
users of DCC. - TABLE - name used for CREATE TABLE statement.
102Implementing a Data Model Extension
- SRC Files
- Example
- Knowledge.src
- ltCLASS_SECTIONgt
- CLASS HP_KNOWLEDGE
- STORE ALL_STORE /Default /
- CONTENT HP_KNOWLEDGE
- TABLE HP_KNOWLEDGE / table Name /
- The Content and table name are same above but
need not be same.
103Implementing a Data Model Extension
- SRC Files
- Optional include statement allows inclusion of
custom data types - include cnt_type.src
- Optional storage clause for database DDL
- TABLE_OPTION - Allows to specify the storage
parameters for database, this is tagged onto the
end of table creation statements. - INDEX_OPTION - Allows to specify storage
parameters for database. There is only one index
storage option and so all have the same size.
104Implementing a Data Model Extension
- SRC Files
- OID does not appear in the SRC File - BV will
update automatically. - Required Attributes of content type
- ATTRIBUTE KNOWLEDGE_ID
- TYPE STRING NOT NULL
- COLUMN varchar (20)
- ATTR_KIND REQ_ATTR
- FRIENDLY_NAME Knowledge Id
- SEMATICS Unique integer assigned to knowledge
105Implementing a Data Model Extension
- SRC Files
- The Generating the SQL of the above statements
will result a insert into a BV_ATTRIBUTES table. - Multi-value attributes tables
- Defined as a LIST_TABLE in the SRC
- with a table name
- Attributes are simply listed under the LIST_TABLE
statement - Parent Key is implied by the list table.
- Define a column as key if required a composite
key. - SRC Files
- BV Data Types
- Numeric
- LONG, Double, MONEY
- Character
- STRING, TEXT (varchar(2000)
- DATETIME
- Enumeration - Integer or strings
- Boolean - enumeration or a long
- Can be NOT_NULL
- No blobs and no images.
106Implementing a Data Model Extension
- SRC Files
- Attribute Kind
- KEY - identifies primary key
- REQ_ATTR - Will ensure user enters value when
editing in DCC. - READ_ONLY - makes the attribute read only in DCC
- HIDDEN - will prevent the data from being
displayed in DCC. - Column - Native database column definition.
107Implementing a Data Model Extension
- SRC Files
- Generating the schema.mk file
- mycontent_db.sql mycontent_spec.src
- /bin/touch mycontent_spec.tmp mycontent_db.sql
- /bin/rm -f mycontent_spec.tmp mycontent_db.sql
- (CPP) -B mycontent_spec.src mycontent_spec.tmp
- (SCH_GEN) -schema mycontent_spec.tmp -script
- mycontent_db.sql -cnt -class_only
- Be care full to use the tabs at the beg. Of
continued lines - -cnt for content definition
108Implementing a Data Model Extension
- Generating the SQL files
- make -f schema.mk mycontent_db.sql
- Applying SQL
- BV1To1/bin/scripts/apply_sql mycontent_db.sql
109Implementing a Data Model Extension
- Extending an existing content type
- Put the word EXTENSION at the top of the SRC file
- SQL will be generated to alter the existing
tables.
110Data Loading
- A set of Unix utilities are available to perform
bulk loading of data into BV database - These tools are run when system is off-line.
- Provide delimited text files containing raw data
for batch insert or update. - Load Users
- BV_load_users utility batch creates or updates
visitor accounts in the BV database.
111Data Loading (Contd)
- Load Content and Load Categories
- Use BV_load_cat to load categories
- The BV_load_content utility loads data into
- content tables
- related list tables
- categories
112Dynamic Command Center - DCC
- DCC is a Windows 95/NT application.
- Useful during development for testing purposes
and looking at the database data. - DCC used to create the Rule sets in BV
applications. - DCC is an Orbix client, it connects to the
Generic db Accessor, server through. - DCC must be configured with the correct Orbix
parameters.
113Targeted Content
- What is targeted Content ?
- Visitor 1 is a rich software developer like you.
- Visitor 2 is a physics student with a trillion
dollars in debt.
114Targeted Content
- Know your visitor
- Last time they were here, they looked at a lot of
diet books - They have previously purchased subscriptions to
Carpenters Monthly and Home Improvement
Magazine - They created an account and filled in a user
profile form, telling us - gender, age, profession, income, shoe size,
favorite color ...
115Targeted Content
- Where do you have data about the visitor ?
- User Profile
- Session
- Event
- Bought Product A
- Viewed a Category B
116Targeted Content
- What content can be targeted ?
- Any BV content type
- Product
- Advertisement
- editorial
- Categories
- Instead of returning actual content from the
rules, BV categories can be returned.
117Targeted Content
- Incentives
- Notifications
- Observations