7 ms·
Enterprise Javascript is...
- jrmxrf 16y agoIt 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.
- ranza 16y agoi so hope this is all jokes
- aliem 16y agoThis is "Enterprise"!. It's a very nice collection indeed.
- CWIZO 16y agoWish 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)
- mgkimsal 16y agoIt wouldn't be enterprise if they did that.
- aik 16y agoYou can click on the "enterprise ___ IS:" bit to refresh. Not particularly intuitive.
- kree10 16y agoYou can cheat and get them all on on page by reading the source here: http://github.com/bentruyman/enterprise-js/blob/master/tips.js http://github.com/bentruyman/enterprise-js/blob/master/tips....
- 9ec4c12949a4f3 16y agoI didn't bother with the website, http://github.com/n1k0/enterprise-js/blob/master/tips.js http://github.com/n1k0/enterprise-js/blob/master/tips.js
- bentruyman 16y agoI might just add this feature. Although, it'd work over websockets/Flash/Comet.
- dejv 16y agoThis one is best: http://enterprise-js.com/16 http://enterprise-js.com/16
- dchest 16y agoFeels like Google's Closure Library.
- rimantas 16y agoUsage 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.
- latentflip 16y agoThat'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.
- DougWebb 16y agoNamespacing 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.
- jasonlotito 16y agoI'm bothered that when I saw the code on http://enterprise-html.com http://enterprise-html.com for rounded corners, the first thing I thought was "You forget to set cell spacing, padding, and borders..."
- niyazpk 16y agoI 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.
- weego 16y agoPress the fork button and your wishes can be reality.
- mk 16y agoI had the same thought when I saw this yesterday. HN users should all fork it and add at least one good practice each.
- voodootikigod 16y agoIf you want to help promote better JS documentation, see http://promotejs.com 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 http://arewefirstyet.com For further details see, http://voodootikigod.com/jsconf-eu-2010-speech http://voodootikigod.com/jsconf-eu-2010-speech
- natep 16y agoFor 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.
- user24 16y agoI 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.
- dansingerman 16y agoI think snobbery about "Enterprise Solutions" that cost £££$$$ is just fine.
- 9ec4c12949a4f3 16y agoPounds of dollars?! Heavy.
- weego 16y agoI'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.
- njharman 16y ago> 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.
- user24 16y agoI 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?
- brown9-2 16y agoI really like the idea of handling submissions from readers by telling people to fork the github and then send a pull request... so simple.
- marknutter 16y agoSeems 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 :)
- dansingerman 16y agoIn a similar vein I also like http://twitter.com/enterprisey http://twitter.com/enterprisey
- tszming 16y agoThe most needed one is enterprise-java.com, so you can program like people do at Oracle.
- bentruyman 16y agoSeems as though someone just registered that domain...feel free to fork.
- duairc 16y agoObviously it's not convention in Javascript, but this is the convention in Haskell and I quite like it.
- chc 16y agoWhat are you talking about?
- javanix 16y agoYikes. That hits a little too close to home.
- aw3c2 16y agoThe 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"?
- vital101 16y agoFrom 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.
- fraserharris 16y agothink or thick?
- mavroprovato 16y agoAnd the "cool" way is to fail on URL encoding? http://i.imgur.com/hUtkJ.png http://i.imgur.com/hUtkJ.png
- jdavid 16y agoIf this is a joke, then it's a riot. Else do not read into this, this is not javascript.
- modality 16y agoEnterprise Javascript is making blanket statements about the coding styles of some fictitious out group in order to attract attention to yourself.
- tajddin 16y agoI 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.
- psawaya 16y agoI 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"
- Xk 16y agoI 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.
- psawaya 16y agoIndeed. 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.
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- euphidime 16y agoI 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.