This is a migrated thread and some comments may be shown as answers.

Javascript and telerik

2 Answers 188 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Social_Quotient
Top achievements
Rank 1
Social_Quotient asked on 03 Jun 2008, 11:55 PM

I have been using telerik for a while and today while doing some QA on a page with my team I had a profound moment when I looked at my modal/page loading in firebug.

I have a simple page that uses 3 sections in a splitter, 4 tabs in the tab control and 1 editor no tools just spellcheck and I have to load all this.

<asp:ScriptReference Path="~/Scripts/Common/Core.js" />
<asp:ScriptReference Path="~/Scripts/Common/PopUp/PopUpScripts.js" />
<asp:ScriptReference Path="~/Scripts/Common/Animation/AnimationScripts.js" />
<asp:ScriptReference Path="~/Scripts/Common/Navigation/NavigationScripts.js" />

<asp:ScriptReference Path="~/Scripts/Splitter/RadSplitter.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/SplitterItem.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/SplitterPaneBase.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/RadPane.js" />   
<asp:ScriptReference Path="~/Scripts/Splitter/RadSlidingPane.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/RadSlidingZone.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/RadSplitBar.js" />
 
<asp:ScriptReference Path="~/Scripts/TabStrip/RadTabStripScripts.js" />
<asp:ScriptReference Path="~/Scripts/TabStrip/MultiPage/RadMultiPageScripts.js" />

<asp:ScriptReference Path="~/Scripts/Dialogs/DialogOpener.js" />          
<asp:ScriptReference Path="~/Scripts/Window/RadWindow.js" />          
<asp:ScriptReference Path="~/Scripts/Editor/RadEditor.js" />
<asp:ScriptReference Path="~/Scripts/Editor/Modules.js" />         
<asp:ScriptReference Path="~/Scripts/Spell/SpellCheckService.js" />
<asp:ScriptReference Path="~/Scripts/Editor/AjaxSpellCheck.js" /> 


Am I missing something or is this more js than you ever thought you would need to pull something like this off.

It would be great if someone would post back and tell me to make sure and click the property that says "not really as much js" but I have a feeling that is not going to happen. I dont mean for this to be a blog but I am curious of the community feedback on the general topic and my scenario.

Thanks and I do love telerik products
John

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 Jun 2008, 08:17 AM
Hi John,

Thank you for your feedback! We are glad that you like our controls.

By default, RadControls for ASP.NET AJAX read all script and skin files from the Telerik.Web.UI.dll file and the controls can work without using any external resources.

The external SCRIPT and SKIN in the RadControls for ASP.NET installation are provided for customization purposes. That is why if you do not plan to customize the controls our suggestion is to use the embedded resources and you will not deal with any external files.

Of course, if you want to use the external SCRIPTs for testing or customization purposes the following information could be helpful:
  • RadEditor is contained by three controls which currently use 5 js files:
    • Rich Text Editor which uses the RadEditor.js
    • RadSpell - the integrated inline ajax spellchecker requires SpellCheckService.js and AjaxSpellCheck.js - we plan merged both files in 1 file.
    • RadWindow - is used by the editor's dialogs and requires DialogOpener.js and RadWindow.js. They will be also merged later in one file. Thus finally the three editor's controls will use only 3 js files.
    • Rich Text Editor which uses the RadEditor.js
    • RadSpell - the integrated inline ajax spellchecker requires SpellCheckService.js and AjaxSpellCheck.js - we plan merged both files in 1 file.
    • RadWindow - is used by the editor's dialogs and requires DialogOpener.js and RadWindow.js. They will be also merged later in one file. Thus finally the three editor's controls will use only 3 js files.
  • RadSplitter - we also plan to merge the used scripts like these of RadEditor
With the newly added RadScriptManager and RadStyleSheetManager controls, RadControls for ASP.NET AJAX suite gives developers the advantage of a simple drag-and-drop to achieve the combination of resources to a single request. All you need is to add a RadScriptManager to your page instead of the default ScriptManager and the javascript files will get combined into a single file. Putting an additional control – RadStyleSheetManager to the page makes the stylesheet requests combined into a single request.

You can use all external scripts for testing purposes, but merging then with RadScriptManager on the production server.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rumen
Telerik team
answered on 04 Jun 2008, 09:01 AM
Just a quick follow-up:

If you set the editor to load its tools from a ToolsFile.xml file and does not register the AjaxSpellChecker tag in this file, then the editor will not read the SpellCheckService.js and AjaxSpellCheck.js files.

If you remove the editor's modules (RadEditor1.Modules.Clear();) then you don't need to import the
Modules.js script file as well.

If your users will not use the editor's dialogs then do not import the
DialogOpener.js and RadWindow.js files.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Social_Quotient
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or