• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Javascript Frameworks that play nice with existing code

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on an app that is using a lot of fairly unstructured jQuery. Ideally, I'd rewrite the application using EmberJS. However, that isn't going to happen anytime soon for various reasons. I've looked into using EmberJS along side non-EmberJS code and it is not as easy as it would seem.

So I'm looking for advice on Javascript libraries that would help me bring my codebase to something more structured but plays nice running next to other code. This might be for brand new functionality or something to replace bits of nasty code while fixing bugs and refactoring. I'd prefer to steer clear of Backbone and Angular.

Thanks for any suggestions.
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect that jQuery is not the problem, but rather the way it was utilized in the source code that you're trying to fix. It's quite possible to write well-structured code with jQuery or write poorly structured code with any framework.

In other words, I don't think picking another framework is going to be a magic fix. Maybe if you provide some code examples or describe the actual problems you are facing, we can offer some solutions.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, jQuery is the problem because it is unstructured. I understand the argument about anything can be written poorly. I've told people that myself. I know there is no magic fix. I know that jquery can be written with better structure and design patterns. This is not what I'm looking to do.

I'm just looking for suggestions for any libraries / frameworks that provide structure out-of-the-box (jquery doesn't) that might help me improve my codebase and play nice with existing code outside of said framework. For example, would it be a good idea to use ReactJS or Knockout and / or ??

 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my experience -- and I'll admit that that's limited as there are just too many freaking frameworks that seem to be popping up on a daily basis -- you may not be able to find what you are looking for. There are frameworks that only provide a portion of the client-side MVC stack, and these aren't going to help you with structure. Then there are the more full-stack (at least on the client) that provide a structure. Problem is, those all seem to be rather opinionated, and aren't going to play well with code outside the expected structure. AngularJS is one of the biggest offenders in this space (at least in my opinion). When you adopt AngularJS, you are using it for absolutely everything or all hell breaks loose.

I have admitted that I'm not familiar with everything that's out there, but from what I've seen so far, they fall into two camps: "build your own structure", or "use our structure or die".
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic