Sitecore CMS and everything related RSS 2.0
 Monday, August 18, 2008

A little known fact is that Sitecore 6 comes with Prototype and Firebug lite preinstalled. Prototype is a mind saving javascript library, and firebug lite is a helpful javascript instrumentation console replacing dozens of alert(“I’m here”) calls.

We’d do it for ourselves anyway, but what does it mean for you?

Prototype

Prototype javascript library is automatically included in Sitecore shell applications – both native, such as Content Editor, and the custom ones.

This means you can safely use prototype both in your Sitecore customizations, such as custom fields, and in your own applications. (If you look closely enough, you’ll see that custom FieldTypes I’ve made for Crestone shamelessly use prototype whenever possible).

Needless to say that prototype is great and saves a lot of brain cells if you do any javascript at all. Some great alternatives, such as jQuery, do exist – but if you don’t use anything at all, I really wonder why.

If you’re new to prototype and javascript frameworks in general – they have very solid documentation at http://prototypejs.org/.

Even more, prototype’s cousin – Scriptaculous, a javascript UI controls and effects library is also shipped with Sitecore, but is not included automatically. If you need it, it’s at /sitecore/shell/Controls/Lib/Scriptaculous.

Firebug Lite

Firebug lite is a cross browser javascript console – the fact that it works in Internet Explorer is of biggest interest to Sitecore developers. I’ve praised it before, but now it’s one key press away in Sitecore shell applications.

Press F12 and the firebug lite console will pop up from the top:

Firebug lite opened in Sitecore Content Editor

This means you can use console.log and other instrumentation methods to debug your javascript.

Sitecore UI has a lot of IFrames, so pay attention where you click before opening the console – each IFrame is a separate javascript realm, and therefore has its own firebug console.

The Website is Safe

I’d like to stress again that both Prototype and Firebug lite are only included in the Sitecore shell applications. Technically, if the sitecore.js javascript file is loaded, the prototype and firebug are also inlcuded.

We don’t add anything to the frontend sites – it’s your decision.

Monday, August 18, 2008 8:37:58 AM (FLE Standard Time, UTC+02:00)  #    Comments [4]
Sitecore | Crestone | Web development
Monday, August 18, 2008 10:31:21 PM (FLE Standard Time, UTC+02:00)
This is just sick man! Awesome feature for the developers!!!
Alex Shyba
Monday, August 18, 2008 10:44:57 PM (FLE Standard Time, UTC+02:00)
Glad you like it, Alex :)
Tuesday, August 19, 2008 11:27:36 AM (FLE Standard Time, UTC+02:00)
Nice to see that Sitecore has chosen some "standard" JavaScript framework on the core. I am going to be using this a lot, I was doing some work before with ProtoType but nowdays I prefer jQuery over prototype as my library of choice. Though, cool part of jQuery is also that it works nicely together with prototype. Anyway, I am very happy that you choose Prototype over AJAX.NET.
Is it possible to add own js library to the core for example jQuery?

Do you guys plan to support Firefox on shell some point?
Tuesday, August 19, 2008 12:27:58 PM (FLE Standard Time, UTC+02:00)
If you look how the devices are set up in the core database, you'll see that it has a number of child items, representing stylesheets and javascripts. Adding the jquery script there will include it pretty much everywhere, although there probably are a few special cases.

We're definitely looking into supporting firefox in the shell, but that's all I can say at the moment. I'd be the first to use it.
Comments are closed.
Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
Blogroll
 Alex de Groot
Few words about SiteCore from Holland
 Alexander Shyba
Sitecore Support
 Anders Dreyer
Anders Dreyer on Sitecore Development
 Jakob Christensen
Sitecore Core Development
 Lars Fløe Nielsen
Lars's ramblings about development and business processes
 Ole Thrane
Sitecore API
 Runi Thomsen
Runi Thomsen Sitecore Toughts
 The Sitecore Experience
The Sitecore Experience
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010
Alexey Rusakov
Sign In
Statistics
Total Posts: 211
This Year: 0
This Month: 0
This Week: 0
Comments: 0
Themes
Pick a theme:
All Content © 2010, Alexey Rusakov
DasBlog theme 'Business' created by Christoph De Baene (delarou)