At this point, I think that I'm writing way too much code to get simple things done and I want to start playing with more advanced ways of doing things.
Wondering if I'm shooting myself in the foot trying to adapt to a framework or just getting ahead of myself, or going down the right path.
The link is for a character generator for a local LARP group that I belong to and I want to try to make a character generator. If you click on the lists in the middle, you'll see some of the amounts change. Ideally, I want to build something that will allow me to adjust things without writing this much jscript code. The difference between my jsfiddle and the website is a week or so of work, but I'm looking for some advice on where to begin looking to amp this thing up and make it look decent. Right now, it looks like my first website in 1996.
Well it is your choose, you may also look at AngularJs and EmberJs that are decent options for CanJs. I think that currently AngularJS is more comparable with CanJs in terms of common approaches to many things.
Actually CanJs gives you everything you need to build dynamic HTML5-applications of any kind. Everything you REALLY need and it is constantly improving. Actually as other libraries (and frameworks, such as Angular) are. I don't want to be biased, you should compare and make your choice.
Angular is being developed and maturing very fast. CanJs is quite mature, it is more structured, simpler and lighter. But it doesn't have such comprehensive examples and guides (angular has many, even perhaps too many... ), and thus CanJS probablyrequires from you more intellectually intensive homework to figure out how things should be done.
Many things and techniques are hardwired/predefined in angular (for example like view filters, animations) but though you don't have it out of the box with CanJS, you can control the way how things are implemented and thus improve performance in many cases.
From my point of view you could try to use either CanJS or ReactJS. Both are relatively lightweight. Although ReactJS doesn't have all features and is basically a "view", it might be more than enough for you (according to your links)
Let me try to shed light on what I'm trying to do in the short term. I feel like i'm writing way too much code in the js and html so I was thinking that a framework would help. The general point of this app is to have checkboxes that can change the values of other checkboxes, so say I choose halfling, the price of the rogues list goes down by half, and other items have to be disabled. Ideally, it'd be kind of cool to check off a race, and things I can't choose get highlighted in red or have a strikethrough and the checkbox is grayed out or something like that.
I'd like to find out a few things.
What is a framework and how do they help? I know they create functions you can use more easily than straight js, but I'm still cloudy on why they should be used and how they can help.
see if I should be using objects to handle all of this, and how
link the label, the value, and the checkbox all into one referenceable item instead of having so many different variable names.
ways of resetting all, or specific things
find a way to have a list of all of this stuff and it's value and have the html be dynamic instead of writing out all of the code for each and every checkbox, label, and value.
I was looking at the tree hierarchy and thinking it looked promising, but I'm just wondering if I'm barking up the wrong tree.
First thing you should understand about can.js (and high lever other libs/frameworks) that they encourage the approach when you don't make manual manipulations with DOM. And where DOM (presentation layer) is a reflection of data (model) layer state.
So each your checkbox (and other element) is a reflection of model's attribute value.