It seems to me that the creator of this does not know much about work organization in big companies. All those things that makes no sense when you are coding alone, make a lot of sense, and can save a lot of time, when many programmers are working on the same project and when often somebody new is joining and need to be able to start coding without asking everyone around what is what.
From the webpage:
function createInformationWindow(message){
alert(message);
}
IMHO, this function does make a lot of sense. You learn it when the client decides info window must by pinky blinky cute. And so on.
Usage shown in example is stupid.
However to present this approach as antipattern is also stupid.
If "enterprise" means even moderately big apps namespacing is the way to go.
Alas, that project mocks too much useful stuff to be liked by me.
That's the first example I got when loading the page, and that's exactly what I thought: for big projects namespacing seems sensible enough. So I thought the site was a collection of design patterns, rather than anti-patterns.
Left me very confused when the next example was declaring all your functions globally.
Namespacing seems fine, but to torture the declaration syntax as shown on the site in order to get the Java-like com.domain.package.class.method() syntax is wrong. Just use underscores in the name rather than periods and use the syntax properly.
I'm bothered that when I saw the code on http://enterprise-html.com for rounded corners, the first thing I thought was "You forget to set cell spacing, padding, and borders..."
I wish they included the right way to do the stuff. Then it would be fun and useful too, and that would be a great way to teach best practices and coding techniques.
For a project that's trying to improve documentation and documentation visibility, arewefirstyet.com is a pretty horrible site. I had no idea what was going on until I read the jsconf speech. Also, (this is nitpicky, but) you might want to reverse the vertical axis of your graph to emphasize that #1 is a good thing (and make the range 1-250, not 0-250).
Of course, if you only want 'insiders' looking at arewefirstyet.com, then what I said doesn't matter.
I'm fairly sure things on the internet are still allowed to be fun if the publisher so desires.
It certainly beats another "You are a bad programmer but..." submissions which are tiresome in the extreme for their general self-serving and contrived examples/advice.
> I don't really see how this snobbery helps anyone
I find your lack of humor, amusing. Practically, it makes people laugh which I'msure if I bothered to look I could find some study that shows laughing reduces stress. It provides relief from dreary, serious business, grumple heads like you.
I meant how does it advance JavaScript? How does it make JS developers look to the outside world? Is it really cool to laugh at people who don't know better?
Seems like a great way to run a hacker specific news site.. that way only people who understand things like git and github would be able to submit stories :)
If you're someone that runs an enterprise-level website (>100 hits per day), you've probably had to deal with the pains of scaling and maintaining your code.
Enterprises have dealt with these problems for years -- this is an attempt at gathering all of that knowledge and to share it with the world.
I realize things are a little different in JS, but when you're working on a massive product with a small team, no matter how great the code is, eventually you learn that the variables DO have to be descriptive and properly organized namespaces ARE very important.
Many of these conventions evolved, in my opinion, because it's difficult to create large applications, period. No matter how much effort you put into abstracting everything and modularizing components into smaller components.
Anyway, these were the only ones that I thought were a little out of place.
I spent a summer interning at a large financial data company, and I was surprised to see javascript was used quite a bit internally, so I can attest that "enterprise javascript" really does exist.
My coworkers wrote very good code, however the quality of my JS was terrible. Of course. I only knew C++ and Java at the time, so I treated javascript like it was "Java without types"
I would probably bet most people approach JS like that. Which is probably related to the fact that there is so much bad javascript. People who don't really learn the language and just assume that they know [insert-statically-typed-language-here] and therefore can program javascript.
Indeed. Javascript: The Good Parts is a good book for getting past that stage. I feel like I'm finally learning JS, after having used it for years amateurishly, and it's becoming one of my favorite languages.
I really hope the recommended method of suggesting tips (fork, modify, pull request) and the overcomplicated backend (complete with four dependencies!) is an attempt at meta-humor. Maybe we need an opensource-js.com.
54 comments
[ 22.6 ms ] story [ 1221 ms ] threadFrom the webpage:
function createInformationWindow(message){ alert(message); }
IMHO, this function does make a lot of sense. You learn it when the client decides info window must by pinky blinky cute. And so on.
http://github.com/n1k0/enterprise-js/blob/master/tips.js
Left me very confused when the next example was declaring all your functions globally.
Of course, if you only want 'insiders' looking at arewefirstyet.com, then what I said doesn't matter.
Heavy.
It certainly beats another "You are a bad programmer but..." submissions which are tiresome in the extreme for their general self-serving and contrived examples/advice.
I find your lack of humor, amusing. Practically, it makes people laugh which I'msure if I bothered to look I could find some study that shows laughing reduces stress. It provides relief from dreary, serious business, grumple heads like you.
Your CSS3 is "using every feature available because you can"?
http://i.imgur.com/hUtkJ.png
If you're someone that runs an enterprise-level website (>100 hits per day), you've probably had to deal with the pains of scaling and maintaining your code.
Enterprises have dealt with these problems for years -- this is an attempt at gathering all of that knowledge and to share it with the world.
The sarcasm is so think I can almost taste it.
Many of these conventions evolved, in my opinion, because it's difficult to create large applications, period. No matter how much effort you put into abstracting everything and modularizing components into smaller components.
Anyway, these were the only ones that I thought were a little out of place.
My coworkers wrote very good code, however the quality of my JS was terrible. Of course. I only knew C++ and Java at the time, so I treated javascript like it was "Java without types"