Recent Blog Posts
Blogs ยป Archive for March, 2004
X# to Xen to C Omega
The ever-changing future programming language from Microsoft has yet another name, C Omega. You might have seen it as X#, or Xen in the past. C Omega’s research will introduce the notion of data access natively into the OO programming model. If you are tired of the hassle of using APIs to access XML and traditional DBMSs, and have wondered why a language doesn’t have the notion of XML and SQL ready in its core, C Omega could be worth watching out for.
It’s been hidden away, brought back to life, and had name changes galore, but C Omega could looks like it is paving the way for C# without XML or SQL classes, but with built-in functionality to handle data access.
For example, taken from the research paper, this is how we could, in future, handle our XML:
public class card {
sequence{
string name;
string title;
string email;
string? phone;
logo? logo;
};
}
public class logo {
…
Using Fireworks MX 2004 for Flash Graphic and Interface Design
One of the things that can take the longest time when developing Flash applications is the design of interfaces and graphics.
It’s often a trade off between using lightweight vector objects created in a vector based application such as Freehand or Illustrator or to just use imported bitmaps.
More often than not it is the developer / designers choice or preference that dictates how the integral parts of the interface are created whether bitmap or vector, but there is an often overlooked gem in the Macromedia arsenal of applications that you can use as an alternative to create lightweight interfaces…Fireworks MX / MX 2004.
Fireworks MX / MX 2004 excels in creating lightweight editable, scalable vector imagery, and is much easier to use for rapid development of interface or graphics than say FreeHand or Illustrator with a vast range of fill and stroke types as well as the new autoshapes.
Creating vector graphics within Flash itself can lend itself to multiple episodes of hair pulling, but by using the built in shapes and pen tool in Fireworks MX / MX 2004 in conjunction with the selection and subselection tools, you can quickly create the graphics you need.
From there, it’s as simple as creating …
Practical Uses of HTTP in ColdFusion
…posted by davidjmedlock:
As you may have noticed, my most recent article has been published on SitePoint: Practicle Uses of HTTP in ColdFusion. I hope everyone enjoys this article and learns as much from as I did. (Yes, writing is not only a teaching experience, but as much or more of a learning experience, believe it or not.)
I’d like to invite all my readers to share with us ways that they’ve applied HTTP to their ColdFusion applications to extend functionality and enhance their usefulness. I look forward to hearing everyone’s feedback on this.
Proposed New Top Level Domains
While this is slightly off of the open source topic, I felt this was a newsworthy issue to cover in Open Sourcery. ICANN released information on March 19 on ten new proposed top level domains (TLDs) to be added to the registry by sponsoring applicants. These domains include .asia, .travel and .xxx (you can guess what that is for).
There is an open comment period throughout the month of April for the public to voice input, and then an independent committee will begin review and discussions in May.
An important distinction to note is on how this process works. These new TLDs here are sponsored. According to the ICANN release, unsponsored domains operate under the policies of the global Internet community as set through the ICANN process.
Sponsored domains are specialized TLDs that have a sponsor representing the narrower community that is most affected by the TLD. The sponsor thus carries out delegated policy-formulation responsibilities over many matters concerning the TLD.
Complete information is available at ICANN –> New Proposed TLDs
New Flash Shell Extension Available
Daniele Ugoletti has had his thinking cap on and produced a superb Flash shell extension, adding ‘Export to SWF’ , ‘Export to Folder’ and ‘Publish’ options to the context menu when you right click FLA files within Windows.
You can get the .exe file here
http://www.ugoletti.com/go/FlashShellExtension
Disk Based Query Caching
…posted by davidjmedlock:
I happened to notice this on Macromedia’s ColdFusion Developer Center today. I think the article has been out for a little while but I thought I’d post the link here for any who are interested.
Caching Queries to Disk or Memory With ColdFusion
This author also provides a custom tag to do all the dirty work for you. I was thinking about query caching in terms of a few things:
Let’s say you have 1,000 clients or users and you build a complex, dynamic report so that user 1 logs in and views the report. In there it has something like (WHERE UserID = #UserID#) to pull the report for that user.
Well, you can begin to see the problem: 1,000 users = 1,000 complex reports. If you cache those reports using cachedWithin then you’re going to murder your server quickly.
The disk based approach might work better, but first of all, you still have to run every query at least once. …
Running PHP4 and PHP5 in parallel
A roundup of links on how to run PHP4 and PHP5 on the same server;
- Via PHPKitchen: Running PHP 4 and PHP 5 Concurrently
John Coggeshall explains, using two Apache instances, Apache’s mod_proxy and a virtual host.
- Via Planet PHP: PHP5 CGI parallel to PHP4 module on Windows
Urs Gehrig explains. This is probably about the quickest and easiest way to get them running together. Of course PHP as a CGI is not quite the same as an Apache module, performance / $_SERVER variable-wise. Urs also has a handy page of links on PHP5 Installation and related here.
- Via Bitflux: How to run PHP4 and PHP 5 parallel
Tobias Schlitt explains how to get both running as apache modules under Linux.
Any more?
Working with HTML markup
This happened to me recently. I needed a way of highlighting keywords in a chunk of HTML for when users visited the site through Google. In this way, you can help your users locate the information they’ve searched for in Google quickly.
However, a simple string.Replace function wouldn’t cut the mustard. Obviously, it would also replace any mention of a keyword in the HTML markup too, and so would kill links or images.
For example, take the keyword “sitepoint” and I wish to replace it with some HTML “sitepoint”. If my image name had “sitepoint” in it, I’d end up with . Not what I want.
So, I hacked together a little function to first remove all the HTML tags in a string, and then replace them once the replacement has been made. I hope it is of some use, fellow readers:
private string highlightText(string text, string keyword, string highlightColour) {
//ok strip the tags, but keep them safe
System.Collections.ArrayList a = new
System.Collections.ArrayList();
string temp = text;
//ok, find an <
while (temp.IndexOf(”
CSS at SxSW
I attended SxSW Interactive last week in Ausin, Texas. Two highlights of the conference were the CSS panels on Monday morning: Hi-Fi Design with CSS and CSS: The Good, the Bad and the Ugly. Several of the slides from these presentations are available online:
- Dan Cederholm: Accessible Tabs with CSS
- Dave Shea: Hi-Fi Design with CSS
- Douglas Bowman: Hi-Fi Design with CSS
- Douglas Bowman: CSS: The Good, the Bad, & the Ugly
There was great information presented in all of the above, but the point that struck home hardest, at least for me, was when Doug Bowman anounced the infamous Fahrner Image Replacement technique deprecated. Image replacement techniques are CSS methods of replacing text with an image, with FIH the first and most famous. Although designed to improve accessibility, the technique actually has the opposite effect thanks to many screen readers ignoring text that has been set to display: none in the CSS. Joe Clark’s article in A List Apart from last year has the full technical details.
Various other image replacement techniques have sprung up to replace FIR, but so far every one of them has the distinct disadvantage of rendering content completely invisible for users with images turned off in …
PDF’s, Linux and the Web
Regardless if the use of pdf’s is considered useful for your site visitors or cumbersome, they are a part of the everyday web. Often this is the most functional method for distributing complex documents to any platform.
If your Linux workstation or server includes Ghostscript, you have some excellent open-source alternatives for creating and optimizing PDF files.
Ghostscript is an interpreter for PostScript and Portable Document Format (PDF) files as well as complex image files. It can translate and output files to a viewer (Ghostview for one, as well as Acrobat Reader) on numerous Unix variants including of course Linux, as well as translate PostScript files to print to a non-postscript printer.
Within the Ghostscript application there are two utilities, ps2pdf and pdfopt. ps2pdf enables you to generate pdf files completely compatible with Acrobat Reader, including the ability to tweak Adobe Distiller parameters (dozens) and to set resolution for output, such as for screen viewing, for printing and even for pre-press.
Also available is a nice little utility called pdfopt, which allows for the optimization of pdf files, often shrinking file size as much as 50 percent or more.
For information on these tools, see the links below:
Ghostscript –> Complete Overview
ps2pdf …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
SitePoint Kits
Download sample chapters of any of our popular kits.
The Search Engine Marketing Kit, 2.0
The Web Design Business Kit 2.0
The Email Marketing Kit
The Usability Kit
SitePoint Books
Download sample chapters of any of our popular books.
