Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Styczeń, 2011

Stubbles Blog: On annotations and logic

Stubbles Blog: On annotations and logic

On the Stubbles blog there’s a recent post that talks about a feature they introduced into the framework – annotations – with high hopes it would give them more flexibility in how things worked. As Frank Keline says, though, “it’s not such a good idea at all”.

The most simplest reason for this is the idea that annotations are markup. They mark (or, to keep the notion, annotate) code as being special or to be treated in some special kind of way, depending on the scenario where the code is used in. [...] From a design point of view this makes it clear why annotations should not contain logic. If annotations contain parts of such logic, it becomes splitted and possibly cluttered throughout different classes.

He goes on to talk about a second reason why he doesn’t think they should be considered first-class in an application – it doesn’t promote code reuse. For example, if you define them on a method, there’s no way to use that method without them. He puts this into the perspective of the Stubbles framework that currently uses them and how he’s changed the logic to live in special classes instead. He considers other changes like places annotations can be used and having different annotation classes.

Source: http://www.phpdeveloper.org/news/15826

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Timothy Boronczyk’s Blog: Geolocation Search

Timothy Boronczyk’s Blog: Geolocation Search

In a post earlier this month Timothy Boronczyk took a look at a common feature for web applications that’s popping up more and more given the emphasis of social networking – geolocation of your users. The post shows you how to use various web services and data sets to determine where a user is and how they relate to other locations.

Services that allow users to identify nearby points of interest continue to grow in popularity. I’m sure we’re all familiar with social websites that let you search for the profiles of people near a postal code, or mobile applications that use geolocation to identify Thai restaurants within walking distance. [...] The first step is to obtain the latitude and longitude coordinates of any locations you want to make searchable.

He talks about why postal code-based location isn’t the best option, a web service (like Geocoder.ca for Canadians) could provide more accurate results. He includes code you can use to help search the data based off of two formulas – one to grab the larger area of locations and the other to filter them down into the closest. Finally, he shows how to use the Geolocation API service to get the results based on the user’s search parameters.

Source: http://www.phpdeveloper.org/news/15825

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Ian Barber’s Slides from ThinkVitamin "Deployment Tactics" Posted

Community News: Ian Barber’s Slides from ThinkVitamin "Deployment Tactics" Posted

While not specifically about deploying PHP applications, Ian Barber’s talk at the recent ThinkVitamin Code Management and Deployment Conference is packed full of good tips you can use in your web application deployment. He talks about everything from version control strategies, continuous integration, remote releases, package management, hotfixes and one of the most difficult things to do – rollback.

Still deploying sites and updates manually via FTP? This session will cover a number of automated deployment methods, best practice workflow for updating sites and fixing bugs, along with how to use staging servers, deploying to multiple machines, zips tars & scripts, packaged releases hotfixes, database changes, rollbacks and more.

There’s tons of technologies mentioned, so you’d be better off going through his slides and taking your own notes. Unfortunately, a recording of the session isn’t currently publicly available, but the slides are an excellent resource for those currently looking to better their overall deployment process.

Source: http://www.phpdeveloper.org/news/15824

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Symfony Blog: Symfony Live Conferences Updates

Symfony Blog: Symfony Live Conferences Updates

On the Symfony blog today there’s some new updates about their upcoming SymfonyLive events posted – both for the San Francisco and Paris conferences.

I’ve already posted about the Symfony Live Conferences schedule a few weeks ago, but since then, we have added quite a few sessions from top-notch speakers.

San Francisco will be getting a talk from Dustin Whittle (a Symfony core team member) as well as Kris Wallsmith speaking about Assetic (an asset management library for PHP 5.3). Those attending the Paris conference will be happy to know that Weka Entertainment, the developers of a major Facebook game, will be on hand to talk about how they migrated everything to Symfony in less than three months.

You can find out more about these conferences on the Symfony Live website.

Source: http://www.phpdeveloper.org/news/15823

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Cal Evans’ Blog: Six ways to be a better client for your developer – Point 7 (bonus!)

Cal Evans’ Blog: Six ways to be a better client for your developer – Point 7 (bonus!)

Cal Evans has snuck in a seventh part of his six-part series looking at what you, the client, can do to help make the relationship and contract between you and your developer better. This new post talks about doing your part.

robably the second most common reason I’ve seen projects fail is because the client fails to live up to their commitments. No I’m not talking about hitting your payment milestones, I’m talking about delivering your content.

Without everything they need to get the job done, the developer(s) cannot hit the marks you both laid out in the contract. Show them that you’re committed to the project by delivering your side of things too.

Don’t be the reason that it misses it’s delivery date. Also, don’t expect your developer to work extra hours to get the project back on schedule just because you failed to meet your obligations.

Source: http://www.phpdeveloper.org/news/15822

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Popular Posts for the Week of 01.28.2011

Site News: Popular Posts for the Week of 01.28.2011Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/15821

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Brian Swan’s Blog: Paging Data with the SQL Server Drivers for PHP: Simplified

Brian Swan’s Blog: Paging Data with the SQL Server Drivers for PHP: Simplified

Brian Swan has simplified the pagination using the SQL Server drivers for PHP in his latest post. He shows how to use a cursor to move around in the result set from your query.

An oversimplified definition of a database cursor might be this: A cursor is database functionality that allows you to point to a certain location within a result set and allows you to move forward (and sometimes backward, depending upon the cursor type) through the result set one row at a time. [...] In the paging [scenario], I’ll use a static cursor since that cursor type would seem to satisfy the requirements of many web-based applications.

He shows how to execute a simple query with a dynamic cursor by specifying it in the connection call. He then uses the sqlsrv_num_rows to find the number of records returned and a sqlsrv_fetch_array call to pull just the page you need. He also includes some handy code to paginate the results, complete with links.

Source: http://www.phpdeveloper.org/news/15820

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

ZendCasts.com: Setting up Zend_HTTP_UserAgent

ZendCasts.com: Setting up Zend_HTTP_UserAgent

In a recent post to the ZendCasts.com site, they’ve added a new screencast showing you how to set up Zend_HTTP_UserAgent, the component of the Zend Framework that lets you determine the software the site’s visitor is using.

With the plethora of mobile devices available on the market, it’s increasingly important to be able to identify the capabilities of those devices in order to present content in a an appropriate way. For instance, if the device is not capable of displaying images, you might want to omit them from the markup; alternately, if a device is capable of Flash, you may want to provide a Flash-based user interface. The process of identifying a device’s capabilities typically first requires knowing the HTTP User Agent, and then comparing that user agent against a database of user agent capabilities.

The screencast lasts about 30 minutes and shows you how to set up a Zend Framework 1.1 application and integrate the WURFL data to help with determine the mobile device of the user.

Source: http://www.phpdeveloper.org/news/15819

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Shameer Chamal’s Blog: Why Kohana is an awesome framework

Shameer Chamal’s Blog: Why Kohana is an awesome framework

On his blog today Shameer Chamal has a new post about a framework he’s recently developed an appreciation for (he calls it “awesome” in fact) – Kohana.

In this article we will discuss some important features of Kohana, a promising and the sexiest community driven php framework. This article is pretty basic and intended to instigate those who are still not familiar with this framework. One of the problem with this framework is the lack of well organized documentation. Anyway there are many useful resources available and I have mentioned some of them at the end of this article.

He talks about some of the things he likes best about the framework including its HMVC (hierarchical Model view controller) support allowing you to cascade files down, allowing overrides at any level (good illustration here). He also talks about the scalability it offers and how, because of the HMVC functionality, you can split things up into interchangeable parts that can be pulled in based on the situation. Other features briefly mentioned include easy configuration, security and the exception handling and profiling.

Source: http://www.phpdeveloper.org/news/15818

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

9Lessons: Facebook Graph API Connect with PHP and Jquery

9Lessons: Facebook Graph API Connect with PHP and Jquery

In a new post to the 9Lessons blog Srinivas Tamada shows how to connect your application to the Facebook Graph API with the PHP you’re already using and jQuery. (You’ll need to set up a Facebook application to be able to follow along)

Last few days I have been working on labs.9lessons to connecting Facebook Graph API access token system, it’s very interesting. This post I had presented in easy way to connect and read the Facebook home timeline with PHP and Jquery. Explained how to store facebook token and user id hope you like it.

He shows you how to set up a simple database for storing the Facebook tokens for users, make the connection to the API and the PHP scripts he’s created – a hander for the sessions redirect from Facebook, a “home” page for the application to use and a database connection script. He also includes a bit of CSS to style things better than the defaults.

Source: http://www.phpdeveloper.org/news/15817

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>