miércoles, 8 de octubre de 2014

El Libro del Día: ASP.NET AJAX Programmer’s Reference

El Libro del Día: 2014-10-08

Titulo: ASP.NET AJAX Programmer’s Reference
Autor: Shahram Khosravi
Editorial: Wrox
Nro Paginas: 1563

Capítulos:
Chapter 1: AJAX Technologies
Chapter 2: JavaScript Base Type Extensions
Chapter 3: Built-In and Custom Exception Types
Chapter 4: JavaScript Object-Oriented Programming and Type Reflection Extensions
Chapter 5: Event Programming Extensions
Chapter 6: DOM Extensions
Chapter 7: Component Development Infrastructure
Chapter 8: Developing Client Controls
Chapter 9: Event Bubbling and Button Client Control
Chapter 10: Type Description Extensions
Chapter 11: Data Classes
Chapter 12: Client-Server Communications
Chapter 13: Consuming Web Services Via Soap Messages
Chapter 14: Consuming Web Services Via JSON Messages
Chapter 15: Proxy Classes
Chapter 16: Behaviors
Chapter 17: Script and Extender Server Controls
Chapter 18: Web Services Bridges and Transformers
Chapter 19: UpdatePanel and ScriptManager
Chapter 20: Using UpdatePanel in User Controls and Custom Controls
Chapter 21: Page Life Cycle and Asynchronous Partial Page Rendering
Chapter 22: ASP.NET AJAX Client-Side PageRequestManager
Chapter 23: Asynchronous Partial Page Rendering: Server Side Processing
Chapter 24: Asynchronous Partial Page Rendering: Client-Side Processing
Appendix A: XML Script
Appendix B: Binding
Appendix C: Actions
Appendix D: Data Control
Appendix E: Templated Controls
Appendix F: ListView

Descarga:
ASPNET_AJAX_Programmer's_Reference

martes, 7 de octubre de 2014

El Libro del Día: Microsoft ADO.NET 4 Step by Step

El Libro del Día: 2014-10-07

Titulo: Microsoft ADO.NET 4 Step by Step
Autor: Tim Patrick
Editorial: Microsoft
Nro Paginas: 441

Capítulos:
Part I Getting to Know ADO.NET
Chapter 1 Introducing ADO.NET 4
Chapter 2 Building Tables of Data
Chapter 3 Storing Data in Memory
Chapter 4 Accessing the Right Data Values
Chapter 5 Bringing Related Data Together
Chapter 6 Turning Data into Information
Chapter 7 Saving and Restoring Data
Part II Connecting to External Data Sources
Chapter 8 Establishing External Connections
Chapter 9 Querying Databases
Chapter 10 Adding Standards to Queries
Chapter 11 Making External Data Available Locally
Chapter 12 Guaranteeing Data Integrity
Part III Entity Framework
Chapter 13 Introducing the Entity Framework
Chapter 14 Visualizing Data Models
Chapter 15 Querying Data in the Framework
Chapter 16 Understanding Entities Through Objects
Part IV LINQ
Chapter 17 Introducing LINQ
Chapter 18 Using LINQ to DataSet
Chapter 19 Using LINQ to Entities
Chapter 20 Using LINQ to SQL
Part V Providing RESTful Services with WCF Data Services
Chapter 21 Binding Data with ADO.NET
Chapter 22 Providing RESTful Services with WCF Data Services

Descarga:
Microsoft_ADONET4_StepByStep

lunes, 6 de octubre de 2014

El Libro del Día: Exam Ref 70-483 Programming in C#

El Libro del Día: 2014-10-06

Titulo: Exam Ref 70-483 Programming in C#
Autor: Wouter de Kort
Editorial: Microsoft
Nro Paginas: 379

Capítulos:
Chapter 1 Manage program flow
Chapter 2 Create and use types
Chapter 3 Debug applications and implement security
Chapter 4 Implement data access

Descarga:
ExamRef_70483_Programming_C#

domingo, 5 de octubre de 2014

El Libro del Día: Exam Ref 70-486 Developing ASP.NET MVC 4 Web Applications

El Libro del Día: 2014-10-05

Titulo: Exam Ref 70-486 Developing ASP.NET MVC 4 Web Applications
Autor: William Penberthy
Editorial: Microsoft
Nro Paginas: 386

Capítulos:
Chapter 1 Design the application architecture
Chapter 2 Design the user experience
Chapter 3 Develop the user experience
Chapter 4 Troubleshoot and debug web applications
Chapter 5 Design and implement security

Descarga:
ExamRef_70486_Developing_ASPNET_MVC4_WebApplications

sábado, 4 de octubre de 2014

El Libro del Día: Exam Ref 70485

El Libro del Día: 2014-10-04

Titulo: Exam Ref 70485 Advanced Windows Store App Development Using C#
Autor: Roberto Brunetti, Vanni Boncinelli
Editorial: Microsoft
Nro Paginas: 462

Capítulos:
Chapter 1 Develop Windows Store apps
Chapter 2 Discover and interact with devices
Chapter 3 Program user interaction
Chapter 4 Enhance the user interface
Chapter 5 Manage data and security
Chapter 6 Prepare for a solution deployment

Descarga:
ExamRef_70485_Advanced_WindowsStore_C#

viernes, 3 de octubre de 2014

El Libro del Día: Practical HTML5 Projects

El Libro del Día: 2014-10-03

Titulo: Practical HTML5 Projects
Autor: Adrian W. West
Editorial: Apress
Nro Paginas: 474

Capítulos:
Chapter 1: Moving to HTML5
Chapter 2: A Rollover Picture Gallery
Chapter 3: Backgrounds
Chapter 4: Rollover Menus
Chapter 5: Moving to CSS3
Chapter 6: Audio, Video, and Slide Shows
Chapter 7: Rounded Corners
Chapter 8: Drop Shadows
Chapter 9: Create Collages and Galleries
Chapter 10: Add PayPal
Chapter 11: Secure Feedback Methods
Chapter 12: Monitor Mayhem
Chapter 13: Appearance and Usefulness
Chapter 14: Accessibility
Chapter 15: Dump Those Deprecated Items
Chapter 16: Search Engine Optimization
Chapter 17: Printing, Counting, and Redirecting
Chapter 18: Validation
Chapter 19: Troubleshooting
Appendix: Quick Reference, Techniques, and Useful Data

Descarga:
Practical_HTML5_Projects

jueves, 2 de octubre de 2014

El Demo del Día: Gráficos de Lineas y Curvas en WinForms

Gráficos de Lineas y Curvas en WinForms

Hoy veremos como crear gráficos en .NET dinamicamente usando la clase Graphics del espacio de Nombres System.Drawing, la cual tiene métodos que permiten dibujar textos, lineas, curvas, etc.

Para el ejemplo lo haremos mediante un Timer que genera números al azar con los cuales se crearan los puntos a graficar, pero en un caso real, en vez del Timer podemos leer de una base de datos una serie de datos o también recibir por el puerto serial o via sockets leer el valor de un dispositivo conectado a la computadora, por ejemplo un termómetro, balanza electrónica, medición de latidos del corazón, pulsos, etc.

Crear la Aplicación Windows Forms

En el Visual Studio crear una aplicación en C# llamada: "GraficoLineasCurvas" y renombrar el formulario a "frmGrafico". Arrastrar solo un control Timer y llamarlo: "tmrGrafico" configurando sus propiedad Enabled en True, para que se habilite cada 100 milisegundos el gráfico.

El diseño del formulario debe quedar como se muestra en la figura:



Escribir el siguiente código en el formulario, sobre todo la función "graficarSeries" que esta asociado al evento "Tick" del timer "tmrGrafico":

using System;
using System.Drawing;
using System.Windows.Forms;

namespace GraficoLineasCurvas
{
    /*Creado por Luis Dueñas para el Blog*/
    public partial class frmGrafico : Form
    {
        private int x = 0;
        private int n = 40;
        private Point punto1Linea;
        private Point punto1Curva;

        public frmGrafico()
        {
            InitializeComponent();
        }

        private void graficarSeries(object sender, EventArgs e)
        {
            Random oAzar = new Random();
            int yLinea = oAzar.Next(this.Height-200) + 100;
            int yCurva = oAzar.Next(this.Height-200) + 100;
            if (x == 0)
            {
                punto1Linea = new Point(x,yLinea);
                punto1Curva = new Point(x, yCurva);
            }
            Point punto2Linea = new Point(x, yLinea);
            Point punto4Curva = new Point(x, yCurva);
            Graphics grafico = this.CreateGraphics();
            grafico.DrawString("Gráficos Dinámicos en .NET (Por Lduenas)",
                new Font("Arial",40),Brushes.Green,100,20);
            grafico.DrawLine(new Pen(Brushes.Red, 4), punto1Linea, punto2Linea);

            Point punto2Curva;
            Point punto3Curva;
            int c = (int)((x/n)-1)*n;
            if (punto1Curva.Y >= punto4Curva.Y)
            {
                punto2Curva = new Point(c + (n/4), punto4Curva.Y);
                punto3Curva = new Point(c+((3*n) / 4), punto1Curva.Y);              
            }
            else
            {
                punto2Curva = new Point(c+ (n / 4), punto1Curva.Y);
                punto3Curva = new Point(c+ ((3 *n) / 4), punto4Curva.Y);              
            }
            grafico.DrawBezier(new Pen(Brushes.Blue, 4), punto1Curva, punto2Curva,
            punto3Curva, punto4Curva);
         
            x += n;
            punto1Linea = punto2Linea;
            punto1Curva = punto4Curva;
            if (x >= this.Width)
            {
                x = 0;
                grafico.Clear(this.BackColor);
            }
        }
    }
}

Nota: Se crea la variable x para la posición de la columna y la variable y para la fila, ademas 2 variables punto1Linea y punto1Curva para guardar el punto anterior desde donde se iniciara el gráfico.

Para las lineas solo necesitamos 2 puntos: inicio (punto1Linea) y fin (punto2Linea), pero para la curva de Bézier necesitamos 4 puntos: punto de anclaje de inicio (punto1Curva), punto de control 1 (punto2Curva), punto de control 2 (punto3Curva), y punto de anclaje final (punto4Curva).

La variable n (por defecto 40) indica el intervalo en que aumenta las columnas o posición x.

Probar la Aplicación Creada

Grabar el proyecto y ejecutarlo con F5. Aparece una ventana maximizada como en la siguiente figura:




El texto con el título se mostrará de color verde, el gráfico de Lineas se mostrará en color rojo y el gráfico de Curvas en color azul.

Cuando llegue al final del ancho se borrará el dibujo y se creará nuevamente. Puedes experimentar modificando el tamaño del intervalo n de 40 a mas o menos.

Comentario Final

Es muy fácil crear gráficos dinámicos en .NET, ya sea de lineas o curvas, sin necesidad de recurrir a ningún Control, ya que estos solo se utilizan para graficar datos históricos (existentes den bases de datos, archivos de textos, xml, etc), pero, si deseamos graficar en tiempo real mejor es crear nuestro gráfico dinámicamente usando la clase Graphics de System.Drawing.

Descarga
Demo20_GraficoLineasCurvas