Fuentes web
Entradas
Comentarios

De la mano de Coding 4 Fun , nos llegan varios kits, que demuestran lo sencillo que puede ser hacer una aplicación vistosa con el WPF y Visual 2008.

Ademas, incluyen una serie de controles y componentes orientados a comunicaciones, que ademas, funcionan sobre las ediciones Express.

¿A que esperais?

En este interesante articulo podemos encontrar, un ejemplo de aplicación implementada con MVC.

Modelo-Vista-Controlador.

Ademas de una implementación, del patron sobre un clon de DIGG  (El Meneame yanki) utiliza las siguientes tecnologias

ASP.NET MVC, LINQ to SQL y ASP.NET AJAX.

Se puede descargar en forma de starter kit :

CSS Para todos

http://www.cssplay.co.uk/ Magnífica página donde podemos encontrar nuevas maneras de diseñar con CSS, sin necesidad de javascript. Un curioso menu http://www.cssplay.co.uk/menu/mantis.html y un layout con cabecera y pie fijos http://www.cssplay.co.uk/layouts/fixit.html

Un plugin para pasar de Photoshop a CSS

http://www.medialab.com/sitegrinder/download.html

Y unos cuantos STARTERS de MICROSOFT

http://msdn2.microsoft.com/en-us/asp.net/aa336613.aspx

CON LAYOUTS

Editar CSS

Cuando no queda mas remedio que pegarse con CSS, un buen editor, es de agradecer:

  1. CSS Tab Designer
  2. Balthisar Cascade CSS Editor
  3. CSS Stylesheet Editor
  4. EclipseStyle
  5. BHead – Meta Tags & CSS Generator
  6. Redbox13 CSS-editor
  7. StyleSpread
  8. <oXygen/> CSS Editor
  9. CSSEdit
  10. CSSED
  11. CSS Editor for Eclipse
  12. JustStyle CSS Editor
  13. Style Assistant

Estos , son algunos programas gratuitos, que nos pueden ayudar.

Via TuFuncion

De la web de phxsoftware, un articulo interesante sobre sqlite y las consultas parametrizadas

Parameterized queries are something often overlooked by developers. It either looks confusing, or can’t possibly be that important, or the developer wants more fine-tuned control over their queries, the excuses go on. If you’re even remotely interested in maximizing performance, reducing SQL injection risks, or are deciding whether or not its worthwhile to rewrite your code to use parameterized queries, then please read on! If you already know all about parameterized queries, just skip to the end and read the syntax. Perhaps the single greatest feature of parameterized queries is that every major database engine takes advantage of them! What follows applies to all major database engines, not just SQLite:

First things first. SQL (Structured Query Language) is an interpreted language. Every time you execute a new SQL query the contents of the query must be parsed, an execution plan developed, memory allocated, etc. Parsing SQL is an expensive operation, though usually not as expensive as accessing the underlying data the query references. The decision on when to use paramterized queries is often influenced by a couple of factors:

  • Does the query involve input from the user?
  • Am I executing essentially the same statement with slightly different input values repeatedly?

If your code does either of these, you should consider using parameterized queries. Take for example, the following loop:

string lookupValue;
using (SQLiteCommand cmd = cnn.CreateCommand())
{
  for (int i = 0; i < 100; i++)
  {
    lookupValue = getSomeLookupValue(i);
    cmd.CommandText = @"UPDATE [Foo] SET [Value] = [Value] + 1
                        WHERE [Customer] LIKE '" + lookupValue + "'";
    cmd.ExecuteNonQuery();

  }
}

Now this code may look innocent enough, but it suffers some performance penalties and some security risks. First, the CommandText has to be re-evaluated every time the command is executed. SQLite must parse the statement and construct a query plan 100 times in this loop. There are also a lot of memory allocations being done here. The previously-prepared CommandText is freed, the new CommandText allocated. A statement is compiled and strings are concatenated causing even more allocations and deallocations. There are also a great number of interop calls being performed behind the scenes.

If lookupValue is unknown, provided by the user, or can be altered externally, this statement becomes a risk for an injection attack. Imagine what would happen if the lookupValue contained the string ‘; DELETE FROM Foo; SELECT ‘

Now put that statement together and you have:

UPDATE [Foo] SET [Value] = [Value] + 1
WHERE [Customer] LIKE ”; DELETE FROM Foo; SELECT ”

Now this is a disastrous injection attack. The very least you’ll have to do to defend against this is double any single quotes that may appear in lookupValue, which of course is yet another step in the whole loop that will slow things down.

Parameterized queries provide a means to minimize all this impact. With a parameterized query, the CommandText is set only once at the beginning of the loop. The lookupValue becomes a parameter, assigned within the loop, and the command is executed over and over without having to do any extra parsing. Furthermore, since the parameter is a string variable and the SQL statement has already been prepared, it is not vulnerable to an injection attack.

SQLite supports named and unnamed parameters. Named parameters must appear in the SQL statement with either a $ (dollar), : (colon) or @ (at sign) prefix. Unnamed parameters consist of a single question mark ? character. Rewriting the above code to use a named parameter looks like this:

using (SQLiteCommand cmd = cnn.CreateCommand())
{
  cmd.CommandText = @"UPDATE [Foo] SET [Value] = [Value] + 1
                      WHERE [Customer] LIKE @lookupValue";
  SQLiteParameter lookupValue = new SQLiteParameter("@lookupValue");
  cmd.Parameters.Add(lookupValue);     for (int i = 0; i < 100; i++)
  {
    lookupValue.Value = getSomeLookupValue(i);
    cmd.ExecuteNonQuery();

  }
}

The same code now using an unnamed parameter (compatible with Jet/Access)

using (SQLiteCommand cmd = cnn.CreateCommand())
{
  cmd.CommandText = @"UPDATE [Foo] SET [Value] = [Value] + 1
                      WHERE [Customer] LIKE ?";
  SQLiteParameter lookupValue = new SQLiteParameter();
  cmd.Parameters.Add(lookupValue);     for (int i = 0; i < 100; i++)
  {
    lookupValue.Value = getSomeLookupValue(i);
    cmd.ExecuteNonQuery();

  }
}

For simplicity I didn’t wrap these functions inside a transaction which would have made them significantly faster. Even still, the amount of processing that must be done for the parameterized queries are a fraction of the original. When performing a bulk update or insert, or executing a query using outside information, parameterized queries are a clear winner.

¿Que ocurre cuando quieres que un sitio web , bajo IIS 6, se comunique bajo https?

Que necesitas un certificado.

Puedes adquirirlo en Verisign o similares, es mas , si piensas realizar transacciones monetarias, no es mala idea por imagen.

O puedes usar los Certificate Services, y usar la CA del propio servidor.

Peeeeeero….

¿Y si no los tienes instalados? ¿Y si tu servidor no pertenece a un dominio?

Entonces hay un kit de herramientas , Internet Information Services (IIS) 6.0 Resource Kit Tools , que te permiten hacer de forma sencilla la generacion de un certificado, su instalación, y la configuración de un sitio web como seguro.

La herramienta es SelfSSL , y para sitios con un número reducido de usurarios, cumple a la perfeccion con las necesidades de generar un certificado y hacer las comunicaciones sobre https.

La descarga, en esta dirección 

SQLite , es una pequeña / gran base de datos, que otro dia dedicaré un post como se merece.

Hoy, tan solo incluir un fragmento de código, que permite entre otras cosas, proteger los datos de acceso, encriptando el fichero.

No he encontrado demasiada documentación al respecto, y dado que generalmente esta base de datos se usa particularmente en cliente, me parece interesante. En este post la información ampliada

Entre otras aplicaciones, Google Gears (librerias para usar en modo desconectado apps web) usa como base de datos SQLite.

Vamos a abrir una bd encriptada

// Para abrir la base de datos encriptada

SQLiteConnection cnn = new SQLiteConnection("Data Source=c:\\test.db3");

cnn.Open();

// Encrypts the database. The connection remains valid and usable afterwards.

cnn.ChangePassword("mypassword");

Vamos a quitarle la clave

// Opens an encrypted database

SQLiteConnection cnn = new SQLiteConnection("Data Source=c:\\test.db3;Password=mypassword");

cnn.Open();

// Removes the encryption on an encrypted database.

cnn.ChangePassword(null);

O como la memoria de pez, puede hacer que detalles que hace tiempo aprendiste, acaben olvidandose por la falta de uso.