Continuing our tour on WPDK, today I want to explain the pattern used in the Javascript framework.
Javascript has many patterns , what we have chosen (a variant of the Module Pattern) believe maintains a good similarity with PHP, while still providing excellent advantages at the script level. The similarity I sought because some classes have their own counterpart Javascript in PHP, or vice versa.
Articles with tag 'Javascript'
WPDK: Javascript pattern
Coding Guidelines
When you are not working alone for most all developers comes time to find guidance in the writing of the code. Protocols and standards to allow "read" easily and intervene (more easily) in the code of others.
When we work on a project more programmers, often of different languages, you must find a common form of writing, in the standard internal and external documentation to the code. In my work I am normally interact with:
- Objetive-C, C / C + +
- PHP
- HTML
- Javascript
- Actionscript
- CSS
jQuery snippets
Verify the existence of an element in the DOM
You will've had to verify the existence of an element of the DOM. With jQuery could be spontaneous try:
Objective-C: subclassing and Categories
In Objective-C it is possible to extend a class given in two ways: by a classic subclassing (see also inheritance) or by exploiting the so-called Categories .
Note: there is also a third way in Objective-C indicated by the name of Posing we might call a mix of subclass (because it defines a new name) and Categories (because a given moment all classes of a type behave like the new) .
Very short snippet: slideshow in 10 lines of code
Let me demonstrate how it is possible to implement a simple slideshow of images with very few lines of code, using jQuery .
This technique can be implemented on any type of website, the important thing is to include the library jQuery . I used this technique for a site built in WordPress , developed in a few hours for an event.
Very short snippet: how to identify the Ajax calls in PHP
When building a Gateway Ajax, that is, a file that is called by the object XmlHTTPRequest JavaScript, you can inadvertently create a tunnel for intrusions do not like. In fact, given a file like the others, placed on our server, it is also accessible from the browser address bar.
Commodore 64 emulator Javascript
A little 'time ago I reported the version of a Commodore 64 emulator written in Adobe Actionscript 3.0, now in a new version :
Variable arguments in Javascript: two alternatives
In JavaScript you can write functions with variable arguments, that is, functions that do not necessarily accept a predefined number of inputs. For example, you can write functions like this:
How to get latitutine and longitude in Google Maps
To find the coordinates of an address or latitude and longitude, we can use this simple and useful hack. Open your site in Google Maps . Once on the map look for the address you would like (eg Via Cortese 10, Modena).
Shadowbox 3.0 beta
It was released just now (thanks to the suggestion of the author Michael JI Jackson ) the 3.0 beta release of Shadowbox.js . In addition to the new design of the website here are the most important changes in this release preliminary:







Latest Comments
Giovambattista Fazioli : @ ale: As shown @ Kevin see on GitHub repo: https://github.com/gfazioli/Ch roma-Key
Giovambattista Fazioli : @ Kevin: See https://github.com/gfazioli/Ch roma-Key
Kevin : Very nice example - would like to see the. fla too!
Ludovica : Hello! I'll explain my doubt. When I write a post not add pictures in the article (if so ...
Marco : hello @ Giovan Battista Fazioli, thanks for all the explanations of this excellent guide. I have a question to ...