Skip to content

Feed aggregator

Daily Dose - ASP.NET MVC 2 Has Arrived

Microsoft just released the second major version of ASP.NET MVC.  An alternative to HTML abstraction development in ASP.NET WebForms, ASP.NET MVC 2 is used in cases where control over the HTML and precise layer separation are more important than productivity.  The new version features support for lambda expressions in the HTML input helpers, new validation technology, async controllers,...
Categories: Communities

Rallyhat lives!

@TheKeyboard - Chris Hartjes - Fri, 03/12/2010 - 23:00

Some of my long-time readers have seen me mention a long-festering (I believe that is the correct term at this point) project that I dubbed Rallyhat. It first started out as a “figure out when some baseball teams are in town and buy tickets” and then morphed into “a tool for helping people plan road trips by tagging destinations with information”.

What it really became was a tool for me to learn how to write a solid web-app using Python and Django. I’m happy to say I finally have a version that I feel comfortable sharing with the rest of you. So feel free to check it out. Pound on it, try and break it and I will also read your feedback and comments. I’m sure you can figure out my email address…

Also, I’ve found it has been easy to pick up not only Python and Django itself. I’m ready to tackle some other applications using Django, and I have one just in mind.

Yes, I am aware at how spartan it looks right now. I’m more focussed on functionality than how it looks right now. I’ve already gotten some interesting ideas on expanding the app to include adding in images to go with locations, so we’ll see how that goes.

For those who are curious, I built it using the following:

Categories: Blogs

Matthew Weier O'Phinney's Blog: Module Bootstraps in Zend Framework: Do's and Don'ts

PHPDeveloper.org - Fri, 03/12/2010 - 21:48

Matthew Weier O'Phinney as a new post to his blog today looking at a few "do's" and "dont's" when it comes to working with module boostraps in your Zend Framework applications - an apparently somewhat confusing topic for several developers out there.

In Zend Framework 1.8.0, we added Zend_Application, which is intended to (a) formalize the bootstrapping process, and (b) make it re-usable. One aspect of it was to allow bootstrapping of individual application modules -- which are discrete collections of controllers, views, and models.

He talks briefly about why module boostraps are run on every request (getting into some detail on Zend_Application), how you can properly set up your boostrapping process and how you can use plugins to initialize only the things you might need and, as he openly admits, that there's just not a really good way to handle this sort of module funcionality.

Categories: Blogs

Pablo Viquez's Blog: Zend Framework Documentation

PHPDeveloper.org - Fri, 03/12/2010 - 20:13

Pablo Viquez has put together something that all of the Windows-based Zend Framework developers might find very useful during their next offline (or online, really) development session - a Windows Help file version of the Zend Framework manual.

As you might now, you can view and download the Zend Framework reference manual from the Zend Framework site and download it from the download section, however what I wanted was the Windows compiled version of it (CHM file). In order to get this version you need to compile the documentation, after running into some small issues, I manage to do it, and to save you some work.

He only had to fix an issue with one XML file to correct some escaping in the Zend_Feed_Writer.xml and zend.feed.writer.html files. You can download both the English CHM and the Spanish CHM files depending on your needs.

Categories: Blogs

Johannes Schluter's Blog: Future of PHP 6

PHPDeveloper.org - Fri, 03/12/2010 - 19:58

With the releases in the PHP 5.x series (5.3 and now a newly branched 5.4), people have been left wondering about PHP 6 and the promised Unicode support it will include. Development on that branch had all but stalled out and things weren't looking too good for the method of introducing full Unicode support to the language. Johannes Schluter has some good news, though - the effort has been restarted and a new approach has been decided on.

Yesterday the stagnation created by the situation has been resolved and it was decided that our trunk in svn will be based on 5.3 and we'll merge features from the old trunk and new features there so that 5.3 will be a true stable branch. The EOL for 5.2 has not yet been defined but I suggest you to really migrate over to 5.3, which usually can be done with very little work, as soon as possible.

Discussion are being made about which type of Unicode support will actually be introduced with a "string class" wrapper gathering some support behind it to provide an alternative to the current string handling.

Categories: Blogs

Ian Christian's Blog: Handling Uploaded file in symfony's admin generator

PHPDeveloper.org - Fri, 03/12/2010 - 18:03

Ian Christian has an informative new post for the Symfony developers out there. He's figured out a way to handle uploaded files with Symfony's admin generator relatively easily, changing the filename option.

When a file is uploaded using sfForm in the admin generator, by default the filename that's used is a random string, which can look bad in URLs. If you want to change this, it's not immediately obvious how - but it is incredibly simple.

The Symfony project does have some documentation on the topic, but it's not the easiest to read. It basically boils down to is defining a function in your extended class based on the name of the file where you can change the name however you'd like. Code snippets are included to make the point a bit more clear.

Categories: Blogs

Jani Hartikainen's Blog: Should a failed function return a value or throw an exception?

PHPDeveloper.org - Fri, 03/12/2010 - 17:41

Jani Hartikainen poses an interesting question on his blog today - is it more correct for a function, having failed at its job, to return a value of throw an exception.

You have created a nice, well written function, but you realize you forgot something: The failure case. What should a function do when it fails? There are two schools for this - the "throw an exception" school and the "return an error value" school. But which of these is the correct approach?

He suggests that this debate has stuck around from the time when there weren't exceptions in several popular programming languages and that returning the value was the only valid way. He touches on what an exception condition is (with a few code examples) and situations where each choice might be the right way to go.

Categories: Blogs

Sorting on aggregate and composite fields using pagination in 1.2

The Bakery, Everything CakePHP - Fri, 03/12/2010 - 16:48
While it may not be a common problem, I ran into this while working on a simple website I was building, and have recieved permission to share it with the community. I had a paginated table, and wanted a SUMed column to support sorting. This is how I did it. Note that the coming release of CakePHP 1.3, has an awesome feature known as Virtual Fields http://book.cakephp.org/view/1608/Virtual-fields, which are far superior to this little trick.
Categories: Open Source

Brian Swan's Blog: MSSQL vs. SQLSRV: What's the Difference? (Part 2)

PHPDeveloper.org - Fri, 03/12/2010 - 16:37

Brian Swan has posted the second part of his series looking at the difference between the MSSQL driver and the SQLSRV drivers for connecting to SQL Server databases from PHP (part one can be found here). He gets a bit more detailed in this second post.

I'm aiming to provide a high-level comparison that you might use if you were considering moving to the SQLSRV extension, but I think there is also some interesting information if you are just curious about the differences. [...] In cases where a short note wasn't enough (and there were several of these), I've provided relevant links to topics in the SQLSRV documentation.

He talks about things that one offers that the other doesn't, like prepared statements (sqlsrv) and working with stored procedures (mssql). He also mentions error handlng, persistent connections and scrollable cursors in sqlsrv. Finally he gets into a one-to-one function comparison of the two drivers with the sqlsrv function list coming up a bit short compared to the features of the more recend (and well-supported) mssql driver.

Categories: Blogs

Phil Sturgeon's Blog: CodeIgniter 2.0: Everything you need to know

PHPDeveloper.org - Fri, 03/12/2010 - 15:14

Phil Sturgeon has posted a look ahead at everything you need to know about the next version of the popular CodeIgniter framework, version 2.0.

It has been 6 months since the last CodeIgniter minor update and 18 months since the last major update. Through all this time we were given no information about the next release of CodeIgniter, but finally 2.0 is on the way.

Because of the Ellis Labs move to Mercurial for its version control system (and BitBucket for the repository), it allows for a more "social coding" environment where it's easier for developers to just fork and contribute. Other major changes for this upcoming version include the fact that PHP4 support will officially be deprecated, driver libraries, application "packages", a smaller reserved controller name list and the dismissal of plugins.

Check out the Changelog for more detailed information as things are updated.

Categories: Blogs

Solar 1.0.0 Stable Released

Paul M. Jones - Fri, 03/12/2010 - 14:38
Yesterday, I announced the release of the 1.0.0 stable version of the Solar Framework for PHP on our mailing list. (I tagged the release four days ago on Monday, but wanted to time the announcement to go along with my Solar presentation at ConFoo.) You can see the change notes here. The highlights are: Added [...]
Categories: Blogs

Component For Google Custom Search

The Bakery, Everything CakePHP - Fri, 03/12/2010 - 11:09
This is a pretty simple component for retrieving your Google Custom Search Engine results and returning them to cake wrapped in an array. This will only work for a Business account which grants you access to the custom search api. Usage is quite simple, add the component to your controller and pass the search term to the run_search() method.
Categories: Open Source

Google static maps helper for CakePHP

The Bakery, Everything CakePHP - Fri, 03/12/2010 - 11:09
This is a simple CakePHP helper to create static maps using google API. For more information on the api and how to get an api key consult the Google Static Maps API.
Categories: Open Source

Detect mobile devices with the WURFL API

The Bakery, Everything CakePHP - Fri, 03/12/2010 - 08:35
This component uses the WURFL API to detect any mobile or wireless device, and sets custom paths for your views and css, so you can easily create a mobile version of your website.
Categories: Open Source

Google PageRank Component

The Bakery, Everything CakePHP - Fri, 03/12/2010 - 08:34
Google Page Ranking is being used less and less, but it's still out there and offered by accessing google's servers. When talking about Search Engine Optimization the main items to look at are Trust and Authority, however Google/Yahoo/Bing are not releasing the ability to get that information yet. Page Rank will just have to do for the time being.
Categories: Open Source

Sexy Cake with Krumo: Say Goodbye to print_r()

The Bakery, Everything CakePHP - Fri, 03/12/2010 - 08:33
Debugging nested arrays with print_r() can be wicked tough but Krumo makes this task a little less crack-a-lackin.
Categories: Open Source

How to implament One Time Password for forgot-my-password and account-activation processes

The Bakery, Everything CakePHP - Fri, 03/12/2010 - 08:32
CakeOTP is a secure, table-less and expirable implementation of One Time Password for CakePHP. It can be used for forgot-my-password and account-activation processes.
Categories: Open Source

Autocomplete multiple fields

The Bakery, Everything CakePHP - Fri, 03/12/2010 - 08:31
This short tutorial will show how to autocomplete data to multiple fields.
Categories: Open Source

Hostip.info - Accessing GeoIP information using HttpSocket

The Bakery, Everything CakePHP - Fri, 03/12/2010 - 08:30
This article will cover how to access geoIP information from hostip.info. Hostip.info is a community-based project to geolocate IP addresses, making the database freely available but it needs you to put in your city to make it work.
Categories: Open Source