Club PA 2.0 has arrived! If you'd like to access some extra PA content and help support the forums, check it out at patreon.com/ClubPA
The image size limit has been raised to 1mb! Anything larger than that should be linked to. This is a HARD limit, please do not abuse it.
Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!

[Programming] Thread: Fixed last bug in 5 month thread

194959698100

Posts

  • InfidelInfidel Heretic Registered User regular
    What's that, ES6? You cache the "import blah from 'blah'" so when I use that multiple times and just do a "export default new blah()", that same object reference is given to all importers and I get singletons for free?

    Thanks ES6, you're the best.

    OrokosPA.png
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
    ecco the dolphinGnomeTank
  • NogsNogs Crap, crap, mega crap. Registered User regular
    es6 is a pretty huge upgrade for sure.

    hell es6 makes JS feel like almost a completely different language. especially if you use babel to implement some of the proposed es7 ideas.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • InfidelInfidel Heretic Registered User regular
    We are running babel with -stage 0.

    Where we're going, we don't need roads.

    OrokosPA.png
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
    Nogs
  • NogsNogs Crap, crap, mega crap. Registered User regular
    i will say though,

    i don't think i like decorators.

    it feels way too much like 'magic' to me. its really hard to understand wtf is going on at a glance.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • InfidelInfidel Heretic Registered User regular
    Nogs wrote: »
    i will say though,

    i don't think i like decorators.

    it feels way too much like 'magic' to me. its really hard to understand wtf is going on at a glance.

    I like that using classes has forced us to drop mixins though, which are even more magic.

    It is really hard to grok I find at first yeah, but that's more in the "write them properly" sense. Using them is straight-forward, and my other dev is thankful that I sorted it out and am converting mixins to them for her instead of leaving it to her.

    Also, I submitted an issue for Webstorm which will make me happy because it's the only thing that isn't fitting our code style now. :rotate:

    OrokosPA.png
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
    Geth
  • NogsNogs Crap, crap, mega crap. Registered User regular
    yeah classes at A++

    mixins cause way too many problems the larger you go.

    all about them higher order components now.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • InfidelInfidel Heretic Registered User regular
    Yep, and decorators are just syntactic sugar for HOCs.

    I think the only difference is that for the more verbose and explicit code of a HOC, you can see clearly the wrapping of components. It's not so obvious with a decorator, but the resulting object is identical.

    OrokosPA.png
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • MadpoetMadpoet Registered User regular
    Man, for a town that is supposedly desperate for devs, Portland sure has nothing open for a mid level talent. Just out of college? Great! Come fizzbuzz for 40k a year! Senior? Pick your position.
    But smack in the middle and I can barely get a call back, let alone an in-person.
    And it looks like it's recruiters or nothing - I haven't had a single company even acknowledge that I've sent them a resume. Dammit, save your company tens of thousands of dollars and freaking call me you lazy HR drones!

    Any recommendations on recruiters? Mine is getting me a phone call per week, but really seems to want me to be a Sr. dev, so I'm always underqualified.

  • InfidelInfidel Heretic Registered User regular
    Nothing to say on recruiters, but what kind of work do you do?

    OrokosPA.png
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
  • DelmainDelmain Registered User regular
    I'm 3 years out of college and labeled a Senior Software Engineer, so uh, talk to them?

    syndalis wrote: »
    Apple is a terrible company.
    crimsoncoyotemightyjongyo
  • MadpoetMadpoet Registered User regular
    Infidel wrote: »
    Nothing to say on recruiters, but what kind of work do you do?
    I was doing web apps for about 4 years - .Net MVC and that ecosystem. Mostly internal stuff like building a CMS for our marketing site, but also some customer facing doodads. C#, SQL, EF, Jquery, Knockout.
    I talk to the guys wanting Sr. devs, but so far I either lack team experience (I was a solo dev for 3.5 of 4 years) or I don't know one of their tools (usually because I went knockout over Angular).

  • admanbadmanb the bored genie Seattle, WARegistered User regular
    If you have a week, teach yourself angular and add it to your resume. It's not hard.

  • zeenyzeeny Registered User regular
    edited August 2015
    Nogs wrote: »
    i will say though,

    i don't think i like decorators.

    it feels way too much like 'magic' to me. its really hard to understand wtf is going on at a glance.

    Decorators are awesome* as long as you are the one writing them. When you stumble upon a decorator that uses reflection** and does things to that innocent other class that make parent classes blush and you weren't the person that wrote it, you just want to stab people.

    * No, not really.
    ** I have written those ;o(



    zeeny on
  • MadpoetMadpoet Registered User regular
    admanb wrote: »
    If you have a week, teach yourself angular and add it to your resume. It's not hard.
    Already done. And Node.js while I was at it. (Well, Express, which seems to be 90% of what anyone does in Node from what I can see.)

    ecco the dolphin
  • bowenbowen How you doin'? Registered User regular
    mahapps makes WPF enjoyable, mmmmm so sexy

    Ladies.
  • crimsoncoyotecrimsoncoyote Registered User regular
    Looks like we're taking a stab at MEAN tomorrow/Friday for the hackathon.
    Should be fun! (I hope)
    Unfortunately I will only get 1 day with it since I will be off joining the 30-years-of-debt homeowners club Friday (wooohooooooo!)

    ecco the dolphin
  • urahonkyurahonky Registered User regular
    edited August 2015
    Okay React question... Hate to call you out on this one @Nogs but I hope you can help. It's very simple:

    I'm writing a page that displays Password Reset Requirements. When they type in a character in the password field I want the page to verify that what they typed in made one of the requirements valid. Basically once they hit the requisite length of the password I want it to move from a red X to a green check. Right now I have these validations as states and in the render function I check if this state is true or false and update it accordingly.

    What I mean is that I cannot (or, should not) update the state in either componentWillUpdate or componentDidUpdate, right? So is the idea that I do my validations in the componentDidUpdate and manipulate the DOM in that way? I had this all working before with me changing the state in componentWillUpdate, but I'm trying to get away from terrible React practices.

    urahonky on
  • jaziekjaziek Registered User regular
    Tearing my hair out all morning because of this

    http://blogs.msdn.com/b/darrenj/archive/2005/03/07/386655.aspx

    I had no idea this limit was even a thing, and it only became apparent once I tried testing my service against an endpoint with a built in delay of 30 seconds for each request.

    Steam ||| SC2 - Jaziek.377 on EU & NA. ||| Twitch Stream
  • NogsNogs Crap, crap, mega crap. Registered User regular
    urahonky wrote: »
    Okay React question... Hate to call you out on this one @Nogs but I hope you can help. It's very simple:

    I'm writing a page that displays Password Reset Requirements. When they type in a character in the password field I want the page to verify that what they typed in made one of the requirements valid. Basically once they hit the requisite length of the password I want it to move from a red X to a green check. Right now I have these validations as states and in the render function I check if this state is true or false and update it accordingly.

    What I mean is that I cannot (or, should not) update the state in either componentWillUpdate or componentDidUpdate, right? So is the idea that I do my validations in the componentDidUpdate and manipulate the DOM in that way? I had this all working before with me changing the state in componentWillUpdate, but I'm trying to get away from terrible React practices.

    Okay so, before getting into all that craziness I'm going to suggest you take a step back and maybe try implementing this guy:

    https://seethroughtrees.github.io/react-ux-password-field/

    My gut instinct is you actually just put an onChange method on the input and check length/state there. Also, be aware that React does some stuff automatically with form inputs. (read: https://facebook.github.io/react/docs/forms.html ).

    But without knowing fully how things are set up, and also the fact that as far as I know you aren't using a data handler like Backbone or some kind of Flux implementation, I'm skeptical of giving you too much state changing advice without seeing the whole ecosystem.

    So, for right now I suggest just quick pulling in that repo and giving that a shot, looks like it's got most of the stuff you'll need - then it'll just be styling.

    If it doesn't suit your needs, let me know and we can go back and forth in PMs.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    urahonky
  • InfidelInfidel Heretic Registered User regular
    Yeah, dealing with forms is something that isn't trivial in React since it eschews two-way binding. You're on your own, but not really. Lots of implementations and packages you can utilize, but that means it depends on which you're using to know the best approach.

    If you're not using one, maybe you should consider one? For example, we're using formsy-react, and it gives us easy tools for defining inline validation like this.

    OrokosPA.png
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
    urahonkyNogs
  • NogsNogs Crap, crap, mega crap. Registered User regular
    also if that repo doesnt work for your use case, or if it has defects, you could probably still learn a bit from looking at its src/index.js file.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
    Infidel
  • NogsNogs Crap, crap, mega crap. Registered User regular
    edited August 2015
    ya formsy-react is a popular one. check that out.

    one thing thats so great about react is, everytime you make something, it is automatically reusable.

    that fosters a huge open source community. which means that a lot the problems you run into, someone has probably already attempted to solve.

    now react is still new enough that these solutions arent always perfect. but they really help with quick bootstraping.

    Nogs on
    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • urahonkyurahonky Registered User regular
    edited August 2015
    Here's a shortened implementation of what I had written:

    I'm using React-Bootstrap, by the way, so that's what the Panel, Grid, Inputs, etc are.

    render:
    render: function() {
            return (
                <Grid>
                    <Panel bsStyle='primary' header={header}>
                        <Input type="text" label="Username" disabled={this.state.form} onChange={this.userOnChange} value={this.state.user} ref="user"/>
                        <Input type="text" label="Password" onChange={this.passwordOnChange} ref="password"/>
                        <Input type="text" label="Retry Password" onChange={this.retryPasswordOnChange} ref="retryPassword"/>
                        <ButtonInput onClick={this.handleResetSubmit} disabled type="submit" value="Reset Password" bsStyle='success' ref="submitBtn"/>
                    </Panel>
                    <Panel header={prHeader} bsStyle='primary'>
                        <Row>
                            <Col xs={12}>
                                <i className="fa fa-times fa-md password-reset" ref="validLength"/>
                                <span className="password-reset">Must be at least 6 characters long.</span>
                            </Col>
                        </Row>
                        <Row>
                            <Col xs={12}>
                                <i className="fa fa-times fa-md password-reset" ref="validNum"/>
                                <span className="password-reset">Must contain at least one number.</span>
                            </Col>
                        </Row>
                        <Row>
                            <Col xs={12}>
                                <i className="fa fa-times fa-md password-reset" ref="validCapital"/>
                                <span className="password-reset">Must contain at least one capital letter.</span>
                            </Col>
                        </Row>
                        <Row>
                            <Col xs={12}>
                                <i className="fa fa-times fa-md password-reset" ref="validMatch"/>
                                <span className="password-reset">Passwords must match.</span>
                            </Col>
                        </Row>
                    </Panel>
                </Grid>
            );
    }
    

    All of my onChanges look like:
    passwordOnChange: function() {
            this.setState({
                password: this.refs.password.getInputDOMNode().value
            });
        },
    

    componentDidUpdate:
    componentDidUpdate: function(prevProps, prevState) {
            if(this.validate()){
                this.refs.submitBtn.getInputDOMNode().disabled = false;
            } else {
                this.refs.submitBtn.getInputDOMNode().disabled = true;
            }
        },
    

    validate:
    validate: function() {
            var valid = true;
    
                if(this.checkValidLength(this.state.password)){
                    this.refs.validLength.getDOMNode().className = "fa fa-check fa-md password-reset";
                } else {
                    this.refs.validLength.getDOMNode().className = "fa fa-times fa-md password-reset";
                    valid = false;
                }
    
                if(this.checkValidNum(this.state.password)){
                    this.refs.validNum.getDOMNode().className = "fa fa-check fa-md password-reset";
                } else {
                    this.refs.validNum.getDOMNode().className = "fa fa-times fa-md password-reset";
                    valid = false;
                }
    
                if(this.checkValidCapital(this.state.password)){
                    this.refs.validCapital.getDOMNode().className = "fa fa-check fa-md password-reset";
                } else {
                    this.refs.validCapital.getDOMNode().className = "fa fa-times fa-md password-reset";
                    valid = false;
                }
    
                if(this.checkValidMatch(this.state.password, this.state.retryPassword)){
                    this.refs.validMatch.getDOMNode().className = "fa fa-check fa-md password-reset";
                } else {
                    this.refs.validMatch.getDOMNode().className = "fa fa-times fa-md password-reset";
                    valid = false;
                }
    
            return valid;
        },
    

    Am I on the right track? This works exactly as I want it to (updates the images immediately, disables the button if it's invalid, etc).

    urahonky on
  • InfidelInfidel Heretic Registered User regular
    Here's a quick example of what formsy can save you on all that managing of state, this is basically the entire component for a form:
      constructor(props) {
        super(props);
        this.state = {
          canSubmit: false
        };
      }
    
      static contextTypes = {
        onSetTitle: PropTypes.func.isRequired
      };
    
      render() {
        let title = 'New User Registration';
        this.context.onSetTitle(title);
        return (
          <div className="RegisterPage">
            <div className="RegisterPage-container">
              <h1>{title}</h1>
              <Formsy.Form onValidSubmit={this.submit.bind(this)} onValid={this.enableButton.bind(this)}
                           onInvalid={this.disableButton.bind(this)}
                           className="login">
                <TextBox name="firstName" title="firstName" required/>
                <TextBox name="lastName" title="lastName" required/>
                <TextBox name="email" title="Email" validations="isEmail" validationError="This is not a valid email"
                         required/>
                <TextBox name="password" title="Password" type="password" required/>
                <button type="submit" disabled={!this.state.canSubmit}>Submit</button>
              </Formsy.Form>
            </div>
          </div>
        );
      }
    
      enableButton() {
        this.setState({
          canSubmit: true
        });
      }
    
      disableButton() {
        this.setState({
          canSubmit: false
        });
      }
    

    We define all the validation (built-in and custom ones) in the props of our fields (themselves components) and hook into one canSubmit state, it handles showing of validation messages and enabling of the submit button reactively.

    OrokosPA.png
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
    Nogs
  • NogsNogs Crap, crap, mega crap. Registered User regular
    edited August 2015
    well

    ideally you dont do the getDOMNode() or ref stuff unless you absolutely need too. most of the time proper state flow heirachy will do that stuff for you. ( https://facebook.github.io/react/docs/more-about-refs.html last bullet at bottom of page )

    ideally you would find a way to pass state to the button via a shared anscetor that holds that state and that takes care of it. Or you use a flux/backbone implementation to handle your app state and have component get state that way.

    but youre on a deadline and it works, thats what matters. id suggest looking at the formsy-react stuff going forward, and highly suggest getting backbone or some flux implementation in your app sooner rather than later.

    Nogs on
    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • bowenbowen How you doin'? Registered User regular
    honky's fa-fa fa-facked

    just kidding, but I couldn't resist

    Ladies.
  • urahonkyurahonky Registered User regular
    If I can't use state and I can't use refs I'm very, very unclear on what I need to do for validations. I see that Formsy has you pass in properties to those components but that means I need to have separate components for things like Inputs that can accept the validations, right? That means I have to write something similar to Input to do validations. I guess my problem is that this PasswordReset page is literally a self-contained component that uses the Bootstrap components to display stuff... I have to write sub-components that use these (something like <HonkyInput>) that take in these props and those props get validated against whatever I want. How would I get these values from a separate component, though? Like if I had:

    PasswordReset.render:
    render: function(){
        <Panel>
            <HonkyInput label="Password" type="password" validateLength />
        </Panel>
        <Panel>
            <i className="fa fa-times password-reset" />
        </Panel>
    }
    

    How would I know if HonkyInput was valid to change the image? Would I attach a function in PasswordReset to HonkyInput that would change the state in PasswordReset?

  • urahonkyurahonky Registered User regular
    I'm so annoyed that the other dev that started us down the React path obviously had no idea how to use it.

  • bowenbowen How you doin'? Registered User regular
    I've still yet to figure out just exactly what the point of each of these JS frameworks is supposed to fulfill.

    You've got handlebars, react, express, node.

    When should I use which? What are some examples!

    I see a lot of hello world with a print or something, but real world practical examples are kind of missing.

    Ladies.
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    am I the only one who gets massive anxiety when I add a new subroutine to a crucially important function and get ready to hit run....

  • InfidelInfidel Heretic Registered User regular
    I just wrote a new registration back-end to replace the stubbed one out. The whole thing from express post handling through validation through to saving the database and returning a jwt.

    What's that? It had no syntax errors and worked completely the first time?

    God I hate that. :rotate:

    (Looks okay on the database and authentication followup calls...)

    OrokosPA.png
    Play D&D 4e? :: Check out Orokos and upload your Character Builder sheet! :: Orokos Dice Roller
    The PhalLounge :: Chat board for Critical Failures IRC! :: #CriticalFailures and #mafia on irc.slashnet.org
    Echo
  • admanbadmanb the bored genie Seattle, WARegistered User regular
    Jasconius wrote: »
    am I the only one who gets massive anxiety when I add a new subroutine to a crucially important function and get ready to hit run....

    Anxiety implies a fear of the unknown. It's not unknown if I know I broke something.

    gavindel
  • djmitchelladjmitchella Registered User regular
    bowen wrote: »
    I've still yet to figure out just exactly what the point of each of these JS frameworks is supposed to fulfill.

    You've got handlebars, react, express, node.

    When should I use which? What are some examples!

    I see a lot of hello world with a print or something, but real world practical examples are kind of missing.

    Handlebars is a templating language that lets you generate HTML more easily. React is an end-to-end framework for making web apps. Express is a framework that sits on top of Node and lets you make webservers more easily. Node is a low-level way to run javascript natively and do network-y things.

    Of those, React is the only "framework" in the way it's most commonly used; the other big-name frameworks right now are Angular and Ember. There's things like backbone which is much smaller and just gives you a way to get events/data moving around, without any rendering.

    See http://stackoverflow.com/questions/5284340/what-is-node-js-connect-express-and-middleware for more about node/express; see many religious war pages for more about react/angular/ember.

  • NogsNogs Crap, crap, mega crap. Registered User regular
    Angular and Ember a full "MVC"-ish frameworks. You can theoretically have an end-to-end solution with just Angular or Ember or Meteor. They handle data, routing, views, etc. and are generally pretty opinionated.

    React JUST handles view, which is why you have things like Flux to handle data, and react-router to handle routing. You can technically use React inside of Angular, Ember or Meteor.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • TofystedethTofystedeth veni, veneri, vamoosi Registered User regular
    I hate switching back to C# after working with SQL and SQLlike languages for like 5 months.
    I mean, that's not true. I'd much rather work with C#.
    I just hate having to remember that I can't do stuff like if(thing = poopy) and to use semicolons and stuff.

    steam_sig.png
    Geth
  • bowenbowen How you doin'? Registered User regular
    bowen wrote: »
    I've still yet to figure out just exactly what the point of each of these JS frameworks is supposed to fulfill.

    You've got handlebars, react, express, node.

    When should I use which? What are some examples!

    I see a lot of hello world with a print or something, but real world practical examples are kind of missing.

    Handlebars is a templating language that lets you generate HTML more easily. React is an end-to-end framework for making web apps. Express is a framework that sits on top of Node and lets you make webservers more easily. Node is a low-level way to run javascript natively and do network-y things.

    Of those, React is the only "framework" in the way it's most commonly used; the other big-name frameworks right now are Angular and Ember. There's things like backbone which is much smaller and just gives you a way to get events/data moving around, without any rendering.

    See http://stackoverflow.com/questions/5284340/what-is-node-js-connect-express-and-middleware for more about node/express; see many religious war pages for more about react/angular/ember.

    Why do people talk about using react and handlebars together? It's confusing as fuck.

    Ladies.
  • bowenbowen How you doin'? Registered User regular
    I mainly ask all this because I'm contemplating using node/react and RethinkDB for my next project.

    Ladies.
  • NogsNogs Crap, crap, mega crap. Registered User regular
    urahonky wrote: »
    If I can't use state and I can't use refs I'm very, very unclear on what I need to do for validations. I see that Formsy has you pass in properties to those components but that means I need to have separate components for things like Inputs that can accept the validations, right? That means I have to write something similar to Input to do validations. I guess my problem is that this PasswordReset page is literally a self-contained component that uses the Bootstrap components to display stuff... I have to write sub-components that use these (something like <HonkyInput>) that take in these props and those props get validated against whatever I want. How would I get these values from a separate component, though? Like if I had:

    PasswordReset.render:
    render: function(){
        <Panel>
            <HonkyInput label="Password" type="password" validateLength />
        </Panel>
        <Panel>
            <i className="fa fa-times password-reset" />
        </Panel>
    }
    

    How would I know if HonkyInput was valid to change the image? Would I attach a function in PasswordReset to HonkyInput that would change the state in PasswordReset?

    I'm assuming the image is:
    <i className="fa fa-times password-reset" />
    

    if that is the case then, you know because PasswordRest component is a parent to both HonkyInput and i.

    One thing you could do is send down a method as a prop to HonkyInput and i.

    Say you have a method inside PasswordReset called handleValidation. i could look something like
    var PasswordReset = React.createClass = {
      handleValidation: function (args) {
        if (foo === bar) {
          setState({valid: qux})
        }
      },
      render: function(){
          <Panel>
              <HonkyInput validationMethod={this.handleValidation} label="Password" type="password" validateLength />
          </Panel>
          <Panel>
              <i className="fa fa-times password-reset" valid={this.state.valid}/>
          </Panel>
      }
    }
    

    and in HonkyInput you can call this.props.validationMethod() and it'll execute whatever is PasswordReset's handeValidation method.

    which then sets it's state, which then you can pass down to it's children and they can re-render how they need to.

    That's if you don't use something like backbone or Flux to handle state, it is prudent to have state in the closest most common ancestor to whatever components need to talk to each other.

    Admittedly it can get to be a huge pain depending on how big your app is and what compoents are interacting with what other components. But Flux/backbone/Mobservable aim to make that easier.

    After React is just views, not data/state handling.

    Once you get Flux/etc implemented, it's actually suggested to make as many components as 'stateless' as possible.


    But with all that said, you keep saying you are on a deadline. If shit is working right now, i'd move on to the next issue/ticket/defect. You can worry about getting it perfect after the deadline.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
  • urahonkyurahonky Registered User regular
    Yeah I know. I just hate that I'm doing something wrong.

    But yeah I figured that passing in the validate method from the parent to the child was the best route to go... But I was being sure. Thanks.

  • NogsNogs Crap, crap, mega crap. Registered User regular
    bowen wrote: »
    bowen wrote: »
    I've still yet to figure out just exactly what the point of each of these JS frameworks is supposed to fulfill.

    You've got handlebars, react, express, node.

    When should I use which? What are some examples!

    I see a lot of hello world with a print or something, but real world practical examples are kind of missing.

    Handlebars is a templating language that lets you generate HTML more easily. React is an end-to-end framework for making web apps. Express is a framework that sits on top of Node and lets you make webservers more easily. Node is a low-level way to run javascript natively and do network-y things.

    Of those, React is the only "framework" in the way it's most commonly used; the other big-name frameworks right now are Angular and Ember. There's things like backbone which is much smaller and just gives you a way to get events/data moving around, without any rendering.

    See http://stackoverflow.com/questions/5284340/what-is-node-js-connect-express-and-middleware for more about node/express; see many religious war pages for more about react/angular/ember.

    Why do people talk about using react and handlebars together? It's confusing as fuck.

    they shouldnt, that is stupid.

    most of that crap happens because people see JSX and have a knee jerk reaction and are all like "GET THAT TEMPLATE AWAY FROM LOGIC" without understanding how beneficial it is. because they have a skewed notion of what "seperation of concerns" means.

    rotate.jpg
    PARKER, YOU'RE FIRED! <-- My comic book podcast! Satan look here!
This discussion has been closed.