Archive for the 'Internet Explorer' Category

Delivery of an important project, thanks to some clever shortcuts

This blog has been quiet for the last couple of weeks because I’ve been leading a development team in the final stages of delivery of a pretty large asset/stock tracking system.

Its a long story as to why we decided to do it all ‘in house’ rather than to buy a COTS product. Lets just say, we’d already tried buying off the shelf and that’s the reason why we started doing our own.

The budget was very challenging and the development team grew large in the space of a few weeks when we realised that the estimated man hours required to do it was going to take more than four full time developers.

Communication

With a large development team, in disparate locations around the UK it is important to get the communication channels right. My organisation had rolled out text based communication similar to Live Messenger (Office Communicator). This proved the first clever shortcut. This tool allowed us to collaborate in real time, using virtual whiteboards.

WAN based software configuration management. This was very important, it meant we could all see the same page, and nothing was stuck on Fred’s laptop when he went on leave :-)

Hudson – continuous integration testing, ensured that we never dirtied our source code, so we didn’t hear any of the usual ‘why does it not build when I check it out?’ type crying from the team. I really liked the fact you could schedule builds and output the successful build number to SharePoint using it’s RSS feeds. This little gem saved the bacon many a time… although until the developers got used to not treating our source code control system as a backup for their work in progress, the automatic emails telling everyone (including the PM) that the build failed was a little annoying ;-)… I loved it, as there was no excuse for checking in ‘work in progress’  :-D

SharePoint 2007 for project documentation. For much the same reason why we had WAN based software configuration management. SharePoint helps anyone on the internal intranet see what we are up to … and the project manager can stick the GANTT and meeting minutes somewhere too :-)

Process

Those of you who have read my blog before will remember my ramblings about which software development methodology should you choose. We chose to use OpenUP, which is the open source version of the Rational Unified Process. I was a little sceptical about its adoption in the embryonic stages of the project, but it certainly helped us stay on course. It also ensured we followed a process that industry knows about. The iterative nature of these kinds of processes ensure that higher management get to see what us technical types are up to, which keeps the pressure off, because at the end of each iteration there is a defined output and testing stratagem.

Technology

We had to keep it all web based, so it could work over the intranet… and we were limited to IE6 because my organisation hates upgrading and is very risk adverse. I can hear you all groaning… but what about all the security patches etc. etc… yeah I know… I’ve sat across the table from the infrastructure guys and have tried to explain that, but we are only developing for our internal intranet… what could go wrong with that ;-) … basically it is out of my pay bracket to argue with the people that make that kind of decision.

As my department is well versed in C# and ASP.NET (3.5) this was our chosen technology base… we paired this with SQL Server, as we are also well versed in that.

During the design phase it was glaringly obvious that the standard AJAX toolkit combined with the standard ASP.NET controls was not going to cut the mustard with the requirements that had been elicited… and we needed rapid application development, and slick results.

We turned to Telerik’s ASP.NET AJAX control library and it saved us a small fortune. I’m sceptical about most third party products… and I was very sceptical about using it in such a ‘flagship’ project, however my fears were unfounded. It seems you can sell a product with these controls in, and you get all the source code for them… and you can modify the source code for them providing you let Telerik know what you did. They also provide an excellent forum for dealing with problems. If you use a search engine and look up ‘RadGrid’ the Telerik equivalent of a GridView or DataGrid, you still get hundreds of hits :-)

We used the windows style dialog manager (RadWindow and RadAlert), menu control (RadMenu), grid view (RadGrid), combo box (RadComboBox), numeric only text boxes with extras (RadNumericTextBox) and many of their date pickers to name a few. Not only did we use them, we also used them alongside existing AJAX and standard .NET controls with no issue. I think if we did not buy this toolset, we would have spent hundreds of hours doing what they have already done for us, and I bet ours wouldn’t have been as slick, or as tested as theirs. The development team and I weren’t sad that they’d taken the raw control building away from us (and I thought it would incite a riot by the coffee machine!). One of the most pleasing aspects about it is that the customer is happy that we have delivered a sophisticated interface that is user friendly. The window manager allows users to resize, drag and minimise functionality on our web pages much the same as they do on their windows desktop machines.

Our next cost saving came came with the ReportViewer control. We’d been bitten badly in previous projects when using Reporting Services. Is it just me, or does it not feel like a finished product? Problems we had in the past were cross domain access / the classic double hop problem (impersonation) and unstructured website navigation (that one was probably more our fault). The ReportViewer control gives us a little more freedom, we can construct dynamic object data sources in our business layer, and create reports on the fly, on the actual page rather than firing off our requests to the Reporting Services engine running on another site collection in IIS. This eliminates authentication issues and allows you to put the report that is generated anywhere on your page. Our user’s like it a lot :-).

SQL Server Integration Services (SSIS) is looking like it will save us money once we’ve worked out how to use it properly ;-). The COTS product that we’re replacing has a database backend that we can connect to using SSIS, and the customer is providing us data in excel. This is a useful took to help shape and data cleanse on the way into the new system

Final thoughts

User training is now underway and the User acceptance test is around the corner, and I think it will be a big success for the team.

SpittingCAML



Hudson – Continuous Integration Testing

For a while now we’ve been planning on making use of Hudson to help us maintain working builds in our source code configuration system.

What Hudson does, is build your software at a predefined schedule (like a SQL Server agent job, or Windows Scheduled task) or when requested by a user, and produces a dashboard showing the status of your software builds. It is highly configurable, and can link to many source code control systems to get the latest version of your latest code.

Even though this product was/is/seems to be (I’m not sure on this) aimed at the Java developers of this world, it can build pretty much any software package.

We intend to make use of it for the building of .NET applications by getting it to call MSBUILD via DOS Batch files (in my example), however I will point out that you can get Hudson to call MSBUILD through an MSBUILD plug-in not covered in this post.

I want to use another plug-in, the ‘Text Finder’ plug in to parse the output of the batch file for StyleCop errors and system build failures.

Please have a read of this: Meet Hudson, so you can get a proper introduction to it.

To be perfectly honest, I’m not a Java fan (as my colleagues will tell you ;-))… and I thought it was a little overkill to have to install a Java Runtime and Apache, and Hudson to perform automatic builds… however, it has been relatively painless… and as my organisation is not exactly liking to splash to cash at the moment, the fact that everything is free helps…

Those risk adverse, like myself, have to put aside the fact that it’s all open source… and the only support out there is through volunteers :-)… there’s no metaphorical stick to hit someone with if the product doesn’t ‘just work’ out of the open source box.

What I downloaded

  1. Java Runtime Environment (jre-6u14-windows-i586)
  2. Tomcat 5.5 (apache-tomcat-5.5.27)
  3. Hudson (hudson.war v1.314)
  4. Text Finder plug in (text-finder.hpi v1.7)

NB: If you are using IE8/7 to download hudson.war and text-finder.hpi you may find that the extension is changed to .zip. You will need to rename the files back to their original extension to get the installation to work correctly.

Setting up Hudson on Windows 2003/2008 Server alongside IIS

Obviously, since apache tomcat and Hudson are Java based applications, if you don’t have a Java Runtime environment (JRE), you’ll need to install that first. It is relatively painless, simply double click on the EXE installer and bob’s your uncle.

I had my doubts about getting Tomcat 5.5 working alongside IIS, but to my surprise (I haven’t touched Tomcat since my University days back in 2001) the installer worked well, and defaulted to using port 8080, which is nice, since I don’t want to be getting in the way of IIS on port 80. The installer *should* also detect if you’ve got a JRE installed and set the link to it up automatically. If it doesn’t, simply point the installer at the folder that you installed the JRE. You need to set an administrator account up to access the Tomcat manager.

The Tomcat application server should be alive (possibly following a reboot in certain circumstances) after the install and you should be able to navigate to it’s front page.

tomcat_001 
Figure 1: The tomcat front page

imageFigure 2: Entering tomcat manager

Open the Tomcat manager to instigate the Hudson installation. It will prompt you for the username and password you set up during the Tomcat installation before you can access the page.

Scroll down to the Deploy section, in the ‘WAR file to deploy’ section click browse, and select the hudson.war file we downloaded earlier.

tomcat_002
Figure 3: Deploying the Web Archive (WAR) for Hudson

Click the deploy button and the application should be deployed. If you put the WAR file in a part of the file system that gives a long file path, e.g. ‘C:\longfilepath\longfilepath\longfilepath\longfilepath\longfile\hudson.war’ you may have issues with the deployment. I certainly encountered this issue last week. The error message you will get isn’t the most useful, so it’s worth moving it to the root of a drive to see if that solves it.

To confirm successful deployment, look at the application list

tomcat_003
Figure 4: the application list, showing Hudson

If you click on the hyperlink ‘/hudson’ it should take you to the front page of the Hudson application.

tomcat_004 
Figure 5: The Hudson ‘dashboard’

You are now ready to go… as you might have noticed I’ve already created a Job - ‘Test 001’. This is the build that I’ve set up to hopefully explain to you as part of this post.

As I’m using the ‘Text Finder’ plug-in, you’ll now need to install that if you want to follow my example.

tomcat_005 
Figure 6: Managing Hudson, and adding a plug-in

Click ‘Manage Hudson’ and then on ‘Manage Plugins’, Click the ‘Advanced’ tab and scroll to the bottom of that page so you see the following:

tomcat_006
Figure 7: Uploading a plug-in

If now click the upload button, when it has finished, restart the Tomcat service. If you don’t perform a restart the plug-in wont be shown as installed.

image
Figure 8: list of installed plug-ins

Once installed, you should see it in the list of installed plug-ins.

We can now go about creating the job that will build the .NET application.

I’ve got a really simple .NET 3.5 website application (it does nothing other than to display default.aspx) that I’m using for this post.

tomcat_007
Figure 9: Visual Studio 2008 Web Application, the working folder on E: drive and the batch file in the root of the web application folder.

The batch file that Hudson will call is very simple, and I suspect it could be done better, however, here it is if you want to make use of it:

echo change directory to visual studio 2008 common tools folder
cd /d %VS90COMNTOOLS%
cd ../..
cd VC
echo set environment variables
call vcvarsall.bat;

echo call Test001.csproj (looks in the directory of this batch file for it)
call msbuild %~dp0Test001.csproj

Navigate to the Hudson ‘dashboard’/front page. And click ‘New Job’.

Provide Hudson with a name for your job, and select ‘Build a free-style software project’.

image
Figure 10: Free style software project selection

tomcat_008
Figure 11: Adding build steps

Leave everything else as standard for now, and click ‘Add build step’ and select the ‘Execute windows batch command’ option.

Enter the path to the batch file (as shown in Figure 12)

tomcat_009
Figure 12: entering the batch file details into build step

The next step is to configure the ‘text finder’ plug-in to look for the token ‘FAIL’, since MSBUILD produces messages with the word ‘FAIL’ in them.

tomcat_010
Figure 13: configuring Hudson to look for the token ‘FAIL’ in the console output.

Click the Save button, and your job has been created!

Navigate back to the Hudson dashboard, and click the ‘build’ icon next to Job ‘Test 001’ (as shown in Figure 14)

tomcat_011
Figure 14: Instigate a build

If the build was successful, when you refresh the page, you should see this:

image
Figure 15: The sunny picture indicates a very stable build

To demonstrate how Hudson picks up on failed builds, I’m now going to rename the code behind page for default.aspx from ‘default.aspx.cs’ to  ‘breakbuild.aspx.cs’.

image
Figure 16: Deliberately breaking the build

Using Hudson, run the job again.

image
Figure 16: The cloudy picture indicates a failure has occurred

The job has failed, the more the job fails, the worse the weather gets :-)

Run it a few more times to get more bleak weather (unless you like thunderstorms).

image
Figure 17: thunderstorms indicate that most recent builds have all failed

You can review the console output of all the builds that have taken place to help you diagnose failed builds.

tomcat_012
Figure 18: review console of failed builds

As you can imagine, with the text finder plug-in and the numerous others available for Hudson, it makes it a very powerful tool.

I intend to set ours up so it will notify the development team when the latest version of a system checked into our source control system will not build, or contains StyleCop warnings.

SpittingCAML



Sophos IE8 add-on prevents IE8 from loading

Are you having trouble launching IE8 from the desktop icon, the application icon or start menu?

Are you only able to launch it in ‘Administrator’ mode.

Are you running Sophos 7.6.8 on Windows Vista?

The problem might be related to the Sohos add-on. It seems that if you disable it, IE8 returns to working order.

Go to Internet Options and the programs tab. Click on ‘Manage add-ons’

imageFigure 1: Internet Options in IE8

Now disable the Sophos Web Content Scanner

image
Figure 2: Add-on management

Restart all instances of the browser you have open.

Things should now be back to normal.

This is likely to have something to do with the other Sophos issues that are currently related to an update in the last week. See Sophos Antivirus on Windows Vista HP x64 not detected by Windows Security Centre.

SpittingCAML



Internet Explorer - Critical Security Update

I guess I’m only posting this due to the mass hysteria in the media at the moment.

I know lots of people are using IE in corporate environments, I would like to hope that the guys in charge of your work machine will roll this patch out for you ASAP.

For those of you like me, who use IE in a development environment and/or a Virtual Machine, you’ll be pleased to know that Microsoft have released a ‘quick’ fix for the issue.

You can get the patch from Microsoft: here

Read the mass hysteria (from the BBC): here

I think that it is obvious to the average user, that the Internet can never be 100% safe, even if you are running other browsers.

My advice (for what it’s worth) is:

  • If possible (and I can’t believe I’m about to say this!) run a *nix based Operating System (e.g. Linux, MacOS, Solaris). (Read this Whitepaper - registration required)
  • Keep anti virus software up-to-date - remember some of the best packages are free, such as Avast! and AVG
  • Ensure your browser security settings are set to ‘High’ in the ‘Internet Zone’ (Shown in Figure 1 below)

image
Figure 1: High setting for the Internet zone

  • Run the protected mode in IE provided if running Windows Vista
  • Browse the internet as a non-admin user (i.e. a user that is not classed as an administrator!)
  • Use Windows Defender (if running Windows)
  • Don’t store passwords and personal information on your hard drive in an unencrypted form - if you must store it, ENCRYPT it!
  • Delete all those emails you get from various companies that contains your username and the password you forgot but needed reminding about!
  • Sign out of your online banking as soon as you’ve finished using it
  • Use a spy ware detective, such as SpyBot - Search and Destroy

Even doing all above, and by being ultra paranoid, you can never be 100% safe. Just remember, ALL of the technologies that are out there to protect you are written by people, not super humans, they can make mistakes, and source code can be released into the community for devious individuals to take advantage of.

You are in control of which sites you visit, what emails you open and what software you install!

There’s lots of great advice out there, just look for information on how to remain safe online :-) DON’T PANIC!

Remember, that you might not be able to install and/or do many of the things I’ve suggested here at your place of work due to restrictions on what you are allowed to do. Don’t give your engineers a headache!

SpittingCAML




You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.