Running a javascript function after UpdatePanel.Update()

Found this forum post to be very helpful and I think I may employ this more often when doing UpdatePanel related messaging-when-done…

Run a javascript function after UpdatePanel.Update() – ASP.NET Forums:

You should call the method in this way:

ScriptManager.RegisterStartupScript(this.Page, this.GetType(), “MyScriptName”, “<script type=’text/javascript’>functionToCall(‘hello world’);</script>”, false);

The problem could be the fact that you are using this instead of this.Page. Also instead language=’javascript’ you can use type=’text/javascript’.

All I know is that when I launched the script properly passing this.Page it worked properly. I had derived from Page to a custom base page, so maybe that had something to do with it.

Additionally, I refined it just a bit by building the script dynamically in a string and then passing that instead of just a literal in the static method call.

One more improvement I was considering is to embed this as a method on my aforementioned customized base page. Then i can just pass a name and the script to the method, and I won’t have to worry about the messy details every time.

Better JavaScript Minification

A List Apart: Articles: Better JavaScript Minification:

In the past few years, performance research has become more prevalent thanks to research by the Yahoo! Exceptional Performance Team and Google’s Steve Souders. Most of that research studies not the individual HTML page, but the resources the page requires to display or behave correctly.

Although both CSS and JavaScript may be included within an HTML page, best practices encourage storing CSS and JavaScript in external files that can be downloaded and cached separately. Performance research asks: How can these external resources be downloaded and applied most efficiently? The first approach is to limit the number of external requests since the overhead of each HTTP request is high. The second approach? Make your code as small as possible.

15 Best Wireframing Tools for Designers (and Developers)

15 Best Wireframing Tools for Designers | tripwire magazine:

15 Best Wireframing Tools for Designers Building a website can be a time-consuming and expensive business. To ensure that you minimize the number of hours spent and the amount of money wasted on each project, it’s absolutely essential that you plan properly, flushing out content and functionality early, reducing rework. Most people simply use a pen and paper to plan the early stages of their website designs, but is this enough? Besides a rough, handwritten sketch, you should be creating wireframes for your own benefit and to aid in preliminary discussions with clients and team members. To create a successful wireframe, you’re going to need to use a good wireframing tool. We explore the 15 best online tools below. Online tools, as opposed to desktop applications, tend to be easier to use, cheaper and better for sharing your designs with colleagues and clients. Each tool in the list below performs several unique functions. Some are better for knocking up a mockup in a matter of minutes; others are better for building fully interactive, clickable, high-fidelity prototypes that look and feel like a proper website. Take some time to try out a few of these tools and find out which one’s right for you.

Smashing Magazine – Maps in Modern Web Design

Smashing Magazine – Maps in Modern Web Design

Geo-location was a hot topic in 2009. With so many applications on GPS-enabled smartphones, more maps than ever were accessible to the average person. But how can Web designers and developers take advantage of an increasingly location-aware user base? This article explores existing trends, conventions and the possible future of interactive maps online…

Read More…

15+ Free Abobe Air Applications for Designers and Developers

Great Adobe AIR-based tools for web design and development!

15+ Free Abobe Air Applications for Designers and Developers | Admix Web:

Adobe AIR, which stands for Adobe Integrated Runtime, is a cross-functioning system runtime engine that allows web designers and web developers to create rich internet applications, and Adobe AIR is compatible with Windows, Macs and Linux. Adobe AIR is a very functional and useful system for web designers and web developers because it permits Flash, Flex, JavaScript, HTML and AJAX code to look like traditional desktop applications by running without the Web browser. Adobe has created an official Adobe AIR Marketplace which essesntially trys to show all of the Adobe AIR applications that exist. These applications range from tools useful for designers to developers to bloggers to the average person using the web. These are great tools and applications because they can make our lives as designer and developers easier, and best of all they are free. I have compliled a list of 15+ great Adobe AIR applications for you all to use. Remember, this list is not a best of or all inclusive, just ones that I have found to be helpful! Click on the images for links to the application. Enjoy!

ASP.NET Logging to the Visual Studio Output Window with log4net

OK this one has been baffling me for a long time but I just ignored it. We have been using the open source logging library log4net for a long time, and for the most part it was working fine. But the one thing that I wanted to do but could never get working was logging to what my brain wanted to call “The Console,” AKA (to me) the Output window in Visual Studio.

I tried using the log4net appenders ConsoleAppender and ColoredConsoleAppender, to no avail. Turns out there’s a different appender that works with the Output window, and it’s not ConsoleAppender.

The appender in question is TraceAppender!

So here’s a little snippet of XML from my web.config files that handles output to the Output window (basically the same markup as appears on the log4net examples page):

  </log4net>
    <appender name="TraceAppender" type="log4net.Appender.TraceAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d [%t] %-5p %c %m%n"/>
      </layout>
    </appender>
    <root>
      <level value="ALL"/>
      <appender-ref ref="TraceAppender"/>
    </root>
  </log4net>

To those familiar with the way the log4net section looks in your web.config this will make sense, but the key concept is that, per the log4net documentation, “Events are written using the System.Diagnostics.Trace.Write(string,string) method” — and it turns out that one of the listeners is the Output window!

A colleague of mine and I were very confused by all this (I’m glad I wansn’t alone in that feeling either!), but we were both very glad to figure this one out.

Thanks go to Google (of course), and this post on the SharpDevelop forums.

The Remote is Dead! Long Live the Remote!

Imagine my dismay when I discovered that my Apple Remote had taken a ride through the clothes washer and dryer a couple of weeks ago… As you may imagine, this journey rendered the remote inoperative and useless (albeit totally dry).

Additionally, searching on the Apple Store was a bit more depressing since the device is evidently no longer available… yikes.

eBay to the Rescue

Thankfully there’s eBay.

After nosing around a bit I was able to find several vendors who had very reasonable prices on basically brand-new remotes. I think mine ended up being $6.99 USD.

At any rate, it arrived today and I was very pleased to try it out while listening to iTunes and it works perfectly. At that rate I probably should have purchased a few extras just in case this happens again…

Let’s hope not.

Strange Behavior

My next task was to resolve a very strange and annoying problem if you have more than one Mac in the proximity while using the remote. This happened to me while on vacation — the remote was pointed at my MacBook Pro, but in addition to controlling it, my wife’s MacBook was also responding to the controller, starting and stopping iTunes while a movie was playing on my computer. Very interesting.

Thankfully it is possible to pair up your remote to your computer, and I’ve already paired the new remote with my laptop and will do the same with our other MacBook and its respective controller…

Whew!

New Look

I’ve been experimenting with some new WordPress themes, and I took a shine to DailyPress by Blog Oh Blog!

I haven’t decided if this is going to be the permanent design, but it’s much better than the old default look I was using, especially with all the links back here regarding the iPhone wireframing templates.

Please don’t add debug messages to your customer-facing application

Debugging messages are for developers/engineers, not for humans (I can say that since I’m a developer). But I can’t believe that it’s 2009 and I still encounter things like the following example…

Every time I log into one of my online banking systems, I get a message like the following:

This is just intrusive and rude behavior (as Alan Cooper might say). First of all, the message first off tells me when the last unsuccessful attempt was made to access the account… HUH??? Then it tries to be helpful and tell me when the last successful attempt was made.

It just makes no sense at all to me why this message exists at all. Why would I ever care about these particular statistics, and even if I did care about them, is it really necessary to pop up a message box every time I log in???

I vote no.

Fine. If you want to have that information accessible, provide a log of all accesses tucked away in my account settings or somewhere I can get to if I think I have a security concern. Don’t show this message to me, please. What this message boils down to is a debug-ish message in the clothing of security (I could be wrong, but that’s what it smells like to me).

Interestingly, as a side note, I happen to know that this system is from a company that is now owned by Intuit (my former stomping ground), and in the two or more years since that acquisition, this message box has surprisingly still not disappeared.