IE 7.0 Freezes

Recently what appeared to a be a problem with IE 7.0 on my Lenovo T61p drove me up the wall. Every time, I would open a second instance of the browser, it would not only freeze the browser but also all the active windows on my machine!!! I later found out that it was the "Shockwave Flash Object" by Adobe that was the culprit. So overcome this otherwise annoying problem, in IE 7.0 I went to Tools - Manage Add-ons - Enable or Disable Add-ons and disabled the "Shockwave Flash Object" and voila... This action seems to have fixed my problem wherein I can now have multiple instances of IE or for that matter have multiple tab pages in a single instance of IE 7.0.
Cheers,

Obi Oberoi

Software in 2008

Here are some of the predictions of what future holds for the industry software in 2008.

1. User Experience Reaches the Enterprise. In 2008 we will see several major enterprises start efforts to build UX centric applications that increase worker productivity, reduced transaction costs and increase pull through as the UX meme of the consumer facing world leaks into the enterprise. The days of the battleship gray, forms of data application as the king of the enterprise are numbered because of an imperative towards richer visualization of complex and interconnected data. While there will always be a need for the traditional sort of application, by the end of 2008, it is no longer the only element of the corporate landscape. 

2. Testability Becomes a Requirement for Software Development Frameworks. No longer satisfied with simple reductions in costs for initial development, a growing community demand frameworks and tools that facilitate sustainable and agile practices. 2008 is the year that frameworks and tools take notice and start to deliver solutions that are testable out of the box. Technologies such as Test Driven Development, MVC/MVP patterns, and frameworks that support mocking become mainstream. After seeing this year’s cool demos at software development industry conferences a common question will be: “...And how do you test that?” Let’s hope the presenters have an answer.

3. The Companion Applications Become Practical. While RIA and AJAX application categories continue to grow, many consumer facing web applications and enterprise applications developers realize there is a need for desktop exploitive applications as well as reach web applications that work everywhere. What meaningful application wouldn’t benefit from a pairing like that of Outlook and Outlook Web Access? In the past it has been prohibitively expensive to build these applications, but with the circa 2008 technology such as .NET Framework 3.5 and Silverlight, it is finally becoming practical to have a single codebase that fully exploits the desktop and offers a rich web experience.

 

Obi Oberoi

 

Definition of Interoperability

What does the term 'interoperability' really mean? What does it mean to 'interoperate' or be 'interoperable' when designing solutions? A number of definitions are available depending upon whom you speak to or where you search. Some define interoperability in terms of relationships; others have a much more specific view based on the technology that they are describing.

To define this term, as per Simon Guest, there is a three-part explanation: one formal, one pictorial, and one comparitive.

1. Formal: Interoperability enables communication, data exchange, or program execution among various systems in a way that requires the user to have little or no awareness of the underlying operations of those systems. Interoperability is about connecting and building applications that work with each other to such an extent that the presentation to the user is seamless.

2. Pictorial: When describing interoperability, think of it as making reference to a popular lake-dwelling species, the duck. As a duck is seen swimming across a lake, only the top half of the duck looks very serene. The duck appears to glide across the lake with little or no effort. Despite this calm exterior, the duck’s legs are frantically kicking in all directions to get to the other side of the lake. Such is the way of interoperability. A well –designed solution that interoperates among many diverse systems should appear “calm and serene” to the user – the user should have no awareness that a click of a button or a switch of a page might create many calls to various systems throughout the enterprise, somewhat akin to the frantically kicking legs of our feathered friend.

3. Comparative: Comparative draws upon the previous two but offers a slightly different slant which is the following:

• Migration: Opportunities exist in the migration space. Customers do have code that can benefit from running on the .Net framework, and some of this code already exists within J2EE applications today.

• Portability and Interoperability: Portability is the notion of running a single component or piece of code on platforms based on multiple implementations from various vendors. The point isn’t to detail the sustainability of either the Java or the .Net platform for developing applications. The success lies in the operability between the two platforms.

• Reuse of existing systems: Most established companies have a number of legacy systems. The term legacy is meant technology that’s not being actively developed upon today. For example, a system located in the data center that’s still in production but no longer offers a strategic advantage to the company is a legacy system. A plan to move these systems to a new platform might be a longer-term strategy. A solution that has the ability to interoperate with these systems has the potential to extend the life of these systems and more importantly, the knowledge of the developers who work with them.

• Delivery based on technical merit: Designing an architecture that can enable interoperability promotes the selection of platforms based on technical merit. One could argue that every platform and technology—whether it’s .Net, J2EE, or anything else – has its own merits for deployment. This could be maturity, reliability, scalability, security, technical advancement, and so forth. An approach to developing applications and services that have the ability to interoperate with one another allows platforms to be selected based on their merit and applicability to the job, allowing greater choice regardless of the vendor.

• Pilot for adoption: When organizations want to deploy a new technology such as the .net framework, it’s rare that they simply rip and replace an entire application or system. In many cases, a replacement is normally triggered by a pilot, or proof-of-concept, project. Such a pilot tends to be a short-term project with an aim to prove that the technology can work well with existing systems and applications. The ability for this pilot or proof-of-concept project to interoperate with existing production systems is imperative, and in many cases, can often determine its success.

• Migrations: Even if a system will be replaced or updated, it’s rare to find a case where this can be done with a single “flick of a switch” – many migrations have to be well planned and carefully executed, and often involve moving an application a few parts at a time. This way of dividing a system for migration purposes often creates a demand for interoperability (because some parts that have been migrated still might need to communicate with others that have not).

Obi Oberoi

ASP.Net Tutorial - A way to go!!!

What a better way to learn ASP.Net than reading the tutorial below...

New Features in ASP.NET 2.0

ASP.NET 2.0 offers some of the following new features:

  • Master Pages, Themes and Web Parts

  • Security controls standardized

  • Standard controls for navigation

  • Personalization, roles and internationalization services

  • Simpler and better data access controls

  • Complete support for XML standards

  • Better compilation and deployment

  • Better Site Management

  • New and improved development tools

Let's discuss these new features in detail:

Master Pages

ASP.NET didn't offer a way to have a consistent look and feel for the complete web site.

ASP.NET 2.0 solved this problem by introducing master pages. A master page is a template for other pages, with shared layout and functionality. The master page defines placeholders for content pages. The result page is a combination (merge) of the master page and the content page. More about master pages read in Master Pages in ASP.NET 2.0 tutorial

Themes

To give a customized look to the web applications, ASP.NET 2.0 came up with the themes/skins feature (more about this feature you can find in Themes and Skins in ASP.NET 2.0 tutorial).

ASP.NET 2.0 aimed to achieve the following design goals:

  • Simplify to customize the appearance of a site

  • Allow themes to be applied to controls, pages, and entire sites

  • Allowing the customization of all visual elements

Web Parts

ASP.NET 2.0 Web Parts provide a consistent look for a site, while still allowing user customization of style and content (more in Web Parts in ASP.NET tutorial).

New controls:

  • Zone controls - areas on a page where the content is consistent

  • Web part controls - content areas for each zone

Navigation

ASP.NET 2.0 introduces built-in navigation controls (more in Web Site Navigation in ASP.NET 2.0 tutorial)

  • Site Maps

  • Dynamic HTML menus

  • Tree Views

Security

Security plays a key role in application development. So the confidential and personal information need to be protected (read more on Security Features in ASP.NET 2.0).

In ASP.NET 2.0 the following controls has been added:

  • A Login control, which provides login functionality

  • A LoginStatus control, to control the login status

  • A LoginName control to display the current user name

  • A LoginView control, to provide different views depending on login status

  • A CreateUser wizard, to allow creation of user accounts

  • A PasswordRecovery control, to provide the "I forgot my password" functionality

Roles and Personalization

Internet communities are gaining popularity. ASP.NET 2.0 has personalization features for storing user details. This caters to an easy way to customize user (and user group) properties (more about user management read in User registration and authentication for an ASP.NET 2.0 tutorial).

Internationalization

To cater and reach out to a large audience is important and requires reaching people with different languages. So to handle this, ASP.NET 2.0 introduces an improved support for multiple languages (read more in Building Multilingual Web Sites with ASP.NET tutorial).

Data Access

There are many data driven web sites that use databases or XML files as data sources. With ASP.NET this involved code, and often the same code had to be used over and over in different web pages.

A key goal of ASP.NET 2.0 was to ease the use of data sources and eliminate this redundancy. ASP.NET 2.0 has a whole new data controls, removing much of the need for programming and in-depth knowledge of data connections. Read more in Data Source Controls in ASP.NET 2.0 and DataSet and DataAdapter in ASP.NET 2.0 tutorials

Mobility Support

Often with Mobile devices is a problem arises when it comes to screen size and display capabilities. In ASP.NET, the Microsoft Mobile Internet Toolkit (MMIT) is used for such purposes. But In ASP.NET 2.0, MMIT is no longer needed because mobile support is built into all controls.

Images

In ASP.NET 2.0, following new controls for image handling have been included:

  • The ImageMap control - image map support

  • The DynamicImage control - image support for different browsers

These controls are important for better image display on mobile devices, like hand-held computers and cell phones.

Automatic Compilation

ASP.NET 2.0 supports automatic compilation. The first run will compile all files within a directory, including support for WSDL, and XSD files.

Compiled Deployment (Installation) and Source Protection

ASP.NET 2.0 also provides pre-compilation. A complete web site can be pre-compiled. This gives an easy way to deploy (upload to a server) compiled applications, and this protects the source code as only compiled files are deployed.

Site Management

ASP.NET 2.0 introduces three new features for web site configuration and management:

  • New local management console

  • New programmable management functions (API)

  • New web-based management tool

Development Tools

Along with ASP.NET, Project and design features were released in Visual Studio.NET keeping in mind the need of corporate developers. With ASP.NET 2.0, Visual Studio 2005 was released.

Visual Studio 2005's key design features include:

  • Support for the features described above

  • Upload files from anywhere (FTP, File System, Front Page...)

  • No project files, allowing code to be manipulated outside Visual Studio

  • Integrated Web Site Administration Tool

  • No "build" step - ability to compile on first run

For non-corporate developers who cannot access Visual Studio.NET, ASP.NET introduces a new and free tool called Visual Web Developer. More about this free tool read in Introduction to Visual Web Developer 2005 - Express Edition tutorial.

Cheers,

Obi

 

MSDN Real Development Reloaded Tour 2007

Hi Folks,

Microsoft Canada has just announced the upcoming realDevelopment 2007 Tour.

"This tour is all about Web development and how to make better use of
current technologies like AJAX and Visual Studio 2005 in your projects. If
you are a web developer you don't want to miss this."

The Toronto event will be held on Tuesday, October 30 at the Metro Toronto
Convention Centre from 8:00am to noon. For more details and to register,
please visit:

http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032348798&Cultur

Cheers,

Obi

 

Virtual PC 2007 for download

Virtual PC 2007 was released in final form for download early this year.  You can read more about Virtual PC 2007, and download it, from the newly updated Virtual PC website: http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx.

Some key features of Virtual PC 2007 include:

  • Support for x64 Windows as a host operating system
  • Support for hardware virtualization support
  • Support for Windows Vista as a guest and host operating system 
  • Support for PXE network booting of virtual machines
  • Support for the use of fullscreen virtual machines on multi-monitor systems (VM still stays on just one monitor though)

Cheers,

Obi

What's with IIS and Apache

How does IIS7 stack up against Apache? Bill Staples, who runs the server products within the Developer Division – Web Server, Media Server and Commerce Server recently wrote a great blog that talks about IIS versus Apache. It is a very well written piece and for those of you interested in understanding what's going on in the web server space and how IIS compares against other offerings, this is a good read.

Cheers,

Obi Oberoi

Seminar on SOA

Next week, I am attending a breakfast seminar on bridging Service Oriented Architecture organized by Object Sharp Consulting. Thanks to Rob Windsor who informed me about it.

I am currently writing a thesis on 'Interoperability between Disparate Systems' . I am sure this seminar will feed some ideas to facilitate in polishing up my thesis.

Cheers,

Obi Oberoi

 

Learning VB.Net online

This how-to video series is dedicated to getting Visual Basic developers productive on areas of data-based Windows Application development. The series starts with the basics of database development with SQL-Server 2005 Express then walks through the details of connecting to and querying databases, and Windows Forms development basics using the built-in designers in Visual Basic 2005.

This series is aimed at VB.NET Winforms and database beginners...Enjoy the series!

 

Obi


Toronto Code Camp Videos just Released

As you'd probably know, there was a Toronto Code Camp held recently and was publicized all over the town. The Toronto Code Camp has just released the videos (17 of them). The members include the presenters and attendees.  Watch what they have to say!!!

Cheers,

Obi

 

How to execute a DTS Package

Executing a DTS package from .Net has never been simpler. Here's how:

 '----------------------------------------------------------------------------------------------------------------------
' NOTE: Requires reference to Microsoft DTS Package Object Library
'----------------------------------------------------------------------------------------------------------------------

Dim oPackage As New DTS.Package

oPackage.LoadFromSQLServer sServerName, sUID, sPWD, DTSSQLStgFlag_Default, "", "", "", "MyPackageName", 0

oPackage.Execute

Set oPackage = Nothing

Cheers,

Obi

How to Format Dates in .Net

 '-------------------------------------------------------------------------------------
' Determines the date of the Sunday of the week for the incoming date
'-------------------------------------------------------------------------------------
Function GetSundayDate(strDateIn)

   dim intDayOfWeek

   intDayOfWeek = weekday(strDateIn, 1)
   intDayOfWeek = (intDayOfWeek * (-1)) + 1

   GetSundayDate = formatdate(dateadd("d",strDateIn ,intDayOfWeek))
  
End Function


'-------------------------------------------------------------------------------------
' Formats a date in mm/dd/yyyy format
'-------------------------------------------------------------------------------------
Function FormatDate(strDateIn)

   FormatDate = datepart("m", strDateIn) & "/" & datepart("d", strDateIn) & "/" & datepart("yyyy", strDateIn)
  
End Function


'-------------------------------------------------------------------------------------
' Returns a formatted "hh:mm AM/PM" string for the incoming 24-hour formatted time
'-------------------------------------------------------------------------------------
Function FormatTime(intTime)

   dim strTime

   if intTime < 1000 then
      strTime = cstr(intTime)
      FormatTime = left(strTime,1) & ":" & right(strTime,2) & " AM"
   elseif intTime < 1200 then
      strTime = cstr(intTime)
      FormatTime = left(strTime,2) & ":" & right(strTime,2) & " AM"
   elseif intTime < 1300 then
      strTime = cstr(intTime)
      FormatTime = left(strTime,2) & ":" & right(strTime,2) & " PM"
   else
      strTime = cstr(intTime - 1200)
      FormatTime = left(strTime,1) & ":" & right(strTime,2) & " PM"
   end if

End Function


'-------------------------------------------------------------------------------------
' Returns a mm/dd/yy formatted date for the incoming Sunday date and the requested day of the week
'-------------------------------------------------------------------------------------
Function GetDate(strDateIn, intDayOfWeek)

   GetDate = formatdate(dateadd("d", intDayOfWeek, strDateIn))

End Function

Happy Coding,

Obi

 

How to Deserialize an XML Document into an Object

A simple yet useful way to demonstrate how to take an XML document, and deserialize it to rehydrate an object:

string xmlStuff = TaxReturnXMLDoc.OuterXml;
TextReader reader = new StreamReader(@"C:\temp\Efile-SerializedTaxReturnObject-Clean.xml");
XmlSerializer serializer = new XmlSerializer(typeof(TaxReturnEntity));
TaxReturnEntity tre = (TaxReturnEntity)serializer.Deserialize(reader);
reader.Close();

Obi

How to Pass Values Between Two Web forms

Expose the values you want to access in other pages as proprties of the current page class. This method requires you to code extra properties that you can access in another web form.

The entire process works as follows:

1. Create the web form with controls

2. Create property Get procedures that will return control values

3. Provide some button or link button that posts the form back

4. In the button click event handler call Server.Transfer method that will transfer execution to the specified form

5. In the second form you can get a reference to the first form instance by using Context.Handler property. Then you will use the get properties we created to access the control values.

--------------Source Web Form----------------

Add following properties to the web form:

public string Name

{

   get

   {

      return TextBox1.Text;

   }

}

 

public string EMail

{

   get

   {

      return TextBox2.Text;

   }

}

 

Now, call Server.Transfer.

private void Button1_Click (object sender, System.EventArgs e)

{

   Server.Transfer("anotherwebform.aspx");

}

 

----------------------------------------

Destination Web Form

----------------------------------------

private void Page_Load (object sender, System.EventArgs e)

{

   //create instance of source web form

   WebForm1 wf1;

 

   //get reference to current handler instance

   wf1=(WebForm1)Context.Handler;

   Label1.Text=wf1.Name;

   Label2.Text=wf1.EMail;

}

Cheers,

Obi

 

Orcas is here baby!

Folks,

I haven't been very active in my blog posts lately. This is largely due to the fact that my life has been flat out like a lizard drinking (aussie expression for being busy)!

There is never a dull moment in my household, so lately I have been tinkering with some cool Microsoft products such as the Microsoft Office Professional 2007 and the like.

The Redmond guys keep rolling out the good stuff.  Before, I even realize a sense of pleasure or satisfaction (if you will), a newer version of Visual Studio or Sql Server is rolled out.

Talking about Visual Studio, the next version code name "Orcas" is ready for download. Orcas mainly targets Windows Vista and the .NET Framework 3.0 Development.  It consists of the following new features:

·         Create Microsoft Office Applications with full integration of VSTO into VS

·         Handle Data More Smoothly with LINQ

·         Enable New Web Experience with client-side execution using ASP.NET AJAX and other enhancements.

·         Improve Application Life-Cycle Management (ALM)

I can go on and on to extol its goodness, but suffice to say, this is a cool stuff and I suggest that you check out the Orcas_March07CTP

Cheers,

Obi