RSS ? Recent Blog Posts

Blogs » Archive for October, 2004

How long is a piece of string?

by Harry Fuecks

That’s a question that’s been bugging me alot recently. Wondering if anyone’s got any idea’s how to solve this problem…

PHP’s serialize() function allows you represent PHP data structures as a string, which can then be parsed and restored to data with unserialize().

Because the string is very easy to generate, it opens up the possibility of using it in other languages to exchange data with PHP, which is what I’ve been doing with Javascript here. Other implementations exist in Ruby, Perl, Flash Actionscript and even C# - have put together a list of those I’ve found here.

In general this approach works nicely - no need to reinvent stuff on PHP’s side at least. But there’s one problem; how long is a string? As this bug shows, it’s a problem.

Using Javascript as the example, if I have a string like “Főő” (”Foo” using Hungarian o character - see here) (note Sitepoint have a problem it seems hence the entities showing up - you’ll need to look up the character)

var s = “Főő”;
alert (s.length);

Will tell me the string length is 3 - Javascript (at least in Mozilla / IE) is smart when it comes to understanding what a character is.

When serializing this string …

 

Lessons from a panel of top producers

by Andrew Neitlich

I just got back from leading a seminar with 100 or so IT professionals/entrepreneurs. During the seminar, we had a panel of top producers — both “rookies” who had achieved excellent results within a year, and “veterans” who had been at it a while.

The first question was, “What tactics have worked best for you?”

In order of number of responses, here are their answers:

One: Building their “sphere of influence” by networking and asking for referrals

Two: Delighting current customers, following up with them to get more business, and asking for referrals

Three: Lead exchange groups (e.g. BNI, starting their own)

Four: Getting involved in the community, for instance the local chamber of commerce and in volunteer activities– but wisely, in ways that build real relationships with influential people

Five: Choosing a vertical market/industry and reaching decision makers in that industry via direct mail and follow up calls, along with joining their association and getting active with it

Six: Advertising via a variety of means

Seven: Cold calling

This hierarchy makes sense to me….How about to you?

 

Men in Black Security Guides

by Blane Warrene

Where might one go for advanced security techniques? Regardless of where on the planet you may be - if you think about it for a while the United States Government’s National Security Agency will pop up on that list somewhere.

These are the folks who brought us the excellent Security Enhanced Linux — a promising construction of the Linux kernel for ‘hardened’ protection and administration.

I was pointed to a new security configuration guide released on October 15th for tweaking OS X (Panther) — showing deeper penetration by Apple beyond the research tiers in the public sector, where they have a stronghold, into more mainstream usage areas.

While there I discovered an entire library of documents covering new and legacy platforms and applications relevant to the web professional, including:

  • A brief on network security, and router guidelines
  • Java plug-in security
  • IIS 5.0 recommendations
  • Techniques for securing Microsoft SQL and Oracle database servers
  • Client and server configuration guides for Exchange Server 2000 and Outlook
  • and much more — free for the taking..

The NSA’s site has great depth and is fairly easy to maneuver — there are some interesting research projects and outreach programs to academia, businesses and within the government.

 

Guess everyone makes mistakes

by Harry Fuecks

Gmail accounts ‘wide open to exploit’ through XSS (presumably in the form of an email).

Chris has a good explaination on XSS Self Defence.

While on the subject; was glancing at a PHP book called “PHP 4 Programming for Advanced Web Developers” - you thankfully won’t find in the bookstores (electronic only for a limited online bookstore). Here’s a quote;

You can validate the form data by using client-side scripting languages, such as JavaScript or VBScript, […], or send the form data to a verification script.

That suggests client side validation is good enough (and makes me want to scream). Think there needs to a place to report misinformation as well as application security holes.

 

Inspiration

by corriehaffly

I always get inspired by these examples of photo “retouching.”

http://1976design.com/blog/archive/photo/2004/04/10/photo-manipulation/

 

Talking to MySQL: Your First Look at JDBC

by Kevin Yank

To build the To-Do List application we will use to explore the myriad Java Web development technologies that are available, we’ll begin with the backbone of the application: a set of classes that connect to a MySQL database to retrieve, model, and update a to-do list.

Before you go any further, you’ll need a working knowledge of Java as a programming language. At the very least, you should understand the basic concepts of object oriented programming: classes, objects, methods, properties, and constructors. For an overview of these concepts and the necessary basics of Java programming, see my articles: Getting Started with Java, Java Language Basics, and Object Oriented Concepts in Java (part one and two).

Since we’re connecting to a database, we will be using the Java Database Connectivity (JDBC) classes, which are part of the Java 2 Enterprise Edition (J2EE) platform, supported by all Java-enabled Web servers. These classes provide a common set of classes for connecting to any database server.

In order to connect to MySQL with JDBC, we need to grab a copy of MySQL Connector/J, the JDBC driver for MySQL. After telling Java to load the driver, we can ask it to connect to a MySQL database and all …

 

Scalable Vector Graphics

by Blane Warrene

The W3C is issuing a final call for comments on its draft of Scalable Vector Graphics 1.2. After a review of public input the SVG Working Group will be submitting for candidacy.

If you have not explored SVG yet - put it on your radar. It is an XML-based language for web grapics and can interact with traditional web formats such as gif, jpg, png, html and others.

The best way to relay the power of SVG to you is to show it - and no better examples exist than on Adobe’s SVG Zone (Adobe has an excellent viewer to download for free as well). The amazing demos are found here that were created for real world use.

Once you see them - you will most definitely see the applicability to the web developer and designer’s goals to take applications and user interfaces to the next level.

I personally have been exploring SVG for use in a reporting solution that can generate interactive charts with drill down capabilities. This is for a web application project I have been involved with for nearly 18 months. It is in production for several corporate users - and the next logical step in its roadmap …

 

Let’s start at the bottom…

by Kevin Yank

As I have mentioned, Java Web technology has been built up in layers over many years. Today, there are at least a dozen practical and proven approaches to building Web sites with Java.

My first goal in this blog will be to take you on a grand tour of these options, to give you an understanding of each–its strengths and its weaknesses–so that you can begin to make informed decisions about what to learn.

So we’ll start by looking at Servlets, then we’ll move on to JSP, combine the two as we examine Model 2, extend this to a discussion of MVC frameworks like Struts and Spring, and evenutally explore the various View technologies like Velocity, JavaServer Faces, and XMLC. This is by no means an exhaustive list–there is lots to explore!

As we do this, I predict you’ll notice an interesting trend. Most Web development platforms start out reasonably easy to learn and use, but they tend to get more and more complicated as you try to shoehorn larger, more practical and complex projects into them. PHP comes to mind: much as I love that language’s ease of use, you can spend months reading people’s thoughts on how best to structure sizeable …

 

Making Curves

by corriehaffly

So I got a question from someone about how to make those “curve-things” that you see on a lot of web sites. I was at first a bit surprised by the question since I thought I covered it in my vector graphics tutorials, but it sounded like they were looking for something more step-by-step. Well, here we go…

I’ll be using Photoshop for this example, but you can use any graphics program that has a vector pen tool.

1. Click to make a point.

2. Click-and-hold at where you think the top of the curve should be, then hold the shift key and drag out to the side of the point to create curve handles. Holding shift constrains the curve handles so that they are horizontal.

3. Then, click-and-hold at where you think the bottom part of the curve should be….

4. And again, hold the shift key and drag.

5. Click to end the curve.

6. To create the shape that we’ll later fill in, hold the Shift key (to constrain the movement to vertical/horizontal/45 degree angles) and click to create the bottom right corner of the shape.

7. Holding shift still, click to create the bottom left corner of the shape.

8. Finally, …

 

What’s All The Excitement About? This…

by sgrosvenor

A little late with this one, but I’ve been changing jobs over the past few weeks, so it’s been a little busy! Apologies

There’s something afoot, something so huge, it will change the way we work and create our Flash applications in the future, yep you guessed it, Macromedia have revealed a mini sneak preview of of the new features to be available in the next incarnation of the Flash Player (v8) at the Macromedia Flash conference in Tokyo, Japan, and I so wish I was there!

Here are some of the main points from Colin Moock’s Blog regarding a small cross section of the enhancements…

-saffron, a new type-rendering engine
-dramatic performance improvements (a sluggish calendar app jumps from 14fps to 125fps)
-real-time bitmap effects (blur, drop shadow, colour matrix etc)
-real-time video alpha channel

Looking at the image at the top of this blog, gives you a taster of the demonstration that was presented of the next generation player, and if you watch one of the video streams , you will be as shocked as I was to see the advances in just a single player version that they have planned in the next version. Just wait till you see the increase …

 

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Logo Design, Web page Design and more!

99designs

  • Custom logo designs created ‘just for you’.
  • Pick the design you like best.
  • Only pay if you’re satisfied with the result.