El Libro del Día: 2014-10-19
Titulo: Data Push Apps with HTML5 SSE
Autor: Darren Cook
Editorial: O'Reilly
Nro Paginas: 221
Capítulos:
1. All About SSE...And Then Some
2. Super Simple Easy SSE
3. A Delightfully Realistic Data Push Application
4. Living in More Than the Present Moment
5. No More Ivory Tower: Making Our Application Production-Quality
6. Fallbacks: Data Push for Everyone Else
7. Fallbacks: There Has to Be a Better Way
8. More SSE: The Rest of the Standard
9. Authorization: Who’s That Knocking at My Door
A. The SSE Standard
B. Refactor: JavaScript Globals, Objects, and Closures
C. PHP
Descarga:
DataPushApps_HTML5_SSE
Blog de Luis Dueñas dedicado a la difusión del Desarrollo en Microsoft .NET, Visual Studio, WinForms, WebForms, MVC, ASP .NET, jQuery, AJAX, HTML5, JavaScript, Móviles, etc. Encontrarás Libros, Demos, Artículos Técnicos, Entrenamiento.
domingo, 19 de octubre de 2014
El Libro del Día: Data Push Apps with HTML5 SSE
Etiquetas:
Authorization,
Closures,
Darren Cook,
Data Push Apps,
Fallbacks,
HTML5,
Javascript,
Libros,
O'Reilly,
Objects,
PHP,
Refactor,
SSE,
Standard
viernes, 17 de octubre de 2014
El Libro del Día: Data Structures & Algorithms with JavaScript
El Libro del Día: 2014-10-17
Titulo: Data Structures & Algorithms with JavaScript
Autor: Michael McMillan
Editorial: O'Reilly
Nro Paginas: 246
Capítulos:
1. The JavaScript Programming Environment and Model
2. Arrays
3. Lists
4. Stacks
5. Queues
6. Linked Lists
7. Dictionaries
8. Hashing
9. Sets
10. Binary Trees and Binary Search Trees
11. Graphs and Graph Algorithms
12. Sorting Algorithms
13. Searching Algorithms
14. Advanced Algorithms
Descarga:
DataStructures_Algorithms_JavaScript
Titulo: Data Structures & Algorithms with JavaScript
Autor: Michael McMillan
Editorial: O'Reilly
Nro Paginas: 246
Capítulos:
1. The JavaScript Programming Environment and Model
2. Arrays
3. Lists
4. Stacks
5. Queues
6. Linked Lists
7. Dictionaries
8. Hashing
9. Sets
10. Binary Trees and Binary Search Trees
11. Graphs and Graph Algorithms
12. Sorting Algorithms
13. Searching Algorithms
14. Advanced Algorithms
Descarga:
DataStructures_Algorithms_JavaScript
Etiquetas:
Algorithms,
Arrays,
Binary Trees,
Data Structures,
Dictionaries,
Environment,
Graphs,
Hashing,
Javascript,
Libros,
Linked Lists,
Lists,
Michael McMillan,
Model,
O'Reilly,
Queues,
Searching,
Sets,
Sorting,
Stacks
jueves, 16 de octubre de 2014
El Demo del Día: Programación Asíncrona en ASP .NET con XmlHttpRequest
Programación Asíncrona en ASP .NET con XmlHttpRequest
En este breve post veremos como hacer un envío asíncrono usando XmlHttpRequest, para los que no conocen que es, es el padre de AJAX y fue creado por Microsoft por el año 2000 para usarlo en Outlook Web Access (OWA) que era un cliente de correo. Uno de los integrantes y líder del equipo que desarrollo XmlHttp es Alex Hopmann, para mayor información visitar su web:
Alex Hopmann
Requerimiento
Se desea registrar el nombre y la observación de una persona en el servidor, sin hacer un Full PostBack ni refrescar toda la pagina cuando se muestre el resultado, es decir, se desea hacer un envío y recepción asíncrona en forma nativa con HTTP.
Solución
Para enviar asíncronamente datos desde el Cliente Web (Navegador o Browser) hacia el Servidor Web podemos usar XmlHttpRequest desde JavaScript, en cualquier tipo de aplicación del servidor, sea ASP .NET, Java o PHP.
Crear la Aplicación Web en ASP .NET Web Form
Crear un "Nuevo Sitio web vacío de ASP .NET" en C# o VB.NET (en mi caso esta en VB.NET) llamado "Asincrono_XmlHttpRequest":
Nota: Conseguir una imagen para la espera llamada: Progress.gif
Cambiar de nombre a la pagina por "Registro.aspx" y realizar el siguiente diseño:
Para lograr el diseño mostrado, escribir el siguiente HTML:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Registro.aspx.vb" Inherits="Registro" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script>
function enviarDatos() {
var nombre = document.getElementById("txtNombre").value;
var observacion = document.getElementById("txtObservacion").value;
var espera = document.getElementById("divEspera");
var xhr = new XMLHttpRequest();
xhr.open("get", "Registro.aspx?nombre=" + nombre + "&observacion=" + observacion,true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onloadstart = function () { espera.style.display = "inline"; }
xhr.onloadend = function () { espera.style.display = "none"; }
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var spn = document.getElementById("lblMensaje");
spn.innerHTML = xhr.responseText;
}
}
xhr.send();
return false;
}
</script>
</head>
<body style="background-color:aqua">
<form id="form1" runat="server">
<div>
<h1>Envio Asincrono con XmlHttpRequest</h1>
<h2>Registro de Datos</h2>
Nombre:<br />
<asp:TextBox ID="txtNombre" Width="300" runat="server" /><br/>
Observacion: <br />
<asp:TextBox ID="txtObservacion" Width="300" TextMode="MultiLine"
Rows="5" runat="server" /><p />
<input id="btnGrabar" type="submit" value="Grabar"
onclick="return enviarDatos();" runat="server" />
<p />
<asp:Label ID="lblMensaje" runat="server"></asp:Label>
</div>
<div id="divEspera" style="display:none;text-align:center;position:fixed;left:0px;top:0px;
width:100%;height:100%;background-color:gray;">
<h1>Espera un momento...</h1>
<img src="Progress.gif" width="600" height="400" alt="" />
</div>
</form>
</body>
</html>
Nota: La función "enviarDatos" se esta asociando al evento "click" del botón para realizar el envio asíncrono usando el método send de la clase XMLHttpRequest. Además para recibir la respuesta del servidor se esta usando el evento "onreadystatechange" en donde se escribe HTML sobre la etiqueta "lblMensaje".
Escribir código en Visual Basic (o C#) para devolver los resultados, no sin antes hacer una pausa simulando la demora del servidor, tal como sigue:
Partial Class Registro
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim Nombre As String = Request.QueryString("nombre")
Dim Observacion As String = Request.QueryString("observacion")
If Nombre IsNot Nothing Then
System.Threading.Thread.Sleep(3000)
Response.Write(String.Format("{0} escribio {1}", Nombre, Observacion))
Response.End()
End If
End Sub
End Class
Nota: Para devolver los resultados del servidor al cliente estamos usando el objeto Response con sus métodos write para escribir la salida y end para enviarla al cliente.
Probar la Pagina Web
Guardar el Sitio Web, clic derecho a la Pagina "Registro.aspx" y seleccionar "Ver en el explorador".
Se mostrará una ventana similar a la mostrada en la siguiente figura:
Ingresar el nombre y la observación y luego clic al botón "Grabar" para realizar el envío de datos asíncrono al servidor. Observen que no se mueve el botón de Refresh del navegador, es decir no se hace un Full PostBack.
Luego, parecerá la pantalla de espera (div) con la imagen del progreso, tal como se muestra en la siguiente figura:
Después de los 3 segundos de espera se mostrará el resultado final sin refrescar toda la pagina, tal como se muestra en la siguiente figura:
Comentario Final
En este pequeño demo hemos visto como podemos llamar y recibir datos en forma asíncrona usando la API de HTML llamada XMLHttpRequest, la cual es nativa y actualmente es soportada por todos los navegadores modernos: Chrome, Firefox, Safari e Internet Explorer.
Esta forma de uso es mas ligera por ser nativa, pero no es tan difundido su uso por un poco de desconocimento (como todas las cosas), la mayoría conoce a los hijos de XMLHttpRequest que son jQuery ($.ajax, $.get, $.post, etc) y Microsoft AJAX Library (ScriptManager, UpdatePanel, Sys, etc).
Descarga:
Demo21_Asincrono_XmlHttpRequest
En este breve post veremos como hacer un envío asíncrono usando XmlHttpRequest, para los que no conocen que es, es el padre de AJAX y fue creado por Microsoft por el año 2000 para usarlo en Outlook Web Access (OWA) que era un cliente de correo. Uno de los integrantes y líder del equipo que desarrollo XmlHttp es Alex Hopmann, para mayor información visitar su web:
Alex Hopmann
Requerimiento
Se desea registrar el nombre y la observación de una persona en el servidor, sin hacer un Full PostBack ni refrescar toda la pagina cuando se muestre el resultado, es decir, se desea hacer un envío y recepción asíncrona en forma nativa con HTTP.
Solución
Para enviar asíncronamente datos desde el Cliente Web (Navegador o Browser) hacia el Servidor Web podemos usar XmlHttpRequest desde JavaScript, en cualquier tipo de aplicación del servidor, sea ASP .NET, Java o PHP.
Crear la Aplicación Web en ASP .NET Web Form
Crear un "Nuevo Sitio web vacío de ASP .NET" en C# o VB.NET (en mi caso esta en VB.NET) llamado "Asincrono_XmlHttpRequest":
Nota: Conseguir una imagen para la espera llamada: Progress.gif
Cambiar de nombre a la pagina por "Registro.aspx" y realizar el siguiente diseño:
Para lograr el diseño mostrado, escribir el siguiente HTML:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Registro.aspx.vb" Inherits="Registro" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script>
function enviarDatos() {
var nombre = document.getElementById("txtNombre").value;
var observacion = document.getElementById("txtObservacion").value;
var espera = document.getElementById("divEspera");
var xhr = new XMLHttpRequest();
xhr.open("get", "Registro.aspx?nombre=" + nombre + "&observacion=" + observacion,true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onloadstart = function () { espera.style.display = "inline"; }
xhr.onloadend = function () { espera.style.display = "none"; }
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var spn = document.getElementById("lblMensaje");
spn.innerHTML = xhr.responseText;
}
}
xhr.send();
return false;
}
</script>
</head>
<body style="background-color:aqua">
<form id="form1" runat="server">
<div>
<h1>Envio Asincrono con XmlHttpRequest</h1>
<h2>Registro de Datos</h2>
Nombre:<br />
<asp:TextBox ID="txtNombre" Width="300" runat="server" /><br/>
Observacion: <br />
<asp:TextBox ID="txtObservacion" Width="300" TextMode="MultiLine"
Rows="5" runat="server" /><p />
<input id="btnGrabar" type="submit" value="Grabar"
onclick="return enviarDatos();" runat="server" />
<p />
<asp:Label ID="lblMensaje" runat="server"></asp:Label>
</div>
<div id="divEspera" style="display:none;text-align:center;position:fixed;left:0px;top:0px;
width:100%;height:100%;background-color:gray;">
<h1>Espera un momento...</h1>
<img src="Progress.gif" width="600" height="400" alt="" />
</div>
</form>
</body>
</html>
Escribir código en Visual Basic (o C#) para devolver los resultados, no sin antes hacer una pausa simulando la demora del servidor, tal como sigue:
Partial Class Registro
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim Nombre As String = Request.QueryString("nombre")
Dim Observacion As String = Request.QueryString("observacion")
If Nombre IsNot Nothing Then
System.Threading.Thread.Sleep(3000)
Response.Write(String.Format("{0} escribio {1}", Nombre, Observacion))
Response.End()
End If
End Sub
End Class
Nota: Para devolver los resultados del servidor al cliente estamos usando el objeto Response con sus métodos write para escribir la salida y end para enviarla al cliente.
Probar la Pagina Web
Guardar el Sitio Web, clic derecho a la Pagina "Registro.aspx" y seleccionar "Ver en el explorador".
Se mostrará una ventana similar a la mostrada en la siguiente figura:
Ingresar el nombre y la observación y luego clic al botón "Grabar" para realizar el envío de datos asíncrono al servidor. Observen que no se mueve el botón de Refresh del navegador, es decir no se hace un Full PostBack.
Luego, parecerá la pantalla de espera (div) con la imagen del progreso, tal como se muestra en la siguiente figura:
Después de los 3 segundos de espera se mostrará el resultado final sin refrescar toda la pagina, tal como se muestra en la siguiente figura:
Comentario Final
En este pequeño demo hemos visto como podemos llamar y recibir datos en forma asíncrona usando la API de HTML llamada XMLHttpRequest, la cual es nativa y actualmente es soportada por todos los navegadores modernos: Chrome, Firefox, Safari e Internet Explorer.
Esta forma de uso es mas ligera por ser nativa, pero no es tan difundido su uso por un poco de desconocimento (como todas las cosas), la mayoría conoce a los hijos de XMLHttpRequest que son jQuery ($.ajax, $.get, $.post, etc) y Microsoft AJAX Library (ScriptManager, UpdatePanel, Sys, etc).
Descarga:
Demo21_Asincrono_XmlHttpRequest
Etiquetas:
.NET,
AJAX,
Alex Hopmann,
Asíncrono,
ASP.NET,
Asynchronous,
Demos,
Javascript,
jQuery,
Lduenas,
Microsoft,
Response,
ScriptManager,
UpdatePanel,
VB.NET,
WebForms,
XMLHttpRequest
El Libro del Día: The Art of Unit Testing
El Libro del Día: 2014-10-16
Titulo: The Art of Unit Testing (Second Edition)
Autor: Roy Osherove
Editorial: Manning
Nro Paginas: 294
Capítulos:
PART 1 GETTING STARTED
1 The basics of unit testing
2 A first unit test
PART 2 CORE TECHNIQUES
3 Using stubs to break dependencies
4 Interaction testing using mock objects
5 Isolation (mocking) frameworks
6 Digging deeper into isolation frameworks
PART 3 THE TEST CODE
7 Test hierarchies and organization
8 The pillars of good unit tests
PART 4 DESIGN AND PROCESS
9 Integrating unit testing into the organization
10 Working with legacy code
11 Design and testability
Descarga:
The_Art_Of_Unit_Testing
Titulo: The Art of Unit Testing (Second Edition)
Autor: Roy Osherove
Editorial: Manning
Nro Paginas: 294
Capítulos:
PART 1 GETTING STARTED
1 The basics of unit testing
2 A first unit test
PART 2 CORE TECHNIQUES
3 Using stubs to break dependencies
4 Interaction testing using mock objects
5 Isolation (mocking) frameworks
6 Digging deeper into isolation frameworks
PART 3 THE TEST CODE
7 Test hierarchies and organization
8 The pillars of good unit tests
PART 4 DESIGN AND PROCESS
9 Integrating unit testing into the organization
10 Working with legacy code
11 Design and testability
Descarga:
The_Art_Of_Unit_Testing
Etiquetas:
C#,
Dependencies,
Design,
Frameworks,
Hierarchies,
Integrating,
Legacy Code,
Libros,
Manning,
Mock Objects,
Organization,
Pillars,
Roy Osherove,
Testability,
Unit Testing
miércoles, 15 de octubre de 2014
El Libro del Día: Windows 8 and Windows Phone 8 Game Development
El Libro del Día: 2014-10-15
Titulo: Windows 8 and Windows Phone 8 Game Development
Autor: Adam Dawes
Editorial: Apress
Nro Paginas: 499
Capítulos:
Chapter 1: Getting Started
Chapter 2: Getting Started with MonoGame
Chapter 3: Creating a Game Framework
Chapter 4: User Input
Chapter 5: Sounding Out with Game Audio
Chapter 6: Drawing with Vertices and Matrices
Chapter 7: The World of 3-D Graphics
Chapter 8: Further 3-D Features and Techniques
Chapter 9: Enhancing Your Game
Chapter 10: Application Management
Chapter 11: Getting Started with XAML
Chapter 12: XAML Controls and Pages
Chapter 13: Mixing XAML and MonoGame
Chapter 14: Distributing Your Game
Descarga:
Windows8_WindowsPhone8_GameDevelopment
Titulo: Windows 8 and Windows Phone 8 Game Development
Autor: Adam Dawes
Editorial: Apress
Nro Paginas: 499
Capítulos:
Chapter 1: Getting Started
Chapter 2: Getting Started with MonoGame
Chapter 3: Creating a Game Framework
Chapter 4: User Input
Chapter 5: Sounding Out with Game Audio
Chapter 6: Drawing with Vertices and Matrices
Chapter 7: The World of 3-D Graphics
Chapter 8: Further 3-D Features and Techniques
Chapter 9: Enhancing Your Game
Chapter 10: Application Management
Chapter 11: Getting Started with XAML
Chapter 12: XAML Controls and Pages
Chapter 13: Mixing XAML and MonoGame
Chapter 14: Distributing Your Game
Descarga:
Windows8_WindowsPhone8_GameDevelopment
Etiquetas:
3D,
Adam Dawes,
Apress,
Audio,
C#,
Controls,
Distributing,
Framework,
Game Development,
Libros,
Matrices,
MonoGame,
Pages,
User Input,
Vertices,
Windows 8,
Windows Phone 8,
XAML
martes, 14 de octubre de 2014
El Libro del Día: Oracle Database 12c Performance Tuning Recipes
El Libro del Día: 2014-10-14
Titulo: Oracle Database 12c Performance Tuning Recipes
Autor: Sam R. Alapati, Darl Kuhn, Bill Padfield
Editorial: Apress
Nro Paginas: 621
Capítulos:
Chapter 1: Optimizing Table Performance
Chapter 2: Choosing and Optimizing Indexes
Chapter 3: Optimizing Instance Memory
Chapter 4: Monitoring System Performance
Chapter 5: Minimizing System Contention
Chapter 6: Analyzing Operating System Performance
Chapter 7: Troubleshooting the Database
Chapter 8: Creating Efficient SQL
Chapter 9: Manually Tuning SQL
Chapter 10: Tracing SQL Execution
Chapter 11: Automated SQL Tuning
Chapter 12: Execution Plan Optimization and Consistency
Chapter 13: Configuring the Optimizer
Chapter 14: Implementing Query Hints
Chapter 15: Executing SQL in Parallel
Descarga:
Oracle_Database_12c_Performance_Tuning_Recipes
Titulo: Oracle Database 12c Performance Tuning Recipes
Autor: Sam R. Alapati, Darl Kuhn, Bill Padfield
Editorial: Apress
Nro Paginas: 621
Capítulos:
Chapter 1: Optimizing Table Performance
Chapter 2: Choosing and Optimizing Indexes
Chapter 3: Optimizing Instance Memory
Chapter 4: Monitoring System Performance
Chapter 5: Minimizing System Contention
Chapter 6: Analyzing Operating System Performance
Chapter 7: Troubleshooting the Database
Chapter 8: Creating Efficient SQL
Chapter 9: Manually Tuning SQL
Chapter 10: Tracing SQL Execution
Chapter 11: Automated SQL Tuning
Chapter 12: Execution Plan Optimization and Consistency
Chapter 13: Configuring the Optimizer
Chapter 14: Implementing Query Hints
Chapter 15: Executing SQL in Parallel
Descarga:
Oracle_Database_12c_Performance_Tuning_Recipes
Etiquetas:
Apress,
Bill Padfield,
Darl Kuhn,
Indexes,
Libros,
Memory,
Optimizer,
Optimizing,
Oracle Database,
Parallel,
Performance,
Query Hints,
Recipes,
Sam R. Alapati,
SQL,
Tables,
Tracing,
Troubleshooting,
Tuning
lunes, 13 de octubre de 2014
El Libro del Día: Head First jQuery
El Libro del Día: 2014-10-13
Titulo: Head First jQuery
Autor: Ryan Benedetti, Ronan Cranley
Editorial: O'Reilly
Nro Paginas: 538
Capítulos:
1 Getting Started with jQuery: Web Page Action
2 Selectors and Methods: Grab and Go
3 jQuery Events and Functions: Making Things Happen on Your Page
4 jQuery Web Page Manipulation: Mod the DOM
5 jQuery Effects and Animation: A Little Glide in Your Stride
6 jQuery and JavaScript: Luke jQuery, I Am Your Father
7 Custom Functions for Custom Effects: What Have You Done for Me Lately
8 jQuery and Ajax: Please Pass the Data
9 Handling JSON Data: Client, Meet Server
10 jQuery UI: Extreme Form Makeover
11 jQuery and APIs: Objects, Objects Everywhere
i Leftovers: The Top Ten Things (We Didn’t Cover)
ii Set Up a Development Environment: Get Ready for the Big Times
Descarga:
Head_First_jQuery
Titulo: Head First jQuery
Autor: Ryan Benedetti, Ronan Cranley
Editorial: O'Reilly
Nro Paginas: 538
Capítulos:
1 Getting Started with jQuery: Web Page Action
2 Selectors and Methods: Grab and Go
3 jQuery Events and Functions: Making Things Happen on Your Page
4 jQuery Web Page Manipulation: Mod the DOM
5 jQuery Effects and Animation: A Little Glide in Your Stride
6 jQuery and JavaScript: Luke jQuery, I Am Your Father
7 Custom Functions for Custom Effects: What Have You Done for Me Lately
8 jQuery and Ajax: Please Pass the Data
9 Handling JSON Data: Client, Meet Server
10 jQuery UI: Extreme Form Makeover
11 jQuery and APIs: Objects, Objects Everywhere
i Leftovers: The Top Ten Things (We Didn’t Cover)
ii Set Up a Development Environment: Get Ready for the Big Times
Descarga:
Head_First_jQuery
Etiquetas:
AJAX,
Animation,
DOM,
Effects,
Events,
Functions,
Head First,
Javascript,
jQuery,
jQuery UI,
JSON,
Libros,
Methods,
O'Reilly,
Objects,
Ronan Cranley,
Ryan Benedetti,
Selectors,
Web Page
Suscribirse a:
Entradas (Atom)









