4 Tutoriales Backbone.js

Communicating between views in Backbone
The backbone application that I am currently working on has a document section and a sidebar section. To represent the above structure in Backbone, I came up with following views. ApplicationView, DocumentView, SidebarView…

Why should we use server side in Backbone.js?
JavaScript is often written as a free-hanging and unrelated blocks of code, and it doesn’t take long before it becomes hard to make sense of the logic and organization of your own code. This becomes very much problematic when you are making a single page application(SPA). We can use server side scripting along with backbone.js to tackle this problem. Although this very approach creates problems of it’s own.

Introduction to the Backbone Query API
As a relatively “new” user of Backbone.js, I looked at different JSON querying tools that existed. At the time I was still struggling with using JSON as the data source and wrapping my head around the process for querying the data set that was contained in a large string. Coming from a Java and strong PL/SQL background in Oracle, I wanted to find something akin to the PL/SQL language I was used to.

Backbone.js Events Example
The purpose of this tutorial is to provide basic understanding of backbone.js along with its components. We will be discussing that what backbone.js actually is and how it differs from other JavaScript libraries. In particular, we will be understanding its out of the box support for events with example.

Características interesantes de Angular 2

Typescript

Con TypeScript podremos utilizar un IDE y trabajar al estilo “Java/Scala”

Pipes:

Los filtros de Angular ahora se llaman Pipes.

Se crean así:

Y se usan:

Y en nuestro HTML:

Uso de HTTP

Basta inyectar el componente http e invocarlo con cabeceras y parámetros:

Nos devuelve un Observable que se consume:

Observables:

En Angular1 teníamos las Promises, ahora los Observables como veíamos en el ejemplo anterior.

Simplificación en las directivas:

En Angular2 se elimina la distinción entre controladores y directivas.

Por ejemplo un componente que encapsula el uso de Charts ng2:

Su template:

Y se usa:

Leer más

Node.js for Enterprise Applications! Are You Kidding?

En estos momentos en los que parece que Node.js es el Killer Java en cierto tipos de aplicaciones me ha gustado saber que no estoy solo…

Mihir Shelat argumenta en este post por qué Java es una mejor opción para el desarrollo de Aplicaciones Empresariales.

Os recomiendo su lectura, tanto a los fans de Java como a los de Node.js🙂, y os animo a comentar vuestra opinión.

Los puntos débiles de Node.js para aplicaciones empresariales están en:

· El Modelo Single-Thread

· Que todo sea asíncrono: os ha pasado lo del Callback Hell?

· WebServer y código de negocio en el mismo proceso

· NPM como mecanismo de paquetes

· …

Leer más

Taming the AngularJS – Tutorials to get you started

Web Code Geeks on Steroids

Taming AngularJS

First baby steps with Angular.js
This article outlines some of my notes of a webinar about Angular.js I recently participated at. These are really just “baby steps” in that it covers the very basics that might help to get started. Since these are really my first steps with Angular, I might have misunderstood some of the stuff. So feel free to help me improve this article!

Learning Angular: What is the scope of your directive?
This might create quite some debugging headaches, especially in a larger application. Things don’t bind properly, have different data on the scope than you’d expect etc.. When you define your directives, you have to be really careful about their scope.

Learning Angular: Access directive scope variables from directive controllers and vice versa
Angular directives can have a separate, isolated scope, which is even the suggested approach most of the time. And they can have directive controllers. But…how do I access the directive’s scope variables from the directive controller and vice-versa?? It’s quite simple, read on and see it yourself.

Why Angular is not only for single page web apps
AngularJs is often seen as a viable solution for building full scale single page web applications. Although that is a good use case for Angular, in this post we will explore how the framework can also be used to incrementally add functionality to any web page in general, in some cases with little to no Javascript needed.

Understanding Providers, Services, and Factories in Angular
I’ve read quite a few posts (as well as questions posed) about the differences between services and factories in Angular. I’ve seen just as many attempts to explain it and even fell victim to trying to force an explanation for the difference myself. The answer is more simple than you may think and is evident if you browse the Angular source code and then re-read the documentation.

open.php?u=09cef08fc376e6da2dace7d09&id=7bbc1eddd0&e=7d180cd87d

Ext JS 6: Lo bueno, lo malo y lo feo!

¿Qué es Jaggery?

Jaggery es un framework con licencia Apache 2.0 para escribir aplicaciones y servicios Web completas:Front-end, comunicación, lógica en Servidor y persistencia, todo ello en Javascript.

Las aplicaciones Jaggery se despliegan sobre el Jaggery Server (un Servidor Java construido sobre WSO2 Carbon Runtime), y ofrece una consola que permite desplegar y gestionar aplicaciones Jaggery:

También ofrece una CLI para desplegar apps vía línea de comandos.

Entre sus herramientas tenemos un Editor para IntelliJ y un Debugger sobre Rhino Javascript Debugger: http://jaggeryjs.org/tools.jag

Para probarlo lo mejor es echar un ojo a sus demos.

¿Qué es DynJS?

DynJS es un Runtime ECMAScript para la JVM Java.

Para ver lo que nos ofrece basta con:

1. Descomprimir su ZIP (versión actual la 0.3.0): https://oss.sonatype.org/content/repositories/releases/org/dynjs/dynjs/0.3.0/dynjs-0.3.0-dist.zip

2. Desde una Shell (o cygwin) ejecutar /dynjs-0.3.0/bin/dynjs –consol

3. Escribir algo en Javascript:

4. O escribir un pequeño JS: ejemplo.js

print("Hi! What’s your name?");

var sayHello = function(name) {

print("Hello " + name);

}

System = java.lang.System;

scanner = new java.util.Scanner(System.in);

name = scanner.nextLine();

sayHello(name);

Y lanzarlo con

DynJS también puede embeberse en una aplicación Java:

1. Importamos la librería en nuestor pom.xml:

2. Lo uso así:

En un próximo post veréis por qué es tan interesante DynJS….

A %d blogueros les gusta esto: