yet another cool silverlight app., time well spent. It has nice stories though.

mslim

Designing the perfect form

February 26, 2009

I came across this interesting post on form design and development, and thought it’s worth sharing, it shows by example what to consider when designing the prefect form and how it would have direct impact on how much or how little people use them..

In the last few days I had a closer look on chrome and how it would benefit our development work, I like to use Firefox since it offers so many development tool plug-ins, but I still have to make sure my applications perform properly in IE. From a developer viewpoint, Chrome provides a few tools for working with web pages. The list includes the following:

imageGears, a standard component, provides a platform for creating web applications that can run offline, you can install it from here

Web Inspector, allows you to take a closer look at any element on the currently open page. It is available by right-clicking on an element. It allows you to browse page elements and view object properties and style. This is a feature from the WebKit base.

image 

JavaScript console, allows you to enter command-line JavaScript code that can access page elements. It opens within the Web Inspector window — located in the bottom portion.

JavaScript debugger, a command line JavaScript debugger. here is an online tutorial.

image 

Task Manager, allows you to view the current processes running within Chrome. It shows the system resources by a process. This includes memory, network, and CPU usage. A button is provided to end a process along with link to a report that breaks down memory usage for individual processes.

image

Of course, this doesn’t beat Firefox’s development tool plug-ins, so I’ll stick to Firefox while keeping an eye on Chrome.

Google just released a beta version of its new web browser Chrome for windows, they claim its much faster, safer, and easier. it has been released with many languages support, it works fine with me so far, the pages looks a bit different because of its flatness, the only trouble I had is a failure while downloading a flash plug-in for the browser and after a couple of workarounds it has been installed successfully, check it out..

asp.net has published some new AJAX control toolkit tutorials, check them out, the AJAX control toolkit would certainly speed up your AJAX development.

subscribe to the asp.net latest content feed using this

Technorati Tags:

recently I had to integrate two applications one built in ASP classic and the other was an ASP.NET application, a problem you might have is transferring the session content between the two applications, you will have to do a workaround to get it done, the following sample illustrates how:

the ASP classic part

where your session variables are set, and where you want to do the transit between the two application, drop the following code into two ASP classic files, the first one is where you set the session variables, and want to transit to the ASP.NET application, the second ASP classic page submits the compound session content to the receiving ASP.NET page:

<TITLE>ASPPage1.asp</TITLE>
<%
‘ This is the page where we just set the ASP Classic Session Variables

Session(“username”)=”waleed”
session(“email”)=”email@gmail.com”

Server.Transfer(“ASPPage2.asp”)
%>

===================================================

<TITLE>ASPPage2.asp</TITLE>
<%
‘ We pull all the session variable names/values and stick them in a form
‘ and then we submit the form to our receiving ASP.NET page (ASPNETPage.aspx)

Response.Write(“<form name=t id=t action=ASPNETPage.aspx method=post >”)
For each Item in Session.Contents
    Response.Write(“<input type=hidden name=” & Item)
    Response.Write( ” value=” & Session.Contents(item) & ” >”)
next
Response.Write(“</form>”)
Response.Write(“<script>t.submit();</script>”)
%>

 

the ASP.NET part

this is where you would receive and set the ASP.NET session variables.

<TITLE>ASPNETPage.aspx</TITLE>
<%@ Page language=”c#” %>
<script runat=server>
private void Page_Load(object sender, System.EventArgs e)
{
    for(int i=0;i<Request.Form.Count;i++)
    {
     Session[Request.Form.GetKey(i)]=Request.Form[i].ToString();
    }

    //where you will start your ASP.NET application
    Server.Transfer(“YourASPNETApp.aspx”,true);
}
</script>

 

Technorati Tags: , ,

AJAX, the wrong tool?

March 13, 2008

Some developers view AJAX as the best view for every scenario, however from my own experience AJAX introduces its own set of drawbacks, and we should take care before we start on using this technology, we can summarize these drawbacks in the following points:

Additional development time

Learning a new technology like AJAX makes its own delays before properly understanding and using it.

An extra time would be needed when we consider what to do when a user has disabled JavaScript support within their browser, this would require additional development time to deliver an alternative solution (using the NOSCRIPT tag).

No browsing history, means Back/Forward buttons become useless, so the users are unable to easily bookmark or navigate to and from the app. using the browser’s buttons, there are some JavaScript libraries provide a way to build such functionality, but it will add development time and testing.

In addition, when developers jump on the AJAX, you should make sure they don’t use it for everything, so you won’t lose time fixing the application up eventually.

Accessibility

AJAX makes the browsers act in a way that is different than its original design, like we said, Back and Forward buttons no longer work as expected, and there is no URL for some AJAX content, you will have to take all this into your consideration while designing your AJAX application.

Discoverability 

Search engines like Google requires a page URL and use words on the page as one of the aspects of its approach to ranking pages. search engine spiders do not load a page and execute its JavaScript, this can lead to lose visitors, but it will not be an issue for internal intranet applications.

Security

while JavaScript is a mature language, it does have security holes that must be considered regardless of whether you’re using AJAX, sever-based security measures can be used to block such problems.

also the issue of cross-site scripting (XSS) is more recognized with AJAX, as script may run in the background and access resources without user knowledge, given these possibilities, all data must be protected to avoid malicious activity.

and finally, make the good decision

All have agreed a hybrid approach is usually the best solution with AJAX, there are times when AJAX is applicable, and there are times when you should use another approach.

 

what problems have you encountered during developing AJAX-based application? share your experience..

 

Technorati Tags:

pat After a couple of delays, next month the EDC (Egyptian Developer Conference) ‘08 will take place in Cairo, nothing has been announced yet about the agenda, place, speakers and topics, all we’ve got is “the mid of April”.

Patrick Hynds (MDC’s most famous speaker) has just confirmed his participation and announced the topics he will be speaking about in the conference.

see you all there!

 

Technorati Tags: , , ,

I am posting this to help you and myself on remembering and getting these three actions done with any ASP.NET 2.0 application that uses Membership Provider before pushing it into a production server:

1.   Add “applicationname” attribute in Profile Provider. IF you do not add a specific name here, Profile provider will use a GUID. So, on your local machine you will have one GUID and on production server you will have another GUID. If you copy your local DB to production server, you won’t be able to reuse the records available in your local DB and ASP.NET will create a new application on production. Here’s where you need to add it:

    <profile enabled=”true”>
    <providers>
    <clear />
    <add name=”…” type=”System.Web.Profile.SqlProfileProvider” connectionStringName=”…” applicationName=”YourApplicationName” description=”…” />
    </providers>

2.   Profile provider will automatically save the profile whenever a page request completes. So, this might result in unnecessary UPDATE on your DB which has significant performance penalty. So, turn off automatic save and do it explicitly from your code using Profile.Save();

<profile enabled=”true” automaticSaveEnabled=”false” >

3.   Role Manager always queries database in order to get the user roles. This has significant performance penalty. You can avoid this by letting Role Manager cache role information on cookie. But this will work for users who do not have a lot of roles assigned to them which exceeds the 2 KB limit of Cookie. But it’s not a common scenario. So, you can safely store role info on cookie and save one DB roundtrip on every request to .aspx and .asmx.

<roleManager enabled=”true” cacheRolesInCookie=”true” >

 

Technorati Tags:

it becomes a big problem since there have been multiple browsers to test on. Testing with all browsers – especially these days – is almost impossible, but you can come a lot closer than you may think. Delivering a web application to the Internet needs a comprehensive testing to ensure a consistent user experience with different browsers and operating systems.

Who will use your application?

When you start thinking about the many combinations of browsers and operating systems that your customers might be using to access your web application, a complete suite of cross-browsers tests might seem like a headache on your development resources. a quick glance at browser statistics for December 2007 shows IE with a commanding lead in browser usage (v6.x and v7.x) that’s a large majority, but not an overwhelming one, so you can’t afford losing the remaining percentage, once you decide what browsers are supported you need to decide how to actually test with these browsers.

Multiple browsers testing

Running multiple versions of the same browser concurrently can be a bit tricky, as the install process for most browsers overwrites any previous versions. Fortunately, there are workarounds. For Firefox, it’s generally as simple as saving the executable of each browser under a different name, and then being sure to launch the profile manager the first time you start each version so that profiles aren’t shared, the following image for two different Firefox versions running simultaneously.

twofirefoxes

For Internet Explorer, the process is a little trickier, Manfred Staudinger perfected the standalone versions by adding IE version numbers to the title bar of the standalone browser window. Moreover, by removing the “IE” key in the registry subkey [HKLM\SOFTWARE\Microsoft\Internet Explorer\Version Vector] Internet Explore defaulted to respecting conditional comments based on the version number prebuilt in the program, the following images show five different versions of the IE running simultaneously.

multipleie

setup2

 

virtualization

Of course, browsers are only half the battle in your testing; you’ll probably want to test across multiple operating systems as well, virtualization involves multiple OSes running simultaneously. You’ll want a test machine with some form of virtualization on board. A number of tools are available, including VMWare and Virtual PC, that make it easy to run Windows and most other x86-compatible OSes on any generic PC. One OS acts as a host, and the others run within the virtualization application. This makes it possible to test your applications on.

The mobile world

The boom in mobile device usage means this ever-expanding user community should not be ignored. Like personal computers, you can assemble a group of mobile devices to use for testing, or you can use third-party services and products to assist with mobile testing. A great resource is the DotMobi Virtual Developer Lab, which provides access to hundreds of mobile devices for testing.

Outsource your testing

Browsershots.org is an example for what you can get from the free version of this sort of service. the following shows the different options you have available to you. For each box you check, you get a PNG file with a screenshot of the URL you specify for that browser/OS combination. The process can take a half hour or more, so you’ll want to keep it running in the background while you do something else.

browsershots

The key issue is to test an application so it functions properly within supported browsers. How do you test your Web applications? Do you get users involved or keep it in-house? Share your thoughts and experience.