Archive for the 'asp.net' Category

Web Deployment Projects Visual Studio 2008 - RTW

Sunday, January 27th, 2008

The release of Visual Studio 2008 Web Deployment Projects - RTW is out. After working with the December CTP over the last month I am glad to see this release. I had several problems with the CTP which should all be resolved now. After a couple of tests with the new RTW release everything appears to be working.

Previously the biggest problem was the failure of the build to clear the output directory before attempting to move the temporary build directory. It caused many incomplete builds in a sporadic way which made it hard to figure out. The fix for the CTP was to implement the AfterMerge task to blow away the output directory and move the temporary directory in place, as it should have done automatically. Now all my scripted automation goodness is back on track.

Reviewing Software Design for Growing Applications

Sunday, January 20th, 2008

Applications that live for a long time tend to grow to the point that they become unmanageable. It is a common problem. Large projects grow by adding new features continually. And when critical bugs are discovered they are fixed as quickly as possible without fully considering the impact on the overall system. It is too bad because even the most basic check on the design is a process that can be as simple as a 10 minute review.

Reviewing the application can be as simple as drawing up a diagram to represent all of the parts of the application with lines drawn between the dependent pieces. This diagram does not have to be a detailed UML diagram but can instead be simple circles and lines. The diagram will quickly reveal some obvious problems. Once you have the diagram you can ask yourself a couple of questions:

  1. Are the dependencies always moving down, or are there circular dependencies?
  2. Are the components too big or too small?

(more...)

Holiday Installfest Recap

Friday, December 21st, 2007

On Tuesday we had our local installfest holiday part of the new release of Visual Studio 2008 and .NET 3.5. This was a big one. I feel like I have been hearing about multi-targeting and LINQ for years now. A few weeks back I wrote a summary of my favorite new features. In that post I forgot to mention the new code metrics, so I followed up with a summary of that great set of features.

Since I had a copy of Visual Studio 2008 prior to the installfest I was able to dig in and build a little application that I showed during my mini demo. I call it Kvetch Reborn because it is a recreation of the original Kvetch.com which is no more. I made use of LINQ to get it up and running faster than writing the stored procedures I have typically used with .NET 2.0.

I also made use of the ASP.NET AJAX features to convert a web service into a JavaScript proxy so the methods provided by the service could be used directly from the client-side. The service callbacks are extremely lightweight. Most communications are measured in bytes while your average ViewState is multiple kilobytes. I have been leveraging this functionality for several months now since it was released with ASP.NET AJAX release last year. But now it is a bit easier with intellisense support for JavaScript. You can try it and download all of the source with the following links. In later blog entries I will detail exactly how it was all built. Check back for those details.

It was a great event. We nearly filled the seats with an expected attendance around 200 people. There were lots of prizes thanks sponsors like KForce, Fullhouse Interactive and Apress. All of the tasty food was sponsored by Centare. And Microsoft also threw in some big prizes like the Xbox Elite, Zunes and lots of other great prizes.

I especially want to thank Matt and Kerrie at Direct Supply and Patrick at Northwood Software for helping out the .NET User Group this past year by hosting events at their facilities. I look forward to more meetings with them.

Lastly I want to thank our organizers and hosts: Scott Isaacs, Gerry Heidenreich, Larry Clarkin and Dave Bost. Without them these events would not happen. Thanks guys!

Progress with IE8

Thursday, December 20th, 2007

Great news for web designers and developers, IE8 now passes the Acid2 test. You can see for yourself on Channel 9. The video shows the actual rendered image in their nightly IE8 build which will not be out until the first half of 2008. That could mean late February or late June. I expect we will get a Beta 1 release followed by a Release Candidate a month so that we can all try it out and report any breaking changes it may have caused in our websites and web applications.

I am not sure what this really means for CSS compliance. It would be great to get Firefox 3 and IE8 up to CSS Level 2 and then get moving to CSS Level 3 next. That would allow for automatically flowing multi-column layouts and other basic features the people in the print world have enjoyed for years.

Kvetch.com Reborn

Tuesday, December 18th, 2007

In the late 90's there were a few developers and designers who were feeling out the web as a new medium. I would read their websites, which were essentially blogs before RSS existed, and they would write very personal entries on all sorts of topics. My very favorite was Maggy. I somehow came across the websites she created and quickly discovered others like Alexis Massie, Lance Arthur, Ben Brown and Derek Powazek. Each of them showed a great ability to develop and design great concept websites as well as write amazing content. The mixture of these talents made for very addictive websites.

One website that Powazek created was Kvetch.com which is no longer active. He wrote that when he moved his websites from one server to another he did not restore the Kvetch.com website. That is unfortunate. It was a brilliant idea. Essentially you could select from a handful of topics and then view a series of complaints about that topic. You could also post a complaint anonymously. (Note: Kvetch is a Yiddish word for complain.)

This week I wanted to get some exposure to various features in Visual Studio 2008 which was released recently so I thought this would be the perfect time bring the Kvetch.com concept back. When I built it originally he used inline frames while I am using AJAX as well as some nice effects with jQuery. In another post I will cover the details on how it was built. I have refactored down the AJAX work so that it is very easy to create AJAX-friendly user control with complex, yet uniquely contained, behavior.

I look forward to reading your comments.

[ Kvetch Reborn ]

Also, I hope to see you at the installfest tonight. I may give a short demo of the LINQ and JavaScript that I created for this website.

Tidy up your Markup in .NET

Monday, November 19th, 2007

Clean markup is important. If you allow a page to include sloppy markup it will switch from rendering in "Standards Compliance Mode" to "Quirks Mode" which will apply different rules to how the layout and style works. It makes for an unpredictable result and can be a major headache. One way to introduce sloppy markup into a website is making use of rich editors that spit out HTML, such as the ASP.NET Rich Text Editor Control on CodePlex. There are others like the RichTextBox, FreeTextBox and FckEditor. Each of these editors are ASP.NET controls while you can get a purely JavaScript solution using TinyMCE which is used in BlogEngine.NET. Some of these solutions do create decent markup, but in the case of the ASP.NET Rich Editor Control, it still creates HTML 3.2 instead of XHTML 1.0 Transitional which has become the de facto standard since ASP.NET 2.0. (XHTML?) It still includes FONT tags and other older syntax which has been deprecated. This is where Tidy comes in.

(more...)

The Books have Arrived

Wednesday, September 19th, 2007

When I got home today I found a box full of books waiting for me. More books should be on shelves in bookstores everywhere starting Monday. I managed to put a lot of great content into the book that I could not find in other books, like a custom databound control and a photo album provider that integrates directly with the SiteMap Provider.

You can read more about it on the book website and see the table of contents for a full list of the covered topics. I plan to give away a few copies at the next local .NET User Group meeting.

Revised SmallSharpTools.com

Sunday, September 2nd, 2007

I have revised SmallSharpTools.com with a new design. I am no designer, but my previous attempt was very lacking. I hope this one makes it easier to learn about each of the projects. Let me know what you think.

And I have more on the way with revisions for existing projects as well as some new projects that will be very useful with integrating various .NET technologies. Check back soon for those updates.

Faster JavaScript with jQuery

Sunday, August 5th, 2007
Recommended
Reading

book
book

As you start to build more AJAX features into your application you will be writing more and more JavaScript. Even though we are getting more tool support for JavaScript, especially with Visual Studio 2008, it can still be difficult to work with JavaScript because of browser differences. Even changes between Internet Explorer 6 and 7 can be troublesome. To minimize these problems I have been leveraging different JavaScript libraries which provide a rich set of features that have already handled the cross-browser issues. My favorite has become jQuery for multiple reasons.

The main reason I like jQuery is the fact that it is designed to do more with less code. The programming model lends itself to very compact code that does a lot for you. It also has a rich querying model that allows you to use CSS selectors to find elements within a web page and apply various changes on those elements. And another great reason to use it is the fact that it allows you to write much faster JavaScript. The jQuery model allows you to chain methods together. Each call to jQuery starts with a query like $('div.content') that will match all div blocks in the with content set as the class name. The method returns a jQuery object which can then be used to call another method, like addClass('Highlight') that will add Highlight as a class name to all of the matched elements. It will then return the jQuery object again for another method to run a jQuery method. Chaining the calls allows the same objects to be used over and over so you can avoid the overhead of creating objects which is expensive.

(more...)

Visual Studio Fanboys

Wednesday, July 25th, 2007

A line has formed around building 42 at the Microsoft campus as anxious developers await the release of Visual Studio 2008 Beta 2. The word on the street is that it will be coming out any time this week so it could be a couple more wet, cold nights in Redmond. Microsoft appreciates the dedication and is hosting a Matrix trilogy projected onto the building tonight to help the fanboys pass the time. I wonder if they had Visual Studio in the Matrix. And what would Neo's code look like? I bet his color scheme would be hot. But I digress.

Ok, so there is no line, that I know of, but I am definitely anxious to start using it. I will just download it from MSDN once it is out. My main need at the moment is the Javascript support that it will provide. I have become accustom to Intellisense in C#, VB and even XML and not having it in while I work with Javascript has made me feel like I am back in a terminal window hacking Perl in vi. I try to get by with as little code as possible because I know it will not be easy to maintain.

(more...)