Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,487 members, 7,954,872 topics. Date: Saturday, 21 September 2024 at 11:25 AM |
Nairaland Forum / Science/Technology / Webmasters / Javascript Corners (941 Views)
as webmaster you can make over 150 million naira through four corners / Dhtml Quiz: How Will You Detect If A Browser Support Javascript From Php Code? / Rounded Table Corners In A Webpage,how? (2) (3) (4)
Javascript Corners by Nobody: 12:43pm On Oct 16, 2012 |
Sorry guys was terribly busy with School(Aptech) and Life and ex-Relationships( )), but now am back and i have stuffs to write here about JavaScript development and first i'll be using this as introduction, just decided to pick a new place to rant about JS Development because as much as you know it JS is getting Faster(V8) and even in Server Environments(NodeJS) or even with more powerful architecture (Dojo/Backbone/amberJS) but am not jumping into frameworks as they hinder your knowledge of JavaScript so i'll start with the basic to the hardest. so have fun. |
Re: Javascript Corners by Nobody: 12:48pm On Oct 16, 2012 |
We are all familiar with the simple pattern of creating JavaScript Objects like this,Rule 1 Everything is an object in JavaScript, even function is a First-Class Object with properties,
|
Re: Javascript Corners by Nobody: 12:51pm On Oct 16, 2012 |
Re: Javascript Corners by Nobody: 1:05pm On Oct 16, 2012 |
//Let's try using Literal Object also var Car={ However with this Pattern we can't have a constructor so can't do this
The Classical approach actually allows us to achieve Prototypical Inheritance to All Objects, while this creates an Object with keys and functions attached to this, calling a car.prototype yields to "Object" |
Re: Javascript Corners by Nobody: 1:07pm On Oct 16, 2012 |
//Style 2 var x=Object.create(null); //Empty Object |
Re: Javascript Corners by Nobody: 1:10pm On Oct 16, 2012 |
//Style 3 Using Object API var x=Object.create(null); So we can create a Top Object and have several Objects inherit from them e.g Car->SuperCar->Super-Space-Car |
Re: Javascript Corners by Nobody: 1:23pm On Oct 16, 2012 |
//But wait a min there's a danger here assuming am i have an array of functions which should hold objects of cars and display their name while traversing
And people say JavaScript is Crap |
Re: Javascript Corners by Nobody: 7:47pm On Oct 16, 2012 |
console.log -> you need to explain that one to your students. Only FF or crossbrowser? |
Re: Javascript Corners by Nobody: 8:37pm On Oct 16, 2012 |
it works on all browsers well i think I.E too should work |
Re: Javascript Corners by Nobody: 11:09pm On Oct 16, 2012 |
pc guru: it works on all browsers well i think I.E too should workWell, i am a student on this thread, but i somehow feel that it is tied to firebug and is not crossplatform, but please help the olodo student to confirm. |
Re: Javascript Corners by Nobody: 11:17pm On Oct 16, 2012 |
won't work on IE but its no big deal, console.log is never in your production site, and to be frank I.E i hardly test on I.E but with Firebug Lite on IE it will work. |
Re: Javascript Corners by Nobody: 8:42am On Oct 17, 2012 |
^^^Gracias teacher. . . |
Re: Javascript Corners by Nobody: 9:40pm On Oct 17, 2012 |
//Today am a bit drunk so i can't write much so we will look at Prototype Inheritance Because in JavaScript everything is an Object we can add a function to a prototype to a Object to Share an a method to any Function created, a prototype method/variable can be attached before initialization and after initialization. example let's create a Class Objects
|
Re: Javascript Corners by Nobody: 2:59pm On Oct 24, 2012 |
Just a Simple Update all my tutorials will be tested with Firebug and FireUnit on FireFox to give a professional feel so next lessons will use it so u can download it http://fireunit.org/fireunit-1.0a4.xpi (Requires Firebug) |
Re: Javascript Corners by dhtml(m): 2:18am On Oct 25, 2012 |
iite man |
Re: Javascript Corners by Nobody: 2:13pm On Oct 25, 2012 |
Before i head out for sallah since i was a former Muslim, let's practice a bit with some FireUnit Code; 1. Testing Your Code with simple ok
|
Re: Javascript Corners by Nobody: 2:16pm On Oct 25, 2012 |
2. Comparing with Compare API
|
Re: Javascript Corners by dhtml(m): 7:29pm On Oct 25, 2012 |
*Peeping* |
Re: Javascript Corners by Ajibel(m): 2:11am On Oct 26, 2012 |
*copying* |
Re: Javascript Corners by Ajibel(m): 2:13am On Oct 26, 2012 |
I'd appreciate a JS Math object tutorial. Not gettin d best of it via w3s Sir/teacher! |
Re: Javascript Corners by Nobody: 9:50am On Oct 28, 2012 |
Actually Maths Functions are easy to use based on what you are using them for so i can't really give an example because it will involve an Application of it e.g Animation,Graphics, or something else, but they are static methods just by using Math.sin() and you get your results. |
Re: Javascript Corners by Nobody: 10:02am On Oct 28, 2012 |
Today we will create a Module with Self Executing Function inside and the purpose of this is to have it return a function and keeping our private codes, now why do we do this, 1 to expose only some methods to users, and also to avoid naming-collision, this is what is also used as APIS in javascript, and it allows you to easily change the code once and it reflects in all places. i'll be testing with fireunit as stated before. DO: Create an API of BrothelFinder with 3 method and 1 properties Methods, FindAllBrothels,FindSexWorker,FindCheapestBrother Properties Version, |
Re: Javascript Corners by Nobody: 11:17am On Oct 28, 2012 |
|
Re: Javascript Corners by Nobody: 11:39am On Oct 28, 2012 |
and to use simply say BrothelFinder.findAllBrothers(); BrothelFinder.ver BrothelFinder.findSexWorker(name); |
(1) (Reply)
Is N1,000,000 Per Year Owkay For Web Developer / A Complete List Of Google Products And Services / Win A Free Website Here
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 44 |