Dynamic Master Pages

by Juan 18. July 2008 15:16

I wanted to create a template web site with the ability to completely change its layout via the web.config file, and it was also a good excuse to look into HttpModules.

HttpModules are services that execute when the requests reach the webserver, you can use them to do whatever you want... like compressing the output before sending it to the client, parsing scripts and put them all in a single file, etc, etc, etc

This time, what I want to do is set the the page's MasterPage according to a value in the web.config file.

What I do is register for the page's PreInit method, and set the MasterPageFile property in the handler, like this:

public void Init(HttpApplication context)

{       

    context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute);   

}   

 

void context_PreRequestHandlerExecute(object sender, EventArgs e)   

{       

    Page page = HttpContext.Current.CurrentHandler as Page;       

    if (page != null)       

        page.PreInit += new EventHandler(page_PreInit);       

}   

 

void page_PreInit(object sender, EventArgs e)   

{       

    Page page = sender as Page;       

    if (page != null)

        page.MasterPageFile = "~/MasterPages/" + ConfigurationManager.AppSettings["MasterPageTheme"] + "/site.master";       

}

In that example, you have to have a MaterPageTheme setting with the name of the folder that contains site.master.

image

Then you just need to register the module, and you are good to go

<httpModules>

    <add name="MasterPageModule" type="MasterPageModule"/>
</httpModules>

You can download the code below, just drop it in the App_Code folder

MasterPageModule.zip (620.00 bytes)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Programming

Creating template projects with visual studio

by Juan 16. July 2008 10:48

As part of the development framework we are creating here in Iceberg I wanted to create a base web site that developers could use as a starting point, with themes, master pages, and some default properties set in the web.config file to use our database and membership engines.

My initial thought was to create it, and then have them copy/paste it to start a new web site, until I came across the "Export template..." feature in visual studio.

Basically what it does is package a project or item so it can be reused, exactly what I wanted.

Let's test it... first I create a project

image 

And I added a few items, just to not let it the same as the default project

image

Then I go to File, Export template

image 

You are presented with this self-explanatory dialog box

image

You click next, then finish, and that's it... you can add a new project and select this template as many times as you want (You can set a custom Icon and a Description if you want, play a little with this options if you like)

image

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Programming | Tips

Oportunidad laboral

by Juan 11. July 2008 15:04

Hace un tiempo escribí sobre como si no se está aprendiendo, o si no se está contento con el trabajo, hay que buscar uno nuevo. No hay que perder tiempo por la razón que sea, si no sirve, no sirve.

En ese momento estaba cambiando de trabajo, fue más o menos hace 3 meses.

La verdad que fue una buena decisión, estoy muy bien a donde estoy, con muchas perspectivas de crecimiento y aprendizaje.

Así que ahora quiero extender la posibilidad a quien esté interesado en trabajar acá conmigo en Iceberg a que me contacte y me mande su CV, si pasa mi riguroso filtro inicial, lo reenvío a recursos humanos para que empiece el proceso de entrevistas.

Las búsquedas activas actuales son:

  • Gerentes de Proyectos (Ref. PM)
    Profesionales o estudiantes avanzados de carrera afín a Sistemas con experiencia mínima de 2 años liderando proyectos. Manejo de herramientas Microsoft y bases de datos SQL Server / Oracle. Preferentemente certificación PMI. Dominio del idioma inglés. 
  • Arquitectos de Aplicaciones (Ref. ARQ)
    Profesionales o estudiantes avanzados de la carrera de Sistemas con 2 años de experiencia en Arquitecturas Orientadas a Servicios (SOA) y Aplicaciones Distribuidas. Manejo de Herramientas de Desarrollo y Base de Datos y conocimientos del idioma inglés.
  • Consultores funcionales (Ref. CF)
    Profesionales o estudiantes avanzados de la carrera de Sistemas con conocimientos en Arquitecturas Orientadas a Servicios (SOA) y Aplicaciones Distribuidas para realizar análisis funcional. Manejo de Herramientas de Desarrollo y Base de Datos y conocimientos del idioma inglés.
  • Programadores SharePoint (Ref. SP)
    Profesionales o estudiantes de la carrera de sistemas, para desempeñarse en el área de desarrollo, sobre tecnologías Microsoft. Es requisito contar con 1 año de experiencia mínima trabajando con MS SharePoint, ASP.Net, C#, MS IIS y MS SQL Server y nivel de inglés intermedio.
    Conocimientos en tecnologías de portales y desarrollo de intranets, proyectos de desarrollo de sitios en Internet y metodología de desarrollo sobre tecnologías Microsoft.
  • Programadores .NET (Ref. DEV)
    Profesionales o estudiantes de la carrera de sistemas con experiencia en programación sobre plataforma.NET (C#, ASP.net y/o VB.Net) y Web Services. Con conocimientos del idioma inglés.
  • Estudiantes de Sistemas (Ref. ES)
    Que estén iniciando su carrera laboral. Con ganas de aprender y aceptar nuevos desafíos. Interesados en el desarrollo de aplicaciones con nuevas tecnologías que requieran metodología para grandes clientes. Preferentemente que hayan programado en algún lenguaje

Remember, this stuff is supposed to be fun

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Work

Gaming.NET 2008

by Juan 11. July 2008 14:42

Ya está abierta la inscripción a Gaming.NET edición 2008.

Desde la página oficial pueden inscribirse y bajarse la autorización para anotarse a la mejor competencia de nivel nacional de programación en tecnologías Microsoft.

Los esperamos!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Gaming.NET

Imagine Cup 2009

by Juan 10. July 2008 14:18

Having IC 2008 just ended, registration is open for IC 2009 at the official site.

Check out the categories for next year, and start preparing for Egypt!

The theme is kind of open (Solve the World's Toughest Problems), you can focus your efforts in whatever you see fit, not restricted to one social problem like previous years. This may seem like an advantage, but I anticipate a lot of great ideas from all over the world to compete against...

Good luck!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Imagine Cup

Resultados oficiales - Hoshimi 2008

by Juan 5. July 2008 13:10

Ahora sí, acá les dejo la tabla de posiciones del concurso hoshimi 2008.

Este año estuvo bastante peleado, con algunos equipos terminando muy cerca de otros.

Las posiciones finales son:

Felicitaciones a los ganadores!

Pueden bajarse los replays y mapas del siguiente link

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Hoshimi

Google Reader BlogEngine Widget

by Juan 4. July 2008 12:16

I modified my Google Reader Pick's box there on the right to be compatible with the new widget framework of BlogEngine.NET, and here's the code if you want to use it in your own blog.

All you have to do is upload the "Google Reader Picks" folder to the widget folder, and configure it for your account.

The most important property is your User Id, which you can get from your Google Reader homepage, clicking on "Shared Items", like this

image

image

Then, you can go to the configuration file clicking on the edit link

image

  • User ID is the user id you have in your Google Reader Homepage.
  • Color Scheme is the color of the list, you can experiment with it, but for the standard blogengine theme I recommend setting it to "none".
  • Items is how many items to show
  • Show item sources adds a link to the original feed
  • Add Xfn Link adds a hidden link with the rel="me" tag for Google's Social Graph API

And the result looks like this

image

You can download it from the following link, any feedback is appreciated, this is my first widget =)

Google Reader Picks.zip (2.99 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Blogging | Programming

BlogEngine.NET 1.4 Released

by Juan 2. July 2008 01:21

As you can see at the bottom of this page, I am now powered by BlogEngine.NET 1.4

If you are still using some standard blogging provider, I recommend you get you own hosting and install this blogging engine, nothing beats having absolute control over everything... yes world, you are next!

Some of the new features include (from the official site):

New database provider
BlogEngine.NET now works with most commercial and open source databases such as MySQL, SQL Server, VistaDB and many others. This allow you to use practically any database supported by your hosting provider. You can still use XML files if you don't want to use a database.

Drag 'n drop widgets
Widgets are the pieces of content most often located at the sidebar. It could be a list of recent posts, latest tweets from Twitter or anything else. You can drag and drop the widgets around in your sidebar and modify the content of them directly on the front-page. The widget works independently of the theme you are using as long as it is implemented in the theme. In BlogEngine.NET it is implemented in the Standard and Indigo themes and many more themes with widgets will be available for download very soon at the BlogEngine.NET website.

Extension settings
The new settings model for extensions have been upgraded to give you a much better experience using third-party extensions. For extension developers, it has never been easier to store your settings and let the user change them from the admin section. The same settings model is used by the widgets as well.

Web 3.0 improvements
BlogEngine.NET 1.4 makes full use of many semantic formats and technologies such as FOAF, SIOC and APML. It means that the content stored in your BlogEngine.NET installation will be fully portable and auto-discoverable. It is possible to filter the RSS feeds based on the visitor's interest defined in her APML file or do a site search with it as well. Read more the APML filtering in BlogEngine.NET.

Author profiles
By utilizing the ASP.NET profile provider it is now possible to let all authors maintain their own profile. This is used in the FOAF document and widget/extension developers can take full advantage of the profiles to provide new exciting visualizations and functionality.

Other new features
We've listened to what you - the user - wanted in BlogEngine.NET 1.4 and here is a list of some of those features that made it.

  • Tag selector when adding new posts
  • Subcategories
  • Password encryption
  • Improved live comment preview
  • Hierarchical pages in the control panel
  • Smarter comment spam protection
  • Link collection widget
  • Various performance improvements
  • and much more...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Blogging | Programming

Resultados Hoshimi

by Juan 1. July 2008 09:45

Sé que entraron a este post con ganas de ver los resultados, pero no... a pesar de que ya los tengo y se están imprimiendo las placas y certificados mientras les escribo, no se los puedo decir.

El anuncio de los ganadores se va a hacer este sábado 05, a las 11 AM en Mario Bravo 1050, en el SUM.

Ahi nos vamos a enterar quien va a ser compañero de Ariel y mío en la facultad el año que viene.

Los esperamos!

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

Hoshimi | Student Life

Final Hoshimi - Universidad de Palermo

by Juan 28. June 2008 10:31

Acaba de largar la final del concurso Hoshimi en la Universidad de Palermo.

Los participantes tienen un total de 3 horas para programar sus estrategias en la esperanza de ganarse el primer premio del concurso, que es una beca completa en la universidad.

No pueden rogarnos para tener más tiempo, ya que una vez que el contador llegue a cero no hay nada que podamos hacer para ayudarlos.

Ellos aún no lo saben, pero cuando se acerque a cero, cambiará de color agregando factores a la presión de la competencia.
2008-06-28-37185 El contador es incorruptible... créanme, yo traté de sobornarlo una vez y no me fue bien...

 

2008-06-28-37211 La competencia largó con todo, se siente en el aire el silencio mientras los participantes tratan de adelantarse a sus competidores en la carrera para llegar primeros a la meta... o al menos segundos o terceros para llevarse premios consuelo y no sentirse tan mal 2008-06-28-37780

Suerte!

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Hoshimi | Student Life

Powered by BlogEngine.NET 1.4.0.2
Theme by Mads Kristensen Modified by Juan Manuel Formoso.

About the Author

Juan Manuel
Networking
View my LinkedIn profile View my Technorati profile View my Facebook profile View my bookshelf
View my Plaxo profile View my digg profile

Juan Manuel Formoso
There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something more bizarrely inexplicable.

There is another theory which states that this has already happened.

E-mail me Send mail

Ads

Google Reader Picks

Calendar

<<  July 2008  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Recent posts

Recent comments

Comment RSS

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2008
XFN Friendly