Earlier quoted context omitted.
My english is awful, I was trying to say it's not really a SPA that I'm making. I want to keep the routing mainly on my back-end and only do ajax calls to my API where needed. But if it's not another alpha-state component I would love to have the added possibility of using one or two extra routes on the JS side. It's just that checking the most popular repos and reading things like these is awful: "We are currently w…
> I want to keep the routing mainly on my back-end and only do ajax calls to my API where needed. I'm not trying to push React (I'm still evaluating it myself), but that sounds like just the job for React components?
Ask HN: JavaScript framework that I can use “right now”?
11–20 of 24 posts
Re: Ask HN: JavaScript framework that I can use “right now”?
#12I'm the sole developer on a "rails monolith" (254 tables, 540 models/classes, 4 years old), with enterprise-like architecture (ecommerce, event ticket sales, booking engine, access control, etc) and I'm positive the only way I'm able handle it all is because I stick to basic jquery.
My secrets:
- The rails-ujs adapter
- $(document).on('event', '.element', ..) is fantastic. Never debug events ever again
- selectize select's for "find or create" relationships
- cocoon gem for nested form relationships
- parsley for form validation (hooks into html5 validators)
- bootstrap 3
- datatables.net + following the pattern of ajax-datatables-rails (gem - separate classes for each table)
- a single javascript function that accepts a DOM element (body, a modal, section) and initializes all the elements the app knows of (selectize elements, date/time pickers, etc) inside that container
- above function is hooked into by bootstrap's 'bs.modal.shown, bs.modal.hide, tab's, cocoon's 'cocoon:after-insert', etc.
rake stats says: 33k LOC models, 8k LOC controllers, 23k Javascript (though this must be all plugins. I'd guess 3-6k lines of javascript, max)
Needless to say, I don't believe in the frontend javascript hype.
Re: Ask HN: JavaScript framework that I can use “right now”?
#13Earlier quoted context omitted.
> I want to keep the routing mainly on my back-end and only do ajax calls to my API where needed. I'm not trying to push React (I'm still evaluating it myself), but that sounds like just the job for React components?
Check my other reply. React is great but I think you need to buy the entire stack since one thing leads to the other. "I'm already using JSX so why not add just this one more babel line and get free ES6. It's the last thing I'll add, I swear"
Re: Ask HN: JavaScript framework that I can use “right now”?
#14jQuery. I'm the sole developer on a "rails monolith" (254 tables, 540 models/classes, 4 years old), with enterprise-like architecture (ecommerce, event ticket sales, booking engine, access control, etc) and I'm positive the only way I'm able handle it all is because I stick to basic jquery. My secrets: - The rails-ujs adapter - $(document).on('event', '.element', ..) is fantastic. Never debug events ever again - sele…
Re: Ask HN: JavaScript framework that I can use “right now”?
#15Earlier quoted context omitted.
Check my other reply. React is great but I think you need to buy the entire stack since one thing leads to the other. "I'm already using JSX so why not add just this one more babel line and get free ES6. It's the last thing I'll add, I swear"
I thought React was designed specifically so you won't have to buy into the entire stack (unlike Ember and friends). I've used React components without ES6, using plain old jQuery and AJAX calls during component mount (and nothing else). I didn't feel any particular temptation to add more things. Okay I'm lying :) . It's tempting, but it's possible to do without.
Re: Ask HN: JavaScript framework that I can use “right now”?
#16Earlier quoted context omitted.
I thought React was designed specifically so you won't have to buy into the entire stack (unlike Ember and friends). I've used React components without ES6, using plain old jQuery and AJAX calls during component mount (and nothing else). I didn't feel any particular temptation to add more things. Okay I'm lying :) . It's tempting, but it's possible to do without.
You weren't using JSX?
Re: Ask HN: JavaScript framework that I can use “right now”?
#17Re: Ask HN: JavaScript framework that I can use “right now”?
#18jQuery. I'm the sole developer on a "rails monolith" (254 tables, 540 models/classes, 4 years old), with enterprise-like architecture (ecommerce, event ticket sales, booking engine, access control, etc) and I'm positive the only way I'm able handle it all is because I stick to basic jquery. My secrets: - The rails-ujs adapter - $(document).on('event', '.element', ..) is fantastic. Never debug events ever again - sele…
> - $(document).on('event', '.element', ..) is fantastic. Never debug events ever again
> - a single javascript function that accepts a DOM element (body, a modal, section) and initializes all the elements the app knows of (selectize elements, date/time pickers, etc) inside that container
Re: Ask HN: JavaScript framework that I can use “right now”?
#19- jQuery (for small stuff)
- RequireJS (so that you don't have to load all at once)
- MomentJS (Date / Time management done right)
- AmplifyJS (Pub / Sub and localstorage)
I really like KnockoutJS. Easy to learn and it grows with you so that you don't have to complicate your app if not necessary.
Re: Ask HN: JavaScript framework that I can use “right now”?
#20jQuery. I'm the sole developer on a "rails monolith" (254 tables, 540 models/classes, 4 years old), with enterprise-like architecture (ecommerce, event ticket sales, booking engine, access control, etc) and I'm positive the only way I'm able handle it all is because I stick to basic jquery. My secrets: - The rails-ujs adapter - $(document).on('event', '.element', ..) is fantastic. Never debug events ever again - sele…
That's amazing! Believe it or not I was mocking a very similar thing (besides rails). And select2. What made me rethink was the heavy dependencie on using datatables and mobile compatibility. Am I worrying too much and datatables.net "just works"?