• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Web Design and Development |OT| Pixel perfect is dead, long live responsive design

moniker

Member
You could just change the dependency from Underscore to Lo-Dash in the package.json and do npm install again.

Thanks for the answer. You mean in Backbone's package.json? I don't want to alter npm installed modules since they're not going to be part of my repo (that wouldn't make much sense).

I found this blog post about replacing module dependencies with the browserify-swap transform, but I can't get it to work. Maybe something has changed since then.

For now I think I'm just going to manage Backbone manually in my repo and override Underscore in the browser field in my package.json.

Anyway, thanks again.
 

maeh2k

Member
Repost for new page:

Do any of you use services like Visual Website Optimizer, Optimizely, ABTasty, Adobe Test&Target?

If so, what are your experiences with them? Which have you tried and which do you like best? Any issues?
How do they impact performance? Can they cause rendering issues (e.g. on mobile devices)?

I'm evaluating using on of these services for a mid-size ecommerce website. So far they haven't done a lot of A/B-Testing and I think there might be some potential there.
 
Thanks for the answer. You mean in Backbone's package.json? I don't want to alter npm installed modules since they're not going to be part of my repo (that wouldn't make much sense).

I found this blog post about replacing module dependencies with the browserify-swap transform, but I can't get it to work. Maybe something has changed since then.

For now I think I'm just going to manage Backbone manually in my repo and override Underscore in the browser field in my package.json.

Anyway, thanks again.
What's the issue you are running to with browserify-swap? I haven't tried it myself but it should work I guess
 

moniker

Member
What's the issue you are running to with browserify-swap? I haven't tried it myself but it should work I guess

I didn't research it too much but when setting it up exactly as outlined in the post, Backbone still used Underscore. No errors or anything like that when bundling, it just didn't make any difference.

I'm leaving it for now, I've already spent way too much time on this :)
 
I'm trying to learn Web Development, and I am just getting my feet wet with design. Can anyone suggest [css/sass/scss and html] tutorial reference for learning and if you guys know any resources for Ruby on Rail recipes for designing different types of websites.
 
I'm trying to learn Web Development, and I am just getting my feet wet with design. Can anyone suggest [css/sass/scss and html] tutorial reference for learning and if you guys know any resources for Ruby on Rail recipes for designing different types of websites.

RailsCasts are a great resource for learning different aspects of Rails. If you're just getting started with Rails, the official docs are also very helpful.
 
Have a syntax question guys and maybe you can help me out! I'm looking through someone else's code on our team at a form he made, and he has an input like so

<input type="email" value="Email address" onfocus="(this.value == 'Email address') && (this.value = '')" onblur="(this.value == '') && (this.value = 'Email address')" class="form-control">

I'm confused as to what the bold part does...I get what onfocus and onblur are for, but what does the && (this.value== '') mean?
 
Have a syntax question guys and maybe you can help me out! I'm looking through someone else's code on our team at a form he made, and he has an input like so



I'm confused as to what the bold part does...I get what onfocus and onblur are for, but what does the && (this.value== '') mean?

The default value is 'Email address' and gets wiped when you click on the field. If you leave it blank and click away it fills the field with the text 'Email address' again.
 
The second part doesn't use double equals signs.

Code:
(this.value == 'Email address') && (this.value = '') [B]//If value equals 'Email address' set value to [/B]''

Ahhh, now I understand. That's a weird way to do if statements (I'm not entirely familiar with the syntactical quirks of javascript). Thanks!
 

Ultimatum

Banned
Is it worth using a CMS if I don't plan to produce any content? I just need a robust backend for user accounts, but backend dev isn't my strong point so I don't know much about that stuff. I don't have much database experience either, so I've been thinking about using a CMS system, but what are their limitations like?

Project I'm working on pulls data on a user from multiple sources and provides analysis on that data, just not sure where to start with it... Would appreciate any tips
 

BaBaRaRa

Member
Yeah, I know placeholder. It's weird why it was done this way, but then again, I didn't right the code

Placeholder wasn't widely supported until a few years ago. It's not uncommon to see these horrible inline hacks still lying around for that reason.

Even now some people insist on this if a large portion of their audience use legacy browsers.


Is it worth using a CMS if I don't plan to produce any content? I just need a robust backend for user accounts, but backend dev isn't my strong point so I don't know much about that stuff. I don't have much database experience either, so I've been thinking about using a CMS system, but what are their limitations like?

Project I'm working on pulls data on a user from multiple sources and provides analysis on that data, just not sure where to start with it... Would appreciate any tips

So would you say that 'users' are your content?
 
Grr, can anyone help me here? I'm trying to use the html5 form validation with jquery for form submission. So I read if I use bind for the "submit" even it will only trigger after the form is valid. The thing is, i can never get it to work. What's weird is the click even works

I basically have

Code:
$(function() {
       $('#login-form input[type=submit]').on('submit', function(event) {
		event.preventDefault();
		console.log('submitted');
	});
	
	$('#login-form input[type=submit]').bind('click', function(event) {
		console.log('submit clicked');
	});
})

But for some reason the submit event is never fired and it just reloads the page or does whatever the default submit does. Is there a typo somewhere? I don't see any errors in the console. I even tried .submit(function()... and that didn't work either
 

Maiar_m

Member
Grr, can anyone help me here? I'm trying to use the html5 form validation with jquery for form submission. So I read if I use bind for the "submit" even it will only trigger after the form is valid. The thing is, i can never get it to work. What's weird is the click even works

I basically have

Code:
$(function() {
       $('#login-form input[type=submit]').on('submit', function(event) {
		event.preventDefault();
		console.log('submitted');
	});
	
	$('#login-form input[type=submit]').bind('click', function(event) {
		console.log('submit clicked');
	});
})

But for some reason the submit event is never fired and it just reloads the page or does whatever the default submit does. Is there a typo somewhere? I don't see any errors in the console. I even tried .submit(function()... and that didn't work either

Not too sure about the whole process, but I'm pretty sure you can't use "submit" on an input. Just target the whole form.

Code:
$('#login-form).on('submit', function(event){
  // Your code
});
 

Tathanen

Get Inside Her!
Grr, can anyone help me here? I'm trying to use the html5 form validation with jquery for form submission. So I read if I use bind for the "submit" even it will only trigger after the form is valid. The thing is, i can never get it to work. What's weird is the click even works

I basically have

Code:
$(function() {
       $('#login-form input[type=submit]').on('submit', function(event) {
		event.preventDefault();
		console.log('submitted');
	});
	
	$('#login-form input[type=submit]').bind('click', function(event) {
		console.log('submit clicked');
	});
})

But for some reason the submit event is never fired and it just reloads the page or does whatever the default submit does. Is there a typo somewhere? I don't see any errors in the console. I even tried .submit(function()... and that didn't work either

Bind is just an old version of "on," you shouldn't be using both of them. And do what Maiar_m said, bind to the form submit action instead.

Validation parsing isn't automatic, unless you're using HTML validation attributes, like "required" and HTML5 input types. In theory if those are invalid they'll stop the form submission event from firing in modern browsers, but they won't stop a click event on a button.
 
Just go to straight to the docs, it's written pretty clearly in there:

This method is a shortcut for .on( "submit", handler ) in the first variation, and .trigger( "submit" ) in the third.

The submit event is sent to an element when the user is attempting to submit a form. It can only be attached to <form> elements. Forms can be submitted either by clicking an explicit <input type="submit">, <input type="image">, or <button type="submit">, or by pressing Enter when certain form elements have focus.

http://api.jquery.com/submit/

Also, .bind() is roughly equivalent version of .on(), but since the introduction of .on() in version 1.7, .on() is always the preferred markup.

edit: beaten by Tathanen
 
Ah, thanks Maiar_m. It's exactly as you said. I was binding the event to the button instead of the form. Such a dumb mistake. Thanks for all the other suggestions guys. I'll try using on instead of bind
 
Good thing I found this thread. Was about to make a new thread for a really simple/stupid question. I want to use WordPress to make a blog. Gonna take a stab at reviewing video games and see how I do. I'm not a web designer--although I know HTML, CSS, JavaScript, jQuery--and the whole web host bit has me confused. To some extent, I don't really even know what a web host is, although I guess I can read up on that in no time.

Which web host is the best for WordPress? I know already to steer clear from GoDaddy. (Although GoDaddy is a domain host? is there a difference? Eh I'm confused.) Again my intention is to write game reviews, maybe cover gaming related things in general. Don't expect much traffic at all and don't plan to implement any sort of taxing features. So which host is best? Do we look at performance? Price? Features? I don't even know what features to look for, or what good performance is when dealing with web hosts.

Any advice you guys can give would be greatly appreciated. Thanks!
 

ShadiWulf

Member
Good thing I found this thread. Was about to make a new thread for a really simple/stupid question. I want to use WordPress to make a blog. Gonna take a stab at reviewing video games and see how I do. I'm not a web designer--although I know HTML, CSS, JavaScript, jQuery--and the whole web host bit has me confused. To some extent, I don't really even know what a web host is, although I guess I can read up on that in no time.

Which web host is the best for WordPress? I know already to steer clear from GoDaddy. (Although GoDaddy is a domain host? is there a difference? Eh I'm confused.) Again my intention is to write game reviews, maybe cover gaming related things in general. Don't expect much traffic at all and don't plan to implement any sort of taxing features. So which host is best? Do we look at performance? Price? Features? I don't even know what features to look for, or what good performance is when dealing with web hosts.

Any advice you guys can give would be greatly appreciated. Thanks!

All low cost hosting is shared hosting, which is all you need for now. For shared hosting the best thing you can do is try and Google stuff related to the best hosts, but it's kind of hard because there is a lot of spam results. I'd recommend avoiding Godaddy for everything, your choice though. I use Namecheap for domains and my hosting is hostgator, and I find hostgator to be really good, even if its a tiny bit more expensive then other hosts. Their performance is good. I've worked on websites with hosting plans on other hosts before and they tend to be slower then hostgator from what I've noticed. Is just my personal opinion though.

If you know HTML/CSS/JavaScript and don't want to design your own theme, you should have no issue buying an existing premium wordpress theme and altering it. I'd recommend buying one because better support and everyone uses the free themes. Well, i mean, everyone uses the paid themes too, but not as much of everyone.
 

BaBaRaRa

Member
Good thing I found this thread. Was about to make a new thread for a really simple/stupid question. I want to use WordPress to make a blog. Gonna take a stab at reviewing video games and see how I do. I'm not a web designer--although I know HTML, CSS, JavaScript, jQuery--and the whole web host bit has me confused. To some extent, I don't really even know what a web host is, although I guess I can read up on that in no time.

Which web host is the best for WordPress? I know already to steer clear from GoDaddy. (Although GoDaddy is a domain host? is there a difference? Eh I'm confused.) Again my intention is to write game reviews, maybe cover gaming related things in general. Don't expect much traffic at all and don't plan to implement any sort of taxing features. So which host is best? Do we look at performance? Price? Features? I don't even know what features to look for, or what good performance is when dealing with web hosts.

Any advice you guys can give would be greatly appreciated. Thanks!

I'd advise to open an account with http://wordpress.com/.

If you're already confused about web hosts, and simply want to focus on your content, then just get an account with them and start writing. Otherwise you're going to spend a long time worry about web hosts, then getting Wordpress installed with the right plugins, then the monthly maintenance of updates; all time better spent writing and editing.
 
I'd advise to open an account with http://wordpress.com/.

If you're already confused about web hosts, and simply want to focus on your content, then just get an account with them and start writing. Otherwise you're going to spend a long time worry about web hosts, then getting Wordpress installed with the right plugins, then the monthly maintenance of updates; all time better spent writing and editing.

...This confuses me even more. I'm already intending on using WordPress. And plugins I think is something I should look into right away, cause I want to review games a bit differently. Like, I don't want to use a scoring system, but assign badges/trophies on an individual game basis to show what their game offers. Like the "Undying Intrigue" badge, which designates that the game has phenomenal replay value, and other things like that. Don't like scoring systems.

I imagine I'd be able to implement something like that through a plugin of sorts?

So a web host just takes care of my domain for me and my performance? Like it makes sure the site runs smoothly, stores the data, manages email accounts perhaps...? Namecheap will do all that? Does "shared hosting" mean that WordPress and X hosting service share in hosting the back-end of things? Is there a downside to this over non-shared hosting?

Sorry for the noob questions.
 

Somnid

Member
So my company has a client who wanted a complete rebuild (they needed it) but balked at our estimate. They outsourced to India. Fast forward 1.5 years and they've come back unhappy with the work and spent well over our estimate. Codebase includes gems like this:

Code:
var lastName = $($(sender.get_element()).parent().parent().parent().find("input[type=text]")[0]).val();
var firstName = $($(sender.get_element()).parent().parent().parent().find("input[type=text]")[1]).val();
var email = $($(sender.get_element()).parent().parent().parent().find("input[type=text]")[2]).val();
var employeeId = $($(sender.get_element()).parent().parent().parent().find("input[type=text]")[3]).val();
 
So my company has a client who wanted a complete rebuild (they needed it) but balked at our estimate. They outsourced to India. Fast forward 1.5 years and they've come back unhappy with the work and spent well over our estimate. Codebase includes gems like this:

Code:
var lastName = $($(sender.get_element()).parent().parent().parent().find("input[type=text]")[0]).val();
var firstName = $($(sender.get_element()).parent().parent().parent().find("input[type=text]")[1]).val();
var email = $($(sender.get_element()).parent().parent().parent().find("input[type=text]")[2]).val();
var employeeId = $($(sender.get_element()).parent().parent().parent().find("input[type=text]")[3]).val();

Ah, good ol' parent().parent().parent().parent().parent().parent().parent() chains. Thank mr. jQuery chains.
 
Sorry for more noob questions.
So I was invited to Google Domains, and I'm just curious if there's a good reason to separate my domain provider from my server provider. Like, BlueHost was recommended by WordPress, and it includes unlimited emails, subdomains, 1 free domain with the subscription, etc. etc. etc.

Should I want to run my domain through my web host, or is there a good reason to separate the two? IE go Google Domains for my domain and then have BlueHost or whatever other server be my web host.

Thanks for the help...
 
Sorry for more noob questions.
So I was invited to Google Domains, and I'm just curious if there's a good reason to separate my domain provider from my server provider. Like, BlueHost was recommended by WordPress, and it includes unlimited emails, subdomains, 1 free domain with the subscription, etc. etc. etc.

Should I want to run my domain through my web host, or is there a good reason to separate the two? IE go Google Domains for my domain and then have BlueHost or whatever other server be my web host.

Thanks for the help...

I'd keep them seperate because sometimes it can be a hassle to split them apart later should you choose to. But I think the Wordpress.com advice above was strongest, I'd start there with an ordinary Wordpress.com blog.
 

dokish

Banned
Hello GAF. I already built my site with Muse. I just need a free hosting that provides FTP. Suggestions?

I know about squarespace, wordpress etc, but those sites offer the option to upload my own site? I couldn't find it.
 

ShadiWulf

Member
...This confuses me even more. I'm already intending on using WordPress. And plugins I think is something I should look into right away, cause I want to review games a bit differently. Like, I don't want to use a scoring system, but assign badges/trophies on an individual game basis to show what their game offers. Like the "Undying Intrigue" badge, which designates that the game has phenomenal replay value, and other things like that. Don't like scoring systems.

I imagine I'd be able to implement something like that through a plugin of sorts?

So a web host just takes care of my domain for me and my performance? Like it makes sure the site runs smoothly, stores the data, manages email accounts perhaps...? Namecheap will do all that? Does "shared hosting" mean that WordPress and X hosting service share in hosting the back-end of things? Is there a downside to this over non-shared hosting?

Sorry for the noob questions.

Sorry for more noob questions.
So I was invited to Google Domains, and I'm just curious if there's a good reason to separate my domain provider from my server provider. Like, BlueHost was recommended by WordPress, and it includes unlimited emails, subdomains, 1 free domain with the subscription, etc. etc. etc.

Should I want to run my domain through my web host, or is there a good reason to separate the two? IE go Google Domains for my domain and then have BlueHost or whatever other server be my web host.

Thanks for the help...

A web host hosts your website and related files like databases and such, the bigger webhosts also offer domain name service, and there is also domain name services that offer hosting servers. There is a lot of overlapping.

If you are feeling confused by that it might be best to just start a wordpress.com blog for now like others suggested, is a good idea. If you feel you are outgrowing wordpress.com in the future I believe they allow you to export all your data so you can move it over to a standalone wordpress installation.

I don't know if wordpress.com sells domains, but if they don't, namecheap is the perfect place to get one.
 
A web host hosts your website and related files like databases and such, the bigger webhosts also offer domain name service, and there is also domain name services that offer hosting servers. There is a lot of overlapping.

If you are feeling confused by that it might be best to just start a wordpress.com blog for now like others suggested, is a good idea. If you feel you are outgrowing wordpress.com in the future I believe they allow you to export all your data so you can move it over to a standalone wordpress installation.

I don't know if wordpress.com sells domains, but if they don't, namecheap is the perfect place to get one.

Thanks for the explanation. I already had a Google Domain registered, though, so I decided to try HostGator for a month too and see if it's not too difficult for me to manage. I think I understand the purpose of domains and hosts. So domain might be like purchasing land. That's where you'll build, but it's nothing yet. The building is the web content/website itself, and the webhost services and upkeeps that shit, so like utility bills. You could probably come up with a more accurate analogy but that's how I've wrapped my head around it so far.

So I'm running into trouble already over something I'm sure is simple.
Google Domain registration promises 100 email aliases, like blank@mydomain.com. Well HostGator says that I have to change the nameservers on that domain from Google's defaults to their own. The moment I make that change, though, Google says that the 100 email aliases service is no longer available, and that if I want it, I have to keep the default nameservers. But if I want to use HostGator as my webhost to actually build a website, I need to use their nameservers, right? So basically Google Domains isn't doing anything for me? I don't understand this at all. Am I supposed to set up my email accounts through Google Domain or through HostGator? Does that fall under a domain or a webhost issue?

And I'm having trouble installing WordPress already. Geez. HostGator's QuickInstall says that WordPress was successfully installed and that I could login to my dashboard through http://www.mydomain.net/ but when I click it it just says Server Cannot Be Found. Google Domain shows that the DNS is set up to HostGator's own...so I'm not sure why it's not showing up? But then again this stuff is way over my head so maybe I'm missing something obvious.
 
Thanks for the explanation. I already had a Google Domain registered, though, so I decided to try HostGator for a month too and see if it's not too difficult for me to manage. I think I understand the purpose of domains and hosts. So domain might be like purchasing land. That's where you'll build, but it's nothing yet. The building is the web content/website itself, and the webhost services and upkeeps that shit, so like utility bills. You could probably come up with a more accurate analogy but that's how I've wrapped my head around it so far.

So I'm running into trouble already over something I'm sure is simple.
Google Domain registration promises 100 email aliases, like blank@mydomain.com. Well HostGator says that I have to change the nameservers on that domain from Google's defaults to their own. The moment I make that change, though, Google says that the 100 email aliases service is no longer available, and that if I want it, I have to keep the default nameservers. But if I want to use HostGator as my webhost to actually build a website, I need to use their nameservers, right? So basically Google Domains isn't doing anything for me? I don't understand this at all. Am I supposed to set up my email accounts through Google Domain or through HostGator? Does that fall under a domain or a webhost issue?

And I'm having trouble installing WordPress already. Geez. HostGator's QuickInstall says that WordPress was successfully installed and that I could login to my dashboard through http://www.mydomain.net/ but when I click it it just says Server Cannot Be Found. Google Domain shows that the DNS is set up to HostGator's own...so I'm not sure why it's not showing up? But then again this stuff is way over my head so maybe I'm missing something obvious.

You'll need to change the nameservers to HostGator's so when people visit your site, it knows which server to point to.

I haven't used Google Domains, so I can't really give advice but it would probably be best to just call your hosting company and explain the issue to them. I mean, you could try and set the A records and CNAMEs yourself if you can't do nameserver changes, but DNS is something you generally don't want to mess with unless you know what you're doing, since it can take days for changes to propagate and you don't want to f**k up your site.
 

BreakyBoy

o_O @_@ O_o
So I'm running into trouble already over something I'm sure is simple.
Google Domain registration promises 100 email aliases, like blank@mydomain.com. Well HostGator says that I have to change the nameservers on that domain from Google's defaults to their own. The moment I make that change, though, Google says that the 100 email aliases service is no longer available, and that if I want it, I have to keep the default nameservers. But if I want to use HostGator as my webhost to actually build a website, I need to use their nameservers, right? So basically Google Domains isn't doing anything for me? I don't understand this at all. Am I supposed to set up my email accounts through Google Domain or through HostGator? Does that fall under a domain or a webhost issue?

Your earlier analogy was pretty accurate.

As such, you have to remember that Google Domains is serving primarily as your domain name registrar. That basically means that the primary thing you should expect from them is just a place to register your domain name. Any other services they offer above and beyond that is them bleeding into what your hosting provider (i.e. HostGator in your case) offers you.

This includes hosting and email services. As you already noted, what Google Domains offers are free email aliases, which is basically a way to forward emails sent to whatever@yourdomain.com to a Gmail address of your choice. This is an easy way to be able to have any custom email address you want, and it just goes straight to whatever Gmail address you might be used to using. It does not actually function as a real email account that has it's own inbox and ability to send emails. It just passes things along to the Gmail address you chose.

Google Domains does offer some hosting services as an addition to your existing Domains account. They cost extra per month, and go through some third parties like Squarespace & Weebly, and you'll find them in the "Website" section of your domain's management page.

However, if you decide to use a separate hosting provider (i.e. HostGator), then you'll have to give them the information they need to forward your domain requests to their hosting. At this point, it might be helpful to have a better understanding of how these things relate. I'll try and give you the basic gist of it.

As you may or may not know, every device on the internet is identified by an IP address, typically of the form ###.###.###.### (e.g. 173.194.115.2). No one in their right mind wants to type that in, instead of "google.com" though, so that's where domains come in. You need some way, some directory, to be able to translate any user's request for "google.com" and send them over to "173.194.115.2". This is what DNS (Domain Name System) is for, and that's what nameservers do. They point the domain you purchased to the right address.

So, at this point, Google Domains defaults to pointing to its own nameservers. This is fine if you're going to use their hosting services (including the email alias/forwarding service). However, in this case, it seems you want to host your site on HostGator, so you'll have to provide them with the correct HostGator nameserver. So that way when people go to "yourdomain.com", they will get directed to HostGator, and then the HostGator nameserver will go "oh hey, that domain is in this particular location in our network at this ###.###.###.### address".

The end result is, if you want to use Google's hosting/email services, you keep things as is. If you want to use HostGator's services, you change the nameserver for your domain. You can't have both. Not unless you roll your own anyway, and that's a whole lot more complicated than I'm willing to go over before I go to bed.

I've never used HostGator, but if they're not horrible, they should have some form of customer support. Don't be afraid to ask dumb questions. You're paying them for a service. Don't worry, it's not as hard as it seems, but it's also typical to bump into tons of little problems you have to work out. You're doing fine. Good luck.
 
You'll need to change the nameservers to HostGator's so when people visit your site, it knows which server to point to.

I haven't used Google Domains, so I can't really give advice but it would probably be best to just call your hosting company and explain the issue to them. I mean, you could try and set the A records and CNAMEs yourself if you can't do nameserver changes, but DNS is something you generally don't want to mess with unless you know what you're doing, since it can take days for changes to propagate and you don't want to f**k up your site.

[Really helpful information]...

I've never used HostGator, but if they're not horrible, they should have some form of customer support. Don't be afraid to ask dumb questions. You're paying them for a service. Don't worry, it's not as hard as it seems, but it's also typical to bump into tons of little problems you have to work out. You're doing fine. Good luck.

Thank you guys for the help! I contacted HostGator and they just said to wait till the next morning for the servers to propagate, and lo and behold, it's all set up! Get WordPress installed and it shows. :D Gonna start looking into guides and tutorials and whatnot and go from here. I'm sure I'll bother you guys in the future, but I'll try to keep the simple questions/technical issues to customer support.
 

Rich!

Member
I really need to move away from using templates and start coding from scratch.

But it's all so confusing and scary. And it's so strange that I have always shied away from web coding when I have a decent knowledge of C++ and even goddamn ASM.
 

flyover

Member
But it's all so confusing and scary. And it's so strange that I have always shied away from web coding when I have a decent knowledge of C++ and even goddamn ASM.

My wife (who was also no stranger to other kinds of coding) felt the same. She used Codecademy (http://www.codecademy.com/) as a springboard to doing other web stuff. There are plenty of other sites and books to get you started, but for someone who was kind of intimidated by the thought of just getting started, it was totally the way to go for her.

I would just try that, do the bite-sized exercises and projects there, and see if you want to progress beyond it.
 
Top Bottom