Tuesday, September 6, 2011

El patron MVC, una aproximación al desarrollo de aplicaciones moviles

No es nada común en estos días encontrarse con el reto de implementar una aplicación para dispositivos móviles. Ante este hecho pueden aparecer diversas preguntas ¿qué debe hacer la aplicación?, ¿necesita de mucha espectacularidad? o ¿para qué plataforma debe ser?

Ante ésta última pregunta la respuesta puede variar, pero una situación común és: “la aplicación debe funcionar en dispositivos iOS (iPhone e iPad), en dispositivos Windows Phone 7, en dispositivos Android,..” Pero este requisito no nos obliga a desarrollar tres veces la aplicación como presumiblemente podríamos pensar (dado que cada una de las plataformas citadas usan diferentes entornos y lenguajes de desarrollo) sino que en función del resto de los requisitos de la misma bastará con una única implementación. En este artículo se describirá el patrón MVC (Modelo – Vista – Controlador) y cómo podemos usarlo para desarrollar aplicaciones móviles universales.

El patrón MVC no es un nuevo patrón de desarrollo de software, apareció por primera vez en 1979 de la mano de Trygve Reenskaug de Smalltalk. La intención del patrón, es separar los datos de una aplicación, de la interfície de usuario y de la lógica de control. Normalmente se suele utilizar en aplicaciones web y es este el punto fuerte que utilizaremos para nuestra aplicación universal.

Los elementos del patrón son:

image
Modelo: son los datos. La información con la que la aplicación debe interactuar.
Vista: es lo que comúnmente conocemos como la interfaz de usuario. Se encarga de presentar el modelo en el formato que deseamos.
Controlador: Es el elemento responsable de responder a los eventos (normalmente acciones del usuario) para generar los cambios necesarios tanto sobre la vista como sobre el modelo.


Así pues, la reflexión que quiero presentar es: ya que el marco más común del desarrollo de aplicaciones usando MVC es la programación web y todos los dispositivos móviles disponen de un entorno de ejecución de aplicaciones web; porque no diseñamos un único controlador y un único modelo para nuestra aplicación multiplataforma y tan solo cambiamos la vista en función del dispositivo móvil en que se esté presentando.

Claro está que esta solución no es la panacea, dado que irá en función de la espectacularidad y otros aspectos con los que queramos dotar a la aplicación, pero es interesante tenerla en cuenta si se nos presenta un reto como el que describía al inicio de este artículo.

Thursday, July 7, 2011

FBA SharePoint 2010

Since last year I wanted to write a post about this topic. There are some differences about how to do it on SharePoint 2010 and MOSS 2007. But it makes no sense writing a full post about it when there are great posts already done. Here you have one of the best ones:

Setting up FBA Claims in SharePoint 2010 with Active Directory Membership Provider

Very, very useful!

Monday, July 4, 2011

Scripts for Enabling and Stopping SharePoint 2010 Services

Hello!! Normally in development environment I need to stop or enable all SharePoint services, in order to have more memory to do other tasks like enabling a virtual machine. I have made a very very very simple pair of scripts which enable us to do this tasks:

Enable Script

@echo off
echo Switching On SharePoint 2010
net start "SharePoint 2010 Administration"
net start "SharePoint 2010 Timer"
net start "SharePoint 2010 Tracing"
net start "SharePoint 2010 User Code Host"
net start "SharePoint 2010 VSS Writer"
net start "SharePoint Foundation Search V4"
net start "SharePoint Server Search 14"
echo SharePoint 2010 Running
pause

stop script

@echo off
echo Shutting Down SharePoint 2010
net stop "SharePoint 2010 Administration"
net stop "SharePoint 2010 Timer"
net stop "SharePoint 2010 Tracing"
net stop "SharePoint 2010 User Code Host"
net stop "SharePoint 2010 VSS Writer"
net stop "SharePoint Foundation Search V4"
net stop "SharePoint Server Search 14"
echo SharePoint 2010 is Down
pause

You can optionally add SQL Server or other services you want to enable or stop.

Enjoy!

Saturday, July 2, 2011

Configure SharePoint 2007 to search and index PDF documents (iFilters)

Two months ago I had to configure a MOSS 2007 installation to search and index PDF files. Honestly I had never have the need of doing it, so I search for instructions. Googling I found this great post: Configuring MOSS 2007 to search pdf documents - install and configure pdf ifilters; which helped me in that task. But in my case I had to do a little more of work.

Please notice that I don’t want to correct this post, it’s great, the only objective is to show my experience on configuring PDF iFilter.

If you compare both posts you’ll see that are practically the same, I’ll remark the steps I had to do, which are not described in the original post.

When we want to configure PDF Index and Search on SharePoint, the idea is to install PDF iFilters, wich you can find at:

Adobe PDF iFilters 6.0 (there is another 32 bit version like v8.1 which is integrated with Reader)

Adobe PDF iFilters 9.0 for 64-bit platforms

This tutorial will show the procedure using 6.0 version. For the 9.0 64-bit version you can follow this link.

1. Download iFilters
2. Stop IIS Admin Service, we will need to update DOCICON.XML

image

3. Run the iFilter installer on the Indexing Server
4. Download the 17x17 PDF icon from here
5. Copy the icon to: “12 Hive”\Template\Images
6. Go to: “12 Hive”\Template\Xml
7. Edit DOCICON.XML adding: <Mapping Key=”pdf” value=”icon_file.ext”/>
8. Reset IIS (iisreset)
9. Go to Central Administration and under Search Settings in Shared Service Provider add the PDF as a new file Type:

image

10. Perform a Full Crawl

At this point, we are in a cross road situation. In my case I had only to restart both MOSS Search Services: Windows SharePoint Services Search, Windows SharePoint Server Search and perform a full crawl again.

But the original post author had to perform more tasks like apply the following Microsoft HotFix.

Please be aware that this is only the experience I’ve had. I encourage you reading the original post linked at the beginning of this post.

Enjoy!

Friday, July 1, 2011

Create SharePoint 2010 External Content Type Associations

Hello,

I just write this post to recommend you some articles about the External Content Type associations when creating a Business Connectivity Services Data Model in SharePoint 2010:

Creating SharePoint Server 2010 External Content Type Associations Using SharePoint Designer 2010

Adding Associations Between External Content Types

That’s all folks!