Recent Blog Posts
Blogs » Archive for April, 2004
Do a CS Degree Without University
OK, you won’t get a degree, you won’t experience the cheap beer, and you won’t have to live on baked beans for 3 years, but if you’re after some of the knowledge you pick up at Uni (only if the beer isn’t too cheap mind) you can’t do much better than to take some of the courses at the renowned institution MiT, as part of their OpenCourseWare initiative.
You won’t find courses on .NET there, but as anyone who’s picked up .NET knows, a knowledge of fundemental computer science is essential to write good applications with it.
Check it out, for free, here. Just don’t expect a graduation ceremony ;)
ColdFusion Forum on SitePoint Forums
…posted by davidjmedlock:
ColdFusion now has its own forum here on the SitePoint network! If you haven’t joined SitePoint Forums yet, we’d invite you to do so. It’s a great place for discussions about programming, getting help with questions, and honing your skills while helping others out, too.
We don’t take any responsibility, though, for any addiction caused by registering at SPF… :)
XMLReader coming to PHP5 / PECL
Via Christian, looks like there’s going to be a fast XML Pull implementation coming to PHP5, based on libxml2 (the XML library behind PHP5).
Eventually this should be published via PECL (and I guess, for the near future, not something you can expect your shared host to support) but right now the source is online at http://cvs.php.net/cvs.php/pecl/xmlreader/.
Essentially it means an (arguably) easier way of parsing XML than with SAX. Philip’s article Back to Basics: XML In .NET shows .NET’s XMLReader in action here and it PHP it would be much the same.
Based on looking at the source code for the PHP xmlreader, using it would be something like;
// Create the parser
$reader = new XMLReader();
// Load some XML in a string
$reader->XML($xml);
// Loop through the contents
while ($reader->read()) {
switch ( $reader->nodeType ) {
// Tag start
case XMLREADER_ELEMENT:
echo ‘Got opening tag for ‘.reader->name;
break;
// Tag start
case XMLREADER_END_ELEMENT:
…
ColdFusion Events
…posted by davidjmedlock:
Want to keep up with whats going on in the ColdFusion world? Keep track of Macromedia’s events calendar. There are both in person and online events scheduled. There are a few basic ColdFusion seminars as well as some advanced topics such as using ColdFusion with IBM Websphere and developing applications with Flash and Coldfusion. I just may sign up for that one…
Using Secure Shell and Secure Copy
One way in which web developers and webmaster can further insure secure access to and from their servers is by restricting the use of telnet and where possible ftp.
While ftp can be configured tightly and run under ssl for additional security, it and telnet remain weak points in server security. Alternatives are available.
For starters, by requiring the use of secure shell (ssh) as a replacement to telnet access, user sessions are encrypted and key-based rather than clear text username and password based. SSH is easily available to all platform users with terminals, terminal applications and GUI clients ready-made for Linux, Macintosh and Windows. A majority of *Nix servers have an ssh server installed by default, and telnet can be disabled safely while still insuring access through the command line (terminal) and clients (which the majority support both telnet and ssh).
For Windows-based servers, there are open source ssh servers available, one of the most popular being OpenSSH for Windows (formerly run under the Network Simplicity name). This installs ssh under Cygwin without the need to load a full Cygwin install on a Windows server.
An immediate benefit of using ssh is access to secure copy (scp) …
New Article: Build an RSS DataList Control in ASP.NET
A new article is up online “Build an RSS DataList Control in ASP.NET”.
Learn how to create a server control based on the DataList to provide a self-contained and manageable way of consuming RSS feeds within your ASP.NET applications with this step-by-step tutorial.
One of the challenges of writing such a control is always how the deal with the multitude of different syndication formats that exist. I noticed that many articles that have appeared on consuming feeds only seemed to concentrate on one feed format, instead of producing an extendible way of supporting many formats. In this way, the article highlights how to use XSLT to support both the consumtion of RSS and RDF feeds.
Hope you like :)
Updated Flash Resource Manager Application Available
Still catching up after my holiday, but Mike Chambers (Macromedia) has released an update to his Flash Resource Manager application which he initially released on April 7th. The application in case you didn’t know about it allows easy viewing of the Flash documentation outside of Flash in a much more meaningful and user friendly way than the built in reference and help panels.
Click Here to View Flash Resource Manager technical specification and screenshots
Click here to view the additions / enhancements in the latest release.
What you should know about CSS 2.1
CSS 2 revision 1 has been out as a candidate recommendation for nearly two months now, but there’s been surprisingly little discussion of it around the web. It’s an interesting specification, and one that any standards conscious web developer should be aware of.
CSS 2.1 revises CSS 2 to better reflect the current state of the browser market, and to build upon lessons learnt in the four years since CSS 2 was released. It trims out a number of features that were never really adopted by the overall CSS community, such as aural stylesheets (now relegated to an Appendix) and adds a small number of widely requested or implemented features, such as the colour keyword ‘orange’.
The best guide to what’s new in CSS 2.1 can be found in the specification itself in the CSS 2.1 vs CSS 2 section. While most of the differences are subtle, the end result is a significant improvement over CSS 2 and forms a much better foundation for CSS going forward.
Is It Time to Take the Leap and Start Your Own Business?
Based on comments received so far, many Sitepoint readers appear to want to start their own business, someday, and are not quite ready to take the leap. Please don’t live in “someday.” If you want to start a business — if you’d feel like you’d have wasted your life if you never got around to starting something up — then get a plan in place today.
Here are five elements that you need to succeed. Three are very practical, and two are more in the psychological realm. Please read them and take the challenge at the end of this blog:
1. A solution. You can be a freelance web designer if you want, but why not dream bigger? Why not create a solution that you can sell again and again, without having to trade your time for dollars? That way, you make more money for less of your time. A good solution solves a real problem that people in a focused target market have, in ways that make them more money and also make them feel better (e.g. less stress and frustration, the thrill of success and prosperity, security, etc.). Web design might be only one small part of that solution; you …
Serializing PHP data structures for Javascript
Currently messing with some code that serializes PHP data structures into Javascript and back, as a means for easy data exchange.
Going from Javascript to PHP is fairly easily done (see user comments at http://www.php.net/serialize) by generating strings PHP is capable of unserializing e.g;
String.prototype.toPHP=function() {
var s = this
s=s.replace(/\\/g, “\\\\”)
s=s.replace(/\”/g, “\\\”")
s=s.replace(/\n/g, “\\n”)
s=s.replace(/\r/g, “”)
return ’s:’+s.length+’:”‘+s+’”;’;
}
That modifies Javascript String class so you can call toPHP() on any string and get a PHP-serialized representation of it.
Going the other way, with what I’ve currently got, if I have a simple PHP array like;
$a = array(’x',’y');
a “serialized” string ready for “unpacking” by Javascript, would be;
‘new Function(\’var a = new Array();a[0]=”x”;a[1]=”y”;return a\’);’
If I’ve got that string in a Javascript variable called “serializedData” (perhaps fetched via XMLHttpRequest), I can use it like;
// Creates a function object
unserializedDataFunc = eval(serializedData);
// Get back the data from the function object
unserializedData = unserializedDataFunc();
The reason for using a Function object combined with eval() is so I can avoid all naming conflicts in Javascript. Not 100% sure this is the best mechanism to “serialize” a data structure for Javascript - escaping quotes is likely to be a headache. …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Logo Design, Web page Design and more!
- Custom logo designs created ‘just for you’.
- Pick the design you like best.
- Only pay if you’re satisfied with the result.





