hgs yĆ¼kleme
My Cart (0)  |  My Orders  |  My Downloads  |  My Auction  |  My Account  |  Help

Login |Register        Search

Programming languages in dotnetnuke 6.2

                Print      Add To Favorite     Add To Watch List     Contact Author

Creator: host   8/7/2012 11:13:03 PM    Author: Charles Nurse   Source: http://www.dotnetnuke.com/Resources/Blogs/EntryId/3450/Programming-Languages-are-not-just-Syntax.aspx   Views: 2429    0    0  
Module develop Dnn 6.2 Java script

JavaScriptLike most developers in the DotNetNuke community I began my career programming in Visual Basic, in particular Visual Basic.NET.  I had some knowledge of Java and C (and even PHP), but most of my programming, both hobby and professional was in VB - and later VB.NET.

I used to say that different languages are just syntax - learn the principles of computer programming, and switching from one language to another is just a matter of learning the new syntax.  Recently, I have come to the conclusion that this is not quite true. 

There is a degree of truth in the statement.  For example switching from Visual Basic.NET to C# is primarily just a matter of learning the new syntax.  This is because VB.NET and C# are both object-oriented languages and both are designed to work in the same way with the .NET Framework.

It is also true that switching from Java to C# is relatively easy - in this case the syntax is similar - as both use the familiar C-style syntax - and both are compiled into an intermediate language for execution in a virtual machine.

But the same is not true when switching from C# (or Java) to JavaScript. And yet JavaScript uses the same C-style syntax - and it was given the name JavaScript to attract Java developers - to make them think it was the scripting language for Java.  JavaScript looks like C# - and in my opinion that was a major design flaw. 

Often C# developers, when switching to JavaScript write bad JavaScript code.  This is because, while JavaScript looks like C# (or Java) it is actually a quite different beast. JavaScript owes more to Self and Scheme, themselves dialects of Smalltalk and Lisp, than to C or Java.

There are a number of critical differences.  JavaScript is functional.  JavaScript uses prototypal inheritance rather than class inheritance.  Variable scoping is different - JavaScript only has functional variable scoping (or global - but that’s evil), while C# and Java have block level scoping.

With version 6.2, DotNetNuke really embraces JavaScript, using knockoutJs in the client and AJAX to communicate with the new Service Framework in most of the new components, and I have found myself thinking and reading a lot on JavaScript.

For anyone who is interested in a deeper analysis of the differences between JavaScript and C# I have been writing a series of blogs on my personal site, which you may find interesting.

Rating People: 8   Average Rating:     

     DnnModule.com is built to provide DNN quality modules and DNN skins, some of them are free, some not. We wish these stuffs (free or not ) can be useful to you.

     Besides that, we also provide a full range of professional services, ranging from web site build, seo, system management, administration, support, senior consultancy and security services. We act as if your development project or network was ours, with care and respect. We are not satisfied until it works the way you want it to, and we don't silently ignore found issues as somebody else's problem.