Click here to Skip to main content
15,888,527 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionMoving changing Movies Pin
TheEagle23-Nov-07 21:00
TheEagle23-Nov-07 21:00 
AnswerRe: Moving changing Movies Pin
Christian Graus24-Nov-07 10:28
protectorChristian Graus24-Nov-07 10:28 
QuestionHtml mail format using mail to function Pin
manowj23-Nov-07 20:53
manowj23-Nov-07 20:53 
AnswerRe: Html mail format using mail to function Pin
Unknown Ajanabi23-Nov-07 22:45
Unknown Ajanabi23-Nov-07 22:45 
Questionhow can i pass variable using ViewSate Pin
koolprasad200323-Nov-07 20:48
professionalkoolprasad200323-Nov-07 20:48 
AnswerRe: how can i pass variable using ViewSate Pin
Christian Graus23-Nov-07 20:55
protectorChristian Graus23-Nov-07 20:55 
AnswerRe: how can i pass variable using ViewSate Pin
John-ph23-Nov-07 21:10
John-ph23-Nov-07 21:10 
Question[discussion] What do you think about Script#? [modified] Pin
Michael Sync23-Nov-07 20:26
Michael Sync23-Nov-07 20:26 
Does anyone has any experience in using Scrtip#, the C# to Javascript converter[^] , which is created by Nikhil[^], a software architect from Microsoft?

I was playing a lit bit with Script# and I have some thoughts that I wanna share you and I wanna hear about your thoughts too... (I'm not so sure whether I should post it in Lounge or ASP.NET forum so the admin feel free to move this thread to the appropriate forum. )

First of all, I wanna say "thank you" to Nikhilk for creating this (no matter whether I use it or not) because the Java developers have this kinda tool (GWT) that can convert the Java code to Javascript. Now, We, the C# developers, got the same thing now. Smile | :)

1. The advantage of using Script# is that it supports the compile-time checking, IntelliSense so that it's very easier for those who are not so familiar with Javascript.

2. Script# is able to convert the C# code to Javascript but it doesn't mean that it can convert all C# code. In order to convert the C# to Javascript via Script#, we have to write the Script#-specific code in C# then those codes will be converted to Javascript... (So, I think that Script# is NOT 100% C# to Javascript Converter. )

3. The GWT is developed by Google and Script# is not developed by Microsoft. It has too much differences. Even thought Nikhil is an architect from Microsoft, Script# is just his pet project.. So, he can't support his pet project all the time.. I have checked Script# discussion[^] and found that there is no active contribute (including Nikhil). The community is so small if we compare to GWT community.

4. Script# is not Opensource. Frown | :(

5. In order to use Script#, you have to understand about how Script# works (of course) and the syntax of Script#. It's not so similiar to the Javascript.

If you are alreadys fimiliar with Javascript, you won't be so happy with Script# because ~

5.1. All syntax that are available in Javascript might not be available in Script#. OR it is so hard to find the equivalent Script# .

For example: How to access 'document' of created DOMElement??[^]

In Javascript,
<br />
var iframe = document.createElement("iframe"); <br />
var doc = iframe.contentWindow.document; <br />

In Script#,


using System;<br />
using System.DHTML;<br />
using ScriptFX;<br />
using ScriptFX.UI;<br />
<br />
public class MyScriptlet {<br />
<br />
    public static void Main(ScriptletArguments arguments) {<br />
        DOMElement _iframe = Document.CreateElement("iframe");<br />
        DOMElementExt contentWindowElement = (DOMElementExt)_iframe.GetAttribute("contentWindow");<br />
        DOMElement doc = contentWindowElement.document;<br />
        <br />
    }<br />
}<br />
<br />
[IgnoreNamespace]<br />
[Imported]<br />
public class DOMElementExt : DOMElement {<br />
<br />
    [IntrinsicProperty]<br />
    public DOMElement document {<br />
        get { return null; }<br />
    }<br />
<br />
    [IntrinsicProperty]<br />
    public DOMElement body {<br />
        get { return null; }<br />
    }<br />
<br />
    [IntrinsicProperty]<br />
    public DOMElement src {<br />
        get { return null; }<br />
    }<br />
<br />
    [IntrinsicProperty]<br />
    public DOMElement firstChild {<br />
        get { return null; }<br />
    }<br />
}<br />

If you look at both examples, you will understand how hard to find the equivalent syntax in Script# (sometimes). I understand that it is kinda hard for Nikhil to add all Javascript equivalent systax to his framework..

6. Script# does support the compile-time validation but the problem is that you won't be able to debug the C# code that you wrote. Instead, you will have to debug the Javascript code that generate by Script#. I think that it is the big issue for web developer.

7. The most of Javascript libraries /framework (e.g. prototype, script.aculo.us, Yahoo.UI, ExtJS) are not written in Script#. So, If you wanna use those libraries in Script#-enabled project, you will have to create a wrapper that can take a lot of time...

8. Script# might be good for ASP.NET Ajax developers and Vista Gadget developers. As I'm not very familiar with those things, I'm not able to cover about this. I need your contributes for this fact.

That's all from my side.

As Dimitri said here,

"if you can't handle Javascript, you shouldn't be writing code for Web applications. HTML, CSS and Javascript are the three prerequisites for this ride."

I agreed with his answer..

Could you please share your thoughts about Script#?


-- modified at 2:45 Tuesday 27th November, 2007
I posted it with a few images in my blog.
http://michaelsync.net/2007/11/25/script-is-script-right-for-you

Note: Sorry if you think that my writing is so boring.

Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

AnswerRe: [discussion] What do you think about Script#? Pin
Emil - Gabriel26-Nov-07 20:36
Emil - Gabriel26-Nov-07 20:36 
GeneralRe: [discussion] What do you think about Script#? Pin
Michael Sync26-Nov-07 20:51
Michael Sync26-Nov-07 20:51 
QuestionTo change link button to dropdown box Pin
gunaarun23-Nov-07 20:07
gunaarun23-Nov-07 20:07 
AnswerRe: To change link button to dropdown box Pin
Imran Khan Pathan23-Nov-07 20:47
Imran Khan Pathan23-Nov-07 20:47 
AnswerThanks Pin
gunaarun23-Nov-07 22:15
gunaarun23-Nov-07 22:15 
QuestionWhat is better server.Transfer() or Response.redirect() Pin
koolprasad200323-Nov-07 20:03
professionalkoolprasad200323-Nov-07 20:03 
AnswerRe: What is better server.Transfer() or Response.redirect() Pin
Michael Sync23-Nov-07 20:36
Michael Sync23-Nov-07 20:36 
GeneralRe: What is better server.Transfer() or Response.redirect() Pin
koolprasad200323-Nov-07 20:50
professionalkoolprasad200323-Nov-07 20:50 
GeneralRe: What is better server.Transfer() or Response.redirect() Pin
Michael Sync24-Nov-07 5:19
Michael Sync24-Nov-07 5:19 
AnswerRe: What is better server.Transfer() or Response.redirect() Pin
John-ph23-Nov-07 21:15
John-ph23-Nov-07 21:15 
QuestionQuery Pin
Sunil Wise23-Nov-07 19:45
professionalSunil Wise23-Nov-07 19:45 
QuestionIs it possible to add mySql queries in aspx page Pin
Deepthy.P.M23-Nov-07 19:33
Deepthy.P.M23-Nov-07 19:33 
AnswerRe: Is it possible to add mySql queries in aspx page Pin
Michael Sync23-Nov-07 19:53
Michael Sync23-Nov-07 19:53 
QuestionHow to show data in EXCEL Sheet? Pin
Kasi Viswanathan23-Nov-07 19:11
Kasi Viswanathan23-Nov-07 19:11 
AnswerFound Reference... Pin
Kasi Viswanathan25-Nov-07 22:55
Kasi Viswanathan25-Nov-07 22:55 
QuestionCrystal Report Problem Pin
Suryanairg23-Nov-07 17:49
Suryanairg23-Nov-07 17:49 
QuestionAutoComplete Pin
kirthikirthi23-Nov-07 17:38
kirthikirthi23-Nov-07 17:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.