Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Enterprise Javascript is... (enterprise-js.com)
127 points by dansingerman on Oct 19, 2010 | hide | past | favorite | 51 comments


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.


If you want to help promote better JS documentation, see http://promotejs.com where we are organizing an organic deep backlinking campaign to the proper MDN documentation. Results have already been made and can be tracked at http://arewefirstyet.com For further details see, http://voodootikigod.com/jsconf-eu-2010-speech


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.


Press the fork button and your wishes can be reality.


I had the same thought when I saw this yesterday. HN users should all fork it and add at least one good practice each.


I don't really see how this snobbery helps anyone. Just serves to alienate those who aren't "in the know" without offering any resources to help them.


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?


I think snobbery about "Enterprise Solutions" that cost £££$$$ is just fine.


Pounds of dollars?!

Heavy.


From the readme file on GitHub.

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.


think or thick?


This one is best: http://enterprise-js.com/16


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.


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.


Not to mention, the next library you load will clobber the `com` variable.


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.


Still, two levels of namespaces are more than enough.


Feels like Google's Closure Library.


Closure doesn't do it that way, and the Closure Compiler will collapse the namespacing so that it doesn't result in runtime overhead.


Also, YUI.


YUI2. yui3 is considerably more sane about the namespacing.


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..."


Enterprise Javascript is making blanket statements about the coding styles of some fictitious out group in order to attract attention to yourself.


The text is so huge and stretched that it is hard to read. The code is so small and uses such a bad colour scheme that I often cannot read it.

Your CSS3 is "using every feature available because you can"?


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.


And the "cool" way is to fail on URL encoding?

http://i.imgur.com/hUtkJ.png


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.


Wish there was a "refresh" link that would reload the "tip" via XHR, so I wouldn't have to hit F5 (wasn't even sure there are more the first time)


You can click on the "enterprise ___ IS:" bit to refresh. Not particularly intuitive.


You can cheat and get them all on on page by reading the source here: http://github.com/bentruyman/enterprise-js/blob/master/tips....


It wouldn't be enterprise if they did that.


I might just add this feature. Although, it'd work over websockets/Flash/Comet.



I really like the idea of handling submissions from readers by telling people to fork the github and then send a pull request... so simple.


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 this is a joke, then it's a riot. Else do not read into this, this is not javascript.


The most needed one is enterprise-java.com, so you can program like people do at Oracle.


Seems as though someone just registered that domain...feel free to fork.


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.


In a similar vein I also like http://twitter.com/enterprisey


Obviously it's not convention in Javascript, but this is the convention in Haskell and I quite like it.


What are you talking about?


Probably the initial-comma one - the page doesn't make it easy to see that there is more than one joke on refresh.


Initial comma actually is a good idea. It means that when you edit the list and add another on the end, you're less likely to forget the comma.


Yikes. That hits a little too close to home.


i so hope this is all jokes


This is "Enterprise"!. It's a very nice collection indeed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: