Feed aggregator

Automated linking with rich text editors

Planet-PHP - Tue, 30/04/2013 - 09:00

The web is built of links, of pages linking to other resources on the internet. But making those links manually is tedious. This is another area where modern inline editors could do better.

Yesterday on Hacker News, there was a thread about Wikidata, Wikimedia Foundation's new knowledge base. This comment struck me especially:

I was using Wikipedia the other day and it occurred to me how primitive it is to have all the inner links to other Wikipedia articles defined manually, surely these should have been automated by now (i.e., marking a word or two would link you to the relevant article).

And indeed, this is a usability problem that can already be fixed with the Semantic Interaction stack underneath Create.js.

Introducing Annotate.js

Annotate.js is a VIE widget built by Szaby Grünwald. It works very similarly to a spell checker in traditional text editors — you write text, and it highlights the potential entities you might want to link to. You then can either accept or decline these link suggestions by clicking them. In case of multiple potential matches, you can also disambiguate between them by selecting from an offered list.

Here is a quick video of Annotate.js in action:

You can also try it yourself with an online demo.

Currently Annotate.js has been integrated with the Hallo rich text editor, but it would be easy to do the same with other popular editors like Aloha and CKEditor.

Connecting to entities

The big question with automatic linking is where the entities come from. There are services like OpenCalais that can provide these suggestions for your content, but most of them are focused only on shared knowledge bases of big companies, famous people, and major cities.

Unless you're running a newspaper, it is unlikely that these are the things your content is about.

Apache Stanbol is an open source engine that can provide the enhancements for you. Out of the box it provides suggestions based on the Wikipedia knowledge repository. But more importantly, you can feed it with your own entities.

This way the enhancements you get for your content can be tuned to be meaningful to your content and your audience. If you write about medicine, they could be about symptoms and diseases, or if you're writing about technology, they could be specific open source projects and their contributors. With Stanbol, the choice is yours.

The current downside of Stanbol is that you'll have to run it yourself, but there may be solutions coming for that as well.

Beyond editing

Like never losing your content or managing collections, Annotate.js shows what we can do to improve the editing experience when we interact with it in a semantically meaningful manner.

What Annotate.js does is not merely creating links, but it also marking the machine-readable relationship between them and the html content being edited. This can then be used by yet another set of tools — like search engines — to understand and organize the content better.

It is easy to see Create.js (like Drupal did, unfortunately) as just an easy way to add nice inline editing features to your CMS. However, while that is a good initial step, the addition of being able to interact with your content on the semantic level can do a lot more. Automated linking is just another demonstration of that.

As the ecosystem around Create.js and VIE matures, and it ships in more systems, there will be things that we can't even imagine now built on the stack.

If your CMS is properly decoupled, you can benefit from that immediately.

Catégories: Open Source, PHP Community

Big Fish Selects MySQL Cluster to Serve Real-Time Web Recommendations

MySQL.com - Tue, 30/04/2013 - 02:59
World's Largest Producer of Casual Games Uses World’s Most Popular Open Source Database to Power Improved User Experience
Catégories: PHP Community

AXLE improves analytics on Big Data

Postgresql.org - Tue, 30/04/2013 - 02:00

The AXLE Consortium are pleased to announce the start of the AXLE database research project, funded by European Union under FP7 grant. axleproject.eu

The objectives of the AXLE project are to greatly improve the speed and quality of decision making on real-world data sets. AXLE aims to make these improvements generally available through high quality open source implementations via the PostgreSQL database and Orange data visualisation and data mining tools.

AXLE project members are

Areas of research will include data analysis algorithms for Big Data, advanced hardware architectures, data visualisation and security. Target environments are real-world data in the 10-100 TB range.

"Real world data needs good security too, so we'll be making sure we have high grade security that works well even with high performance requirements", says Simon Riggs, CTO of 2ndQuadrant and Principal Investigator for the AXLE project. "We're very happy that the European Union has recognised the potential of the PostgreSQL database to provide effective database analytics for a broad range of business, research and public services."

First deliverables from the project will be submitted to PostgreSQL version 9.4, available in 2014 and will continue in later releases.

Project updates will be available regularly here as work continues.

Catégories: PHP Community

A new blog!

Planet-PHP - Mon, 29/04/2013 - 22:53

I just launched a new version of my blog, and you're looking at it :). I've went through a number of platforms, most recently habari, which I still have a lot of love for.

But my installation was going rapidly out of date, was becoming very slow due to using Sqlite as a backend, and most of all, I wanted to use GitHub to store my posts so everyone can make edits.

So I settled on using Jekyll, hosted on GitHub pages. Biggest drawback: it's all 100% static, so I had to use Disqus to enable comments. Don't really like the idea of someone else owning my precious, precious data, but alas… I'm in the 'cloud services business' myself, and you gotta practice what you preach.

The first responses have been an overwhelming "weren't you able to find a better template anywhere?". I'm obviously not much a visual artist myself, so I had no problem with the concept. But it's hard to find solid minimalistic designs, and I really wanted a strong focus on actual content, and a great mobile experience, so I've had some trouble finding things that matched those objectives.

Regardless, I'm quite happy with the look of embedded code, I mean… I think this looks pretty sweet:

<?php

include __DIR__ . '/vendor/autoload.php';

use Sabre\XML;

$reader = new XML\Reader();
$reader->open('atom.xml');

$output = $reader->parse();
var_dump($output);

If you recognize the color scheme, indeed.. It's the old vim 'desert' scheme ported to css.

I also ditched the old domainname (rooftopsolutions.nl). I started 'Rooftop Solutions' when I was a 17-year old kid, over 10 years ago. This has been my moniker ever since, but recently I officially 'shut down' this business when I moved from Münster, Germany to London.

Figured I might as well start fresh and use my real name.

While we're on the topic of London. If you're reading this and happen to also live in London. If you're up for some armchair philosophy or programming discussions over a pint, I'm still pretty new here and in the market for friends, so drop me a line!

To conclude: I hope a new system will encourage me to do a better job at blogging. I've been pretty shit last year, and this is my first post of 2013.

I'm actually not sure how relevant blogs still are in 2013. There's definitely been a steep decline, but I enjoy the medium as a consumer and I reckon 10 years down the road older blog posts may still hold some relevancy, unlike compressed twitter discussions with little context.

Anyway, if you're reading this, thanks for sticking with me. If you have any criticisms or suggestions, I'd love to hear it!

Catégories: Open Source, PHP Community

NetTuts.com: HTTP: The Protocol Every Web Developer Must Know - Part 2

PHPDeveloper.org - Mon, 29/04/2013 - 22:07

NetTus.com has followed up their previous article covering some of the basics of the HTTP protocol with this new post, part 2 of the series. They suggest that HTTP, the messaging format of the web, is the one protocol that every web developer should know.

In my previous article, we covered some of HTTP's basics, such as the URL scheme, status codes and request/response headers. With that as our foundation, we will look at the finer aspects of HTTP, like connection handling, authentication and HTTP caching. These topics are fairly extensive, but we'll cover the most important bits.

In this article, they talk about things like the HTTPS secure version of HTTP, server-side connection handling, identification/authorization and working with caching and cache control headers.

Link: http://net.tutsplus.com/tutorials/tools-and-tips/http-the-protocol-every-web-developer-must-know-part-2

Elijah Horton: Sandboxing Untrusted Code With PHPSandbox

PHPDeveloper.org - Mon, 29/04/2013 - 18:56

Elijah Horton has a recent post to his site sharing a tool he's developed to sandbox and validate PHP code of user-contributed code.

Few quotes related to the PHP language are as pithy and resoundingly accurate as the phrase: "Eval is evil." The reasons are myriad: the eval() function basically gives whatever code is passed to it unlimited control of the parser, and this freedom makes eval() both a temptation for developers, who may need to dynamically control PHP at runtime, and a panacea for hackers who are ever-searching for more servers to add to their botnets. So, how does one make use of the extreme power available through runtime evaulation of PHP, without exposing one's server to near-certain rooting? Through a sandbox.

His tool - PHPSandbox, uses the PHP-Parser library to deconstruct the PHP code its given and look for issues. He gives an example of a call to mail and how it would catch the issue. He shows how to install it via Composer, how to configure it with whitelisted methods/functions. It also includes a way to overwrite function calls with a bit safer alternative.

Link: http://www.fieryprophet.com/blog/detail/sandboxing-untrusted-code-with-phpsandbox

Reddit.com: How to progress my PHP skills?

PHPDeveloper.org - Mon, 29/04/2013 - 17:22

On Reddit.com a reader has asked the community what they think he needs to do to progress his PHP skills past the "little bit" he's learned so far.

Last summer I started learning a little bit of PHP, knowing HTML and CSS drove me towards wanting to learn some PHP for fun. I went through a pretty simple book, and made some simple websites (registration and message system, user submitted data, file uploads) using mostly tutorials which I tweaked a little bit. Since last summer I haven't learned anything new, but now that summer is coming along again I might be a bit bored, so I have been thinking of attempting to learn even more.

Suggestions included in the comments are things like:

  • Learn about software architecture.
  • Understand your environment.
  • I very highly suggest learning a PHP framework.
  • http://www.phptherightway.com
  • Start learning industry tools for PHP. It will all influence your coding style, and illustrate why some styles are considered best practices.
  • To add to the other suggestions, I recommend becoming a regular contributor to one or more open source projects.
  • What helped me a lot was to write my own micro framework using OOP that I can now use for future websites and web applications.
  • Come up with a 'complex' web site/application idea and get to it. Bonus points if you can launch it and make money off it (half kidding).

You can read the full set of comments for more good suggestions here.

Link: http://www.reddit.com/r/PHP/comments/1d32dr/how_to_progress_my_php_skills

7PHP.com: Interview with Jakub Vrana - Co-Author Of The Official PHP Manual

PHPDeveloper.org - Mon, 29/04/2013 - 16:09

7PHP.com has another community interview posted today - this time it's with Jakub Vrana, a co-author that works on the official PHP manual.

In this edition I talked with Jakub Vrana who is a co-author of The Official PHP Manual. @jakubvrana is also the creator of the two successful projects namely Adminer and NotORM. I invite you to know him better and to learn from his 7php PHP interview.

The interview shares Jakub's answers about things like:

  • His history as a PHP developer
  • What he sees as good and bad parts of it
  • His preferred tools
  • His choices on frameworks and ORMs
  • How to get started contributing to the documentation/manual
  • Some about his book "1001 tips and tricks for PHP"
Link: http://7php.com/php-interview-jakub-vrana

Top Version Control Systems used by PHP Developers

Planet-PHP - Mon, 29/04/2013 - 15:17
By Manuel Lemos
Version Control Systems are important tools that every developer should be using. However, for many developers version control systems do not make part of their development tool set.

Read this article to learn what are version control systems, why they are so important to be used by all developers, and what are the most popular systems used by PHP developers.
Catégories: Open Source, PHP Community

Community News: Packagist Latest Releases for 04.29.2013

PHPDeveloper.org - Mon, 29/04/2013 - 15:03
Recent releases from the Packagist:

Community News: Packagist Latest Releases for 04.28.2013

PHPDeveloper.org - Sun, 28/04/2013 - 15:01
Recent releases from the Packagist:

PHP: Redirection limit reached

Planet-PHP - Sat, 27/04/2013 - 21:36

PHP may give you the following error:

PHP Warning: file_get_contents(http://example.org/):
 failed to open stream: Redirection limit reached, aborting

This means that the URL you are accessing is telling you via a HTTP Location: header, that the data you want can be found on a different URL. This different URL tells you that the data you want can be found on another different URL. This another different URL ...

The game continues, 20 times. Then, PHP decides to stop following redirects and gives you the error.

The HTTP headers that make your client follow the Location header can are:

More redirections

If you want more than the default 20 redirects allowed by PHP, you can modify the HTTP stream context by setting the max_redirects option:

<?php
$context = stream_context_create(
    array(
        'http' => array(
            'max_redirects' => 101
        )
    )
);
$content = file_get_contents('http://example.org/', false, $context);
?>
No redirection

You may also choose to not follow any redirects by setting follow_location :

<?php
$context = stream_context_create(
    array(
        'http' => array(
            'follow_location' => false
        )
    )
);
$content = file_get_contents('http://example.org/', false, $context);
?>

In this case, you will get the content of the page that causes the redirect.

Catégories: Open Source, PHP Community

PHP: Unable to find the wrapper "https"

Planet-PHP - Sat, 27/04/2013 - 21:08

PHP may tell you the following:

PHP Warning: file_get_contents():
Unable to find the wrapper "https" - did you forget
to enable it when you configured PHP?

This means that PHP is not able to do secure HTTP requests. Reason for this is that it has no SSL library to use.

Unix

Recompile PHP with the --with-openssl flag.

Windows

Edit your php.ini file and add the following line:

extension=php_openssl.dll

Catégories: Open Source, PHP Community

Community News: Packagist Latest Releases for 04.27.2013

PHPDeveloper.org - Sat, 27/04/2013 - 15:09
Recent releases from the Packagist:

PHPMaster.com: Better Understanding Random

PHPDeveloper.org - Fri, 26/04/2013 - 18:52

On PHPMaster.com there's a new tutorial talking about randomness in PHP, what it is and some of the things it can be used for.

Use of random values is very important in the computer security field. It is crucial in computer programming for development of secure systems that are not vulnerable to malicious subversion. Cryptography relies on random value's generation and their reproducibility for unpredictable output that is core for security of any system. Random values are fundamental for secure coding practices and PHP highly makes use of them for security. You will find them used in all libraries and frameworks and almost all codes rely on them for the generation of tokens, salts and as inputs for further functions.

He talks about the important of good random numbers and some of the common uses for it including generating salts and unique identifiers. He mentions the "pseudorandomness" of PHP's generators and how they're seeded to help increase this randomness. He finishes up the tutorial with some suggestions and language features for creating "as random as possible" values like using "/dev/urandom" on Linux-based systems.

Link: http://phpmaster.com/better-understanding-random

/Dev/Hell Podcast: Episode 31: Feline Tooth Extraction

PHPDeveloper.org - Fri, 26/04/2013 - 17:22

The /Dev/Hell podcast has posted their latest episode - Episode #31 - Feline Tooth Extraction. The podcast is hosted by PHP community members Chris Hartjes and Ed Finkler.

Short notes time: In this episode, Chris and Ed talk about conferences we always wanted to go to, and languages & tools we'd thought we'd hate and turned out to like. Then Ed waxes on the Open Recipes project.

You can listen to this latest episode either through the in-page player or by downloading the mp3. Links to all of the technologies and tools they mention are in the show's notes on the page.

Link: http://devhell.info/post/2013-04-24/feline-tooth-extraction

Software Gunslinger: PHP is meant to die, continued

PHPDeveloper.org - Fri, 26/04/2013 - 16:15

In his previous post ("PHP was meant to die") the point was made that PHP isn't really designed as a language to handle long running processes very well. It's made to handle a few operations and then die at the end of the request. In this follow up post he talks more about using PHP for long running processes and a library that could help.

Yes, I already acknowledged that PHP has a garbage collection implementation starting 5.3.0 and up (opt-in or opt-out, that's not the problem). I also acknowledge that garbage collection works, and is able to take care of most circular references just fine. [...] Anyway, as previously stated too, garbage collection is a great thing, but not enough for PHP. It's a borrowed feature that does not play well with old fundamental decisions inherited from the original design. Garbage collection is not a magical solution for every problem, like many tried to argue about. Let's illustrate with another example.

His example uses the React PHP library (a non-blocking I/O platform) to handle a lot of incoming data to a port and report back some memory usage and limit settings. He explains a bit about what's happening and shares the results of the test, including the end result - a fatal error when the memory limit was hit. He still comes to the same conclusion, ultimately...PHP is just not the language to use for long-running processes that do any large amount of work.

Link: http://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continued

Community News: Packagist Latest Releases for 04.26.2013

PHPDeveloper.org - Fri, 26/04/2013 - 15:09
Recent releases from the Packagist:
Syndiquer le contenu