Untitled
Help 
TutorCentral - Online Tutoring, Live Tutors, Quizzes, Learning
 NetVIOS Home Products Forums Meetings/Chat Login Log Out

NetVIOS WebFaces Technology Manuals

The NetVIOS WebFaces technology consists of components and scripts that aid in the development and maintenance of future-generation websites. There are two aspects to the technology - that which deals with the look and feel of web pages and a second aspect that deals with the user interface and form elements of a web page or web form.

This manual is structured into three parts:

The use of Webfaces is initially illustrated by examples then the full syntax and technical details are presented in the technical manuals.

 

PART ONE: WEBFACE FORM ELEMENTS

User Interface Elements of NetVIOS Webfaces

The user interface elements of webfaces includes over 40 element types that can be called on a script page (asp, perl, jsp, etc) to dynamically generate user interface html interface items on a page. Each element is packaged as an object with methods and properties. The functions embedded in each element includes those for:

  • presentation - generation of the element and its initialization
  • validation - interface validation rules can be set within each element
  • event response - response to client side events can be triggered by the elements
  • processing - the state of each element is maintained subsequent to submitting the forms so that values of each element can be retrieved on the server side
  • browser sensitivity - embedded in the generation of presentation language for each element is a self check for the browser type and the generation of the appropriate markup language by browser type.

 

1.1 Presentation

The following example illustrates how to quickly generate an html page with associated user interface elements without the rigor of creating the elements directly from html. Save the following text in a file with a .asp extension (e.g. webfaces.asp) on your website which has NetVIOS webfaces installed on its server.

<html>
<head>
<title>NetVIOS Web Faces</title>
</head>
<body>

<%
Set objform = Server.CreateObject("ubvios.formitem")
objform.FormName = "sampleform"
objform.MaxSize = 40

objform.BeginForm

objform.Name = "sampleinput"
objform.GUIType = "Input"
objform.Datatype = "String"
objform.FieldSize = "14"
objform.Label = "Sample Input:"
objform.DisplayItem

objform.Name = "sampletime"
objform.GUIType = "Time"
objform.FieldSize = "14"
objform.Label = "Sample Time:"
objform.DisplayItem

objform.Name = "sampleeditbox"
objform.GUIType = "EditBox"
objform.Datatype = "String"
objform.FieldSize = "7"
objform.Label = "Sample Editbox:"
objform.OptionValues = "Minimal"
objform.DisplayItem

objform.Name = "sampleimage"
objform.GUIType = "Image"
objform.Datatype = "String"
objform.FieldSize = "250"
objform.Label = "Sample Image:"
objform.DisplayItem

objform.EndForm
Set objform = Nothing
%>

</body>
</html>

The above file uses just 4 out of the over 70 GUI types contained within NetVIOS webfaces. The result of accessing such a file over the web would be as shown here.

 

1.2 Validation

Validation rules can be set for each element which will be enforced by the dynamically generated html code. If it is desired to ensure that the date and the sample input user elements in the above form are validated. Validation instructions are issued for each element type as shown below.

<html>

<head>
<title>NetVIOS Web Faces</title>
</head>
<body>
<%

Set objform = Server.CreateObject("ubvios.formitem")
objform.FormName = "sampleform"
objform.MaxSize = 40

'THE VALIDATION SECTION
'----------------------------------------
objform.StartValidation

objform.Name = "sampleinput"
objform.GUIType = "Input"
objform.Label = "Sample Input:"
objform.ValidateItem

objform.Name = "sampledate"
objform.GUIType = "Date"
objform.Label = "Sample Date:"
objform.ValidateItem

objform.Name = "sampleeditbox"
objform.GUIType = "Editbox"
objform.Label = "Sample Editbox:"
objform.ValidateItem

objform.EndValidation
'----------------------------------------


'THE FORM PRESENTATION SECTION
'----------------------------------------
objform.BeginForm

objform.Name = "sampleinput"
objform.GUIType = "Input"
objform.Datatype = "String"
objform.FieldSize = "14"
objform.Label = "Sample Input:"
objform.DisplayItem

objform.Name = "sampledate"
objform.GUIType = "Date"
objform.FieldSize = "14"
objform.Label = "Sample Date:"
objform.DisplayItem

objform.Name = "sampleeditbox"
objform.GUIType = "Editbox"
objform.Datatype = "String"
objform.FieldSize = "7"
objform.Label = "Sample Editbox:"
objform.OptionValues = "Minimal"
objform.DisplayItem

objform.Name = "sampleimage"
objform.GUIType = "Image"
objform.Datatype = "String"
objform.FieldSize = "250"
objform.Label = "Sample Image:"
objform.DisplayItem

objform.Name = "samplefont"
objform.GUIType = "Font"
objform.Datatype = "String"
objform.Label = "Sample Font:"
objform.DisplayItem

objform.SubmitForm "Submit Example"

objform.EndForm
'----------------------------------------

Set objform = Nothing
%>
</body>
</html>

The result of accessing such a file over the web would be as shown here.

 

1.3 Processing

Presentation language used in describing each object uses the object name as the name and id of the control. Following the submission of a webpage, the state of the element is maintained so that the values entered may be retrieved. In the example below, the DisplayItem command is used to display the value of the elements following the submission of the form. The example here is for asp scripts but php users can generate an equivalent construction.

<html>

<head>
<title>NetVIOS Web Faces</title>
</head>
<body>
<%
'Compose a variable - bsubmitted - that flags whether the form was submitted
if (Request.ServerVariables("CONTENT_LENGTH") > 0) Then
 bsubmitted = true
else
 bsubmitted = false
end if

'Start the form object
Set objform = Server.CreateObject("ubvios.formitem")
objform.FormName = "sampleform"
objform.MaxSize = 40

'THE VALIDATION SECTION
'----------------------------------------
objform.StartValidation

objform.Name = "sampleinput"
objform.GUIType = "Input"
objform.Label = "Sample Input:"
objform.FormName = "sampleform"
objform.ValidateItem

objform.Name = "sampledate"
objform.GUIType = "Date"
objform.Label = "Sample Date:"
objform.FormName = "sampleform"
objform.ValidateItem

objform.Name = "sampleeditbox"
objform.GUIType = "EditBox"
objform.Label = "Sample Editbox:"
objform.FormName = "sampleform"
objform.ValidateItem

objform.EndValidation
'----------------------------------------


'THE FORM PRESENTATION SECTION
'----------------------------------------
objform.BeginForm
objform.Name = "sampleinput"
objform.GUIType = "Input"
objform.Datatype = "String"
objform.FieldSize = "14"
objform.Label = "Sample Input:"
if (bsubmitted) then
 objform.ViewItem
else
 objform.DisplayItem
end if

objform.Name = "sampledate"
objform.GUIType = "Date"
objform.FieldSize = "14"
objform.Label = "Sample Date:"
if (bsubmitted) then
 objform.ViewItem
else
 objform.DisplayItem
end if

objform.Name = "sampleeditbox"
objform.GUIType = "EditBox"
objform.Datatype = "String"
objform.FieldSize = "7"
objform.Label = "Sample Editbox:"
objform.OptionValues = "Minimal"
if (bsubmitted) then
 objform.ViewItem
else
 objform.DisplayItem
end if

objform.Name = "sampleimage"
objform.GUIType = "Image"
objform.Datatype = "String"
objform.FieldSize = "250"
objform.Label = "Sample Image:"
objform.FormName = "sampleform"
if (bsubmitted) then
 objform.ViewItem
else
 objform.DisplayItem
end if

if Not(bsubmitted) then
 objform.SubmitForm "Submit Example"
end if

objform.EndForm

Set objform = Nothing
%>
</body>
</html>

The above file may be accessed here and the look of the page subsequent to submission may be investigated by completing and submitting the form.

The value of the elements may also be retrieved with the ASP Request variable given a knowledge of the names of the html controls that were created by the elements (this usually defaults to the element name) as shown in the example below. 

<html>

<head>
<title>NetVIOS Web Faces</title>
</head>
<body>

<%
'SECTION PROCESSING THE SUBMITTED VARIABLES.
'Here we will simply print them out. But we could perform other processing as needed
if (Request.ServerVariables("CONTENT_LENGTH") > 0) Then
 Response.Write "<u>Submitted values</u><br>"
 Response.Write "Sample Input:" & Request("sampleinput") & "<br>"
 Response.Write "Sample Date:" & Request("sampledatemonth") & "/" & Request("sampledateday") & "/" & Request("sampledateyear") & "<br>"
 Response.Write "Sample Editbox:" & Request("sampleeditbox") & "<br>"
 Response.Write "Sample image:" & Request("sampleimage") & "<br>"
end if


Set objform = Server.CreateObject("ubvios.formitem")
objform.FormName = "sampleform"
objform.MaxSize = 40

'THE VALIDATION SECTION
'----------------------------------------
objform.StartValidation

objform.Name = "sampleinput"
objform.GUIType = "Input"
objform.Label = "Sample Input:"
objform.FormName = "sampleform"
objform.ValidateItem

objform.Name = "sampledate"
objform.GUIType = "Date"
objform.Label = "Sample Date:"
objform.FormName = "sampleform"
objform.ValidateItem

objform.Name = "sampleeditbox"
objform.GUIType = "EditBox"
objform.Label = "Sample Editbox:"
objform.FormName = "sampleform"
objform.ValidateItem

objform.EndValidation
'----------------------------------------


'THE FORM PRESENTATION SECTION
'----------------------------------------
objform.BeginForm

objform.Name = "sampleinput"
objform.GUIType = "Input"
objform.Datatype = "String"
objform.FieldSize = "14"
objform.Label = "Sample Input:"
objform.DisplayItem

objform.Name = "sampledate"
objform.GUIType = "Date"
objform.FieldSize = "14"
objform.Label = "Sample Date:"
objform.DisplayItem

objform.Name = "sampleeditbox"
objform.GUIType = "EditBox"
objform.Datatype = "String"
objform.FieldSize = "7"
objform.Label = "Sample Editbox:"
objform.OptionValues = "Minimal"
objform.DisplayItem

objform.Name = "sampleimage"
objform.GUIType = "Image"
objform.Datatype = "String"
objform.FieldSize = "250"
objform.Label = "Sample Image:"
objform.FormName = "sampleform"
objform.DisplayItem

objform.SubmitForm "Submit Example"

objform.EndForm

Set objform = Nothing
%>
</body>
</html>

The above file may also be accessed here and the look of the page subsequent to submission may be investigated by completing and submitting the form.

A third processing mode is to extract the content of the elements as text post-submission so that the form may be compiled and emailed. The syntax to accomplish this procedure is detailed in the technical manual.

Notice that because the state of the elements are maintained, the programmer does not need to set the values of the html controls on returning to the form (which may be due to failed server-side validation or continuing interaction with the form). This saves the programmer from getting bogged down with such details which may consume a significant amount of web programming time.

Additional examples of some rare elements can be found here.

 

1.4 Ways to Use the User Interface Elements in NetVIOS WebFaces

Dynamic Generation of Pages
Webfaces commands such as the above can be embedded in html files (.asp, .php) for dynamic generation of interface elements when the pages are accessed.

Modifications to the elements due to user requirements can then be easily made during the project development stages or any time in future. For instance, we can easily switch the richtext box (Editbox) specification for the third element in the files above by simply changing on word - the GUIType property of the object and the results will be as shown here.

objform.Name = "sampleeditbox"
objform.GUIType = "TextBox"
objform.Datatype = "String"
objform.FieldSize = "7"
objform.Label = "Sample Textbox:"
objform.OptionValues = "Minimal"
objform.DisplayItem isize, ierror

This makes for a more cost effective project development during the phases when the client is in the process of approving user interface and presentation or during the analysis of various options as dictated by the business processes involved.

Static Generation of Pages
The script files containing web faces technology may be considered as templates. When the pages are accessed, the resulting html version is saved and used as the final files that will be accessed on the website. Modifications to the user requirements will then result in a regeneration of the html pages during the project development phase or due to future modifications to the user interface requirements.

 

1.5 Mixing Webfaces with HTML, Other Script Commands

Webfaces is designed to be a programmer productivity tool and hence does not box users within its functions. The commands can be freely mixed with html (within script segments) or other scripting commands. Compare this listing with the validation example presented earlier but mixed with more html and javascript sections.

 

Complete List of User Interface Elements and Properties

The complete list of user interface elements, the properties that may be set and the value options are available in the webfaces technical manual (html) (pdf).

 

 

 

PART TWO: WEBFACE FEATURES

This is the part of NetVIOS webfaces that deals with the look and operation  of web pages. To demonstrate the benefits of webface features, consider the web page created from the html section below:

<html>
<body bgcolor="#DDEEFF">
<table width = 100%>
<tr>
<td width=200></td>
<td width="70%" valign=top bgcolor="#000000">
<center><font face=Arial color="#FDFAE8" size=3>Page Title</font></center>
</td>
<td width=200></td>
</tr>
<tr>
<td colspan=3><br><br><br><br><hr></td>
</tr>
</table>
</body>
</html>

This web page will look as shown here.

Suppose this page is part of a web application that will be installed on different web servers and websites, it is desirable to make the page customizable or fit to the theme and look of any site on which it is installed. To endow the page with webface features, the page will be modified as shown below:

<%
 Response.Expires = 0
 Response.Buffer=True
 Session("campusidf") = 0

 dim objfeature
 Set objfeature = Server.CreateObject("ubvios.Feature")
 'Page Features
 objfeature.Name = "PageBackground"
 objfeature.Default = "#DDEEFF"
 objfeature.FeatureType= "Color"
 objfeature.Scope = "Page"
 objfeature.IsCookie = True
 objfeature.Caption = "Page Background Color"
 objfeature.ProcessFeature()
 col_background = objFeature.Value

 objfeature.Name = "TitleColor"
 objfeature.Default = "#000000"
 objfeature.FeatureType= "Color"
 objfeature.Scope = "Page"
 objfeature.IsCookie = True
 objfeature.Caption = "Title Background Color"
 objfeature.ProcessFeature()
 col_titlecolor = objFeature.Value

 objfeature.Name = "TextColor"
 objfeature.Default = "#FDFAE8"
 objfeature.FeatureType= "Color"
 objfeature.Scope = "Page"
 objfeature.IsCookie = True
 objfeature.Caption = "Title Color"
 objfeature.ProcessFeature()
 col_textcolor = objFeature.Value

 Set objfeature = Nothing
%>
<html>
<body bgcolor="<%=col_background%>">
<table width = 100%>
<tr>
<td width=200></td>
<td width="70%" valign=top bgcolor="<%=col_titlecolor%>">
<center>
<font face=Arial color="<%=col_textcolor%>" size=3>Page Title</font>
</center>
</td>
<td width=200></td>
</tr>
<tr>
<td colspan=3><br><br><br><br><hr>
<font face=Verdana color="<%=col_textcolor%>" size=2>
<a target=_blank href="/WOS/pagecookies.asp?WOSPageID=/WebFaces/webfeatureset2.asp">Customize/Edit Page Features</a></font>
</td>
</tr>
</table>
</body>
</html>

 This page will still look the same when accessed since the default values of the features are set to be the same as for the prototype page. However, the user may now modify or customize the page. A link to the customization page has been provided on the same document for convenience. You may inspect the result of accessing this feature-enhanced page here.

 

POWER USE OF WEBFEATURES: A Course Home Page Template

An example of the use of features on a real page is presented here. The original look of the page that will be enhanced with features is shown here. This page was enhanced with features such that it can be utilized by any course instructor without rquireing the instructor be proficient with web technology or require assistance from web developers. A listing of the enhanced page may be viewed here.

The results of accesing the enhanced page can be found here. This page can be modified to look like this if the following options are set for the features:

Page Background Color:  #FFFFCC
Text Color:    #111144
Left Column Background Color:    #000000
Left Column Font Color:    #DDEEFF
Page Width:    70
Width of Left Column:    250
Course Title:    NetVIOS Developer Course
Instructor Name:    Mike Salis
Instructor Email:    netvios@netvios.com
Top Image: Webfaces/images/collegelogo.gif

Notice how considerably different this page looks with the modified input. The versatility of this page has been increased by the use of features since the page can now be used by several hundred instructors of the same institution. The aspects of the page that are constant enable the integrity of the site to be maintained while the feature-variable content enable the page to be used for many different courses. This versatility has been achieved merely with seven look-altering features and three function-altering features.

 

Memory Management

Notice that there is no noticeable reduction in the speed of accessing the page which is pure html compared to the page with features. Actually, the same size of file is still sent to the client computer. On the client-side the memory requirement for storing the features is handled using patent-pending, advanced caching procedures such that most recent and most frequently requested features are saved in memory.

 

Registering the Features

A frequent question for new develoeprs using features is - after creating a feature on a page, how are the feature sregistered so that users can set their values in future. The answer is never. NetVIOS web features are designed to be self registering so that the programmer does not have to bother with registering the features or creating means for the user to set or provide the feature's values. The system self registers the features the first time the pages are ever accessed.

 

Cookies of Not

The above examples have all used features which are cookies. The intention of the examples are to allow each user to set the feature values only on their own versions of the pages. Cookies are locally stored and feature cookies appear as wanted only on the user's computer. However, most features on NetVIOS site are not of cookie type even though they are customizable. The changes affect the copy accessed by every visitor on the site. The decision on whether to make a feature a cookie or not depends on the intended use of the feature.

 

Querying the User For Feature Values

There are six files intended to be accessed for setting the values of features by the end user:

For features with site scope. Accessing the following files will enable the end user set all site features and cookies
features.asp
sitecookies.asp

For features with application scope. Accessing the following files will enable the end user set all application's features and cookies
appfeatures.asp
appcookies.asp

For features with page scope. Accessing the following files will enable the end user set all site features and cookies
pagefeatures.asp?WOSPageID=path_to_page
pageecookies.asp?WOSPageID=path_to_page

path_to_page is the path from the web folder e.g. /webfaces.asp.

These pages will automatically present all the registered features of the intended types for the user to provide their values.

 

PART THREE: GENERAL INFORMATION AND INSTALLATION ISSUES

Installation of NetVIOS Webfaces

NetVIOS webfaces consists of a single dll or component that needs to be initialized. There are also several GUI elements that require a database such as the State element or the Country element. The installation instructions for NetVIOS Webfaces files can be found here.

 

Technical Manuals

html
pdf

 

Example Site

View examples of usage here http://webfacesite.netvios.com/. In each example, there is an active file (.asp), and a view file (.htm) that shows the script contents of the active file.

 


Internationalization of Webfaces

For international users who wish to use the State and Country elements, the entries in the State table may be replaced by the locally relevant ones. The first entry in the country table may also be changed to the home country. (Note that the DropDown element can be used in lieu of State or Country. However in this case, the list of states needs to be supplied to the FeatureList property).

 

Future Developments

The current direction of Webfaces technology is to define XML interfaces for the element types and features (similar to Java Server Faces). The definitions will then be independent of a scripting language. Other ongoing developments includes the addition of more event responses as well as more elements that webface users have requested for in large numbers.

 

Contact and Additional Information

NetVIOS Webfaces technology is free. However, to further the contribution to the technology, you may join the NetVIOS developer community, rate this product here, or send a link to this technology to a fellow web developer by clicking here.

To contribute to developments on Webfaces technology through our message boards, click here.

You may also leave a testimonial describing your use of Webfaces as well as a link to your site here.

To contact NetVIOS concerning the Webfaces technology, click here

Home