Forum Moderators: open

Message Too Old, No Replies

Why use frameworks?

         

edacsac

2:16 pm on Mar 27, 2008 (gmt 0)

10+ Year Member



I'm seeing much talk lately about javascript frameworks and things like JSON and what not. How many folks are actually using frameworks as opposed to creating their own scripts and reusing them as part of their own library?

From my standpoint I haven't seen much on the web that would compel me to use a library. Am I missing something? Everything I use javascript for in a web design is pretty straight forward and writing the code isn't a problem. AJAX is based around the httprequestobject, so what would a library do for me there? Bubble tips, dynamic divs, menus, all pretty much straight forward. Still not seeing a need for a framework. I've never really been stumped while adding any DHTML eye candy, and when a new acronym like AJAX or most recently JSON comes out, I always wait at least a year to dig into it, to see if the community at large still cares about it.

I've done some very topical reading about jquery and YUI. jquery comes at me like a tool for people who aren't skilled enough to write js to create richness. YUI seems more like a yahoo development standard than anything meant for the web dev community. mootools? well a name like that is equal to "script kiddie" in professionalism.

I'm very much into doing my own thing when it comes to coding in general. As soon as someone throws an acronym together, it's usually a group looking to control or take credit for a technology. I am against that type of behaviour, so I'm always initially against most things until they've been around for awhile. Are there any benefits to using a framework? Are they just a compilation of canned eye candy? Do they save any time "in the long run", or are there maintenance issues down the road? Is there a library that stands out as most professional?

Are we getting to lazy to write our own code and therefore we must embrace these technologies to be competetive with lazy folk?

carlb007

2:25 pm on Mar 28, 2008 (gmt 0)

10+ Year Member



I couldnt agree more with this.....Especially with AJAX.

I honestly cant see or find any need to use a framework, and from what ive seen they just seem to bloat out whatever your trying to do, and add un-necessary complexities.

Ive been using AJAX with JSON for some time now, and have never needed anything more than my brain and google :)

As for mooTools ive seen some lovely stuff done with it..but at the end of the day its nothing i couldnt do myself 99% of the time. I like to stay in control of my code, so i know that i can make tweaks if needed later on....Frameworks just make me feel constrained if im honest.

RedScourge

7:23 am on Mar 29, 2008 (gmt 0)

10+ Year Member



If you componentalize a site massively with small simple AJAX requests to grab data all over the place all you really need is one or two template AJAX scripts and pass them some variables.

If you are doing an AJAX chat room script you need a special function or two because it wont just work easily out of the box with setTimeout sometimes, etc, so our function count is upto two, and alrady you can write a chat room script and use AJAX to facilitate a simple templating system just with two AJAX functions.

If you are doing weird stuff like passing arrays and objects back and forth thru AJAX, chances are you could be simplifying it somehow and just use the basic one or two functions and be writing complex functions to USE that data once you have it. Other than a few data type conversion functions for getting particular data in and out of AJAX I dont really see a reason to use a framework either.

You wanna know another reason to not use someone else's framework if you dont understand it? Cross Site Scripting (XSS) vulnerabilities!

Personally I strive to use as little and as simple javascript as possible, you never know what the browser quirks are.

However if youre doing tons of crazy stuff like facebook does where you can click and drag stuff all over the place and have it dynamically save settings and all that, you may need more than a function or two...but chances are theyre not all AJAX functions, but mostly input validation and output formatting/preparing functions.

Just my two cents, I've not written a whole lot of stuff that required AJAX but I can imagine alot I could do with it using just two or three functions right now, so unless i need some killer feature or some special case functionality like file upload with progress bar (which I've heard is more of the domain of Java or Flash due to some serious browser incompatibilities), I wouldnt use a framework for anything other than studying code to see what is possible and see what others have done.