Ajax Domino Controller v0.5.0 released

New features of Ajax Domino Controller version 0.5.0 (NTF):


  • getAllEntriesByKey
  • runAgent
  • getDocumentByUNID
  • RaiseError - XML error handling
  • DocumentToXML - unified the XML output for each Function

 You can get the error message raised on Domino server, by parsing the returned XML document with the tagName "ajax-error",
to see what happened on server.
And it is more convinient to out put XML by put your result in the variable xml,
after you assembly your xml output, just call DocumentToXML(xml)
It will format your xml result to a formal XML document.

Try it. :)

Ajax Domino Controller

Ajax Domino Controller is a Domino web development framework by using AJAX javascript and Domino Agent.

It provides web developers to retirve Domino data with no COM object nor CORBA framework, just javascript function call and XML for communication.

 

Now, the released version is 0.1.0 and also many functions need to be developed and tested. You can download the Ajax Domino Controller template and ajaxdomino.js for using on your web page with Domino environment.

 

Also, you need to download the prototype.js on http://prototypejs.org/download, and used on your web pages by adding the following scripts.

 

  <script src="path/to/prototype.js" type="text/javascript"></script>
  <script src="path/to/ajaxdomino.js" type="text/javascript"></script>

In ajaxdomino.js, you can use dblookup to retrive XML data like Formula @DBLookup does.

You provide server,database,view,key,field and onComplete function to handle the XML data with your page.

In the parameter field, you can provide ColumnNumer or fieldName to do with, and not only one column or one field can do,

you can retrive two or more field value by useing comma with it.

 

e.g. dblookup('myserver','mydb','myview','mykey','field1,field2,field3','myCompletefunction');

 

// Change the bold block to your Domino IP/domain name


function dblookup(server,database,view,key,field,onComplete){
  var pars='action=dblookup'+
           '&server='+escape(server)+
           '&database='+escape(database)+
           '&view='+escape(view)+
           '&key='+escape(key)+
           '&field='+escape(field);
  //alert(pars);
  var myAjax=new Ajax.Request(ajaxdominocontrollerurl, {
    method: 'get',
    parameters: pars,
    asynchronous: true,          
    onComplete: eval(onComplete),
    onSuccess: function(resp) {
      //alert("The response from the server is: " + resp.responseText);
    },
    onFailure: function(resp) {
      alert('Sorry. There was an error.');
    },
    onException: function(resp, exception) {
      var description = '';
      for (var property in exception) {
        description += property + '=' + exception[property] + '\n';
      }
      alert('Exception: ' + exception + '\n' + description);
    }
  });        
}

 

The prototype AJAX object will take handle with the Ajax Domino Controller agent "ActionListener" and pass the parameters through Domino web container.

As the ActionListener agent received the request, it will parse the action field and switch to the properly function to do with.

 

The Ajax Domino Controller also provide an error handling function call to send email on the error raised event.

You should also change the constant variable "Administrator" in the ErrorHandling script library to your desired email,

and testing the agent on your Domino server.

 

Be remided, you should create a new Database with the template "AjaxDominoController.ntf" on your Domino server,

sign the database you created with your Adminstration account and change the ACL of "default" from Administrator to Reader.

 

After the responsed XML returned, it will call the onComplete function you provided with dblookup function call, it will look like this

 

    function showResponse(resp) {
      //alert(resp.responseText);
      var xmlDoc=resp.responseXML;
      var x
      
      x=xmlDoc.getElementsByTagName(Field);
      $('Result').innerHTML="<select id='lst'><option></option></select>";
      for (var i=0;i<x.length;i++)
      {       
        var value = x[i].childNodes[0].text;
        $('lst').options[i]=new Option(value,value);
      }
    }

    .....

 

    <div id="Result"></id>

 

Very straight forward, enjoy it.

 

 

 

Lotus Notes on Web 2.0

Fighting SPAM with Domino ND6

今天在找 Domino ND6 的 server mail rules 的相關文章時發現了一個粉棒的網站

IBM Lotus Notes/Domino Hits and Tips 裡面的 Domino SPAM Resource Guide

記載了很多關於 Anti-SPAM 的文章

IBM Redbook - Lotus Domino 6 spam Survival Guide

Controlling spam: Advanced SMTP settings in Lotus Domino - part1 - developerWorks article

Controlling spam: Advanced SMTP settings in Lotus Domino - part2 - developerWorks article

Preventing SPAM mail in Notes/Domino 6 - developerWorks article

Tutorial: Managing inbound spam in Lotus Domino 6: covers many techniques available to Domino administrators to battle spam mail, including:


  • Making sure your mail server isn't used by spammers to relay spam mail
  • Using third party maintained DNS blacklists that can filter out spam
  • Using several techniques to verify various aspects of mail in an attempt to identify and filter out spam
  • Using mail rules and other types of restrictions to combat spam

還有一個網站 Chris Linfoot 的 blog http://chris-linfoot.net/

裡面記載了很多 Domino Administration 的 Tips

多逛逛, 不錯的


Notes 和 Domino 的歷史

今天在 developerWorks 技術專刊中有一篇
名為 "Notes 和 Domino 的歷史" 的文章

介紹了 Notes 誕生與發展的過程, 並提到了下一世代的 Domino ("Hannover")
可以好好給他懷舊一番


Notes 和 Domino 源自 Ray Ozzie、Tim Halvorsen 和 Len Kawell 的研究工作,最初是伊利諾斯州立大學的 PLATO Notes,後來是 DECNotes。Lotus 的締造者 Mitch Kapor 認識到了 Ozzie 的群組工作專案的巨大潛力,其開發歷史就開始了。

了解更多資訊
http://www-128.ibm.com/developerworks/tw/library/ls-NDHistory/

Domino Tips:Monitoring scheduled agents by e-mail

這一篇文章蠻具啟發性的, 在每支執行完後去記錄執行的時間

然後再安排一支 Agent 每 12 小時檢查一次看 Agent Log 所記錄的執行狀況

來判斷該 Agent 是否執行正常

這可以讓一些重要的 Agent 不會因為不正常的因素沒有執行

而導致系統發生錯誤

蠻值得參考

但有個問題是若檢查的 Agent 本身也沒有執行呢?


原文網址: http://searchdomino.techtarget.com/tip/1,289483,sid4_gci1152535,00.html

Domino Tips:Modifying document item values

通常我們在維護 Notes 資料庫時, 最常遇到的問題就是 User
要求修改表單所填的內容
(不管是你的無心造成他的粗心, 或是它的粗心讓你非常擔心)
這時候我們就要找出來他填值的欄位, 然後把正確的資料塞回去, 再給他 save 起來這樣一個動作 可能就要花您 3~5 分鐘的時間

救星來啦!!

在 SearchDomino 上最近來了一篇文章, 就是來解決這個問題的

他的作法是將文件上的欄位透過 @DocFields 把它取出來放到 List 當中
再透過選取欄位與設定欄位型態的方式
將該欄位的值取出來, 然後再進行修改
整個過程用不到 1 分鐘!!

原文說是給 6.5 使用的, 那廣大的 R5 愛用者怎麼辦?

其實只要將 REM {}; 的部份改成 REM ""; 就可以在 R5.09 使用了!!
最好是將它放在 Agent 中透過動作功能表來使用, 記得要設定為 "執行一次可能會用到 @Command".

原文網址: http://searchdomino.techtarget.com/tip/1,289483,sid4_gci1176004,00.html?track=NL-47&ad=547694HOUSE