|
Uziel posted:What's the "best" javascript/html IDE right now? I have an upcoming Javascript/HTML5 class starting in a few weeks so I'm looking around. I'm a Visual Studio person and I think Jetbrains is awesome but I see that they have WebStorm for $29 under academic. Is this the best option or is there something out there free that will suit my needs? You could use Visual Studio to debug javascript in IE if you want. IDEs in JS dev aren't as important/useful as they are for other languages. The best tools and debuggers are built into the browsers themselves.
|
# ? Sep 14, 2013 16:44 |
|
|
# ? May 29, 2024 13:54 |
|
akadajet posted:You could use Visual Studio to debug javascript in IE if you want. IDEs in JS dev aren't as important/useful as they are for other languages. The best tools and debuggers are built into the browsers themselves.
|
# ? Sep 14, 2013 16:48 |
|
Uziel posted:What's the "best" javascript/html IDE right now? I have an upcoming Javascript/HTML5 class starting in a few weeks so I'm looking around. I'm a Visual Studio person and I think Jetbrains is awesome but I see that they have WebStorm for $29 under academic. Is this the best option or is there something out there free that will suit my needs? the jetbrains javascript editor is hands-down the best i've found.
|
# ? Sep 14, 2013 22:21 |
|
Uziel posted:What's the "best" javascript/html IDE right now? I have an upcoming Javascript/HTML5 class starting in a few weeks so I'm looking around. I'm a Visual Studio person and I think Jetbrains is awesome but I see that they have WebStorm for $29 under academic. Is this the best option or is there something out there free that will suit my needs? Jetbrains it pretty good, in my experience. You even have the option of using JSLint and JSHint, which you should get in the habit of using. JSLint is probably a bit too opinionated, but I've already become accustomed to it so I don't mind that much. JSHint is far more lenient w/r/t formatting and such, but will still catch scoping errors and other actual errors. With large files (like the 5452 line monstrosity I'm refactoring right now), it becomes really slow with some operations e: Uziel posted:Yeah I just want to broaden my experiences a bit. I currently use Visual Studio and and the browser's tools for debugging at work and a few personal projects but I want to move out of my comfort zone some and try something new that isn't Notepad++/notepad. I know I won't get away from the browser tools for debugging though. Notepad++ it okay for Javascript development, but again, install the JSLint plugin.
|
# ? Sep 14, 2013 22:37 |
|
A lot of hipsters have been using https://c9.io for JavaScript development, and I find that it works ok for free. Of course you need internet access to use it. I guess it's more geared towards Node.js development too, but it works for vanilla JavaScript/HTML5.
|
# ? Sep 15, 2013 02:46 |
|
Sublime Text 3 all the way baby. Make sure to install Package Control and browse around the repo for cool things to install. ST + Package Control is crazy powerful and pretty to boot. ST asks you to buy a license every couple times you save a file. Unlimited trial and not crippled in any way, though. It's a great piece of software and well worth the $70 I paid for it. As already suggested, for JS, make sure to install a good linter. I use the Sublime Linter package. It defaults to using JSHint. (Note that it needs to be installed manually for ST3.) Oh, and don't forget to install nodejs if you don't already have it. edit: VVVV Snippets are the poo poo. I'm embarrassed to say I just started using them a few weeks ago - only took me a year. jkyuusai fucked around with this message at 04:01 on Sep 15, 2013 |
# ? Sep 15, 2013 03:19 |
|
Sublime with emmett and jshint is great, especially if you do much jquery mobile stuff like I do where you use a lot of snippets over and over again.
|
# ? Sep 15, 2013 03:31 |
|
Snippets are great in Sublime Text but I wish I had more control over them. As is it's loading about 200 snippets for JS where I only would really need about 10. Gets sort of annoying.
|
# ? Sep 15, 2013 05:28 |
|
Thanks all for the suggestions, I had forgotten entirely about the existence of linters!
|
# ? Sep 15, 2013 13:55 |
|
I have a client that wants me to develop a "storyboard" type application that allows a customer to sketch, write notes, and add pictures so they can better express what they are looking for. I've come across a couple sketching libraries like wPaint, Sketch.js, and jqScribble that look interesting. I'm curious if there are any other drawing/sketching libraries that are worth considering for this project?
|
# ? Sep 17, 2013 00:25 |
|
I don't know of any particular libraries, but I do know that canvas is really easy to work with if you decide to roll your own. You just have to give the finger to IE8 (excanvas works, but gently caress me it's slow and would be horrible with mouse events for drawing).
|
# ? Sep 17, 2013 00:35 |
|
Chenghiz posted:What kind of web apps do you guys use MVCs for? http://noted.herokuapp.com/ this is an app I made to learn Ember. It made it easy to architect it like a desktop app - everything is just magically wired together. Sometimes the magic breaks horribly, but it's good until then. Currently, I'm using Ember to work on a big ol' table-based admin panel with sorting/filtering/pagination/etc. Ember's made it easy to structure all of this in general ways, and lessened the amount of explicit wiring up of components. At the same time, it's harder to write abstracted magic than a bunch of manual boilerplate, so I don't know if I'm really doing it any faster. Sure as hell having more fun doing it, though. I use Angular occasionally, too. I made this in it, which is just directives, but I used it more fully at work for a while. If nothing else, directives are awesome. A general personal rule of thumb is that if the project doesn't involve client side routing, Angular is a good choice. Ember's router is incredibly robust, and makes it easy to make real, URL-driven web apps, whereas I've heard nothing but horror stories about Angular's routers (yes, plural - there's a built-in one and ui-router, which is supposed to be better). Still, the lack of a separate data layer (just $.ajax your poo poo into $scope, no model definitions required) and the lack of required build tooling (unlike Ember, which really needs template compilation among other things) make it easy to integrate into existing, primarily server-side projects. And use Backbone if you hate yourself or if you're really against the concept of opinionated libraries. The only happy Backbone users I know have developed their own libraries on top of it. I've been interviewing at a company that uses it with their own, custom-developed view layer, which just seems to me to do the same poo poo Angular directives or Ember views/components do out of the box. Backbone is seriously the worst of both worlds. I've been thinking of making a "bleeding-edge front-end development" thread, covering stuff like JS MVC frameworks, build tools, etc. abraham linksys fucked around with this message at 07:09 on Sep 17, 2013 |
# ? Sep 17, 2013 07:05 |
|
I have this idea festering, but it needs me to write javascript that generates javascript. Is there anything that would facilitate such a thing, or am I looking at a lot of escaping and string concatenation?
|
# ? Sep 17, 2013 07:20 |
|
FeloniousDrunk posted:I have this idea festering, but it needs me to write javascript that generates javascript. Is there anything that would facilitate such a thing, or am I looking at a lot of escaping and string concatenation? escodegen is pretty rad.
|
# ? Sep 17, 2013 07:32 |
|
abraham linksys posted:I made this in it, which is just directives, but I used it more fully at work for a while. Just so you know, the fontawesome files on that site aren't loading on FF Nightly 26.0a1. abraham linksys posted:I've been thinking of making a "bleeding-edge front-end development" thread, covering stuff like JS MVC frameworks, build tools, etc. I'd be interested in this. I have very little experience with JS MVC frameworks and would like to see what other people have done/can do with them.
|
# ? Sep 17, 2013 14:29 |
|
Bognar posted:I don't know of any particular libraries, but I do know that canvas is really easy to work with if you decide to roll your own. You just have to give the finger to IE8 (excanvas works, but gently caress me it's slow and would be horrible with mouse events for drawing). I'll take a look at that. I think I'd still rather use an existing jQuery library or plugin, but it's good to have that as an option.
|
# ? Sep 17, 2013 21:16 |
|
FeloniousDrunk posted:I have this idea festering, but it needs me to write javascript that generates javascript. Is there anything that would facilitate such a thing, or am I looking at a lot of escaping and string concatenation? I don't know about that crazy parser codegen thing, but if you end up needing to concat a shitload of strings, the best way is to make an array and .push() them on, then .join() the array when you are done. You could use eval to run a string of code but another option would be converting your script to base64 and setting it as a data:uri for the src attribute in a dynamically created <script> tag. This might play better with debugging/line numbers compared to eval, but I haven't tried data:uri on javascript source, only images.
|
# ? Sep 17, 2013 22:03 |
|
peepsalot posted:I don't know about that crazy parser codegen thing, but if you end up needing to concat a shitload of strings, the best way is to make an array and .push() them on, then .join() the array when you are done. Yeah, though the codegen thing does look interesting for something deeper, I'm basically just wanting to plug values into a template to generate a bookmarklet (so I don't even have to eval() it, just set the src of an <a> tag and say "drag me to your bookmarks bar"). But I would be interested in making the bookmarklet code somewhat obfuscated as well. I guess I could write the template with placeholders, obfuscate, then replace the placeholders when the time comes. Still on the same festering idea, if I want to pop up a dialog on *any* webpage via HTML injection from a bookmarklet, what would be a good way to ensure a consistent set of styles? I'm sort of doing this at the moment: code:
|
# ? Sep 18, 2013 06:12 |
|
Make your pop-up be an iframe, then you can write whatever you want into it and it won't be affected by styles on the containing page.
|
# ? Sep 18, 2013 06:50 |
|
abraham linksys posted:And use Backbone if you hate yourself or if you're really against the concept of opinionated libraries. The only happy Backbone users I know have developed their own libraries on top of it. I've been interviewing at a company that uses it with their own, custom-developed view layer, which just seems to me to do the same poo poo Angular directives or Ember views/components do out of the box. Backbone is seriously the worst of both worlds. I started a new job in May and had to learn Backbone on the job. I will agree that it requires a lot of work to do things that would be simple in other libraries. Marionette really helps with views. If I was going to start a new project from scratch, I probably would try out Ember or Angular, but at this point I'm really glad I've learned Backbone. Please start that bleeding edge thread. If you don't, I will.
|
# ? Sep 18, 2013 14:11 |
|
Chenghiz posted:What kind of web apps do you guys use MVCs for? Addy Osmani has addressed many of these things in this article. http://coding.smashingmagazine.com/2012/07/27/journey-through-the-javascript-mvc-jungle/ ("Frameworks: When To Use What?" and onward is probably most relevant to you)
|
# ? Sep 18, 2013 18:54 |
|
Speaking of Backbone (and other such libraries, but Backbone is the only I've used): How should I separate view data from server data? If I have a view such as this (rendered as HTML): HTML code:
And the user has selected the first two values (and not set programmatically, just set to "selected" to illustrate the point). Then some refresh script in the background updates the model, with JavaScript code:
If the answer is "don't use Backbone", then what should I use?
|
# ? Sep 18, 2013 21:00 |
|
hedgecore posted:Addy Osmani has addressed many of these things in this article. Ah thanks, I remember reading that a while ago and I guess I didn't retain much of it.
|
# ? Sep 19, 2013 01:35 |
|
I need to tell when a page changes content. Specifically, on this site I need to know when somebody's looking at a product page like this so I can call a certain function. Should I attach a handler to a certain event, like document.onchange or whatever, or should I just have a function running every few hundred milliseconds looking for a product page element? The latter option is simpler, but seems unprofessional for some reason.
|
# ? Sep 19, 2013 02:05 |
|
darthbob88 posted:I need to tell when a page changes content. Specifically, on this site I need to know when somebody's looking at a product page like this so I can call a certain function. Should I attach a handler to a certain event, like document.onchange or whatever, or should I just have a function running every few hundred milliseconds looking for a product page element? The latter option is simpler, but seems unprofessional for some reason. Please do not attempt to do the latter. Your urls both link to the same place, but I think I get the idea. I think you'll want to look for hashchange events on the document. You should be able to attach a function that listens for whenever there's a hashchange and fires itself.
|
# ? Sep 19, 2013 03:17 |
|
smug forum rear end in a top hat posted:Please do not attempt to do the latter. Your urls both link to the same place, but I think I get the idea. I think you'll want to look for hashchange events on the document. You should be able to attach a function that listens for whenever there's a hashchange and fires itself. I noticed the URL problem a bit after writing that post. Apparently the site only has one page, and loads all content dynamically through either iphonenav.js or mobile.js, I think the latter. That's useful for me because I'd only have to download jQuery once but on the other hand I have to check periodically for changes in content.
|
# ? Sep 19, 2013 03:31 |
|
I wrote a thread about modern front-end development! It is here.
|
# ? Sep 19, 2013 20:47 |
|
I have a design question for google maps api v3. Currently I am developing a google maps visualization to be placed ontop of some reporting software. So essentially end users will run a report which contains US states, and then they receive a google map with those states plotted out in polygons. Now the problem comes when they try to view the report at a lower level such as zip code or county, this will cause a large number of polygons to render. Now it has to be dynamic in the fact that I have to render the data that is returned, for example they can filter to specific states or zipcodes. Question: What would be the fastest way to perform this. Currently my polygons are stored as json objects which contain lat/long arrays. I have though about a few options. 1. Prebuild the javascript objects for each row in the database, for example parse the json and turn it into an entire google v3 api polygon in javascript Nevatives: if there are a large # lat/long the column may be too long 2. Keep as Json and parse out the lat/long on runtime for each record 3. ????
|
# ? Sep 20, 2013 21:18 |
Hi gang, I need to improve my JS/jQuery skills so I thought I'd start a dumb sideproject in order to do so. Come pay a visit and lend me some friendly advice so I can improve.
|
|
# ? Sep 25, 2013 19:34 |
|
Is there an easy way to find the index of an object in an array of objects in JS? I am trying to avoid an extra library to add in but if I have to I will (looking at underscore). For example code:
IndexOf does not work for this correctly it would seem.
|
# ? Sep 25, 2013 21:23 |
You could just look at the source for _.isEqual and then use that as a comparator (without invoking the whole _ library). might have to write a loop for the array though, idk if indexOf takes a comparator
|
|
# ? Sep 25, 2013 21:32 |
|
A MIRACLE posted:You could just look at the source for _.isEqual and then use that as a comparator (without invoking the whole _ library). might have to write a loop for the array though, idk if indexOf takes a comparator Or _.findWhere. Underscore is pretty great, though.
|
# ? Sep 25, 2013 22:11 |
|
Yah I had to do a loop, would prefer a pre-made function, but I guess I will roll my own out of this, still easier than the standard functions.code:
|
# ? Sep 25, 2013 22:29 |
|
Sylink posted:Yah I had to do a loop, would prefer a pre-made function, but I guess I will roll my own out of this, still easier than the standard functions. code:
|
# ? Sep 26, 2013 01:17 |
|
I have kind of a weird issue. I have a function that's intended to validate a form before sending it off. The code looks like this:code:
|
# ? Sep 27, 2013 00:27 |
|
You don't have any chained ifs there. Only the last condition failing will result in the form not submitting, not any of them but the first.
|
# ? Sep 27, 2013 01:10 |
|
Plorkyeran posted:You don't have any chained ifs there. Only the last condition failing will result in the form not submitting, not any of them but the first. I've been staring at this too long, I was missing the forest for the trees. Thank you!
|
# ? Sep 27, 2013 01:15 |
|
A MIRACLE posted:You could just look at the source for _.isEqual and then use that as a comparator (without invoking the whole _ library). might have to write a loop for the array though, idk if indexOf takes a comparator You can also use a custom build of Lo-Dash to get only the module(s) your project requires.
|
# ? Sep 27, 2013 09:46 |
Apologies for the question as it may take a bit of code reading, but if anyone's up for it: https://github.com/persepoliz/ascii-timewaster/blob/master/js/game.js The object TerrainObj has a method, load_terrain. Originally, instead of declaring the locally scoped variable terrain, then assigning the result to TerrainObj.terrain, I just set it to the variable this.terrain. For some reason, even though the load_terrain method is invoked, and locally this.terrain is populated, when I went to reference it later as TerrainObj.terrain, it would be an empty array, as it was originally initialized in the object literal notation. The only way I could "force" TerrainObj.terrain to be populated is to explicity state it as I have done in the code you see. So for some reason, outside of the method, any assignment has been ignored or overriden by the OLN definition above. I am probably misunderstanding the purpose of "this", but I assumed that since load_terrain is a method of TerrainObj, then invoking this.terrain would indeed reference TerrainObj.terrain. I am confused, because another method in TerrainObj, generate_display_layer, populates an attribute using "this" without any problems. Thoughts? o.m. 94 fucked around with this message at 11:04 on Sep 29, 2013 |
|
# ? Sep 29, 2013 10:57 |
|
|
# ? May 29, 2024 13:54 |
|
oiseaux morts 1994 posted:Apologies for the question as it may take a bit of code reading, but if anyone's up for it: If you're referring to line 93, it's because "this" refers to the context of the $.ajax callback.
|
# ? Sep 29, 2013 14:00 |