Archive for September, 2007

Zend/PHP Conference 2007

Thursday, September 27th, 2007

In just over a week, I’ll be flying to sunny California to attend and speak at the Zend/PHP Conference and Expo. I’ll be giving two talks at the conference: “Give Your Site a Boost With Memcached” and “Mobilizing & Sharing: How the Zend Framework Builds Community for Nokia MOSH.” The former is an updated version of a talk I gave earlier this year in Germany; the latter is a new talk I’m giving with my colleague Brian DeShong, and it’s more or less a case study of Schematic’s use of the Zend Framework in building Nokia’s mobile social networking website, MOSH.

A month ago, I wrote about the unconference being held at ZendCon this year. The unconference is a community space provided by Zend and organized by Patrick Reilly to facilitate discussion among members of the PHP developer community. This space is open to all conference attendees, who are free to schedule a time slot to lead a discussion or give a presentation. This is a perfect opportunity for you if you’re interested in testing the presentation waters by giving your first talk at a conference, trying out a new (or rehashing an old) presentation, or just sharing your knowledge with and learning from others. Be sure to add your session to the schedule soon!

I’ll be giving a new talk at the unconference with the obnoxiously long title “Getting Information About Your Upload Before It’s Finished Uploading or How To Use A Very Long Presentation Title To Otherwise Say I’m Talking About pecl/uploadprogress.” (Look for a blog post about pecl/uploadprogress from me soon.)

Finally, don’t forget about the #zendcon channel on the Freenode IRC network. That’s your place to chat with other attendees during the conference and find out where everyone’s going for food and drinks in the after-hours. In addition, there is a zendcon twitter user. Start following it today to get zendcon tweets during the conference.

, , ,

Ruby On Rails Proves It Deserves The Hype

Wednesday, September 26th, 2007

Author Avatar

With the multitude of programming languages out there such as Fortran, Java, C++ and C#, you may wonder why Ruby on Rails has suddenly become such a hot topic in the development world. Created in the late 1990s by an individual in Japan, the Ruby programming language had a cult following but never reached top-tier status. In 2004, a company called 37 Signals released a Web programming framework called Rails, which was originally developed for their own in-house projects. Rails was written using the Ruby programming language. It is the combination of Ruby and Rails together that has generated notable excitement in the development community, and the emerging language and application framework is proving to be a game-changer to the world of Web application development.

Ruby on Rails’ Impact on Productivity

Rails is an integrated framework that utilizes the dynamic nature of the object-oriented Ruby programming language. Rails developers emphasize features of the framework for productivity rather than tools, and they take a common approach to Web architecture that should satisfy the needs of a large portion of the Web application projects in the wild.

As Rails was developed, the innovators of the framework realized that there were a multitude of features inherent to the framework that could benefit all Web applications. Rails is an extremely productive framework for database-backed Web applications. It is different from other frameworks in that it preaches convention over configuration. Typically, if you were building a computer program, you had to start from scratch and rely heavily on the skills and experience of the team’s architect to develop and adhere to standards of writing good software. Rails primarily uses conventions to avoid configuration when possible, resulting in time saving and enhanced productivity. In a study by IBM, Rails applications needed a fraction of the configuration code of Java counterparts, often by a factor of ten or more (1). Where the programmer must specify configuration, Rails usually relies on Ruby programming language to provide configuration. The strategy saves developers many lines of code and simplifies the code that does need to be written. By taking mundane but essential decisions away from the developer, productivity increases substantially because more time and attention is spent satisfying the customer’s requirements rather than the technical plumbing that can burden most projects.

Ruby on Rails is known for its ability to build Web applications quickly and with ease. For first-time users of Java, it could take about five to ten days to build a moderately useful Web application that will communicate with a database using accepted Java Web best-practices such as separating business logic, from display logic (commonly referred to as Model-View-Controller). With no prior training on Ruby on Rails, it takes about one day to accomplish the same goal using the Ruby programming language. In several more days, it is possible to build a relatively complete Web application with Ruby on Rails.

In Java, a developer has countless decisions to make about how to proceed when communicating with a database. Should I use JDBC? Should I use an Object-Relational-Mapping (ORM) library, and, if I use an ORM, which one should I choose? TopLink? Hibernate? JDO? Do I need to use EJB2 or EJB3? Rails has an ORM database layer built into its framework called ActiveRecord. Another useful feature of Rails is scaffolding - Similar to how a building under construction uses scaffolding to assist in the construction of the final structure, Rails can generate code called scaffolding that can be used to quickly put up functional Web pages that talk to a database and allow you to add, delete and change information quickly and with very little coding. As previously mentioned, in other languages you have to select naming conventions and define the general structure of the file system, while Rails utilizes conventions and the Ruby programming language so that all of that is provided for you. Managers will appreciate the fact that Rails minimizes configuration and encourages standardization. This feature enables programming skills to be more portable. Rails developers can move from one project to another with ease, since standards common to all development projects, such as naming conventions, directory structures, unit-test frameworks, and interface templates, are already decided, with working samples always available.

Another feature of Ruby on Rails that enhances developer productivity is the rapid feedback loop. The feedback loop is the amount of time between making a change in code and seeing the results in the execution of your application on the screen. In Rails, you get nearly-instant feedback as you code. There is no compile or packaging phase needed. You can immediately load a browser page to see the results of your changes. Managers should take note of this feature, because with enhanced productivity comes improved client satisfaction. Say you are in a meeting with a client, and they have some edits that they would like for you to incorporate into their Web application. With Ruby on Rails, you can make changes promptly and see the results immediately, improving the overall client experience.

It is important to note that introducing a radically different framework such as Ruby on Rails can be detrimental to a company’s development, testing, and production infrastructure. For example, Rails applications are installed differently than common development platforms such as Java or Microsoft’s .NET. Operations managers need to understand how to deploy it effectively.

But Rails acceptance is already being witnessed in large companies such as IBM, Microsoft, Apple, and Sun Microsystems. Sun Microsystems supports a project called JRuby that enables Ruby applications to run in a Java Virtual Machine. Efforts like JRuby will make it easier for companies to transition and adapt to Ruby on Rails since it will become a part of a familiar structure. Apple Computer has announced that Ruby on Rails will be included in the next release of its flagship operating system, OS X 10.5 (Leopard). And, even Microsoft has included Ruby programming language support in its newest rich-Internet framework, Silverlight. The world’s largest technical publisher, O’Reilly Media, has even acknowledged Ruby’s rapid growth and now considers it a major language with triple digit growth between 2006 to 2007.

A common question regarding Ruby on Rails relates to its performance relative to its peers. Some companies claim that Ruby on Rails does not perform as well as comparable systems. Comments such as these must be looked at objectively and balanced against productivity gains. Managers then need to make the decision of whether it is cheaper to hire people or purchase additional hardware, and chances are they will find that purchasing more hardware makes better financial sense.

Conclusion

People are paying more and more attention to Ruby on Rails, and for good reason. With the advent of the Rails framework, the Ruby programming language is making its way towards the top. By focusing on convention over configuration, Ruby on Rails is lowering the barriers of entry to programming and positively impacting employee productivity — ultimately proving that all of the hype is true and well-deserved.

Sources

1. Crossing borders: What’s the secret sauce in Ruby on Rails?; Bruce Tate; May 9, 2006.

About the Author

Francis Wong is an independent consultant and senior technical trainer for WestLake Training and Development. He has developed software applications for many well-known companies such as AOL, Hitachi, FannieMae, and Marriott for over 19 years. Wong has also developed online and on-site technical training for programmers and managers and delivered courses throughout the United States as well as Bangalore, India. He can be reached through Westlake or contacted directly at francis.wong@keybillable.com.

Tags:

Online Maps Warning

Wednesday, September 26th, 2007

Author Avatar

I survived a weekend-long family celebration. Afterward, I learned that some people didn’t make it to the party because MapQuest didn’t have the right information or street for the location of the party. I was horrified. I used Google Maps and it was perfect in giving directions and showing the location of the event.

This is a lesson in how technology can screw up the best laid plans. About five people got lost and thankfully, my out of town family found their way even though I gave them the right map and posted it on the event’s Web site.

So Web designers and anyone involved with Web sites — please verify the directions before posting them on a Web site. When planning an event for a business involving getting someplace… check the major map sites and do all you can to avoid this problem. Maybe I should’ve included a map in the invitations — but really… this place wasn’t new. Remember that people don’t have your Web site with them when they head to the event.

Even if we had our phones with us, it probably would not have made a difference. Only one person called needing directions. Most people won’t likely know how to contact you. Or maybe giving out a cell phone or the event’s phone number would help.

Tags: , , ,

Networking On Ryze: A Strategic Plan For Making Higher Quality Contacts

Wednesday, September 26th, 2007

Author Avatar

Do you use the Ryze Business Network to promote your company Web site and make new connections in the professional world? On Ryze and other online networks, human connections are happening everywhere.

Online networks such as Ryze have live links built into them for a reason. They’re your opportunity to directly connect with people who can help you achieve your business goals. Such links enable you to “trace a path” from connection to connection. You can shorten that path to the best connections if you incorporate a sound linking strategy into your networking plan.

How to go about this? Use keywords and “key people” who can help you get to the place where you want to be.

Include Keywords In Your Personal Profile

As you build your personal Ryze page, you’ll notice that you get to add descriptive words to your profile to define who you are. You’re free to use any words you want, but the idea, again, is to take the most direct route to success. So choose words, or keywords if you will, that will help you “find and be found.”

Let’s use your location as an example. If you click right on the state where you live, you can “pivot” on the word to see a list of every Ryze member who lives in that state, too. The same goes for every other live link you get on Ryze. You are in control of these links.

Now suppose you want to link up to people who share your personal hobbies and interests. Type in the words to describe your interests as they’re most commonly known.

Let’s say you’re a golfer. You can attract other golf enthusiasts with the simple keyword “golf.” You can of course type in something like “putting around” but what other golfer is going to choose those exact words for his interest list? Maybe one other guy, and if you can find him then you’re soulmates and should probably marry each other. Just kidding!

Remember, the point of online network links is not to be original, but to make connections. If you feeling like getting creative, you can always do that on your homepage. Write fabulous copy. Include breathtaking photos. Just make sure that your links are beefed up with common keywords for prime networking opportunities.

Adding Key People: Target Your Links!

In much the same way that a smart advertiser pulls in his audience using keywords and highly targeted copy in every ad he writes, you should be pointing all your Ryze links to the people, groups, and opportunities that will point your business in a highly focused and profitable direction.

Some Ryze members try to really work the Friends List angle, adding everyone they meet to their friends list. But I have my own theory about Ryze: adding everyone to your Friends List defeats the purpose of being there in the first place.

Think about it: what would happen if you could add every single person on Ryze to your friends list? You’d be right back where you started on Ryze. A massive pool of connections to pore through to do some decent business, and you don’t know where to start.

The solution, of course, is to be more selective in who you link to. Hook up with those who offer services, information, support and advice that you need to grow your business. How to do this? Join networks. That’s what they were created for.

Joining the Right Networks Will Bring Targeted Traffic to Your Page

When you first get on Ryze, join networks. Not necessarily a ton of networks, but the ones that will help forward your business objective along. This is how you get good traffic to your page. The thing is - you don’t want “just any” traffic. You want traffic to come from areas where there are already a lot of people who are interested in the same things as you.

An example: let’s say that you sell all-natural coffee, and you want to do some writing for the coffee industry as well as put out a newsletter to your email subscriber list of coffee drinkers. You don’t have subscribers yet because you only just started your business. Also, somewhere down the line maybe you’d like to revamp your Web site, but that’s not in the budget right now.

Your networking strategy whould be as follows: join a network of coffee fans, another network of natural foodies, a writing group, an email and/or ezine publishing group, and a Web design group. Participate in each of those groups. Jump right into the conversations. Then watch as “people whom you’d like to know better” come flocking to your Ryze page in droves.

You’ll find that networks which coincide with your personal goals are appealing because members are often interested in achieving the same things as you are. In talking with them over time, you’ll develop mutually beneficial relationships that lead to new business opportunities.

Another perk of joining the right networks: new Ryzers and “floaters” who “Ryze on by” the networks will scan the list of network members, see your name, and maybe reach out to make a connection with you. This is a method for getting “found” by the right people. People who don’t bother to join topic-specific networks on Ryze don’t ever get the traffic they expected to their page. That’s because they’re not using the system to its fullest potential. So target your networking, and carve a path to success and prosperity for your home-based Web business.

Your Friends List is Your Circle of Trust

Your Friends List can include anybody you wish, but ideally it should consist of people you know and trust. ONLY add people with whom you’ve had positive prior experiences, are making current plans with, and have established solid, long-term relationships.

Some people scurry around Ryze, adding everyone they meet as a friend. This doesn’t work to bring you valuable connections, and I’ll tell you why. Because when the time comes to “seek out a trusted source,” you won’t have one because you actually don’t know many people on your list.

Example: suppose you’re looking to hire a tech guy. You think, “Oh, I know… I’ll ask around my network for a good computer guy to use.” You look to your list… that circle of trust… and if it’s a group of people who you actually know well, then you can rest assured that referral will be a good one.

Of course, not every network you join will be related to your business. You can join for the social aspect alone, and that’s perfectly okay. Because another cool thing about online networking is that you can keep your groups separate if you want!

The best online networks, like Ryze, are ingeniously designed to make the most of your connections in every facet of your business and your life. In much the same way we make real-time connections, online networks afford opportunities to build profitable and trusting relationships. Why not use that to your advantage?

Copyright 2005 Dina Giolitto, Wordfeeder.com Copywriting and Marketing. All rights reserved.

Dina Giolitto delivers copywriting direction, support and implementation to businesses throughout the United States. Want free tips on how to write great copy and drive more sales? Sign up for the Copywriting and Marketing Ezine from Wordfeeder today.

Tags: , , ,

Lampooning Benchmarks

Tuesday, September 25th, 2007

When I first came across Jonathan Street’s “7 tips for lightning fast PHP sites” blog post via PHPDeveloper.org, my first reaction was something like: “Egads! These benchmarks are stupid and misleading! These functions are simply aliases of each other. There should be no discernible difference, and any buffoon should realize this fallacy!” This was before I clicked through from PHPDeveloper.org to read his post.

Then, I clicked through to the post, and I was still dumbfounded that Jonathan found marginal microsecond differences between how the functions performed and was advocating the use of one function over the other based on this “data.” I questioned the testing, and I was prepared to dig through the PHP source to write up a post refuting his claims.

And then I did something smart…

I followed a link to his follow-up post entitled “Better Benchmarks” in which he explains that his previous post was a lampoon that “was supposed to be a spoof celebrating the worst aspects of these types of posts.” He went on to explain:

I had thought that with comparing aliases of functions seven times over people would realise what I was doing but apparently my post was just too close to the sad reality and lacking in sufficient humour for people to catch on.

When reading it in this light, it actually is really humorous. He goes on to explain another round of testing he did that was intended to show a more accurate measurement of the results. His findings are not unexpected, and he admits that:

Overall I conclude that there is no statistical difference between the aliases of a function in the tests that have been run. Although this was the expected result I hope that the analysis presented is sufficiently rigorous to discount the possibility of personal bias in the benchmark.

However, for the naysayers out there, I’ll post some lines from ext/standard/basic_functions.c in the PHP source. This should prove that the only difference in these functions is the name itself. All other code is shared. (Note that is_int() and is_integer() are actually both aliases of is_long(), even though the manual prefers is_int()).

PHP_FALIAS(chop,            rtrim,      arginfo_rtrim)
PHP_FALIAS(ini_alter,     ini_set,      arginfo_ini_set)
PHP_FALIAS(doubleval,    floatval,      arginfo_floatval)
PHP_FALIAS(is_int,        is_long,      arginfo_is_long)
PHP_FALIAS(is_integer,    is_long,      arginfo_is_long)
PHP_FALIAS(join,          implode,      arginfo_implode)
PHP_FALIAS(fputs,          fwrite,      arginfo_fwrite)
PHP_FALIAS(sizeof,          count,      arginfo_count)

So, what can we learn from this? For starters, always read follow-up posts, and never take part in function benchmarking wars. :-)

, , ,

SPL Article Published

Tuesday, September 25th, 2007

Today, Zend Developer Zone published my article on the Standard PHP Library (SPL).

All too often, I think developers overlook the SPL because it appears massively unwieldy and difficult to understand. While it is often difficult to understand due to lack of proper documentation (articles/tutorials/examples), it is not unwieldy. Rather, it’s fairly easy to use… once you get the hang of it. And getting the hang of it requires a good introduction, which is why I wrote this article.

My article was originally intended to be part of a series of articles about features and functionality in PHP 5 that provided a case for adopting/upgrading to PHP 5. Cal Evans, editor-in-chief of Zend Developer Zone, ultimately decided against publishing these articles in a “series” format, but I think the individual articles that were published still fit together fairly well for making a case to upgrade to PHP 5.

The articles are:

, ,

Excel 2007 Multiplication Bug

Monday, September 24th, 2007

tibbar66 writes with news of a serious multiplication bug in Excel 2007, which has been reported to the company. The example first that came to light is =850*77.1 — which gives a result of 100,000 instead of the correct 65,535. It seems that any formula that should evaluate to 65,535 will act strangely. One poster in the forum noted these behaviors: “Suppose the formula is in A1. =A1+1 returns 100,001, which appears to show the formula is in fact 100,000… =A1*2 returns 131,070, as if A1 had 65,535 (which it should have been). =A1*1 keeps it at 100,000. =A1-1 returns 65,534. =A1/1 is still 100,000. =A1/2 returns 32767.5.”

Read more of this story at Slashdot.

Gopal Vijayaraghavan’s Blog: APC Autofilter: The Real Story

Monday, September 24th, 2007

According to Gopal Vijayaraghavan, PHP developers don’t really understand PHP:

They know how to use PHP but they hardly know how it works, mainly because it Just Works most of the time. But such willful ignorance (otherwise known as abstraction) often runs them aground on some issues when their code meets the stupidity that is APC.

To illustrate, he talks about how a simple bit of functionality in PHP, includes, really work. He describes how they’re handled (evaluated at run time) and how the APC relates to this process.

He presents a dilemma where classes are created in two different ways (inside and outside included files) and a problem that could cause the APC caching to not cache a file at all after a certain point. He even gives an example of how, in normal code and a pretty basic development situation, this sort of thing could happen.

Nexaweb Delivers Enterprise Web 2.0 Suite at AJAXWorld

Monday, September 24th, 2007

Nexaweb Technologies, provider of the leading standards-based platform for building and deploying Enterprise Web 2.0 (EW2.0) applications, today announced the latest release of its Nexaweb Enterprise Web 2.0 Suite. Nexaweb?s Enterprise Web 2.0 Suite enhanced design and management features, as well as its interoperability with leading governance solutions from Layer 7 and HP Systinet, make it the ideal RIA, composite application and enterprise mash-up development and deployment platform for IT organizations and the heterogeneous and distributed business groups they serve.

Felix Geisendorfer’s Blog: Migrating from WordPress to CakePHP

Monday, September 24th, 2007

Felix Geisendorfer is in the process of moving his blog from Wordpress to a customized lightweight CakePHP replacement he’s developing to be extended later on. His post shares some of the tips he found so far.

In this post I’m simply going to throw out some snippets to show how I’m currently approaching the whole process in order to give both my insight into what works and what doesn’t, while also hoping to get some people to share their insight into migrating legacy apps to CakePHP.

The tip in this post is primarily about the database side of things his porting over of the information from the Wordpress table model to his new customized schema. His code example for the migration is included.