Which design pattern to learn first for javascript/jquery? [closed] - javascript

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to learn a pattern / process for making and organising proper javascript applications. I am beginning to use OOP to simplify sections of my code, but the code is still messy so I need a process to build bigger things effectively. Should I be thinking about MVC, namespaces or libraries? Not sure if I want to choose a framework yet but any advice/suggestions is greatly appreciated!

jQuery is the best Javascript framework and you can start looking on it following the official website.
Following this blog you can find many tutorials and lessons as well.
Then if you are interested in MVC pattern to use with Javascript I suggest Backbone.

Here is all you need :
http://dochub.io/#javascript/
http://dochub.io/#jquery/

the basic knowledge of JavaScript is good to learn jquery
since the jquery is the library made in JavaScript you can manipulate and understand jquery better

Related

AngularJS or Backbone for beginner [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm choosing a javascript framework for my Chrome extension programming (localStorage, lots of ajax calls, filtering, json manipulation). Do you recommend AngularJS or Backbone? I started with JS a few months ago (I have PHP and Java background) and the main problem for me is to have a good and clean structure of my web app.
What I like about AngularJS? The two way binding and the concept itself.
What I like about Backbone? It's really simple for beginner. And there are a lot of resources.
Full disclosure: I work on AngularJS, and obviously have a bit of a bias. ;)
If you're looking for an opinionated application structure, I would definitely stick with AngularJS. Backbone provides many helpful utilities, but there are many choices that you have to make about how you want to connect things. From my experience writing medium/large apps with Backbone.js, I've found that I have to put in more effort to keep things organized compared to AngularJS, which has much clearer separation of concerns.
The best choice is to code little projects in these two libraries.
Why not test and see the code from Todo MVC project from Addy Osmani and after that, make your choice ?

What to use to refactor the javascript / jQuery of a web application to use require.js and jasmine [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I hope this question is not too general, but i haven't found any good tutorial on how to do the transition from standard javascript / jQuery code to modular / tested code.
Mmy new task is the complete refactoring of the javascript of our wordpress plugin.
Our current code is standard jQuery code, thrown all into a file, with checks on the existance of dom elements to understand on what page we are in and attach the correct event handlers.
My goal is simply to write more manteinable and clear code, and introduce tests in the process.
My approach would be:
Try to modularize code in separate files (one file for each page) and use require.js to load only the required code.
write some tests with jasmine/sinon and try to adapt the esisting code so that the tests pass
Have you got any other suggestions/best practice?
Can you share some example on how you approached similar tasks?
I was thinking about bringing in an mvc framework but if i can stick to standard jQuery code i think it's easier for the development team because it doesn't add complexity

jQuery is JS library. what the term library means? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
i don't understand the meaning of the word library -
regarding to jQuery: will it be right to say that "library" is a huge file with many plug ins that are ready to use?
jQuery is a fast and concise JavaScript Library that simplifies HTML
document traversing, event handling, animating, and Ajax interactions
for rapid web development. jQuery is designed to change the way that
you write JavaScript.
All this means is that jQuery itself does not do anything. A library is "a collection of resources used to develop software". jQuery allows you to write cross-browser JavaScript a heck of a lot easier than it would be without it.
A library is something that extends a base langage. So in this definition jQuery is a library
A small(not huge!!!) file (32K only)... With many many functions and features.
Libraries contain code and data that provide services to independent programs. This encourages the sharing and changing of code and data in a modular fashion, and eases the distribution of the code and data.
Wikipedia

How to create a web crawler with Node.js? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I just recently got interested in how search engines work, and I found out that they use "bots" or "webcrawlers". I immediately started wondering about how do these things work and I wanted to create one! So, first of: how do you make a program that requests a page from a server? It would be awesome if you gave me a simple example in JavaScript (I'm running it as a normal scripting language using Node). Next, is there a Node module that let's me interpret HTML? Create a DOM for me so I can cycle trough all the links and so on? Correct me if I'm wrong but I guess it's done like that... Any examples in C++, C or Python are warmly welcomed as well, although I'd prefer JS or Python because I'm more familiar with high-level scripting languages.
Getting HTTP pages: node http.get (example is there)
DOM documents: jsdom (also includes examples)

What is the easiest, most reputable, most seasoned AJAX framework? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 13 years ago.
I have dabbled with various AJAX frameworks, namely GWT, Dojo, Ext-JS, jQuery UI. I am interested in understanding what AJAX frameworks best meet the following criteria:
- Most easy to learn
- Most painless to keep maintained
- Most reputable, stable, founded & grounded
- Easiest to read and share
- Integrates well with J2EE
why, jQuery of course ;-)
jQuery on the client side, DWR on the server side.
This is a tough question to answer here, because most Ajax frameworks keep improving, changing, and attracting new users. You never know where the next ultra-large scale Internet site will come from, and if they choose an Ajax framework that rates low here, they are as likely to put the developer hours into fixing it as they are to change frameworks.
So please take the advice on this question with a grain of salt, especially as the question gets older and older. Someone might update the answers or maybe not.

Categories