Posts

Showing posts with the label JavaScript

Modern Web Development

In the last few years web technology has lived through rapid growth and heavy change. We went from frames to table layouts, to column layouts, to responsive layouts. From html4 to xhtml & flash to html5. From heavy server to rich client. From rpc to soap to rest. From sql to nosql and big data. From MVC to MVP and so on. In the following post i want to describe what has become state-of-the-art from my perspective. A Backend is a REST api  Every backend should be seen as a REST api and every controller as another resource. You want to analyze your problem domain, find your resources and design proper paths for them. They become the M in your MVC Architecture. Developing a webapplication first, and adding an extra REST api later on has to be considered an antipattern. If you do make a REST api, you want to consequently use it yourself, making your frontend its first consumer. This procedure allows you to smoothly add different kinds of clients later on, such as a mobile app or e...

how to download the programs in jsFiddle

You have to put /show a after the URL you're working on:   http://jsfiddle.net/<your_fiddle_id>/show/   It is the site that shows the results. And then when you save it as a file. It is all in one HTML-file. For example:   http://jsfiddle.net/Ua8Cv/show/   for the site http://jsfiddle.net/Ua8Cv

jQuery code to disable double click event

jQuery code to disable double click event on the webpage. $(document).ready(function(){ $("*").dblclick(function(e){ e.preventDefault(); }); }); Above jQuery code will disable double click event for all the controls on the webpage. If you want to disable for specific control, let's say a button with ID "btnSubmit" then, $(document).ready(function(){ $('#btnSubmit').dblclick(function(e){ e.preventDefault(); }); });

Informative Links :: Node.js

Blazing fast node.js: 10 performance tips from LinkedIn Mobile http://engineering.linkedin.com/nodejs/blazing-fast-nodejs-10-performance-tips-linkedin-mobile   10 Vital Aspects of Building a Node.JS Application https://engineering.gosquared.com/10-vital-aspects-of-building-a-node-js-application Let's Make a Web App: Nodepad http://dailyjs.com/2010/11/01/node-tutorial/   Two-Factor Authentication with Node.js and Twilio http://www.twilio.com/blog/2012/04/two-factor-authentication-with-node-js-and-twilio.html   Real-Time Application http://tympanus.net/codrops/2012/10/11/real-time-geolocation-service-with-node-js/ Creating a REST API using Node.js, Express, and MongoDB http://coenraets.org/blog/2012/10/creating-a-rest-api-using-node-js-express-and-mongodb/   Node.js Web Application with Storage on MongoDB (MongoLab) http://www.windowsazure.com/en-us/develop/nodejs/tutorials/website-with-mongodb-mongolab/ Mongoose http://mongoosejs.com/docs/index.html Windows Azure and ...

MongoDB Details

Informative Links :: MongoDB MongoDB http://docs.mongodb.org/ manual/tutorial/ install-mongodb-on-windows/ http:// myadventuresincoding.wordpress. com/2010/02/15/ getting-started-with-mongo-db/ http://docs.mongodb.org/ manual/tutorial/ getting-started/ #create-a-collection-and-insert -documents http://docs.mongodb.org/ manual/crud/#crud-operations With Node.js http://www.mongodb.org/ display/DOCS/Node.js http://mongodb.github.com/ node-mongodb-native/ Elegant mongodb object modeling for node.js http://mongoosejs.com/ http://mongoosejs.com/docs/ index.html

Informative Links: JavaScript

JavaScript Code Coverage http://ariya.ofilabs.com/2012/12/javascript-code-coverage-with-istanbul.html Asynchronous JS Programming http://www.medikoo.com/asynchronous-javascript/3d/#/asynchronous-javascript   http://blogs.msdn.com/b/ie/archive/2011/09/11/asynchronous-programming-in-javascript-with-promises.aspx http://www.html5rocks.com/en/tutorials/async/deferred/ Delayed Initialization http://www.joezimjs.com/javascript/delay-initialization-with-jquery-delegation/ http://davidwalsh.name/event-delegate Programming Style by Crockford http://youtu.be/_EANG8ZZbRs JavaScript Style Guide https://github.com/airbnb/javascript Scalable JavaScript Application Architecture http://www.slideshare.net/nzakas/scalable-javascript-application-architecture JavaScript Routing System http://millermedeiros.github.com/crossroads.js/ http://sammyjs.org/ Securing JavaScript http://videos.2012.appsecusa.org/video/54087885 Writing Efficing JS Code http://coding.smashingmagazine.com/2012/11/05/writing-fast-...

Informative Links: JavaScript

Asynchronous JS Programming http://www.medikoo.com/asynchronous-javascript/3d/#/asynchronous-javascript   http://blogs.msdn.com/b/ie/archive/2011/09/11/asynchronous-programming-in-javascript-with-promises.aspx http://www.html5rocks.com/en/tutorials/async/deferred/ Delayed Initialization http://www.joezimjs.com/javascript/delay-initialization-with-jquery-delegation/ http://davidwalsh.name/event-delegate Programming Style by Crockford http://youtu.be/_EANG8ZZbRs Scalable JavaScript Application Architecture http://www.slideshare.net/nzakas/scalable-javascript-application-architecture JavaScript Routing System http://millermedeiros.github.com/crossroads.js/ http://sammyjs.org/ Securing JavaScript http://videos.2012.appsecusa.org/video/54087885 Writing Efficing JS Code http://coding.smashingmagazine.com/2012/11/05/writing-fast-memory-efficient-javascript/ Getting Closure in JavaScript http://markdalgleish.com/presentations/gettingclosure/   Immediately-Invoked Function Expression (...

Informative Links :: Node.js

Node.js Framework Comparisons http://ocdevel.com/blog/ nodejs-frameworks-comparison Choosing a web application framework (using Node.js) http://stackoverflow.com/ questions/3809539/ choosing-a-web-application-fram ework-using-node-js PHP Vs. NodeJS http://bit.ly/QNSNSq http://www.scoop.it/t/ node-web-programming http://radar.oreilly.com/2011/ 07/what-is-node.html http://radar.oreilly.com/2011/ 06/node-javascript-success.html http://www.hacksparrow.com/ tcp-socket-programming-in-node- js.html http://jsconf.eu/2009/ video_nodejs_by_ryan_dahl.html http://stackoverflow.com/ questions/5062614/ how-to-decide-when-to-use-nodej s http://www.nodebeginner.org/ http://code.danyork.com/2011/ 01/25/ node-js-doctors-offices-and-fas t-food-restaurants-understandi ng-event-driven-programming/ http://code.danyork.com/tag/ node-js/ Tutorials: http://howtonode.org/ http://net.tutsplus.com/ tutorials/javascript-ajax/ node-js-for-beginners/ http://www.youtube.com/ watch?v=B05Dl4iL21M&feature=rel ated h...

jQuery UI Dragging with containment

<!doctype html> <html> <head> <meta charset="utf-8" /> <title>jQuery UI Dragging with containment</title> <style type="text/css"> <!-- #drg {     width:380px;     height:210px;     border:2px solid blue; } #prt {     width:305px;     height:100px;     margin:8px;     background:#F90; } #prt p {     width:185px;     margin:1px;     background:#a7daa8; } --> </style> <script src=" http://code.jquery.com/jquery-1.8.2.js "></script> <script src=" http://code.jquery.com/ui/1.9.1/jquery-ui.js "></script> <script type="text/javascript"><!-- $(document).ready(function() {   // sets draggable the elements with id="im"   $('#im').draggable({     cursor: 'move',        // sets the cursor apperance  ...

How can I return the value of disabled drop-down field after submit?

In form:-             State             :             id="DisState"   disabled="disabled" class="txtbox_edit_info">                         {?>                 selected>                                                                                    ...

Informative Links: JavaScript

Debugging http://fixingthesejquery.com/ #slide1 https://developers.google.com/ chrome-developer-tools/docs/ scripts-breakpoints DustJs https://github.com/linkedin/ dustjs/wiki/Dust-Tutorial http://akdubya.github.com/ dustjs/ Handlebars http://handlebarsjs.com/ https://github.com/wycats/ handlebars.js/ mustache http://mustache.github.com/ mustache.5.html Exploring the relationship between JavaScript and the modern HTML DOM http://domenlightenment.com/ Journey Through The JavaScript MVC Jungle http:// coding.smashingmagazine.com/ 2012/07/27/ journey-through-the-javascript- mvc-jungle/ Modernizr with Faruk Ates http://www.youtube.com/ watch?v=n0q0kwiIPSY&feature=rel mfu Easy Script Loading with yepnope.js http://net.tutsplus.com/ tutorials/javascript-ajax/ easy-script-loading-with-yepnop e-js/ http://yepnopejs.com/ What are the use cases for RequireJS vs. Yepnope vs. LABjs? http://www.quora.com/ What-are-the-use-cases-for-Requ ireJS-vs-Yepnope-vs-LABjs Design Patterns for JavaScript W...

How to disabled Right click function in webpages?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns=" http://www.w3.org/1999/xhtml "> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>rightclick_disabled</title> </head> <body bgcolor="#000000"> <script language=JavaScript> <!-- //Disable right mouse click Script //By Maximus ( maximus@nsimail.com ) w/ mods by DynamicDrive //For full source code, visit http://www.dynamicdrive.com var message="Function Disabled!"; /////////////////////////////////// function clickIE4() { if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); do...