A blog about web technology.

Tuesday, May 5, 2009

Web Designer Interview Questions

Few days back, I prepared a web designer interview-questions list. We required a good web interface/templates designer for asp.net projects. Knowledge of some programming especially javascripts was bonus points. Here is the questions that I prepared.

Web Standards
- Why would you choose XHTML over HTML?
- What web standards and guidelines do you follow for designing web sites?
- Why do you want to follow W3C standards? Is it really necessary to follow these standards?

Professionalism
- What are your steps of web page designing process (photoshop template or direct HTML template)?
- How are you flexible with your process and client communication?
- How do you make your website consistent among all the browsers?
- What are the tools that you use for web development? + other third party tools?
- How do you keep up-to-date with various standards and tools?

Technical Knowledge (HTML/CSS/PHOTOSHOP):
- How comfortable are you in writing hand-coded HTML?
- What is the difference between DIV and SPAN tags?
- Explain: padding/margin, display:none and visibility:hidden, stacked layers (positioning, z-indexing), floating objects
- How do you handle transparency in web-page elements
- What is the difference between vector graphics and raster images. How would you choose filetypes for publishing in web??
- What are RGB/CMYK/HSI color models?

Extra technical knowledge:
- Do you have any experience in making skins for DNN or other CMS systems?
- (Javascript) Do you have any experience in javascripts?
- (Javascript) How do you show some dynamic text in a DIV? Showing layers, popup controls?
- (Javascript) Form validations:
- How do you disable form submission when validation error occurs?
- applying MAXLENGH in textarea
- enabling/disabling form fields
- any knowledge of regular expressions
- (Javascript) Is there any javascript library that you have used?
- (XML/XSL) Do you have any experience in XML and in XSL transformations?
- (Flash) Do you have any experience in Flash? What are symbols in Flash? Can you do basic ActionScriptings?
- (ASP.NET) Do you have any experience in ASP.NET websites? Tell about challenges while working with programmers.

Optimizations:
- Do you consider Search Engine Optimizations (SEO) when making web designs?
- What are the things that you use or avoid to ensure the web page you designed is SEOed? (Like frames, headers, alt texts, js texts)
- How do you perform page-load optimizations?

Creativity:
- Which site do you think is best designed? (In your opinion, what is a good designed website and bad designed website?)
- Do you think that creativity is part of human nature or is it something that can be learnt?
- What do you most dislike about web design industry?
- What are other creative-thinking hobbies that you have? (like painting, photography, literature, ..)

Sunday, February 8, 2009

ASP.NET facebook application “Hello World!”

Here is a quick article to make a quick facebook application in ASP.NET that can be added to facebook pages as well.

First you need to setup a new application in facebook. You can do so in http://www.facebook.com/developers. I am not writing details of the application setup. Here is one nice link for its help: http://developers.facebook.com/get_started.php

Then download ‘Facebook Developer Toolkit’ from http://www.codeplex.com/FacebookToolkit and add references to your web-project.

Add a new aspx page, clean up all the contents of the page, even tag and tag. Facebook application does not support those tags. In this article, I will render contents using Response.Write()

In codebehind, inherit the page class from facebook.web.CanvasFBMLBasePage

Then create a page init handler subroutine as shown below:


Protected Sub Init2(ByVal s As Object, ByVal e As EventArgs) Handles Me.Init

'These code lines MUST be in Init event handler

If String.IsNullOrEmpty(Request.QueryString("fb_page_id")) Then 'The user is viewing application, force them to login to facebook
'and allow the application's access to the user info

MyBase.RequireLogin = True
MyBase.Page_Init(s, e)

'contents of the facebook app
Response.Write("Hello World")

Else
'The user is not viewing the application, but facebook is requesting FBML

Dim fbPageID As Long = CLng(Request.QueryString("fb_page_id"))
Dim FB As New facebook.Components.FacebookService

FB.ApplicationKey = ConfigurationManager.AppSettings("APIKey")
FB.Secret = ConfigurationManager.AppSettings("Secret")
FB.IsDesktopApplication = False

Dim pFBML As String = "Hello World!"

FB.API.profile.setFBML(fbPageID, pFBML, "", "")

'this is the text that facebook users sees
Response.Write("You have successfully set profile FBML")

'setting FBML does not need further processing
Response.End()

End If

End Sub






Monday, January 12, 2009

DDL Triggers: Logging DB objects changes in SQL Server 2005

We, SQL Server db coders, always lacked date modified filter option in management studio (or in enterprise manager). We always wanted that feature to be availabe in next Service Pack, or if not, in next version. But that never happened.

If you still don’t have solution to this – here are some good news: SQL Server 2005 comes with a new DDL triggers, using which we can track the changes in DB objects. And best thing about it is that it will take just few minutes to setup the log.

Here is how to do it:
1. First we create a log table, with necessary log fields as shown in figure 1.

2. Then we create a DDL-Trigger on the database (fig. 2) which gets triggered on any change to the database. We simply call EVENTDATA function, that returns a xml value that contains event details. We simply run a XQuery on the xml data to get necessary info, and save it to our log table.


Here is sample data in the table:

Also, if you are still stuck in some SQL Server 2000 database projects like me, you can still make use of the trigger by installing SQL Server 2005 and having your databases in 2000 mode (version 8).

In my team, we have created a simple DNN based UI, which allows us to list changes filtered by database, objects and date. Everybody simply creates an export file and puts it in svn at the end of the day. Then, all export files are combined in server database.