News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mathias Verraes:
Value Objects and User Interfaces
November 18, 2013 @ 11:35:07

Mathias Verraes has a new post today with a response to an email he received about some comments on a recent Elephant in the Room podcast about Value Object usage. The question asks about usage of Value Objects, specifically when it comes to things like country information.

There's nothing intrinsically wrong with modeling countries as entities and storing them in the database. But in most cases, that overcomplicating things. Countries don't change often. When a country's name changes, it is in fact, for all practical purposes, a new country. If a country one day does not exist anymore, you can't simply change all addresses, because possibly the country was split into two countries. Whenever you have this kind of friction, there's usually some missing concept screaming to be discovered.

He talks some about the concepts around the "country" data and some of the functional concerns around it (duplicate checking, validation of existence, etc). He takes the concept and breaks it out into two different concepts - the actual Value Object of a single country and an "AvailableCountries" set (and "AvailableCountryRepository").

0 comments voice your opinion now!
value object country example registry set

Link: http://verraes.net/2013/11/value-objects-and-user-interfaces/

Community News:
PHP The Undiscovered Country (Event)
August 20, 2013 @ 09:10:25

At the end of this month (August 29th and 30th), there's a PHP event happening in San Francisco, CA that calls itself a "unique gathering of exceptional PHP developers from around the globe" - PHP: The Undiscovered Country. This two-day event includes speakers like:

  • Nate Abele
  • Graham Weldon
  • Garrett Woodworth
  • Dean Sofer

The sessions are covering things like the future of PHP application development, working with virtual teams, the HipHop VM and future-proofing your APIs. You can still pick up tickets for the event too. So far they've posted the Day 1 schedule to the site with more information (and other speakers) to come.

0 comments voice your opinion now!
pud13 undiscovered country engineyard event conference

Link: http://phpundiscovered.com

Sherif Ramadan:
Web Analytics with PHP and Google Visualization Made Simple
December 19, 2012 @ 12:38:47

in this new post to his site Sherif Ramadan shares a method for visualizing your website's visitor data with the help of the Google Visualization APIs and some geolocation.

The web is a place where everyone is in your backyard. This can be both a blessing and a curse. How do you know where your website traffic is coming from and how much of it there is? [...] How was traffic led to your website in the first place and why? How long do people stick around and what do they like the most about your site? These are all some of the many questions you can answer with web analytic software, but the real question is why would you want to answer these questions at all and what's the best way to look at the answer?

[...] If we look at a heat map it's easier to spot where the majority of our visitors and traffic are coming from, geographically. It also helps us understand that people visiting a virtual space can, and will, be physically located in different parts of the world.

He includes the steps to recreate a map like the one included in this page showing the current view statistics on his site. He uses a MySQL backend to store the GeoIP data and parses out the Apache "access_log" to get the IPs of the visiting users. He then runs these against the GeoIP data and passes this country data on to Google's visualization for handling. He also recommends using the tools offered by the Google Webmaster Tools to further enhance your introspection into your site's visitors.

0 comments voice your opinion now!
google analytics geolocation analytics visualization country


PHPMaster.com:
Pagination with CodeIgniter
January 30, 2012 @ 12:15:22

On PHPMaster.com today there's a new tutorial showing you how to handle simple pagination in a popular PHP framework, CodeIgniter.

Pagination is particularly useful when you are coding an application that interfaces with a database. A large dataset might have hundreds of possible results for one query, and pagination creates a much nicer user experience. In this tutorial, I'll use CodeIgniter's pagination library to show you how you can create a paginated list of results from a MySQL database. Along the way, you'll also see how to fix a problem with the pagination links that the library might produce.

He starts on the backend, creating a model to work with Country information and includes a "fetch_countries" method to grab the limited/paged list. Next up is the controller with an "example1" method that looks to the URL to see what page it should be on. The view is simple enough - just outputting the results back without worrying about how many to show.

0 comments voice your opinion now!
codeigniter framework tutorial pagination mvc country


Ilia Alshanetsky's Blog:
Domain Location Statistics
December 20, 2010 @ 12:15:18

Ilia Alshanetsky has started to gather more and more information about PHP usage on the web as a whole (that was started here) and has been extended with some additional statistics he's done on the location of the domains he's collected.

The first step of the process has been resolving all of these domains, which is now complete. The next step is fetching the server information, which began, but will take some time to finish. However, even from the domain revolving data there is a lot of useful data to be gleamed, which is what I am now publishing. My first focus was on the world-wide distribution on these TLDs, which at least for me held a few surprises.

He includes a few graphs of the results he's found showing things like:

  • The US has the most domains hosted followed with less than half by Germany
  • The overwhelming majority of the PHP domains are in the .com area
  • In the US, the state with the highest number of PHP-powered domains was Arizona with Clifornia coming in second

If you'd like something more interactive, he's also come up with a clickable world map of the results for you to click around on.

0 comments voice your opinion now!
domain statistics country state tld


Init Marketing:
Calendar of Open Source, IT, Industry-specific Events
March 06, 2009 @ 11:13:06

If you're looking for Open Source events to attend in your area (or just about anywhere around the world), check out this calendar as provided by Init Marketing with a great listing of happenings in over fifteen countries around the world.

Below calendar contains world-wide conferences and trade fairs related to Free and Open Source Software, IT and specific industries. It also shows events where you can meet with InitMarketing.

Countries included in the list are Germany, the US, Japan, Italy, Australia, China and many more. If you have an event that's not on the list and you'd like to see added, leave them a comment on that page and they'll get in contact with you.

0 comments voice your opinion now!
opensource it event calendar country


DevShed:
Using Code Igniter to Build an IP-to-Country Mapping Application
February 25, 2009 @ 07:57:11

DevShed finished off their tutorial series looking at mapping IPs to countries in a CodeIgniter application with this new article completing the application to provide a correct products list based on their location.

In this final chapter of the series, I'll be discussing how to build multi-lingual web pages by combining the functionality brought by the "iptocountry" MySQL table that you learned in previous tutorials and the power of the Code Igniter PHP framework.

Their database tables sort the prodcuts out with the three character country code they're associated with. The IP-to-country tables then help with the translation between the visitor's IP address and which products should be shown.

0 comments voice your opinion now!
country ip mapping products codeigniter framework


DevShed:
Building Sample Programs for an IP-to-country Mapping Application
February 11, 2009 @ 08:44:29

DevShed has posted the second part of their series looking at an IP-to-Country mapping application, this time with a focus on building some simple applications to use the data inside.

Building a web site that will be seated on a multi-lingual platform often requires developing an IP-to-country application that permits you to map users' IP addresses to their corresponding countries. [...] This database contains over 82,0000 records and allows you to map more than 3,200,000 IP addresses to their respective countries. This can be really handy for developing different IP-to-country applications with minor efforts.

The review the previous article on making the database and move ahead to create a script that selects - based off the IP range - the country that address could be from.

0 comments voice your opinion now!
ip translate country mapping application program tutorial


DevShed:
Building an IP-to-Country Mapping Application with PHP
February 04, 2009 @ 08:47:30

DevShed has launched a new four-article series today looking at resolving a user's IP to their country via the database provided here.

If you have content in several different languages, your visitors probably speak several different languages as well. Wouldn't it be nice to serve them content from your site in their native language, based on the country from which they hail? You can, even if you're a small company, with an application that tells you a visitor's country based on their IP address. This four-part article series will show you how to build the application and incorporate it into your web site.

They just get things set up in this first part of the series - grabbing the CSV file from the site, creating the MySQL table to import it into and running a script to parse the CSV and push its data into the table.

0 comments voice your opinion now!
tutorial ip country mapping csv database mysql


Toomas Romer's Blog:
Case study Is PHP embarrassingly slower than Java?
August 04, 2008 @ 12:02:05

In a case study posted to his blog, Toomas Romer wonders if a PHP script is embarrassingly slower than than its Java counterpart.

The problem. The PHP implementation [of the IP2C library] is a lot slower. Embarrassingly slower. Without any caching the Java version is able to do ~6000 queries per second. The PHP counterpart can push through ~850 queries. The implementations are the same. The stats provided by the author of the library are 8000 vs 1200. So about the same as my measurements.

He details the script, showing what parts the script is taking up the most time on. A large part of the execution is tied up in IO and the fseek/fread and readShort/readInt functions take up a good chunk.

He even tries removing the functions and making things a bit more streamlined. This helps, but still lags behind its Java brother. Check out the post for more statistics comparing the two.

0 comments voice your opinion now!
casestudy slower ip2c ip country resolution java compare benchmark



Community Events





Don't see your event here?
Let us know!


code wordpress application series configure api podcast bugfix laravel interview library unittest introduction release threedevsandamaybe list developer language install community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework