
Originally Posted by
dclamp
@szlamany I love hearing about your projects.
Thanks!

Originally Posted by
FunkyDexter
Finally, I don't like the way it swallows errors when I make a mistake in a web page - that can make debugging hell. The only one of those three that's a real big deal is the lack of an ide and I'm not sure you blame that on the language.
FireBug shows the exact line of those hidden errors - just set a break at that spot and re-do the operation and you are right at it.

Originally Posted by
dclamp
I love to hate javascript. I tried out node.js once and I just did not care for it. I am just used to using javascript as a front end element rather than a backend element.
My whole recent involvement in this thread was because of Node.JS being mentioned. The proponents of Node talk about having a single syntax across the stack - like that is a good reason to go with it. My backend remains .Net because that library/framework is so well laid out and programmatically accessible. That's enough of a reason to leave VB6 behind - talking to the API from VB6 required knowledge of that stack's particulars. And it's not like you have to be fluent in the API-speak. Just enough knowledge from posts around the internet and you are sub-classing your way around your VB6 with total disregard for proper practice. And god-forbid you subclass in the ide...

Originally Posted by
Niya
No way in hell I'd ever consider using JavaScript for any kind of back end development. Hell, I'd rather use VB6. JavaScript is good at what it does, which is to manipulate your browser but its really a terrible language if you plan to use it like a true programming language.
I agree with you right up to the end - "like a true programming language". That's a big statement.
My backend turns CRUD calls into JSON that the JavaScript front end must then translated into DOM changes. I'd say that 90% of my UI code is in JS.
When I did my last UI - in VB6 - it was 100% VB6. I got a decade of use out of that app - served me well.
Based on how happy my customers are as I migrate them from VB6 to my new web-app, I've got another decade of happy clients.

Originally Posted by
Niya
Another thing is that I find JavaScript doesn't lend itself well to modularization. Always ends of as bunch of files with a bunch of functions. This can very quickly grow to be unmanageable. I suppose one can use the Visual Studio IDE to mitigate this by utilizing folders and regions and such but the language itself doesn't provide what you need to properly organize code. Its like programming in C(not C++ which has classes).
You mentioned classes and functions and source organization.
Look at this JS code:
Here I am setting a VARIABLE equal to a function. That's a class.
I have variables in that function - they are private.
I have private functions in that function...
Code:
var grid_maker = function () {
var gmOffset = -1;
var gmNameSeq = 0;
var windowOn = false;
var parentInfo = {};
var i_set_current = function (i) {
var intGO = g_objGMaker[gmOffset].parentInfo.baseGO;
g_objGrid[intGO].reader.gminfo.gmcurrent = i;
};
var i_set_showlist = function (b) {
var intGO = g_objGMaker[gmOffset].parentInfo.baseGO;
g_objGrid[intGO].reader.gminfo.needlist = b;
g_objGrid[intGO].reader.gminfo.checkneed = false;
};
var i_set_layout = function () {
var strName = "";
var wesRM = $('#acs-reader-message');
if (i_need_listselect()) {
$(g_objGMaker[gmOffset].gmProperties.strControl).hide();
$(g_objGMaker[gmOffset].gmProperties.strPanel).show();
$(g_objGMaker[gmOffset].gmProperties.strWindow).hide();
wesRM.html('List of filter setups');
$('#acs-filter-new').hide();
$('#acs-filter-refresh').hide();
$('#acs-filter-returnlist').hide();
Now those private functions end with a RETURN statement that GIVES back to the instance of this class a series of METHODS - LOAD:, CREATE:
Code:
}
o.ready = true;
}
return {
load: function (i, o) {
var loadOffset = -1;
var foundFId = false;
for (var j = 0; j < g_objGMaker.length; j++) {
if ((g_objGMaker[j].fid != null) && (g_objGMaker[j].fid == o.fid)) {
foundFId = true;
break;
}
}
.
.
.
},
create: function (s) {
var sName = "";
.
.
.
}
};
};
When you code up JS like this you appreciate why the {} brackets and ; terminators are needed!
When you need this class you make it like this
Code:
var gridworker = new grid_maker();
This allows me to organize my code just like any other higher level language. Basically it's all up to me how I use these concepts.
And don't let me start talking about CLOSURE! You all recently got lambda functions in .Net - that's a taste of how the JS world rocks.