In This Issue...

Build Your Own ASP.NET Website Using C# &
VB.NETLearn to build dynamic ASP.NET Websites using freely
available software with no programming experience. Learn ASP.NET by
building:  - a password-protected
Intranet
- an ecommerce store
- a shopping cart system with
credit card processing
- a newsletter system
- and much
more!
All the content is presented in a
fun, practical and easy-to-understand style. All you need to get started
is a recent version of Windows and knowledge of HTML! (More
information...)


Introduction
Thanks to some hasty hardware handling by yours truly, I had
smoke come out of my computer last weekend! Can you guess which part did
the smoking?
Computer parts are pretty well designed these days, so as you might
expect the part that I was able to plug in wrong to cause a short circuit
was the antiquated floppy drive.
As incendiary incidents go, I was happy to get away with a new floppy
drive and a little electrical tape. Bullet dodged, I say, as at the other
end of the short circuit was one of my hard drives.
SitePoint's Around
the World photo competition is winding down with less than a
week to get in for your chance to nab an iPod. With all the fantastic
entries so far, we're still lacking some major landmarks like the Eiffel
Tower, the Grand Canyon, the Sydney Opera House, and the Olympic village.
Live close to a famous landmark? You might be surprised just how easy it
is to win in this contest... <hint, hint...>


PNG Panic
All this week I've been brewing up a big rant for you about
Internet Explorer's PNG support sliding further downhill in Windows XP Service Pack
2. Turns out things weren't nearly as bad as I feared. Now I'm just
confused...
Way back in the Tech
Times #44, I explained a somewhat clunky workaround that let you
display a partially transparent PNG image in both Internet Explorer and
other browsers. I ended that particular tip with these naively hopeful
words:
Let's just hope that Microsoft wise up and support PNG
transparency with the standard <img> tag in
Internet Explorer 7!
Now, more than two years later, not much has changed.
Over the weekend, I was working for the first time since installing SP2
on a site I designed recently that uses PNG transparency in the main logo
at the top of every page. When I previewed my work in Internet Explorer, I
was shocked to see it display a warning about active content as it refused
to display the logo!
The cause? Well, though you may not realize it, you need to use an
ActiveX control to display PNG transparency in Internet Explorer.
filter:progid:DXImageTransform.Microsoft.
AlphaImageLoader(src='logo.png');
In this IE-only CSS property, which displays a PNG file with
transparency in that browser,
DXImageTransform.Microsoft.AlphaImageLoader is actually an
ActiveX control. And at first glance, it looked to me like Internet
Explorer had decided to block its use by default. Disaster!
Today I got around to visiting the live version of the site in Internet
Explorer, and I was both relieved and suspicious when the security warning
didn't pop up. Had it all been some bizarre nightmare?
It turns out that, by default, Internet Explorer only blocks the PNG
transparency control when loading a page from your computer (i.e. with a
file:// URL). Near as I can figure, someone decided that
allowing ActiveX controls to access local files was a security risk.
Personally, I'd have liked to have seen an exception made for this
particular control.
For semi-official information and discussion about PNG support in
Internet Explorer, see the Channel9
Wiki.


HTML Utopia - Learn CSS the Easy Way!
HTML Utopia: Designing Without Tables Using CSS is a complete
introductory guide to CSS with a particular focus on using CSS for
layout.
On top of the guide, the book includes the most complete CSS
property reference currently available! With coverage of over 150+
properties (CSS1, CSS2, and browser-specific extensions), the reference
provides descriptions, examples, and browser compatibility information.
Brandon Eley of CDHost says:
I have several books on CSS but never got past just
putting up a stylesheet for text formatting and creating all my layouts in
HTML tables, until now. I sat down yesterday morning and opened the book
for the first time. By the end of the day, I had redesigned my entire site
layout with a centered two-column design, completely using CSS.


Crossing the Great Divide
At the risk of scaring off some of the less advanced readers,
I'm continuing to follow Harry Fuecks' efforts to develop ScriptServer, a
framework that allows JavaScript code in the browser to execute PHP code
on the server.
SitePoint's PHP blog has had suspiciously little PHP and a whole lot of
JavaScript in it lately. With the latest installment in his Crouching
JavaScript, Hidden PHP saga, Harry revealed the method to this
madness.
Throughout Web history, there has been a Great Divide between
server-side code and client-side code:
-
On the server side, code such as PHP scripts are used
the process form submissions and generate Web pages dynamically from
databases and other sources.
-
On the client side, JavaScript code (and occasionally
Flash movies and Java applets) display friendly, usable interfaces to the
user.
Until recently, the only pass over this Great Divide that would allow
client-side interface code to use server-side processing code has been the
browser's page request mechanism. That is to say, the client-side code can
do all the lovely interface stuff it likes, but the moment it needs to get
information from the server, a new Web page must be loaded to obtain that
information.
Last
issue, I explored some recent developments in browser technology that
have begun to suggest alternative routes across the Great Divide. It is
fast becoming practical for JavaScript code to interact with the server
between page requests. Similar trends can be seen in the world of Flash
(e.g. Flash
Remoting).
Harry's ScriptServer project aims to pave a nice, smooth four-lane
highway right over the Great Divide. Rather than forever futzing with
differing implementations of XMLHttpRequest to get the
slightest practical result, you should be able to simply add the
ScriptServer library to your page and then start coding as if JavaScript
and PHP were one.
ScriptServer has got a ways to go before it's something you'd use in a
public Website, but when the stars align and the wind blows the right way
the alpha version is already quite a thing to see in action.
If being up to your elbows in JavaScript and PHP at the same
time is your idea of a good time (I can't be the only one, surely...),
then check out Harry's work and think about pitching in.
If not, just sleep sound in the knowledge that the Great Divide may be
shrinking by the day.
Read the blog entry:


That's all for this issue -- thanks for reading! I'll see you in two
weeks.
Kevin Yank techtimes@sitepoint.com Editor, The SitePoint Tech Times


Help Your Friends Out
People you care about can benefit from the wealth of information on new
and maturing technologies available on the Internet. Help them learn
how to do it by forwarding them this issue of the SitePoint Tech
Times!
|