. Editors Only: News Stories Pictures Gems Shortcuts Discuss Prefs Admin Bulletins Logoff Help

PHP Everywhere Home

Home    Bio   
  My Prefs   Sign Out
  John Lim is logged in.

2002

 
NASA Software Engineering Laboratory
A list of software engineering documents derived from over 20 years of software development practice at NASA. Here are the ones i found most useful:

-Recommended Approach to Software Development PDF

-Manager's Handbook for Software Development PDF

-Software Process Improvement Guide PDF

PS: These methods are an insight into how to manage a very big project. For smaller projects, many of these details are bureaucracy and are not needed. I found the requirements and planning parts particularly useful as it has several checklists on things to consider...

Discuss (2 responses) (Join / Login first) Edit   permalink: #  

Bending over backwards with PDF and RTF
I will be pretty busy for the next few weeks. Don't know how frequently I will be posting. Doing heavy software development work, building the next generation of our workflow software. Anyway here's a little titbit about how we generate documents dynamically in our workflow system...

There appear to be tons of PHP libraries out there that generate PDF, presumably for creating reports and form letters. However I don't think PDF is a very programmer-friendly format. You have to bend over backwards to do anything nice with PDF. Page-sizes are hard-coded. Doing word-wrap, calculating page sizes is a pain.

I believe a much more flexible method of generating reports is Rich Text Format (RTF), a text markup format used by word processors. Documents formatted in RTF will do all the hard work of calculating word-wrap, page sizes, the amount of text to fit in a table, headers and footers for you. And because all modern word processors support RTF, its as ubiquitous as PDF.

Vadim Paggard has a nice commercial PHP RTF library that we bought over a year ago. You write pseudo-HTML markup, and it converts it to pretty nice RTF.

And RTF is extremely flexible. If your end-users have existing standard form letters that they want generated dynamically with PHP for download, then save the form letter in RTF format. As RTF is a text markup format, it becomes trivial to write a macro-substitution program to search for all variable fields in the RTF letter.

For the example below, the variables {$ADDRESS}, {$NAME} and {$REASON} can be macro-substituted with a simple RTF parser:

{$ADDRESS}

Dear {$NAME},

Thank your for your request to {$REASON}...

The only real limitation to RTF is that it is not a read-only format. But for most uses, you can bend it like Beckham.

tri: RTF specification.

Discuss (2 responses) (Join / Login first) Edit   permalink: #  

Inheritance Considered Harmful (PDF)
It could also be argued that inheritance falls into the class of programming language features which are accepted and instigated without thorough analysis, only to be subsequently rejected when experience has shown them to be unhelpful. It would appear that encapsulation is more relevant and applicable than inheritance, and its benefits to the maintenance process are more obvious. In [12], it is suggested that in future systems, architectures based on aggregation will be more appropriate than those based on inheritance. This is particularly true of systems incorporating multiple inheritance whose structures have tended to be elaborately concocted... Lastly, contrary to what was originally thought, it may be that most OO systems are simply not amenable to the use of inheritance, and their functionality does not lend itself well to use of inheritance. -- Rachel Harrison and Steve Counsell

tri: Not an easy article to read, but basicly it's saying complex inheritance trees (more than 3 levels in depth?) are difficult to maintain, and many designs use inheritance inappropriately. That is why the big thing in C# and Java today is generics, and why I was such a fan of templates in C++, even if the syntax was terrible. PHP has less need for generics because most of its operators and functions are polymorphic (thx to dynamic typing). See also Objects Have Failed.

Discuss (Join / Login first) Edit   permalink: #  

Objects have Failed: A debate between Gabriel and Steele
This debate was held at OOPSLA 2002. Both are well known for their work on Common Lisp. Guy Steele is currently Mr Java Spec at Sun, while Richard Gabriel is researching next generation systems for Sun.

Objects, as envisioned by the designers of languages like Smalltalk and Actors—long before C++ and Java came around— were for modeling and building complex, dynamic worlds. Programming environments for languages like Smalltalk were written in those languages and were extensible by developers. Because the philosophy of dynamic change was part of the post-Simula OO worldview, languages and environments of that era were highly dynamic.

But with C++ and Java, the dynamic thinking fostered by object-oriented languages was nearly fatally assaulted by the theology of static thinking inherited from our mathematical heritage and the assumptions built into our views of computing by Charles Babbage whose factory-building worldview was dominated by omniscience and omnipotence.

And as a result we find that object-oriented languages have succumb to static thinkers who worship perfect planning over runtime adaptability, early decisions over late ones, and the wisdom of compilers over the cleverness of failure detection and repair. -- Richard Gabriel

Counterpoint by Guy Steele

tri: The debate notes (pdf) contain a long list of interesting ideas and thoughts on object technology. Also see Inheritance Considered Harmful.

Discuss (2 responses) (Join / Login first) Edit   permalink: #  

Enemies of Usability
It's easy for an individual to spot usability problems, but it's often impossible for an individual to solve those problems. In fact, in most organizations, the design of usable information systems requires collaboration across teams, departments and disciplines.

These collaborations are notoriously messy. Perhaps our tribal heritage underlies our fear of difference. Perhaps organizations fail to align goals and incentives across groups. Perhaps we secretly enjoy being difficult. -- Peter Morville

Discuss (Join / Login first) Edit   permalink: #  

Xdebug and Zend Magic
A look into Zend engine internals and the Xdebug extension. A presentation given by Derick Rethans at the International PHP Conference 2002.

Discuss (Join / Login first) Edit   permalink: #  

Software, Jim, but not as we know it
As we boldy explore the new universe of service-oriented architectures, we should not be surprised if software begins to assume unfamiliar, alien forms. Here are some of the unusual phenomena to look out for when plotting a course for your enterprise -- Phil Wainewright

Discuss (Join / Login first) Edit   permalink: #  

PHP Architect's new year present - Jan 2003 issue is FREE
To celebrate the success of their launch, they are giving away the January 2003 issue of php|architect for free! php|architect is a monthly magazine dedicated to PHP Professionals. It's published in PDF format and available worldwide. In the second issue:

- Theo Spears: Writing Secure PHP Code
- Jayesh Jain: Using the .NET Assembly with PHP
- Marco Tabini: Writing A Web-based PDF Viewer

Plus, articles on creating your own Full-Text Search with MySQL, accessing the Win32 API, implementing database persistence layers in PHP, tips & tricks, and much more!

Discuss (Join / Login first) Edit   permalink: #  

Google Zeitgeist
The term "zeitgeist" comes from the German "Zeit" meaning "time" and "Geist" meaning "spirit". The term is defined in English by Merriam-Webster's Collegiate® Dictionary as "the general intellectual, moral, and cultural climate of an era." Google believes that this word and its definition appropriate to describe the program it implemented to share global search statistics and trends from the world's most popular search engine.

A new word to impress my friends with...if only i knew how to pronounce it :-)

Discuss (3 responses) (Join / Login first) Edit   permalink: #  

PHP 4.3.0 Release Announcement

After a long and arduous 8 months of development and testing, PHP 4.3.0 is out! With regard to scope, time, and effort, this is the largest 4.x release of PHP, and it further elevates PHP's standing as a serious contender in the general purpose scripting language arena.

Command line interface

This version finalizes the separate command line interface (CLI) that can be used for developing shell and desktop applications (with PHP-GTK). The CLI is always built, but installed automatically only if CGI version is disabled via --disable-cgi switch during configuration. Alternatively, one can use make install-cli target. On Windows CLI can be found in cli folder.

CLI has a number of differences compared to other server APIs. More information can be found here:

Streams

A very important "under the hood" feature is the streams API. It introduces a unified approach to the handling of files, pipes, sockets, and other I/O resources in the PHP core and extensions.

What this means for users is that any I/O function that works with streams (and that is almost all of them) can access built-in protocols, such as HTTP/HTTPS and FTP/FTPS, as well as custom protocols registered from PHP scripts. For more information please see:

New build system

This iteration of the build system, among other things, replaces the slow recursive make with one global Makefile and eases the integration of proper dependencies. Automake is only needed for its aclocal tool. The build process is now more portable and less resource-consuming.

Improvements

PHP 4.3.0 has many improvements and enhancements:

  • GD library is now bundled with the distribution and it is recommended to always use the bundled version
  • vpopmail and cybermut extensions are moved to PECL
  • several deprecated extensions (aspell, ccvs, cybercash, icap) and SAPIs (fastcgi, fhttpd) are removed
  • speed improvements in a variety of string functions
  • Apache2 filter is improved, but is still considered experimental (use with PHP in prefork and not worker (thread) model since many extensions based on external libraries are not thread safe)
  • various security fixes (imap, mysql, mcrypt, file upload, gd, etc)
  • new SAPI for embedding PHP in other applications (experimental)
  • much better test suite
  • significant improvements in dba, gd, pcntl, sybase, and xslt extensions
  • debug_backtrace() should help with debugging
  • error messages now contain URLs linking to pages describing the error or function in question
  • Zend Engine has some fixes and minor performance enhancements
  • and TONS of other fixes, updates, new functions, etc

For the full list of changes in PHP 4.3.0, see the ChangeLog file.

Discuss (Join / Login first) Edit   permalink: #  

Seminar on The Future of PHP 5 and the Zend Engine 2
Michal asked me to post this about their iSeminars. These look really cool because you can talk interactively in the seminar. And there are transcripts of previous sessions too. Unfortunately the last time i tried it, the packets couldn't get through my firewall - bummer...

Date: January 8, 2002

Zeev Suraski, one of the designers of PHP, gives an overview of the new language-level features developed in the Zend Engine 2, and the way they address the limitations of Zend Engine 1 in PHP 4 including:

· New object oriented model
· Integration with external object oriented models, such as COM and Java
· Exception handling
· Stack tracing

Discuss (Join / Login first) Edit   permalink: #  

what i want for christmas
the fedex guy pulled up, so exciting, then he walked to the next house with a ll bean package, rats, but then he came over and said "i have a big package for you" oh muh gawd...

tri: Merry Christmas and a Happy New Year. Spend some time with the ones you love. Postings will continue next year!

Discuss (Join / Login first) Edit   permalink: #  

Top Ten Web-Design Mistakes of 2002
Every year brings new mistakes. In 2002, several of the worst mistakes in Web design related to poor email integration. The number one mistake, however, was lack of pricing information, followed by overly literal search engines -- Jakob "The Man" Nielsen

Discuss (Join / Login first) Edit   permalink: #  

Software, Jim, but not as we know it
As we boldy explore the new universe of service-oriented architectures, we should not be surprised if software begins to assume unfamiliar, alien forms. Here are some of the unusual phenomena to look out for when plotting a course for your enterprise -- Phil Wainewright

Discuss (Join / Login first) Edit   permalink: #  

Comparing C, C++, Java, Perl, Python, Rexx, and TCL (pdf)
Google HTML version. The key conclusions of the research paper are

- Designing and writing the program in Perl, Python, Rexx, or Tcl takes no more than half as much time as writing it in C, C++, or Java and the resulting program is only half as long.

– No unambiguous differences in program reliability between the language groups were observed.

– The typical memory consumption of a script program is about twice that of a C or C++ program. For Java it is another factor of two higher.

– For the initialization phase of the phonecode program (reading the 1 MB dictionary file and creating the 70kentry internal data structure), the C and C++ programs have a strong run time advantage of about factor 3 to 4 compared to Java and about 5 to 10 compared to the script languages.

– For the main phase of the phonecode program (search through the internal data structure), the advantage in run time of C or C++ versus Java is only about factor 2 and the script programs even tend to be faster than the Java programs.

There is also an interesting debate at Lambda the Ultimate on my previous Developing Reliable Software with Scripting Languages essay.

Some people have got the impression the Developing Reliable Software essay advocates scripting languages as the best way to write software. That's simply silly - some things can only be done in a 3GL due to their better performance characteristics. All that was written was "This seems to be a pretty good justification for using scripting languages." Whether the justification fits the problem domain is up to you of course.

Also I am more interested in finding ways to make coding scripting languages more reliable, and not proving that they can be reliable. I am not interested in proving whether Python is more reliable than PHP or C# or vice versa. I just want our code to suck less.

Lastly the reason (which was never elaborated) why scripting is the now and future of computing is because the price/performance ratio of computers is still dramatically going down. The 68000 assembler that I wrote for the Macintosh in the 80's that I (hopefully) thought was highly tuned runs slower than the slowest Perl code I could write today. More and more problems over time have become amenable to the use of specialised domain specific scripting languages. One non-PHP example being the numerical processing now done using Python and MatLab.

Discuss (Join / Login first) Edit   permalink: #  

Why JSP Sucks So Hard
once again my UI engineers will be taking perfectly good HTML written in Dreamweaver and tearing it apart, throwing out some of it and rewriting other parts of it, just to make it work with the JSP they're writing. Once they're done, the HTML author will have absolutely no clue what the page does any more, and will have no desire or ability to edit it. When we insist that no really we need this redesigned, we'll spend twice as long doing it (doubling our costs, negative ROI, bad technology choice, yadda yadda yadda) since the HTML author will need that long to write in sample data and then have the JSP author tear it out again. -- Marc Hedlund

Is Adam Bosworth saying the same thing?

Discuss (Join / Login first) Edit   permalink: #  

IE accounts for 95% of browsers - survey
Nineteen out of 20 surfers use IE as a browser, with Netscape a very distant second, and alternative browsers restricted to use among a small tech savvy niche, according to Web analytics outfit OneStat.com.

Discuss (Join / Login first) Edit   permalink: #  

Jack Herrington and Harald Radi debate on PHP, COM and Java
Boy, I thought I was a fervent supporter of PHP, but even I'm not as hard-core as Jack Herrington. Jack blasts Harald Radi's article on Creating Multi-Tier Web Applications with PHP (pdf) because Harald says:
PHP is attractive as a language because of its simplicity and ease of learning, in return PHP lacks important features needed for building complex web applications.

tri: What do you think?

Discuss (7 responses) (Join / Login first) Edit   permalink: #  

Interview with Maryam Mohit, VP Site Development, Amazon
Q: What's Amazon.com's "secret sauce," the secret of your success?

I wish I knew. I do think that the relentless focus on creating a great experience has to be part of it. It's not just a great experience on the website, because we think about it as a 360 degree experience, which includes what happens after you click to order. What's the experience of waiting for the order to arrive, of getting the box, what happens if something goes wrong? Each of those is part of the customer experience.

Discuss (Join / Login first) Edit   permalink: #  

Tim Perdue Interview (PHPBuilder & SourceForge founder)
A little bit of background. As the rest of the company imploded, we had a lot of those people come over and all of a sudden they cast themselves as the "experts" on everything from building a great development platform to running the development process. And of course, I didn't know shit from shinola, which I always found rather amazing since I built much of what they were fighting over.

tri: Thanks to Keith Devens for the link.

Discuss (Join / Login first) Edit   permalink: #  

The PHP Sharp Research Project
Alan Knowles just posted on php.dev that he is starting to develop a PHP compiler for the CIL (.net bytecode). Anyone looking to develop a commercial PHP# compiler? Alan's for hire...

Discuss (Join / Login first) Edit   permalink: #  

X-oops, I did it again
Nicholas Petreley decided to perk up his VarLinux.org site by ditching the PHP-Nuke weblog package and examining his options with the X-oops and E-Xoops object-oriented portal packages. What he's seen thus far is encouraging.

tri: Here's a little map to help us to navigate this forking mess:

 Thatware -> PHPNuke 
                    -> myPHPNuke  -> X-oops -> E-Xoops 
                    -> PostNuke   -> Envolution
                                  -> Xaraya

All the above versions are still actively developed. Amazing!

Discuss (Join / Login first) Edit   permalink: #  

You gotta love a guy who puts his life on his weblog
The latest episode to Russell's life is that in his new job, he's moving back to the States from Spain.

All my software on my laptop is paid for. Spain doesn't put a lot of weight on paying for their software.

Everyone has a desk and a phone. The Spanish normally share their phones - especially developers who are treated like shit and given no respect whatsoever.

Airport Security: I was anal probed at the airport. Somehow I beeped as I passed through the machine and ended up going through a 5 minute routine which included taking off my shoes (to be x-rayed again), holding up my legs like a high-kicker, taking off my belt, folding down my pants, etc. Additionally, some lady dropped her scarf as she was walking down the concourse and some airport guy comes running up behind her (passing the scarf on-route) telling her she dropped her scarf, and escorted her back to pick up the scarf, walkie-talkie by his face ready to call in the big-guns if this scarf turns into some sort of James Bondesque blast-o-scarf... Fucking ridiculous. And this is in Seattle.

Discuss (Join / Login first) Edit   permalink: #  

Harald Radi: Multi-Tier Web Applications
PHP is attractive as a language because of its simplicity and ease of learning, in return PHP lacks important features needed for building complex web applications. These are mostly required when following the multi-tier pattern to achieve a separation of presentation, logic and data storage and to reuse already existing interfaces of your information system. Because of its straightforwardness PHP is best suited for building the presentation layer of a web application. The extensions bundled with PHP enable you to integrate existing components that are available as Java classes, CORBA- and (D)COM components or .NET assemblies. Another advantage is that most of these component models already provide various frameworks for transactions and messaging between processes and furthermore message queuing if these processes are not running at the same time. Efficient process communication can therefore be realised with very little effort.

tri: There's a little bit of history to this article. Harald was one of the writers who was going to contribute a chapter to a book i was writing. For reasons beyond my control, the book got cancelled. It looks like a lot of what he wrote is inside this article. It's a pity that the book was cancelled because most of the book was written to this article's standard. Harald also converted this article into a set of slides for a conference. The slides are much more readable.

tri: Thx to PHPDeveloper for the link.

Discuss (5 responses) (Join / Login first) Edit   permalink: #  

Piracy is Progressive Taxation
For all of these creative artists, most laboring in obscurity, being well-enough known to be pirated would be a crowning achievement. Piracy is a kind of progressive taxation, which may shave a few percentage points off the sales of well-known artists (and I say "may" because even that point is not proven), in exchange for massive benefits to the far greater number for whom exposure may lead to increased revenues.

Our current distribution systems for books, music, and movies are skewed heavily in favor of the "haves" against the "have nots." A few high-profile products receive the bulk of the promotional budget and are distributed in large quantities; the majority depend, in the words of Tennessee Williams' character Blanche DuBois, "on the kindness of strangers."

Lowering the barriers to entry in distribution, and the continuous availability of the entire catalog rather than just the most popular works, is good for artists, since it gives them a chance to build their own reputation and visibility, working with entrepreneurs of the new medium who will be the publishers and distributors of tomorrow. -- Tim O'Reilly

Discuss (Join / Login first) Edit   permalink: #  

Few Good Solutions have the Luxury of Staying Simple
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies. --C.A.R. Hoare

Before commenting on this quotation, I was in full agreement with Professor Hoare. However after some reflection, I now believe that this quotation is misleading. I do not think that the defining characteristic of a successful design is simplicity anymore -- it is adaptability. I have 3 examples to illustrate my point.

First is Microsoft's Windows NT. Novell had at one time the best PC file server on the market. It had the dominant market share. It had a robust and simple architecture tuned only for file-serving and it did it very well. Then Windows NT came along. NT was slower and not as reliable as a Novell server. But because NT was more adaptable and improved more and more, it became the numero uno PC server.

Second is the Linux monolithic kernel. Many academics condemned Linux in its early days because its monolithic kernel was inferior and more "complicated" than the microkernel. Today most modern operating systems do not use a microkernel - and this old debate over "simplicity" is irrelevant. Moshe Bar recently benchmarked a real microkernel OS (MacOS X) against Linux running on the same hardware. Linux won easily.

The Intel 8086 instruction set is my last example. True it's not a pure software example, but it's apt. Anyone who has studied 8086 assembler and compared it to its contemporary, the Motorola 68000, knows that the Intel chip was an ugly duckling. But of course we know who won this battle. Then came the RISC chips that promised infinite scalability (compared to Intel) because of its superior, simpler technology. Intel did such a good job improving the chip that many people still do not believe Intel when it says that we should upgrade to Itanium.

Of course simplicity is still a good goal, but these examples show in today's complicated world, few good solutions have the luxury of staying simple.

Discuss (Join / Login first) Edit   permalink: #  

Smacked by PHP Traveller
Finally, pay attention to the fourth paragraph of this article where the author describes why he is against the MVC architecture. Now, MVC is *not* meant to help you with viewing permissions. The author doesn't know that but that is not stopping him from speaking against "Smalltalk consultants turned Java advocates". It is important to note here that I do not think everyone should know MVC. What I object against is people not being humble.

Well i have criticized others in the past, so i don't expect anything less than a good smack like this when i get things wrong! Fixed.


New Damn the torpedoes! Full speed ahead!

I get a lot of negative energy reading the responses to this post. Phhhhhtttttt! Make that two farts! Then breathe in your own shit :-)

When you write or release open source code, there will be bugs. When you make comments or post articles, you will make mistakes. If you write enough articles you give people plenty of ammunition. People will point out your errors - that's normal - after all, I will point out yours.

Fixing bugs is no big deal. It's your dreams and what you build that matters.

Discuss (4 responses) (Join / Login first) Edit   permalink: #  

Golden Rules for optimizing your PHP pages
PHP invites beginners to insert complicated scripts and database queries in their sites, while possessing only superficial knowledge of how the internet runs. I often read this and think of my own web experience: I felt that I was able to create anything (because I believe that you can materialize ANYTHING if you are creative, determined and patient enough) but I was not a good PHP builder.

So I began to read manuals, magazines and PHP forums around the web in search of background information. How could I optimize my portal? It began to get heavier from week to week with my new features based on queries that made my sites slower and slower (maybe not for those on ADSL, but at any rate I started to get the feeling that things could be optimized by applying some golden rules). -- Marion Weerning

tri: In an unrelated item, Zend is having a free seminar. It will discuss the issues of intellectual property protection, and highlight the business and technical benefits that Zend SafeGuard Suite offers.

Discuss (Join / Login first) Edit   permalink: #  

Quote of the Day: Generalizations
Generalizations are generally wrong -- Butler Lampson

Discuss (Join / Login first) Edit   permalink: #  

Design Pattern Snobs
Have you noticed lately how the word pattern seems to be creeping into general musings and dialogue more and more? Like name-dropping, it's consciously woven into the fabric of the conversation as a way to assert a certain level of understanding and credibility. Mention the latest design pattern and suddenly your peers will see you as a genius of software engineering, "...you see I have employed the Decorator pattern for this particular class..." While you're fighting the urge to give them a good slap, allow me to let you into the big secret. There is none! -- Alan Williamson

tri: Alan is correct in saying that patterns have produced a lot of jargon and people misuse patterns all the time; unfortunately calling patterns "data structures" suggests he doesn't know what he's complaining about. Ted Neward has a good counterpoint.

Discuss (Join / Login first) Edit   permalink: #  

PHP Congress 2002: APIs, Design Patterns and Useful Objects
This session will present an overview of Design Patterns and other solid OO design concepts, show how to implement those concepts and patterns in PHP, and then give a number of examples of those patterns in working, real-world applications. -- Chuck Hagenbuch

Discuss (Join / Login first) Edit   permalink: #  

Quote of the Day
Q: How many software programmers does it take to change a lightbulb ?
A: It can't be done; it's a hardware problem.

Discuss (Join / Login first) Edit   permalink: #  

Design Really Matters
When it comes to design, most folks have one of three common attitudes. The first is, "Yes, design is vital to accurately communicate our brand." They pony up the bucks and pay professional designers for their talent and ideas.

Others say, "Heck, it's technology that matters. We'll have our in-house designers put a pretty face on it." They create development budgets to match their priorities.

The third contingent is convinced information is more important than looks. "What matters is what we say. We don't want all that graphic stuff to get in the way of our copy." They go with a spare, Jakob Nielsen-like approach that emphasizes text with a Wall Street Journal-like look.

They're all wrong. -- Sean Carton

Discuss (1 response) (Join / Login first) Edit   permalink: #  

Phrame
Phrame encourages application architectures based on the "Model2" approach, a variation of the classic Model-View-Controller (MVC) design paradigm. Phrame provides its own Controller component and integrates with other technologies to provide the Model and the View. For the Model, Phrame can interact with any standard data access technology, including Pear DB/DataObjects, and ADODB. For the View, Phrame works well with PHP, Smarty Templates, XSLT, Flash MX, and other presentation systems.

Phrame provides an extensible development environment for your application, based on published standards and proven design patterns. Phrame is sponsored by the Software Development department of Texas Tech University and is released under the GPL

tri: This set of classes looks really nice if you use the MVC model. But a word of advice: chefs say one of the hallmarks of good cooking is that the natural flavours of the ingredients should be retained, and not disguised; it seems silly to make roast beef taste like chicken. Similarly, when using PHP, we should be using natural built-in PHP constructs. The designers rejected the more idiomatic foreach loop and PHP arrays, and decided to reinvent the wheel in their HashMap (just a hashed array), ListIterator (foreach) and ArrayList (array), Stack (use array_pop and array_push instead) classes. Can't get that taste of Java outa my mouth.

Discuss (1 response) (Join / Login first) Edit   permalink: #  

First English PHP Magazine Out
php|architect is the monthly magazine dedicated to PHP Professionals. It's published in PDF Format and available worldwide. In the first issue:

Zeev Suraski/Brad Young:
Performance Management Opportunities

Harrie Hazewinkel:
SNMP Management with PHP

Marco Tabini:
Console scripting with the nCurses bindings

Plus, articles on creating your own webmail system, distilling PDF files for free, writing a database independent abstraction layer, tips & tricks, and much more!

Discuss (2 responses) (Join / Login first) Edit   permalink: #  

Quote of the Day
You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time. -- Bertrand Meyer

Discuss (2 responses) (Join / Login first) Edit   permalink: #  

Understanding the Importance of Release Early, Release Often
What Often Happens when Commercial Source Developers "Go Open"

This is a pretty common tenet in the Open Source world and where commercial developers often go wrong. If you are an ex-commercial developer then you want desperately to reach a "1.0" stage or a "near functional", "mostly baked" stage before going live. You wouldn't want to release something piece meal, would you? After all -- that's the way it's done. -- Scott Johnson

Discuss (Join / Login first) Edit   permalink: #  

A Programmer visits China
I recently married a nice Chinese girl. We then travelled to China, partly to visit her family and friends, but also to do some sight-seeing, and to be tourists for a few weeks. This article sums up my experiences during this trip. -- Dino Fancellu

tri: I just visited China and read this with interest. Have a look at the responses - some really weird people went ballistic over his frank (and funny) comments.

Discuss (Join / Login first) Edit   permalink: #  

Internationalization and Localization with PHP
While everyone who programs in PHP has to learn some English eventually to get a handle on its function names and language constructs, PHP can create applications in just about any human language. Some applications need to be used by speakers of many different languages. PHP's internationalization and localization support makes it easier to make an application written for French speakers useful for German speakers. -- Adam Trachtenberg

Discuss (Join / Login first) Edit   permalink: #  

Tip of the Day
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies. --C.A.R. Hoare

Discuss (Join / Login first) Edit   permalink: #  

Wireless LAN Security FAQ
Yesterday I complained about the lack of knowledge of basic security issues in some PHP articles. Well I am getting a wireless card for my notebook, and thought I'd learn more about the security issues of 802.11. It's a pretty sad tale for anal-retentive security-obsessed slobs like me. Encryption keys (SSID's) are sent in clear text, etc.

Discuss (Join / Login first) Edit   permalink: #  

Flash and Web-Based Applications
The Internet is changing. Although people have primarily used it to read email and Web pages, more functionality-oriented applications are now emerging, with the goal of providing new features that do more for users. Developers are creating many of these applications using Macromedia Flash, because traditional Web pages are better suited to what they were invented for -- reading articles -- than to the new goal of manipulating data objects.

This possibility [of using Flash] sounds good. However, in the usability field, we've learned that more technical capabilities and a broader set of design options usually translate into more rope for hanging the users. Designers almost always use new features to excess, and it takes some time to discover the most appropriate way of applying new technology to suit human needs. -- Jakob "I told you so" Nielsen

Discuss (Join / Login first) Edit   permalink: #  

The Object-Oriented Evolution of PHP
Few people know this, but when PHP as we know it today was being molded, back in the summer of 1997, there were no plans for it to have any object-oriented capabilities. Andi Gutmans and I were working to create a powerful, robust and efficient Web language loosely based on the PHP/FI 2.0 and C syntax. As a matter of fact, we got pretty far without having any notion of classes or objects—it was to be a purely structured language. However, on August 27th of that year, PHP's object capabilities changed.

When classes were introduced to the code base of what was to become PHP 3.0, they were added as syntactic sugar for accessing collections. PHP already had the notion of associative array collections, and the new classes were nothing but a neat new way of accessing them. However, as time has proven, this new syntax proved to have a much more far-reaching effect on PHP than was originally intended. -- Zeev Suraski

Discuss (Join / Login first) Edit   permalink: #  

I have a Nigerian Investment Scheme for You...
As usual, lots of disinformation out there. Just read an article at Zend that suggests storing your login id in cookies as an authentication mechanism! Of course this is bad -- just find out his userid, and place a cookie with the userid on your browser and you have stolen his identity. Then there was an article at phpcomplete that suggests that using objects is substantially faster than associative arrays. As objects are implemented as associative arrays internally, that sounded fishy. A bit of testing revealed there were bugs in their benchmarks.

In my opinion, the best thing to do with such articles is to quietly delete them. They do more harm then good. Now for all of you people who don't agree with me, I have a plan to export Nigerian goods that will make us tons of money...

Discuss (6 responses) (Join / Login first) Edit   permalink: #  

Replacing Perl Scripts with PHP Scripts
With the introduction of version 4.2, PHP has started supporting a new SAPI (Server Application Programming Interface) called CLI (Command Line Interface). This facility was introduced to help developers create small shell applications (scripts) with PHP. So, now you can kiss Perl goodbye forever. -- Jayesh Jain

Hear hear. Thanks to my influence, other developers at Natsoft are using PHP for their batch scripts too. Hmm maybe it is because they report to me...

Discuss (2 responses) (Join / Login first) Edit   permalink: #  

Zope versus Cocoon
Evaluating a Content Management System or Portal Solution? This excellent survey gives you a better idea of what to look for. It compares Zope, a CMS written in Python, with Cocoon, a Java framework.

I must say that most PHP systems such as PHP-Nuke or Post-Nuke still cannot compare with Zope, although they are improving. The only one that comes close AFAIK is EZ Publish. Midgard is another one that's supposed to be very good, but I've never figured how to install it (remember I am only a generalist).

Discuss (Join / Login first) Edit   permalink: #  

Sample Chapter: Professional PHP4 Web Dev Solutions (pdf)
In this case study, we will focus on, and demonstrate, the use of templates to build a site that supports generic HTML browsers, WML support for WAP phones, and other mobile devices such as PalmPilots and handheld devices running WindowsCE or PocketPC.

Discuss (Join / Login first) Edit   permalink: #  

Interview - Bård Farstad of eZ systems
Bård Farstad is the lead developer at eZ systems, the company behind eZ publish. As a PHP developer from a C++ background, he's pretty much done all there is to do with PHP. For this 25 year old programmer from Skien, Norway, coordinating an international development team and turning an Open Source software project into an enterprise-level commercial success was just a matter of adjusting his stride. Aside from the computer keyboard he's also a master of the guitar fret board. Ask him nicely and he might send you his band's latest single on mp3...

Discuss (Join / Login first) Edit   permalink: #  

Book Review: Beginning PHP4 Databases
Many people think that i'm some kind of database guru because i wrote a popular database abstraction library. Well you want to know a secret... I'm not an expert of databases, i just muddle my way through MySQL, i could never figure out how to compile PostgreSQL on Windows, I don't know so many things.

I'm actually a generalist. I can code a bit in Javascript, I know some C++, PHP and a thousand other useless languages. A generalist is pretty good thing to be in technology, because computers and software changes so fast and if you spend too much time specializing you're already a dinosaur before you turn 40.

So what has this got to do with the book Beginning PHP4 Databases? Well it turns out that this book (sent to me by Wrox) appears to be for beginners but is actually meant for a different audience, people like me: generalists. In typical Wrox fashion, we get an army of smart programmers to write about their fields of expertise. The may know their databases, but the writing is a bit too technical for real beginners.

I still liked the book, and it took me a couple of days to realize why. The book is actually an overview of different database technologies, including relational databases, XML databases and object-relational ones. The book goes into some technical depth on each type of database, shows you how to model and normalize databases, and has examples using the native database api's and PEAR DB, shows us how to interface to Xindice (an XML database), and use the object-relational stuff in PostgreSQL. You get to learn a lot about databases you might never use!

Conclusion: The book has decent content covering many database topics, but is more like a collection of essays on different databases than a cohesive whole. In other words the book has all the advantages and defects of the Wrox team of authors approach. The book is good value if you are someone interested in database technology and want to learn more about what's available today for PHP.

Discuss (Join / Login first) Edit   permalink: #  

PHP Architect: first issue is coming soon
PHP Architect is going to release their first issue on 2nd December 2002. This is a PDF magazine and is very cheap at US 1.99 per issue. There is a sample article Writing a Web-based PDF Converter by Marco Tabini

tri: I would suggest growing the market by giving every alternate issue away as a free download for the first few months, but that's for the publisher to decide.

Discuss (Join / Login first) Edit   permalink: #  

Michael Radwin blogs ApacheCon
Watching the Alpha Geeks: Tim O'Reilly gave this morning's keynote address. (Actually, what's bizarre is that he's actually giving the keynote address right now and I'm blogging via an 802.11b WLAN.)

O'Reilly spoke about early adopters being a good predictor for technology trends. He compared the models of Napster and MP3.com (distributed vs. client-server models) and how it often takes someone to look at technology in a completely different way in order to make progress -- cheap local storage and always-on networking are changing the computing landscape. He says the killer apps of today are all network applications: web, mail, chat, music sharing.

The best laugh came at the moment when he said that he thinks the phrase "Paradigm Shift" gets overused so much that it is starting to generate groans the way the phrase "The Knights Who Say Nee!" has done for years

tri: Thx to Jeremy Zawodny for the link.

Discuss (Join / Login first) Edit   permalink: #  

Will Sun rise again?
8 months ago, I predicted that Sun would be in trouble. Let see what's happened since...

Discuss (Join / Login first) Edit   permalink: #  

Intranet Usability: The Trillion-Dollar Question
Poor search was the greatest single cause of reduced usability across intranets we have seen, aside from the general lack of executive support and budget. Search usability accounted for an estimated 43% of the difference in employee productivity between intranets with high and low usability. -- Jakob Nielsen

Discuss (Join / Login first) Edit   permalink: #  

Comparing Python to Java
Java was designed to be an incremental step up from C++, with the rationale that for the price of a small bit of efficiency, you gained a huge amount in terms of simplicity, ease of development, maintainability, and portability. Python on the other hand "turns all the knobs to 10." It offers a beautifully simple, clean design that can result in programs that are extremely clear, easy to maintain and very quick to develop.

tri: In my mind, what is true of Python holds true for PHP also. Furthermore I can train a C or Javascript programmer to code in proficiently PHP in 2 days. I cannot say the same for Python. Python enjoys a certain intellectual cachet among the digerati, but I think PHP is the better language, especially when PHP's support for threads and unicode is fixed.

Discuss (3 responses) (Join / Login first) Edit   permalink: #  

New features of C#: Generics and Iterators (Word doc)
An interesting presentation for language geeks.

I'm a fan of templates (generics). When I was using C++, STL was a big plus-plus for me. The question arises - does PHP need templates? I don't think so because PHP's data is loosely typed. It couldn't care less if the data was about strings or potato fritters. What is required though for effective template usage in PHP is some standard conventions for object naming and object reflection.

And does PHP need iterators? Not if you dump your potato fitter objects into an array - PHP's type-less array structure provides a natural format to loop over.

There is one use of iterators that could be useful and isn't available now - iterating through a data structure that's larger than can fit into memory. But provided we don't expect PHP to do everything, we could let the database do the processing for us. That's what databases are good for. Munching through tons of banana and potato fritter data.

Techie Glossary: What are templates? code templates that can handle different data types gracefully, eg a list or tree class. And iterators? That's a foreach loop going through a collection of data/records.

Thanks to Andrew Stopford for the link.

Discuss (Join / Login first) Edit   permalink: #  

Comparing PEAR DB to ADOdb

PEAR DB is the default database abstraction library for PEAR. ADOdb is a high end database abstraction library modelled on Microsoft's ADO that is also very popular.

1. Feature Comparison
Where we try to put you to sleep by showing you the similarities between PEAR DB and ADOdb

2. Features Missing from PEAR DB
Now we try to wake you up with some teasers

3. Criticisms of ADOdb
Read what other people are moaning and complaining about

Discuss (3 responses) (Join / Login first) Edit   permalink: #  

Jean Paoli (co-creator of XML) on XML in Office 11
Our goal is to enable end-users to use XML properly. The result is not for developers. We are for the masses. That's why we had to invent this mode where the XML guy or Web developer would be able to introduce a schema into something an end-user can understand, a template, and then the end-user is going to use that template. I know that in general the XML developers do not think about this kind of thing. But we are not here to enable XML developers to be happy creating XML. We are putting XML generation into the hands of people who do not understand XML at all.

Discuss (Join / Login first) Edit   permalink: #  

Best Wishes to Enygma
Seems that enygma, who runs PHP news site, phpdeveloper.org has just lost his job. Best wishes and hope he finds something better soon.

Discuss (Join / Login first) Edit   permalink: #  

Using Amazon Web Services With PHP And SOAP (part 2)
In this concluding part, I'm going to spend some time discussing the search features built into AWS, showing you the various types of search options available and illustrating, with examples, how they can be used to improve the user experience at your store. I'll also show you how to link your store up to Amazon's transaction system, by adding support for both shopping carts and wish lists to your site. All that and more, inside! -- icarus

Discuss (Join / Login first) Edit   permalink: #  

Real-time Animated Graphing using Flash MX
Macromedia Flash MX has now become the professional standard authoring tool for producing high-impact Web experiences. Whether you are creating animated logos, Web site navigation controls, long-form animations, entire Flash Web sites, or Web applications, you'll find the power and flexibility of Flash MX. In this article, we will go ahead to crank out an impressive but simple (and flexible!) real time animated graphing solution in Flash MX! -- Pallav Nadhani

tri: This is actually an ASP article, but I think there are cool ideas here, and a bit of cross-pollenization is kinky.

Discuss (1 response) (Join / Login first) Edit   permalink: #  

Comparing Databases
Generally speaking, there are four different types of databases available on Linux: key/value, relational, object-oriented, and XML. Each has strengths and weaknesses. When choosing a database you should consider whether it:

  • Can handle simultaneous access from multiple users
  • Can be easily accessed from programs written in different languages (especially object-oriented languages)
  • Can handle large amounts of data
  • Can ensure that multiple operations either all happen at once, or not at all ("transactions")
  • Can perform complicated searches ("queries")

Discuss (Join / Login first) Edit   permalink: #  

The Law of Leaky Abstractions
TCP is a way to transmit data that is reliable. By this I mean: if you send a message over a network using TCP, it will arrive, and it won't be garbled or corrupted.

We use TCP for many things like fetching web pages and sending email. The reliability of TCP is why every exciting email from embezzling East Africans arrives in letter-perfect condition. O joy.

By comparison, there is another method of transmitting data called IP which is unreliable. Nobody promises that your data will arrive, and it might get messed up before it arrives. If you send a bunch of messages with IP, don't be surprised if only half of them arrive, and some of those are in a different order than the order in which they were sent, and some of them have been replaced by alternate messages, perhaps containing pictures of adorable baby orangutans, or more likely just a lot of unreadable garbage that looks like the subject line of Taiwanese spam.

Here's the magic part: TCP is built on top of IP. In other words, TCP is obliged to somehow send data reliably using only an unreliable tool. - Joel Spolsky

tri: One of the most beautiful essays on science and computers I have ever read. As brilliant as anything Lewis Thomas has written.

Discuss (Join / Login first) Edit   permalink: #  

Picking a Real World Release Dates
I've worked in big software companies, teeny tiny small software companies and worked with software companies all over the globe. And one thing remains constant: we all screw up release dates with the regularity of snow at the North Pole. I have to think that a big part of it is that managers fail to take into account one simple thing:

I'm a person first. A worker second.

Discuss (Join / Login first) Edit   permalink: #  

Using Amazon Web Services With PHP And SOAP
Now, your favourite language and mine, PHP, has recently started shipping with support for XML-based remote procedure calls (including SOAP) over HTTP. This makes PHP ideal for developers looking to integrate Amazon Web Services into their Web applications. The only problem? Not too many people know how to do it. That's where this tutorial comes in. Over the next few pages, I'll be demonstrating how you can use PHP, in combination with Amazon Web Services, to add powerful new capabilities to your Web applications. Take a look. -- icarus

Discuss (Join / Login first) Edit   permalink: #  

PHP Cookbook Ch 8: Web Basics (PDF)
Web programming is probably why you’re reading this book. It’s why the first version of PHP was written and what continues to make it so popular today. PHP makes it easy to write dynamic web programs that do almost anything. Other chapters cover various PHP capabilities, like graphics, regular expressions, database access, and file I/O. These capabilities are all part of web programming, but this chapter focuses on some web-specific concepts and organizational topics that will make your web programming stronger.

Discuss (Join / Login first) Edit   permalink: #  

Zend Performance Suite
The new Zend Performance Suite is a suite of three product modules that provide a complete solution for performance management: Content Caching, Code Acceleration and Data Compression. By using Zend Performance Suite, you can reduce the load on your http and database servers, and also decrease latency time, execution time, and download time for each request. The net result is decreased hardware and IT support costs for your server environment, and a better user exerience for your users. The Zend Performance Suite includes a performance monitor, which enables you to measure the enhancement experienced by actual site visitors in real-time. The Zend Performance Suite installs quickly and delivers immediate benefits. Compared with hardware solutions to performance problems (in both hosted and in-house environments), the Zend Performance Suite delivers far better ROI.

Zend has also cut the price of the Zend Accelerator by half, but its still hard to compete with free software from ionCube...

Discuss (Join / Login first) Edit   permalink: #  

REST & SOAP
A presentation summarizing REST and SOAP by Peter Drayton, Program Manager (CLR), Microsoft.

The thesis for my talk was that this area of intersection (RESTful SOAP) is actually a good thing, as it provides an opportunity for SOAP to learn valuable architectural lessons from REST, and an opportunity for REST to benefit from SOAP's widespread acceptance among corporate developers.

Powerpoint version.

Discuss (Join / Login first) Edit   permalink: #  

Microsoft Thoughts on Open Source
Some of Microsoft's efforts to disparage open-source software such as Linux have backfired, according to a recent leaked Microsoft memo.

Discuss (Join / Login first) Edit   permalink: #  

Using .NET Assembly (Interoperability with COM) in PHP
The .NET Framework is a new computing platform that simplifies application development in the highly distributed environment of the Internet. The .NET Framework is designed to provide a consistent object-oriented programming environment, a code-execution environment that minimizes software deployment and versioning conflicts, which guarantees safe execution of code and to build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code.

PHP has built in functionality which uses COM objects, using the COM interop feature of .NET we shall create a wrapper around the .NET assembly and use it in PHP (in fact you could use the same steps to use .NET assembly for VB6 or any other COM applications) -- Jayesh Jain

tri: Excellent timing from PHPBuilder. I just installed Visual Studio.NET yesterday on my notebook, and have been trying out .NET and Windows Forms. More later...

Discuss (Join / Login first) Edit   permalink: #  

How to build a mailbot in PHP
The fascination with having software automate your mundane tasks never ceases. One such tedious activity lies in email parsing. Email accounts can be a useful tool for enabling people to enact a request or issue a command that may not require the intervention of humans. One such example is the, now all to common, "unsubscribe" request to harmless lists and nefarious spammers. The automated program that handles these requests is called a mailbot. Though it was adopted early, and has been retired in many cases in favor of web-interfaces, mailbots still represent a good technique for performing a number of useful tasks. Nearly anything can be done with enough creativity, good code, and patience. -- Michael Galloway

Discuss (Join / Login first) Edit   permalink: #  

Comparing Mac OSX Performance to Linux
As good as Mac OS X is for desktops and laptops, one wonders if the FreeBSD inside is not too restricted by the Apple jacket around it to also make for an efficient, secure and fast server OS.

Apple is now busy convincing the world that Apples make also for excellent server appliances in the handy U1 format, thanks to OS X. That new product is called Apple Xserve. Many potential buyers are, however, asking themselves if OS X—given its recent introduction—is ready today to handle their critical apps.

That's why I decided to take one of these sleek Xserve boxes and test run it both under OS X and under Linux. -- Moshe Bar

Discuss (Join / Login first) Edit   permalink: #  

The Google Gods
So powerful has Google become that many companies view it as the Web itself: If you're not listed on its indexes, they say, you might as well not exist.

Discuss (Join / Login first) Edit   permalink: #  

Tips and Tricks by Rasmus Lerdorf, PHPCon 2002 (pdf)
An extensive list of tips by the author of PHP.

Discuss (Join / Login first) Edit   permalink: #  

Systems Software Research is Irrelevant (PDF)
Systems software research has become a sideline to the excitement in the computing industry. When did you last see an exciting noncommercial demo? Ironically, at a time when computing is almost the definition of innovation, research in both software and hardware at universities and much of industry is becoming insular, ossified, and irrelevant. There are many reasons, some avoidable, some endemic. There may be ways to improve the situation, but they will require a communitywide effort. -- Rob Pike, Bell Labs

Discuss (Join / Login first) Edit   permalink: #  

The Petstore Revisited: J2EE vs .NET Server Performance
TheServerSide presents a pretty damning report about EJB servers. They compared 2 EJB servers (most likely Weblogic and Websphere) against a .NET server implementation. TheServerSide modified and improved the Java Pet Store blueprint. Unfortunately, the results were pretty dissapointing. In essence, the .NET servers performed at least twice as fast and could handle at least twice the load as compared to the EJB servers.

tri: Rebuttal by Rickard Oberg.

Discuss (Join / Login first) Edit   permalink: #  

phpMyAdmin 2.3.2
I just downloaded phpMyAdmin 2.3.2 today. I've been using 2.2.5 before that. After 10 minutes of testing, my opinion is that it is a step backward. In previous versions, i could enter SQL from nearly every important screen in phpMyAdmin. Now I have to click on a database, then select the SQL tab. Secondly, they have now highlighted the DROP command in red. After selecting a couple of test tables that I had just created, I clicked on DROP to remove the test tables, only to find to my horror that it was DROP DATABASE!

This just reinforces my opinion that good user interface designers are too well paid to contribute to Open Source projects :-)

Discuss (1 response) (Join / Login first) Edit   permalink: #  

Slashdot Discussion on Yahoo standardizing on PHP
A typical Slashdot debate. Better for laughs than for facts :-)

The UnPEARable Lightness of Being
But there are valid criticisms, many aimed at the class library, PEAR. The sad fact is that i used to use chunks of PEAR in my code, but eventually replaced these bits with my own code as I found PEAR too limiting. Too much of PEAR is written by journeyman programmers. Like many other people more famous than me (notably Manuel Lemos :-), I am unable to contribute to PEAR because I would have to follow the PEAR coding standards.

PHP is not a 3GL - Thank God!
Others have criticized PHP for not having the power of Java/C/C++/C#. I agree that that PHP is not suitable for every job - for example, my company is planning to migrate to .NET for our future Windows desktop software. But PHP is very suitable for web pages, or calling business logic components written in another language. Also from personal experience I find PHP very useful in many other domains, particularly as a replacement for shell-scripts.

Unsafe at any Speed?
From the Yahoo benchmarks it appears that PHP is slower than mod_perl. However despite Perl's superior speed and wide use internally with Yahoo, Perl was rejected. When you have 612 software engineers and 3 million lines of Perl code, Perl became a liability for Yahoo. My guess is that Perl's There's More Than One Way To Do It mentality has proved to be an excuse for poor and divergent coding practices.

tri: Yahoo gets slash-dotted.

Discuss (4 responses) (Join / Login first) Edit   permalink: #  

Rescuing XSLT from Niche Status
XSLT is one of the most exciting technologies to come out of the XML family. Unfortunately, its incredible power and associated complexity can be overwhelming to new users preventing many from experimenting with it or causing them to quickly give up in disgust. In fact, unless the method of teaching and the common style of use for XSLT is radically changed to make it more accessible, XSLT will be relegated to niche status like SGML and other powerful technologies. -- David Jacobs

Discuss (Join / Login first) Edit   permalink: #  

The next tier of web services
Decentralization [of servers] works because it mirrors our own nature, wrote Werbach: "It's the human element that is really driving the pressure for decentralized solutions. This shouldn't be too surprising. Biological phenomena like the human body and the global biosphere have had billions of years to evolve, and they are the most complex decentralized systems we encounter." -- Phil Wainewright

tri: And do you think that complex decentralized systems that take billions of years to evolve are going to be replicated successfully in computer systems overnight by some form of instant evolution? There are going to be fantastic success stories of distributed computing using SOAP and similar technologies in the near future, but to make claims that decentralization is a force of nature makes me think of a bunch of lonely hackers working on an open source project communicating only by email with each other :-)

Discuss (Join / Login first) Edit   permalink: #  

The Joys of Mod_Rewrite: A Beginner's Guide
Mod_Rewrite allows you to dynamicly reformat URLs in apache. If you want to explore this feature try the above link and also see Dirk Brockhausen's tutorials on mod_rewrite part 2 part 3 part 4

Discuss (Join / Login first) Edit   permalink: #  

Introduction to Judoscript
JudoScript shall be a powerful programming language that provides all of Java's programmability in a simpler and scripting way, plus other useful features and sweet "syntactic sugar". For many common computing tasks, it would require less coding. The ease and efficiency of coding stems from its syntax and a large number of rich data structures embedded in the language.

It shall be able to script Java objects and methods with few limitations.

For many of today's common application areas, it shall provide an easy, native and intuitive way to specify the tasks, totally oblivious to implementation details. A list of common application areas have been chosen for the first draft. JudoScript will continue to grow to encompass more and more useful application features as natively and intuitively as possible.

It shall be easily extensible, particularly by Java libraries. Ideally, application features can be natively and seamlessly extended by any Java packages.

It shall be fun! In addition to enterprise computing, it shall also natively support entertainment computing. -- James Huang

Discuss (Join / Login first) Edit   permalink: #  

Nothing stands still in China
Just returned from my 2nd trip to China. The last time I was in China was 1996. The rate of change is brutal and intimidating. People are more opportunistic now and many people have no idealogy except money.

In many ways China reminds me of my country, Malaysia. There are limits to political freedom in Malaysia and China. However anything goes when it comes to making money in both countries. Prices are what you make of it. I went to Shanghai's antique market, and managed to bargain some jewelry boxes down to 1/32nd of the original price. I also over-paid for a beautiful clay teapot in Wuxi; I probably paid 3 times what it was worth.

Overall, i found i liked China a lot. The people there are smart, dynamic, and eager to regain their status as the greatest civilization on Earth.

PS: I had 1150 messages in my mailbox.

Discuss (2 responses) (Join / Login first) Edit   permalink: #  

Bury my backpack in Shanghai
Bye everyone. I am on holidays. Back in two weeks - John

Discuss (2 responses) (Join / Login first) Edit   permalink: #  

Interview with Michael Kimsal, founder of Tap Internet
Michael Kimsal runs a company that does PHP training. I thought it would be interesting in finding out how other people learnt PHP, so we agreed to an interview.

What do students (of PHP) find hard to learn?

The hardest areas of functionality we used to try to cover in detail were PDF generation and using GD. Every student *wants* to know how to do these things, but usually when they start to see how difficult it is to build PDFs and graphics by hand with the individual functions, they want to skip it! :)

We've begun introducing JPGraph and HTMLDoc overviews which help demonstrate the practical benefits of graphic and PDF generation while giving them an easier way to get those benefits.

In terms of PHP itself, many students trip up over single quote/double quote issues, variable name case-sensitivity and basic variable name typos. Variable scope is something which catches people offguard too, but is normally covered and drilled into them by the second day - usually no problems with scoping after day 2.

PHP OO, limited as it is, is also mixed. Some students find it quite straightforward, some struggle, and some reject it outright. Just like the PHP community at large. :)

Discuss (Join / Login first) Edit   permalink: #  

The Parable of Languages
Today, though, the group was quiet, much quieter than usual, because one of their members, PHP, was not its usual cheerful self. In fact, one could say that PHP was in a true funk, if one had a mind to say something like that aloud, or within the hearing of one's boss. Or doctor.

Why the blues, PHP, the other languages asked. All the languages that is but C, because all C ever said was "bite me", being a rude language and hard to live with, but still respected because it was such a good worker.

And PHP answered...

tri: Thx to Sam Ruby for the link.

Discuss (Join / Login first) Edit   permalink: #  

Using PHP to Make Basic vCalendar/iCalendar Events
If you maintain a web calendar, the vCalendar/iCalendar specifications can help you share calendar events with users through your site. By clicking on a simple link to a text file, your events can be added to your users' Outlook, Palm Desktop, or scheduling program of their choice. Such an application can be easy, simple, and automated if the event data is stored in a database, and the text file is formatted to the vCalendar/iCalendar specification with any scripting language. -- Shu-Wai Chow

tri: A return to the high-quality phpbuilder articles we used to remember!

Discuss (Join / Login first) Edit   permalink: #  

DevArticles Interview: Vince Oostindie
Vince is a programmer with over 15 years software development experience. He talks about himself and eclipse, the class library for PHP he created. He's quite opinionated, and trash talks the average PHP programmer. Well perhaps it's better to let his code do the talking.

In general, eclipse is clean and clever. Lots of comments too. However it goes overboard in reinventing everything using object-oriented techniques. For example, eclipse has a FileIterator class for reading a file line by line.

   $it =& new FileIterator('eclipse.txt');
   for ( ; $it->isValid(); $it->next())
   {
       $line =& $it->getCurrent();
       echo $line, "\n";
   }
   $it->close();
Is this an example of "by using Eclipse you can write code that reads like pseudo-code, allowing you to concentrate completely on the problem your solving instead of having to sprinkle your code with hard-to-follow lower-level function calls"?

Discuss (6 responses) (Join / Login first) Edit   permalink: #  

php.weblogs.com interview with Zeev Suraski
Recently i had the good fortune of interviewing Zeev Suraski. Zeev talks about how he works with his long-time collaborator Andi Gutmans, the difference between open-source and commercial software development, and his proudest achievements. I hope you like it.

PS: I also have another interview in the works. I hope to get it out before I go on holiday on Saturday.

Discuss (Join / Login first) Edit   permalink: #  

Database Refactoring
Scott W. Ambler talks about database refactoring, which is about making simple changes to a database schema to improve its design while retaining both its behavioral and informational semantics. For example migrating from a system that assumes addresses and names are a specific format to one that handles addresses and names for multiple countries.

tri: On a different topic, here are some discussions on the ADOdb forums on PHP and Interbase and Object-Relational mappings in PHP that might be of interest. Feel free to post your responses.

Discuss (Join / Login first) Edit   permalink: #  

Apache 1.3.27 Released
This is a security, bug fix and minor upgrade release. Due to security issues, any sites using versions prior to Apache 1.3.27 should upgrade to Apache 1.3.27. Read more about the other security issues that affect Apache 1.3.

Security issues

Fix the security vulnerability regarding ownership permissions of System V shared memory based scoreboards. The fix resulted in the new ShmemUIDisUser directive. CAN-2002-0839

Fix the security vulnerability regarding a cross-site scripting vulnerability in the default error page when using wildcard DNS. CAN-2002-0840

Fix the security vulnerability regarding some possible overflows in ab.c which could be exploited by a malicious server. CAN-2002-0843

Discuss (Join / Login first) Edit   permalink: #  

Open Source Vapourware? Apache 2.0
The 1.x generation of Apache has been out for many years, so it should have been a big deal when version 2.0 shipped.

But early adoption of Apache version 2.0 was minimal according to Netcraft, the authorities on what people are running on the Internet. Over 11 million active sites are running Apache, but about six months after its release, fewer than 100,000 of them are running 2.0. Why? -- Larry Seltzer

Discuss (3 responses) (Join / Login first) Edit   permalink: #  

Criteria for optimal web design (designing for usability)
Some of the questions that Michael Bernard tries to answer:

- How should information be positioned in a typical website?
- How can I make my website's structure more navigable?
- How should text be presented within a website?
- How can I effectively use images on my website?
- Are frames ever appropriate?
- How can I design a visually pleasing interface that follows usability principles?
- How can I reduce the major user annoyances on my site?
- How can I make my site more accessible to children?
- How can I make my site more accessible to older adults?
- How can I make sure my site follows general Web conventions?
- How can my website promote customer sales and loyalty?
- How can I make my site more appealing to international users?

Thanks to Pablo Costa for the link.

Discuss (Join / Login first) Edit   permalink: #  

CSS Design: Taming Lists
AS EARLY AS JULY OF 1999 I was pontificating on email lists about the virtues of style sheets. Some things never change.

What has changed is how I think about CSS, and the underlying structure of (X)HTML to which it is applied. For example, I find that most pages on the web contain a menu of links in a navigation area. These are often marked up as a string of links, often in separate DIVs or paragraphs. Structurally, however, they are a list of links, and should be marked up as such.

Of course the reason that we don't mark them up in that way is that we don't want a bullet in front of every link in our navigation area. In a previous article I outlined several techniques for using CSS to layout a web page. One of those techniques involved manipulating a list to display horizontally rather than vertically.

In this article, I'll demonstrate how to use CSS to bring unwieldy lists under control. It is time for you to tell lists how to behave, instead of letting them run wild on your web page. -- Mark Newhouse

Thx to http://phpdeveloper.org/ for the link.

Discuss (Join / Login first) Edit   permalink: #  

User-Centered URL Design
But despite the universality of URLs, we often forget that they're not just a handy way to address network resources. They're also valuable communication tools. They help orient users in your architecture, and can suggest whether other options are available.

In Edward Tufte's classic book The Visual Display of Quantitative Information, he coins the term chartjunk to refer to needless visual flourishes that contribute nothing to the effectiveness of an information design in communicating to its audience. These days, our URLs are loaded down with something very similar: long strings of characters that exist only to satisfy some technical constraint, detracting from the effectiveness of our URLs as communication tools.

Call it CMSjunk. -- Jesse Garrett

Discuss (Join / Login first) Edit   permalink: #  

Building Accessible HTML Tables for the Disabled
Blind and other severely vision impaired users rely on assistive technologies to render web content. All text can be fed through a screen reader or refreshable braille display to be presented to the user. However, despite containing text, the table above could make a real mess of things without a few extra behind the scenes accessibility enhancements. To an assistive browser our table could well look like this:
Time Planned Task Preferred Task What I actually did
10 - 12 Catch up on replying to my emails. Have a lie in. Surfed aimlessly.
12-1 Have Lunch. Have Lunch. Had Breakfast.
1-5 Finish that project. Go to video store. Caught up on my emails.

Ok, we can still kind of make a little sense of it. That is because we can see it. A blind user can't easily scan back up and check what the third piece of information relates to. Was it what I actually did, or what I would have preferred to do? This is why we need to create relationships within the code of our table. Thankfully, from HTML4.0 a bucketful of accessibility enhancements were introduced to enable the conscientious developer to do this. -- Tim Roberts

Thanks to PHP Developer for the link.

Discuss (Join / Login first) Edit   permalink: #  

The Past, Present and Future of Web Services, part 1
Web services are somewhere around the crest of their hype cycle and currently the darling of the prevalent media. This cresting is like that of other technologies in that it precedes full development and maturity. Web services, an undoubtedly important technology regardless of media interest, have a good deal of development ahead of them. Those who find success using Web services will be those who understand the technology fundamentally: its motivations, the reasons why some components are winning out over others, and the likely course of maturity.

For this reason, I start with the history of Web services. This is no mere nostalgic side-trip: the business and technical environment into which Web services was conceived, and the various players that have waxed and waned in prominence in their history to date are likely to have a strong effect on the future of Web services. You can already see this happening with developments such as the emerging role of Organization for the Advancement of Structured Information Standards (OASIS) as incubator of security, workflow and transaction standards for Web services. OASIS was once seen as the very opposition to mainstream Web services. -- Uche Ogbuji

Discuss (Join / Login first) Edit   permalink: #  

Zeev Suraski Interview at CodeWalkers.com
Zeev, what tips do you have for a beginner using PHP?

There are lots of gotcha's that can be avoided if one follows a few rules. First - always enable E_NOTICE's while you're developing/debugging. Make your code E_NOTICE-clean, and you'd be likely to produce code of much higher quality. Also - use a debugger, instead of printing out debug info. Once you get used to it - you become a hell of a lot more productive than you have before. I went through the same phase (not with PHP, but with C) and I'm not sure how I managed to get anything done before I started using debuggers.

Discuss (Join / Login first) Edit   permalink: #  

Using Flash for Intranets
Last week i mentioned my interest in using Flash to provide a richer user experience. However it looks as if this technology has still some way to go compared to HTML for simple browsing.

Have a look at this forum for the book Foundation PHP for Flash, written in Flash. It seems much slower than any database-backed PHP forum. I'm currently on a T-1 line, so bandwidth is not an issue. Perhaps the rapidly spinning clock makes the refresh seem so much slower.

Other issues are that the scroll-bars don't work like normal Windows scrollbars, and the page cannot resize.

Flash is still a good tool for dynamic page displays. Much easier to use and script than javascript and DOM (any reader knows of a good DOM scripting tool?)

Discuss (4 responses) (Join / Login first) Edit   permalink: #  

Content Editable IFrame's
You learn something new everyday - this is something i just found out: content editable iframe's, which allow you to edit web pages on-line. Here's one commercial tool that uses this feature:

http://www.webedpro.com/

Discuss (1 response) (Join / Login first) Edit   permalink: #  

Frameworks and Components
I reread Jeremy Allaire's essay (PDF) and was struck by the following:
...Components are a major shift in how server-side web applications can be built, empowering a wide range of RAD and script-level developers to access the power of object-based component development, rich client/server models and web services without the pain of complex frameworks.

I agree completely. The voice of experience is talking. All the people out there building big application frameworks are great smart people. I've been using such frameworks since 1987, first on the Mac with TCL and MacApp, and later MFC on Windows. But to use a framework you have to be very smart, too smart. The framework ends up being a barrier to entry. They are hard to learn, and if you dislike the coding style, tough luck!

Microsoft figured (or stumbled on) it out early with Visual Basic. VBX and OCX controls were a big hit. No fancy framework to learn, just plug and play. Internet Explorer for example is a set of components enclosed in a wrapper application. That's how i am currently embedding IE into some of my Windows applications without having to learn any fancy framework - just a few API calls. Just beautiful.

So in the last few years, I've prefered to build components that can plug into existing or new systems. Of course i still use a code framework, but it's now a collection of libraries that share a similar coding structure and can be mixed-and-matched, and not an all or nothing proposition of the early monolithic frameworks.

Discuss (1 response) (Join / Login first) Edit   permalink: #  

 
Get your site hosted using Manila!
Free Software
A high quality database library:
ADOdb 4.22   download
New Netezza, LDAP and odbtp_unicode drivers.
ADOdb for Python
ADOdb Help & Dev Forum

ADOdb Documentation:
  - English
  - Francais
  - Korean
Tutorial:
  - English
  - Chinese
  - German
  - Italian
  - Polish
  - Russian
  - Spanish
  - Thai

3rd Party Tutorials:
  - MelonFire Part 1
  - MelonFire Part 2
  - PHPFreaks
  - Database Journal Part 1
  - Database Journal Part 2

FAQ

ADOdb Articles:
  - PHP4 Sessions with ADOdb
  - Cool ADOdb applications
  - ADOdb testimonials
  - Comparing PEAR DB and ADOdb
  - Writing Portable SQL
  - Web Services with ADOdb
  - ADOdb date library

-Commercial data component: phpLens

Our RSS Newsfeed
PHP Advocacy
Interviews
Michael Kimsal
Zeev Suraski

-Comparing PHP with .NET
-PHP versus ASP
-Why PHP is better than ASP
-PHP versus Cold Fusion
-PHP versus Perl
-What's wrong with JSP?
-PHP,ASP,JSP,CFM Popularity
-PHP Humor

Enterprise PHP
-Enterprise PHP scalable, high availability
-Writing Reliable Software
-PHP Application Variables
-Sessions in a Server Farm with ADOdb
-PHP, FastCGI and IIS

-Optimizing PHP: tips, methodologies and examples.
-Tuning PHP and Apache: many tips and links.

PHP Articles
-PEAR Tutorials & Links
-PHP Windows/Unix Editors
-PHP Caches & Debuggers

-XML-RPC Web Services
-ActiveX on Linux
-PHP: COM & ADO
-GD on Windows
-Using mail()

Some notes comparing PHP, JScript, VBScript and ASP that might be useful
1. Language Basics
2. Functions, Classes
3. ASP Objects and PHP

-My Favorite Articles
-CVS on Windows

PHP and SQL Databases
-SQL Tutorials & Resources
-Transactions in MySQL
-PHP ODBC Tips
-Flying with MySQL & Oracle
-Object-Relational Mania
-MySQL vs MSSQL vs Access
- also see ADODB above.

Apache and IIS
-Unix Performance Analysis
-Securing Apache on Linux
-Porting Apache to IIS
-PHP CGI in IIS
-Windows Apache & PHP

Tips
-Var_Dump & Print_R
-Prevent Caching
-E-mail Your Errors
-Disable magic_quotes_gpc
-Stop Submitting Twice
-Document Code Quickly
-Fault Tolerant Connections
-HTTP Compression
-XML DOM for Windows

Links
PHP.Net Home Manual Bugs
Writing a PHP Extension
Zend.com: PHP Portal
PHPBuilder.com: Articles
HotScripts Code Snippets
PHP Resource Index
PHP Source Code ChangeLog

Evil Walrus
phpinfo.net: French e
phpitalia.com: Italian e
phparchiv.de: German
php-resource: German e
PHP-Center.de: German e
phpuser.com: Chinese
hot PHP Web Cards
Cool Javascripts
More Links

Learn PHP
Forums Ask for HELP here!
or try the KnowledgeBase

Good Intro to PHP
PHP Overview by Rasmus
Intro to PHP


Regular Expressions Intro   txt2regex
Advanced Reg. Expressions
Database Readings PalsLib

Downloads
Bad Blue: Web Server
phpBB: Excellent Forum
ASP2PHP: Converts VB to PHP.
Web Calendar Nice

Archives
-My Favorite Articles
-2004
-2003
-2002
-2001
-2000

PHP4.0.4 Installer
php_gd.dll with GIF


Put the following ADODB logo on your website if you like!

John Lim Malaysia Natsoft Juris Legalpro iJuris mydevotion Tips Juris LensServer Ormes Technologies.

All original materials (c) 2000-2004 John Lim