Sbest Practices
Sbest Practices
IBM
Technical topics Evaluation software Community Events Search developerWor s "rint this page E#mail this page $igg %ace!oo Twitter $elicious &in ed In Stum!leupon developerWor s Technical topics &otus Technical li!rary
Su!mit Search developerWor s
More and more+ !eing a ,otes developer has to do with the development tools you use+ rather than the client software your application runs in* The We! !rowser has ta en a place !eside the ,otes client+ and applications originally created for ,otes clients must !e rewor ed for !rowsers*
-elease . of $omino $esigner has made it much easier to develop ,S% applications that wor well on the We!* /nd !y now there0s a significant !ody of e1perience with the new features and functions of -elease .#and with the strengths and wea nesses of !rowsers as a development target* This article provides a framewor for analy2ing your ,otes application in preparation for redeploying it as a We! application* It then e1amines the different elements of the application and offers tips and techni3ues for ma ing your applications shine on the We!* This article assumes an in#depth understanding of designing applications using $omino $esigner as well as nowledge of &otusScript and 'avaScript*
Before you can !egin rewor ing an application for the We!+ you need to e1amine what you currently have and what you really need* There are three parts to completing a good analysis of the application*
Who will the users of your application !e on the We!9 Will they !e the same people who use it now in a ,otes client9 / completely new and different set of users9 5r some of !oth9 Will the application run only on the We!+ or will it serve a mi1 of We! and ,otes users9 What will !rowser users do with the application9 Will they need all the functionality of the ,otes version or only part of it9 Will We! deployment change the level of activity in the application+ with resulting impact on server load9 Where will the We! users !e9 Will your application !e accessi!le on a corporate intranet+ or is the goal to deliver it across the We! itself9 What access levels will users need+ and are those appropriate for a We! application9 Exercise the application
With the answers to these 3uestions in mind+ you can !egin to analy2e your application* Start !y accessing your ,otes application in a !rowser* ,avigate through it as completely as possi!le* Create and save new documents using the forms if you can* &oo at the results and note errors* Then go !ac and compare the application in the two ma(or !rowsers#e1ercise the application in the versions of Internet E1plorer and ,etscape ,avigator you would e1pect your users to use+ and note differences !etween the two* $uring this hands#on evaluation+ you0ll !egin to spot pro!lems and issues as well as discover some changes that will improve the application in general*
Whether the piece needs to wor on the We! Whether it can wor on the We! How it would wor on the We!
Forms $oes each form loo accepta!le in the !rowser9 $o graphics display properly+ fields and field la!els align9 /re there differences !etween the !rowsers9 Could pro!lems !e solved !y creating separate forms or su!forms for ,otes and We! users9 $o the forms contain &otusScript that must !e replaced with 'avaScript for the !rowser9 /re e1isting agent actions availa!le on the We!9 $o you need to rewrite !ac #end agents to process 3uery strings or change them to scheduled agents9 Views $oes each view wor on the We!9 $o all columns display9 Can you select documents+ or do you need to provide additional code to create 4TM& lin s9 /re all the actions your application re3uires availa!le9 Data acquisition Where does the data come from+ and how does it get into your application9 Is it entered !y the users9 Is it drawn from other applications or from !ac #end data sources9 Is it environmental data li e user names+ document I$s+ and server and data!ase names9 User interface and graphics $oes the application0s user interface and graphic design meet user e1pectations for a We! application9 $oes the application0s e1isting navigation wor in a !rowser+ or do you need to add navigational choices to compensate for the loss of ,otes client functionality9 $oes it need anchors on the We! that it didn0t need in ,otes#a home page+ section pages+ help pages9 Access and security issues 4ow will you !alance user access against system security9 Will your application re3uire users to authenticate with the $omino server9 What level of access will they re3uire9 If your application will run !oth in a ,otes client and a !rowser+ does the security need to !e different for the different clients9
If you0ve considered these 3uestions carefully+ you0ll have gone a long way toward mapping out what needs to !e done to ta e your ,otes application to the We!* Back to top
Trying out your forms in a !rowser may !e a frustrating e1perience at first+ !ecause you are li ely to see error messages rather than anything familiar* If that happens+ ma e a copy of the form and remove fields+ formulas+ and scripted events from it until the form displays in the !rowser* Then !egin adding them !ac in+ chec ing to see that each one wor s in a !rowser and ta ing note of those that don0t* There are many parts of a form that might not wor in a !rowser* %or e1ample+ ;/llow values not in list; for eyword fields aren0t supported !y !rowsers* (There are wor arounds* %or e1ample+ the Iris Today article ;We!ifying an e1isting ,otes application+; includes an e1ample of how you can let a !rowser user add a eyword to a multi#value field*) Chec your application for )functions and )commands that don0t wor in a !rowser* Those )functions that don0t wor fall into three ma(or categories8
They wor only in the ,otes client interface* There are no !rowser counterparts to )$ialogBo1+ )"ic list+ and )"rompt+ for e1ample* /nd several advanced mail#handling functions are uni3ue to the ,otes client+ such as )MailSend and )Is$ocBeingMailed* The much simpler structure of We! views doesn0t support many functions+ including )$ocChildren+ )$oc&evel+ )$oc,um!er+ )IsCategory+ or )-esponses* Many features associated with ,otes access+ preferences+ and the wor station environment don0t carry over to a !rowser#)Certificate+ )Is/gentEna!led+ )MailEncryptSaved"reference+ and )<ser"rivileges+ for e1ample*
Most )commands are associated with controlling the ,otes client interface+ so they don0t wor in We! applications* The handful that do wor on the We! wor hard+ though+ !ecause they0re used often* )Command(=%ileSave>) and )Command(=%ileCloseWindow>)+ for e1ample are used fre3uently together to simulate a Su!mit !utton* 7ou can chec to see whether )formulas and properties of other programming constructs wor for the We! !y loo ing through the topics listed in the ;5verview of features to avoid using in We! applications; topic in $omino . $esigner 4elp*
Internet E1plorer+ and still another for ,etscape ,avigator* There are many ways to do this using multiple forms or su!forms+ selection formulas+ and hide#whens that identify the user0s client and serve up the appropriate code for it* In formulas+ you can use )ClientType to identify the user0s client as ;,otes; or ;We!*; In cases where you need to code around differences !etween the two ma(or !rowsers+ you can use )BrowserInfo to help you determine what the user is running* The e1tent of the differences will affect your solution as well* 7ou may !e a!le to resolve pro!lems with different versions of fields or formulas that are specific to the clients* If you need to duplicate several fields+ you may find it easier to put them on su!forms+ or create two versions of the same form* "erformance may !e a deciding factor8 computing a single hide#when formula to display one of two forms is more efficient than computing ?@ hide#whens to display variant fields within a single form*
Hiding fields
If you can solve a pro!lem with two versions of a field formula+ one that wor s in ,otes and the other that wor s on the We!+ then include !oth in the form and use the ;4ide from ,otes64ide from We! !rowsers; selection in the %ield properties !o1 to display one or the other8
Figure 1. Field hide properties
If you0re using the same form for !oth ,otes clients and !rowsers+ the ;4ide from ,otes64ide from We! !rowsers; attri!ute on an o!(ect0s properties can !e very useful* But don0t forget that hidden has a different meaning for each client* In ,otes+ hidden fields are still present in the document and can !e used in scripted calculations* %ields hidden from We! !rowsers+ on the other hand+ are cut out of the document !y $omino
!efore the page is served to the !rowser* The field contents are not availa!le to !e used !y 'avaScript* Tip If you want to ma e fields invisi!le in a !rowser+ !ut eep their contents availa!le to 'avaScript+ don0t use the ;4ide from ,otes64ide from We! !rowsers; and don0t put ;typeAhidden; into the fields0 4TM& Body /ttri!utes o!(ects* Ma e sure that8
Their hide#when properties are set correctly for the ,otes client ;<se 'avaScript when generating pages; is set in the data!ase properties ;Benerate 4TM& for all fields; is selected in the form0s properties
$omino will generate the appropriate CtypeAhiddenD tags in the 4TM& page8
<input type="hidden" name="fieldname" value="fieldcontents">
-emem!er that field names and values treated this way are not secure* They can still !e seen !y any user who clic s on the !rowser0s ;Eiew "age Source; function* -emem!er+ too+ that not all fields can !e passed to a !rowser this way#the password field+ for e1ample+ ;F<pdated!y+; ;F4tml4ead+; and any o!(ects that contain ,<&& characters (which includes users0 pu!lic eys) !ecause ,<&&s can0t !e e1pressed in 4TM&*
Use subforms
Su!forms can !e an easy way to create forms that wor !oth in a ,otes client and a !rowser* /dd a computed su!form and set its hide#when properties so that it displays properly* The following formula calls one of two computed su!forms named ,S and IE that include !rowser#specific code !y using the CBI varia!le for !rowser type in )BrowserInfo8
@If(@BrowserInfo("BrowserType")="Netscape" "N!" "I"")
Search for )BrowserInfo in $omino . $esigner 4elp to see the entire list of properties accessi!le using this function* In -.+ each su!form has its own 'S 4eader+ so you can selectively include 'avaScript as well as other data types in your forms !y using computed su!forms* -emem!er that all su!forms open simultaneously with the main form* 7ou can0t display a computed su!form on the !asis of calculations after the page opens*
from ,otes clients and the other from We! !rowsers* <se the alias to open the form+ and $omino will open the correct form for the user0s client*
LotusScript or JavaScript?
The amount and type of &otusScript in your application may have a ma(or influence on how easily you can migrate it to a !rowser* If your application uses &otusScript primarily in the client for processing data as it is entered and saved#to validate the contents of fields or to massage the data0s format#you may !e a!le to do the same thing in a !rowser with 'avaScript* If your &otusScript is contained mostly in agents that e1ecute on the server+ it may wor well for !oth ,otes and We! versions of your application* In the -. ,otes client+ many form+ field+ and !utton events can !e scripted in either 'avaScript or &otusScript (or+ to !e sure+ )formulas)* $epending on how your application uses scripted events+ this may mean that you can convert some of your scripts to 'avaScript and use the same form for !oth ,otes and We! clients* There are differences in the capa!ilities+ however* 'avaScript in the ,otes client has access only to the data in the currently open form#it lac s the access to front#end and !ac #end $omino 5!(ects of &otusScript* 7our application may wor !est if you write &otusScript for e1ecution in the ,otes client and 'avaScript for !rowsers+ and use hide#whens or separate forms to eep the e1ecution straight*
Pages or forms?
The page is a low#impact alternative to a form or document for displaying static information+ or for carrying em!edded controls for outlines+ navigators+ views+ or folders to the !rowser* The $omino server performs many fewer calculations when it opens a page than it must do when it opens a form or document+ so there is a performance !enefit* "ages are saved as data!ase resources and can !e referenced in outlines+ included in framesets+ and used as the application0s start page* "ages cannot include fields+ !ut they can include computed te1t* "ages re3uire a lower level of access permission than forms#users with -eader access can see pages+ while forms re3uire /uthor access* This difference can ma e it easier to allow unauthenticated users to view your application and navigate through it without creating the potential for a!use+ !ecause common navigation constructions (com!ining a navigator and a view+ for e1ample) that previously had to !e em!edded in forms can now !e em!edded in pages*
/nother way to reduce the performance hit of opening a form when all you want to do is to display a We! page is to put all the 4TM& code for the page into a field named 4TM&* When $omino finds an 4TM& field on a form+ it sends the contents to the !rowser without performing form chec ing or calculations* 7ou can also use 4TM& fields to get large volumes of 4TM& into $omino data!ases* <se a form with an 4TM& field (it can !e either te1t or -ich Te1t)* Copy and paste the 4TM& code+ save the document+ and edit it to fi1 lin s or path information* The 4TM& field can !e either computed or edita!le* <se a computed field if you want to compose a single page that can0t !e edited !y users later* <se an edita!le field if you0re using the form to create many documents holding 4TM& pages*
Second+ set the form0s security properties to ma e it availa!le to pu!lic users !y choosing the last item on the Security ta!8
There are four reserved form names that can !e used to create customi2ed error messages for !rowser users8 FF-eturn/uthentication%ailure+ F F-eturn/uthori2ation%ailure+ FF-eturn$ocument$eleted+ and FF-eturnBeneralError* %or more a!out these fields and how to use them+ see ;$isplaying a customi2ed error message; in $omino . $esigner 4elp*
This option can provide more security+ !ecause when a We! user tries to run an agent with this property set+ $omino prompts the user for name and password and chec s this against the invo er0s rights in the data!ase /C&* 7ou can reference a <-& or generate an 4TM& page from within an agent !y using "rint statements* This form of redirection doesn0t wor from the We!Guery5pen event+ !ut from a We!GueryClose event+ you can use it to deliver a personali2ed confirmation message to the user or to display the results of the agent e1ecution* Browser users don0t have a counterpart to the ,otes client0s menus+ so you must provide them with whatever actions they need to perform in your application* The -. action !ar applet allows you to do this within a consistent <I* To create an action !ar+ in $esigner+ open the page+ form+ or view where the action !ar will appear* Choose $esign # "age6%orm6Eiew "roperties* In the properties !o1+ change to /ction Bar properties and select ;$isplay <sing 'ava /pplet+; as shown in this screen8
Figure &. Action Bar properties
Set the /ction properties for each of the actions that should appear on the action !ar so that they are included in the !ar in the proper order+ and if you want+ so that they have an icon8
Figure '. Action properties
With the applet+ We! users can see the same action icons that appear in the ,otes client* They can scroll across the action !ar if it is wider than the screen* /ctions that have drop#down menus in ,otes appear as a second row of smaller !uttons when the user clic s the main action* Back to top
$omino renders the ma(or features of the view faithfully* <sers can collapse and e1pand categori2ed views+ and navigation is provided to move the user to previous and ne1t pages if the view is a long one* There is a lin to !ring up a search !o1* This out#of#the#!o1 interface doesn0t have any of the graphical appeal of a well#designed We! application+ and it doesn0t provide some of the functions most fre3uently used in ,otes applications#the a!ility for a user to select multiple documents+ for e1ample*
The page lets you add te1t and graphics+ and even a !ac ground image file* The generic navigation graphics and lin s are gone+ as well+ and you can replace them with your own+ or put the page in a frameset and pair it with a navigator or an outline to provide navigation* The view displayed a!ove has !een further customi2ed* The twisties#those graphics that indicate a category can !e e1panded or collapsed#have !een removed+ and the contents of the right#hand column have !een made into hyperlin s !y selecting ;Show values in this column as lin s; on the /dvanced ta! of the Column properties !o18
Figure ,. Ad)anced column properties
7ou can change the color of the twisties+ or ma e them disappear completely from individual em!edded views !y writing a 'avaScript function called ;imagereplace; into the form that carries the em!edded view* To recolor the twisties+ create two BI% files+ 5"E,*gif and C&5SE*gif+ and save them in your application as Image -esources* Copy the 'avaScript for the imagereplace function into the 'S 4eader o!(ect8
function ima#ereplace() $
for( i=% $
i<document&ima#es&len#th
i'' )
if( document&ima#es(i)&src&inde*+f(,e*pand&#if,) -= ./) $ document&ima#es(i)&src=src = ,012T2B2!"&nsf0+3"N&#if4+penIma#e5esource, 6 00end if if( document&ima#es(i)&src&inde*+f( ,collapse&#if, ) -= ./) $ document&ima#es(i)&src= src = ,012T2B2!"&nsf078+!"&#if4+penIma#e5esource, 6 00end if 6 00 end for 6
/nd finally+ in the page0s onload 'avaScript event enter ;imagereplace(); to e1ecute the imagereplace function when the page is opened in the user0s !rowser* To remove the twisties+ ma e a single small transparent BI% file and change the imagereplace code to replace the collapse*gif and e1pand*gif files with your file* This leaves the twistie functionality in place+ !ut ma es it invisi!le*
7ou are not limited to (ust one presentation of the view in your application* If you em!ed the view in multiple forms or pages+ you can set the properties of that o!(ect to follow the view0s setting and display using the 'ava applet in one instance or override it and display the view as 4TM& in another* To set the em!edded view0s display properties+ in
$esigner+ open the page in which the view is em!edded+ and then edit the Em!edded Eiew properties8
Figure 11. .m*edded )iew properties
The view applet supports multiple document selection* This allows you to move applications to the We! that re3uire users to select a group of documents for processing !y an agent* If you em!ed a view in a page+ you can create hotspots or !uttons that su!mit the list of selected document I$s for processing !y an agent on the server* The programming re3uired to do this depends on &iveConnect+ a capa!ility !uilt into Internet E1plorer+ ,etscape ,avigator+ and the ,otes client* &iveConnect allows 'avaScript to interact with components+ such as 'ava applets+ that are written in other languages* The view applet+ li e the other $omino 'ava applets+ has an /"I that can !e addressed !y 'avaScript in your application* (There are 4TM& solutions to selecting multiple documents+ too* See the Iris Today article ;Com!ining forms and views for friendlier We! applications ("art H); for an ingenious implementation of chec !o1es or list !o1es in views*)
Back to top
Many of the things ,otes users use -ich Te1t fields for+ li e pasting in graphics or uploading files+ are not supported !y the applet#there is a separate file upload control you must include in your form if that0s something you want to allow users to do* To insert a file upload control into a form+ choose Create # Em!edded Element # %ile <pload Control* The control will appear in the form li e this8
Figure 1%. File upload control
Intermediate results
5ne of the most profound differences !etween applications developed for ,otes clients and those developed for a We! !rowser is the use of intermediate results* The interaction !etween We! !rowsers and a We! server is severely limited8 a !rowser re3uests a <-& from the server+ and the server returns the re3uested <-& to the !rowser* The re3uested <-& may !e an 4TM& page+ or it may !e a server action* This is how 4TM& forms wor 8 the client sends a 3uery string that includes varia!le names and values and a <-& on the server that identifies a script that the server e1ecutes to process the contents of the 3uery string*
,otes forms+ in contrast+ are much more fle1i!le and allow for intermediate results* 7our application may use an )$!&oo up formula to let the user choose a value from a list+ then use that value in other computations in the open form* This is not possi!le in a We! !rowser* 7ou can appro1imate the same result !y having the user select the document containing the value+ and then passing this document I$ to a server agent that loo s up the value+ performs the computations+ and writes a new 4TM& page+ which is sent to the user*
CGI variables
,otes ma es a great deal of environmental data easily availa!le to the developer* If you want to identify the user you include )<ser,ame in a formula* 5ther information a!out the current application environment is e3ually easy to access using )/uthor+ )$!,ame+ and )Server,ame* Similar information is availa!le to applications on the We!+ !ut you must ta e an e1tra step to ac3uire it* Every re3uest from a We! !rowser is accompanied !y a set of CBI (Common Bateway Interface) varia!les that pass information a!out the user0s environment+ including such data as the user0s name+ the !rowser type+ and the user0s Internet "rotocol (I") address* $omino treats CBI varia!le names as reserved names#when it encounters a field on a form with the name of a CBI varia!le+ $omino copies the field value from the CBI environment and places it in the field* In order to use a CBI varia!le+ you must have a named field for it on your form* 5ne very !asic use for this information is to smooth over a difference !etween the ,otes client and a !rowser* In ,otes+ )$!,ame returns not only the name of the current data!ase+ !ut the name of its server+ as well* 5n the We!+ however+ )$!,ame returns only the name of the data!ase* If you0re trying to compute a <-&+ you have to find the server name somewhere else* The place to loo is a CBI varia!le called+ appropriately+ serverIname* /n easy shortcut is to add a field to your form called serverIname* This can !e especially useful if you !uild and test your application on a development server+ and then move it to a production server* <sing CBI varia!les eliminates much of the hardwiring of server and data!ase names that must !e corrected !y hand to put an application into production* The complete list of data availa!le as CBI varia!les is a long one* It is availa!le in $omino . $esigner 4elp under the heading ;Ta!le of CBI Earia!les*; Back to top
If your application does sophisticated input validation using &otusScript+ much of it can pro!a!ly !e transformed into 'avaScript to wor in a !rowser as long as it uses data already in the document* If validation depends on e1ternal data#loo ups into other documents or data!ases+ or the ac3uisition of document <,I$s+ for e1ample#you will have to move such actions to server agents* Simple validation is still easy to do with )functions and )commands* 4ere is an e1ample that chec s a form to ma e sure that five fields have !een filled in8 first and last names+ a category+ an item name+ and a description* This screen shows the top part of the form open in $esigner8
Figure 1&. Form for )alidation
The field named Chec Employee+ in red a!ove+ is computed for display* 7ou should give it its own name as a value and set it to hide when ;Chec EmployeeA;;;* Each data entry field has a similar ;chec ; field* The wor of validation is done !y the Su!mit !utton formula8
9I"81 7hec:"mployee ;= @If(9irst = "" < 8ast = "" " <font face=arial si=e=> color=ff%%%%><?>@ou must enter your first and last name<?r>?efore su?mittin# this document" "") 9I"81 7hec:7ate#ory ;= @If(7ate#ory = "" " <font face=arial si=e=> color=ff%%%%><?> @ou must choose a cate#ory<?r>for this item" "") 9I"81 7hec:Item ;= @If(9irst = "" < 8ast = "" " <font face=arial si=e=> color=ff%%%%> <?>@ou must enter a a name<?r>for this item" "") 9I"81 7hec:1escription ;= @If(9irst = "" < 8ast = "" " <font face=arial si=e=> color=ff%%%%> <?>@ou must enter a description<?r>for this item" "") No3ro?lems ;= 7hec:"mployee'7hec:7ate#ory'7hec:Item'7hec:1escription @If(No3ro?lems = "" @1o(@7ommand((9ile!ave)) @7ommand((9ile7loseAindow))) @7ommand((Biew5efresh9ields)))
If any of the data fields is empty+ its chec field is assigned an error message* / temporary varia!le+ ,o"ro!lems+ aggregates the chec fields* If there are no empty fields+ ,o"ro!lems has no length and the )$o command saves the file and closes the window* If any field is empty+ the )$o instead e1ecutes the )Command(=Eiew-efresh%ields>) condition+ which ma es the error messages visi!le8
Figure 1'. Validation error message
This minimal validation lac s the elegance of scripting solutions that allow you to place focus on the field that lac s input+ !ut it does allow you to serve the needs of the users for feed!ac #and yields !etter+ more complete data with little effort on your part*
Graphics improvements in R5
-elease . ma es ma(or improvements in the handling of graphics* 5ne of the most important is native support for the two most widely used We! file formats+ '"B and BI%+ as Image -esources* When you import a file into a $omino -. application+ it is stored in its format rather than converted to a proprietary format (which is what happened in previous versions)* 7ou no longer need to worry a!out color palettes and une1pected color shifts* 4owever+ this doesn0t wor if you paste the image+ only if you import it* %or more information on graphics+ see the Iris Today article ;The Braphic Truth a!out ,otes;* The image resource is a great improvement for managing graphics within your application* <se the image resource to save an image (ust once in an application and then use it on many forms or pages* Image resources replicate with the application so that even if there are multiple copies of your application in service+ as long as they all replicate+ you can update icons or logos in all their occurrences !y replacing (ust one copy*
The image resource is a good e1ample of an easy way to use -elease . to ma e your application more We!#li e* $omino can automatically turn properly prepared image resource files into rollover !uttons that change state when you mouse over them* <se a graphics editor to assem!le the various states of the image into a single graphic with one pi1el of separation !etween the images8
Figure 1(. 0raphics prepared for rollo)er *uttons
The image in the first position on the left is treated as the normal image* Second position is the image displayed on mouseover* Third position is the image when selected* %ourth position is the image when clic ed*
This order is fi1ed+ !ut you can use only two or three states !y inserting an image multiple times to fill the array* The e1ample a!ove uses the same image for the mouseover and selected states+ for e1ample+ so that the clic ed state can display a different image* If you want only normal and mouseover+ you can leave the last two positions empty* ,e1t+ import your multi#state graphic into your application as an image resource+ and indicate how many images it contains in its properties !o18
Figure 1+. 1mage resource properties
$omino automatically uses this information to ma e the image display properly !oth in the ,otes client and on the We!* (The entry for ;Images down; is used for multiple si2es of !oo mar icons* %or more on image resources+ see $omino . $esigner 4elp*) Tip If you add images to forms or pages !y writing 4TM& image tags+ you can improve performance !y including the graphic0s dimensions8
"<ICD !57=myima#e&#if width=EF> hei#ht=/EG>"
($omino does this automatically for image resources*) 7ou can also ma e your application more user#friendly !y adding alternate te1t that appears when an image can0t or won0t !e displayed* In 4TM&+ write it into the image tag8
"<ICD !57=myima#e&#if 28T="3hoto#raph of new manufacturin# facility">"
%or image resources+ add te1t in the /lternate Te1t field on the Information ta! of the "icture properties !o1*
Navigation
We! applications typically need more ela!orate navigation !uilt into them than ,otes applications !ecause !rowsers lac the !uilt#in navigation provided !y the ,otes menus* -elease . adds several features that you can use* The pro!lem with any We! application is that you need to separate its navigation as much as possi!le from individual documents so that when its navigational structure changes+ as it inevita!ly will+ the changes can !e made !y modifying as few documents as possi!le* 5n pure 4TT" servers+ this can !e done with server#side includes or */S" pages to com!ine a panel of navigational lin s into documents as they are served to users* In a $omino application+ a su!form can often perform the same role* 5r you may em!ed an outline in a page or form* 5utlines are a new -elease . feature that you can use to create fle1i!le+ high#level navigation across the areas of an application or a We! site* 5utline entries can !e programmed with commands such as hide#whens so that a single outline can appear differently in different areas of the application* /n outline0s appearance can also !e tailored in each instance of its use* / 'ava applet is availa!le to ma e outlines wor in a !rowser as they do in a ,otes client* %or more information+ see the Iris Today article+ ;$omino $esigner -.8 The 5utline $esigner;*
Frames
%ramesets are often used to place a navigation pane ne1t to content* $omino $esigner -. ma es framesets easier to create with a graphical frameset designer* 7ou can si2e your frames !y dragging them+ or set frame attri!utes such as si2e+ scrolling+ !order colors and width+ and frame spacing in the %rame properties !o1* 7ou can specify the contents of each frame in advance+ or have it computed when the frameset is opened* The following %rame properties !o1 shows part of a formula that computes the name of the navigator to display in the frame* %ormulas can control frame content !ased on client type or CBI varia!les including user name+ so you can write a display formula !ased on user roles*
Figure 1,. Frame properties
7ou can set a frameset to launch automatically when a data!ase+ form+ or page opens* %or more on framesets+ see the Iris Today article ;$omino $esigner -.8 %ramesets;* %ramesets and navigators are an easy way to develop consistent navigation for a site+ !ut remem!er that users often find framesets confusing !ecause it is often hard to reverse direction and navigate !ac along a path you have followed in a frameset* <se them with care* Back to top
If your application is aimed at giving We! users read#only access to information+ it can wor well with /nonymous access set to -eader* 'ust remem!er that this may limit users0 a!ility not only to create+ edit+ and delete documents+ !ut to run agents that create+ edit+ and delete documents* If you would li e to limit users to one level of access from the We!+ while allowing them their customary access from a ,otes client+ you can use the ;Ma1imum Internet name J password; setting on the /dvanced ta! of the /C&* It0s a drop#down list+ as shown in the screen !elow8
Figure !-. A"# Ad)anced settings
If you set the access level for your application to -eader here+ for e1ample+ all We! users will !e restricted to -eader access+ even though they might have /uthor or Editor access when they access the application from a ,otes client*
compute its value when the document is created+ and use $omino administration to modify or update some or all of the -eaders fields in a data!ase at once* /nother option is to limit what0s displayed in the views in your application* This wor s only with em!edded viewsK you can restrict the displayed contents of the view to a single category !y opening the page or form that holds the em!edded view in $esigner and selecting ;Show single category; on the 5!(ects ta! of the "rogrammers pane+ as this screen detail shows8
Figure !1. 2*3ect pane
Then in the Script area of the "rogrammers pane+ enter the name of the category or write a selection formula that evaluates to a category name* 7ou can use this techni3ue to display documents only to their authors or only to mem!ers of specified groups* %or e1ample+ the following formula displays the appropriate category to users who are mem!ers of one of four groups#/dmin+ Sales+ 4-+ or IS8
@If(@7ontains(@Hser5oles "2dmin") "2dmin" @If(@7ontains(@Hser5oles "!ales") "!ales" @If(@7ontains(@Hser5oles "I5") "I5" @If(@7ontains(@Hser5oles "I!") "I!" ""))))
5ne final fillip8 if the formula evaluates to an asteris + all categories are displayed* This means that you can show the entire view to some users and restrict it for others+ or !y using )ClientType+ you can create a view that will display only a single category in a !rowser+ !ut its entire contents in a ,otes client8
@If(@7lientType = "Ae?" "Newsflash" "J")
Back to top
Help is at hand
Most of the challenges you face in converting ,otes applications to We! applications involve finding ways to ma e things ,otes does wor in a !rowser* If you0re a ,otes developer who0s (ust !eginning to wor on applications for the We!+ places to start loo ing for answers are close at hand8
The $omino . $esigner 4elp is a great source+ not only of information !ut of e1amples that can show you how things are done* 7ou can chec out the Iris Sand!o1+ a li!rary of downloada!le applications and code samples on ,otes*net* $on0t forget the ,otes6$omino Bold -elease %orum on ,otes*net* Many of the tips and ideas in this article first appeared there* Benerally+ if you can0t find the answer in the forum+ all you have to do is as the 3uestion* /nd Iris Today has a num!er of relevant articlesK chec out the archives or perform a full#te1t search for the topic that interests you* If you0re (ust moving to -elease . from a previous version of ,otes+ $omino $esigner -. Technical 5verview and $omino -. Technical 5verview+ and the articles they are lin ed to+ are good places to start* %or more on -. !est practices+ you can download the &otus ,otes and $omino /pplication $evelopment Best "ractices Buide*
This article+ along with these resources+ should ta e you a long way toward the successful migration of your ,otes application to the We!*
Resources
&otus ,otes and $omino /pplication $evelopment Best "ractices Buide We!ifying an e1isting ,otes application Com!ining forms and views for friendlier We! applications ("art H) Teach $omino ,ew We! Tric s with $4TM& The Braphic Truth a!out ,otes $omino $esigner -.8 The 5utline $esigner $omino $esigner -.8 %ramesets $omino $esigner -. Technical 5verview $omino -. Technical 5verview
Convert a page+ form+ or su!form (or sections of the page+ form+ or su!form) to 4TM& and use the 4TM& editor to change the 4TM&* Import 4TM&+ thus using the source of an e1isting We! page or form as the !ase of a new page or form* $esigner renders the imported 4TM& on the page+ form+ or su!form already translated from 4TM&* "aste 4TM& directly on a page+ form+ or su!form* The 4TM& stays in 4TM& format* Enter 4TM& directly on a page+ form+ or su!form* The 4TM& stays in 4TM& format*
To import 4T5#
To import 4TM& you must first save it as a file that you can access* M* H* ?* 5pen a page+ form+ or su!form* Choose %ile # Import* Select the file containing the 4TM& you want to import and clic 5:* $esigner translates the 4TM& and then adds it to the page+ form+ or su!form*
To paste 4T5#
M* H* ?* O* .* P* Select the content you want to paste from the source of an e1isting We! page+ form+ or su!form* Copy the content to the clip!oard* 5pen a page+ form+ or su!form* Choose Edit # "aste* 5pen the "roperties !o1 for the page+ form+ or su!form ($esign # Cdesign elementD "roperties)* /t the Info ta!+ chec ;-ender pass through 4TM& in ,otes*;
O*
When you chec ;-ender pass through 4TM& in ,otes+; IBML &otusL $ominoL passes all data on the page+ form+ or su!form directly to the !rowser* $omino ignores em!edded navigators and folders and any em!edded views that don0t have ;-ender pass through 4TM& in ,otes; selected*
7ote "ages+ forms+ or su!forms containing pass#thru 4TM& may display differently in the ,otes client than on a !rowser* %or e1ample+ if you create nested ta!les !y using pass#thru 4TM&+ the ta!le may contain more white space when displayed in the ,otes client than when displayed in a !rowser*
Ma e sure the data!ase is in the IBML &otusL $ominoL $ata directory or a su!directory of the $ata directory* /dd form actions* such as Create+ Edit+ and Save*
%or more information+ see ;/ctions; in the chapter ;/utomation in /pplications; later in this !oo *
-efer to the appendi1 ;%eatures to /void <sing in We! /pplications; later in this !oo *
<se additional )commands and6or create multiple !uttons on a form !y selecting the data!ase property ;We! access8 <se 'avaScript when generating pages*; Change from the &otus Software color palette to a We! color palette to provide greater color fidelity on the We!* To change palettes+ choose %ile # "references # <ser "references* Chec ;<se We! "alette; on the /dvanced options list of the Basics page* Set views+ outline controls+ action !ars+ and rich te1t fields to !e displayed as $omino applets when viewed with a !rowser*
Chec the /ccess Control &ist (/C&) setting to ma e sure it allows appropriate access for Internet users*
%or more information+ see ;Setting up data!ase access for Internet users*;
"revent users from accessing forms and views in a We! application !y selecting the data!ase property ;$on0t allow <-& open*; 9elated topics
Domino )iew and folder properties that are not supported on the /e*
/void using the following view and folder features in a We! application*
Views and folders Folders Views Options properties Show in View menu
Comments Private folders are not supported in outlines on the Web. Private views are not supported.
Web applications do not have a View menu. To exclude a view from the folders navigator, use the Design Design Properties box to hide the view from Web users, or include the view name in parentheses for example, !"iddenView#.
$n $pen% &o To... options $n 'efresh options Style properties (nread rows )lternate rows *eveled headings Advanced properties 'efresh index options Discard index options Column Info properties Show twistie when row is expandable 0xpand1collapes icons !twisties# are alwa-s shown. Views can be reindexed b- an .*+/ ,otus/ Domino/ server. Show selection margin is supported for views rendered as "T+,, but not for view applets.
7ote If you em!ed a view+ you cannot dynamically sort a categori2ed column on the We! or in an IBML &otusL ,otesL client*
Notes/FX fields Field Info properties 2ompute )fter Validation &ive this field default focus Control properties $ptions Advanced properties "elp description 0nable encr-ption for this field Sign if mailed or saved in section Names fields/Control properties 2hoices !for 3ames fields#
Comments
4(se )ddress dialog for choices,4 4(se )ccess 2ontrol ,ist for choices,4 and 4(se View dialog for choices4 are not supported. Web user access to databases is based on the authenticated name.
Check o! fields 2hec5 box selection order For some browsers, the order of the data returned from multiple selections in a chec5box ma- be different from the selection order. The data itself remains the same, but the order returned is different.
'ich text lite fields are not available on the Web. (se rich text fields.
Form Info properties Versioning )non-mous forms +erge replication conflicts Store form in document 0dit mode Disable field exchange )utomaticall- refresh fields #efaults properties $n 2reate% .nherit entire selected document into rich text field 4as ,in54 and 4as 2ollapsible rich text4 $n $pen% Show context pane Security properties Default encr-ption 5e-s Disable printing1 forwarding1cop-ing to clipboard Form elements ,a-out regions Pop up hotspots )ctive7 components, $,0, and $27 ob8ects
Comments
'ead mode is supported, but do not use for documents that need to be created or edited on the Web.
4.nherit entire selected document into rich text field 4as rich text4 is supported. The documents must reside in the same database and the database propert-, 4Web )ccess% (se 6avaScript when generating pages4 must be selected.
3ot supported on +acintosh, (3.7, and $S19 platforms. Supported for displa- on Windows 3T and Windows :; platforms, but users can<t save changes made to ob8ects. .f the top left cell of a table has a border, the entire table is displa-ed with a border= otherwise, there is no border because of limitations with "T+,.
9elated topics
Comments
2alendar views are not supported. The "T+, 2alendar view will be generated even if view applet is selected.
Options properties $n 'efresh Style properties (nread rows color *eveled headings ,ines per heading Shrin5 rows to content 'ow spacing Advanced properties 'efresh index Discard index (nread mar5s For $D*2 )ccess )ctive ,in5 (nvisited ,in5 Visited ,in5 'estrict initial index build to designer or manager Font properties $itle properties Font Advanced properties The available fonts are limited to a subset of fonts supported b- 6ava. The available fonts are limited to a subset of fonts supported b- 6ava. 3one of the 4on refresh4 options are supported.
Domino hori:ontal rule properties that are not supported on the /e*
/void using color rules in a We! application* Bradient color is not supported on the We!*
2omments This propert- is not supported in Web applications, but ma- affect the Width propert- of a cell, which is supported on the Web.
+inimum height 'ow spacing Table Width Cell &orders properties 2olor 2ell *order St-le 2ell *order Thic5ness $a le/Cell &ack'round properties St-le $a le &orders properties *order st-le *order color Determined b- individual cell borders. The table color is used. Solid is the onl- color option supported on the Web. &radients will appear as the first color. 2olor settings for cell borders are not supported on the Web The st-le options, 'idge and &roove, are not supported on the Web. *order thic5ness settings greater than > are not supported. 4Same as window4 setting is ignored in a Web application.
*order effects Thic5ness $a le (ar'ins properties ,eft 'ight Table wrap 2ompatibilit$a le "ows properties Show onl- one row at a time
9elated topics