Of course they are diffrent ,they are totally in different runtime. WebScripts's runtime container is alfresco ,so it can use alfresco's javascript api; Dashlet 's runtime is share 's local runtime; you can use alfresco javascript api implement a webscript ,and develop a dashlet using that webscript