Stop Making The Web Harder Than It Is; Real-world REST, HATEOAS, and Hypermedia APIs with Magpie

Kip Hampton will give a talk at YAPC::NA 2012 described as:

Developing for the Web shouldn’t be hard. Yet, many smart developers make it more difficult than it needs to be by choosing tools and frameworks that do not fully take advantage of all that HTTP has to offer. This talk demonstrates how projects at all levels— from the simplest brochureware site to the most advanced Hypermedia APIs—can be made simpler by getting back to the basics of HTTP. We introduce Tamarou’s internal application development and publishing framework, Magpie (scheduled for public release to coincide with YAPC::NA) and step through a series of real-world examples to show how its resource-oriented approach to development keeps simple things simple and makes hard things easier. 

Topics include:

* Why MVC is the wrong way to think about Web development.

* Why most frameworks that claim to be RESTful aren’t (and how that makes life harder)

* An brief introduction to Resource-oriented development.

* A series of production-tested Magpie recipes covering the gamut of Web-dev from simple templated sites through advanced Hypermedia applications.

[From the YAPC::NA Blog.]

Using Mojo::DOM

Mojolicious is already well known for its web framework, but I am finding more and more (after being told by our own brian d foy) that its DOM parser (Mojo::DOM) is worth the price of admission as well. Anyway today I was poking around StackOverflow and I ended up answering a question using nothing more than some well crafted DOM calls. Here is my (slightly reworded) response. It makes for a nice example of using simple CSS3 selectors to simplify HTML parsing.

The question goes something like this: Lets say we have some HTML which contains the times that a shop is open. How can we get this information in a HTML5/CSS3 (i.e. modern) way? Mojo::DOM.

YAPC::NA 2012 donate ticket

I will not be using my badge to the conference. Is there a place where I can put this in a 'needs' pot? To be used by someone who can make the conference, thanks.

Repeated Capturing and Parsing

An interesting query was recently posted to the internal Perl mail list at work. The questioner was trying to match a pattern repeatedly, capturing all of the results in an array. But, it wasn't doing quite what he expected. The message, with minor edits, went a little something like the following.

Distributed Processing Applications with Helios

Andrew Johnson will be giving a talk at YAPC::NA 2012 described as:

Helios is a distributed job processing system that allows users to write applications to spread workloads across multiple processes and servers.  The Helios job queuing, configuration, and logging APIs aim to provide a user with an environment to easily write applications that scale across multiple processes and hosts.  My talk will focus on Helios basic concepts and features (especially new features introduced in the new 2.4x series) with a particular interest in how to write simple Helios applications.  I will also cover best practices for getting the best performance out of the Helios environment.

[From the YAPC::NA Blog.]

Tel Aviv Perl Mongers Meeting on 30 May, 2012

Important Update! (20 May, 2012) There was a problem with the old building (where we usually meet). There are no available rooms there at all.

As a result we're assigned to room 2205 in the new building (Mitchell building). The entrance is through Yeda Am street, on the corner with HaMelakha street.

(The Hebrew text will be followed by an English one).

File::LinkDir 1.02

File::LinkDir 1.02 is on its way to a CPAN mirror near you.

Two changes went into this release.
- The link-file script will be installed now. (Hinrik)
- The --add-ignore option works properly now. (Matt)

I'd like to thank Philip Durbin for pointing out that --add-ignore wasn't working properly.

Leaflets for YAPC::Asia Tokyo 2012

So you know what YAPC is? If you're reading this, you probably do.

However, there are myriad of people out there who don't know what it is. Especially people who are new. Since our company also hosts meetups and conferences on other topics, we thought it would be grrrreat marketing to let people know that we have a superb conference going on.

And so here it is: our new shiny leaflets for YAPC::Asia!


It says in the middle: "YAPC::Asia Is a Perl 'Festival'!". It explains a bit about what YAPC is, and on the backside there's a bit about what kind of people come to the conference -- especially, that you don't need to be a pro/expert Perl hacker. We have lots of interesting material even if you don't speak our lingua franca.

Oh, and we're still looking for YAPC::Asia Tokyo 2012 sponsors!

Distributed Daemon Discovery

Matt Trout (mst) will give a talk at YAPC::NA 2012 described as:

A tale of systems introspection, service inference and parallel computing - how we used the Tak systems automation framework to help track a customer’s infrastructure.

[From the YAPC::NA Blog.]

8th Week of Perl 6 Tablets

This might be the last entry about the perl 6 tablets for a longer time. (lot of projects and articles have to be written soon and the moose article for heise sits on the brink and no article from me in this issue of perlzeitung). The work is now gradual and you surely don't want to hear same stuff every week. Just one thought on strategy.

I still work on the appendix (F and G now) rather on the actual tablets for several reasons:

A) work for the beginner

The appedices are more structured toward questions starters might have and maybe the answers there are also easier to find. This helps to bring more people to Perl 6 and for more sophisticated musings are still the specs there, which are much easier to read, once you have every term there explained in the glossary of the tablets.

B) have to learn myself

duct tape

Folks used to refer to perl as 'the duct tape of the internet'. It still totally is.

I've started posting perl (and other) portland and/or telecommute jobs on twitter. I thought I'd also include these tweets in the 2pdx.com LinkedIn group. LI supports rss feed inclusion in the news for their groups, so it should simply be a matter of pasting in the rss url

https://twitter.com/statuses/user_timeline/this_job.rss

into their UI. Nope. LI claims that this is not a valid rss feed. Hmm... The validator disagrees, but it does point out some warnings. Maybe LI's code just isn't up to handling that. Even if this was only an issue with twitter's feeds, "just twitter" is a rather large set of rss feeds to exclude based on an overly-strict parser. I advised them of the issue via their feedback form.

CPANdeps now understands META.json files

Because YAML isn't hip and trendy enough, at some point recently the toolchain started using META.json files as well as META.yml. Some foolish module authors only use META.json. Because CPANdeps didn't know about this file, their dependency graphs weren't being generated. Well, now they are. I just now pushed the updated code to the site, and you should start to see dependencies for things like DBIx::Class::Helpers, which has no META.yml.

The reverse dependencies - that is, the list of what modules depend on a particular module - will update over the next few hours.

MediaMath is sponsoring YAPC::NA 2012, and best of all,...



MediaMath is sponsoring YAPC::NA 2012, and best of all, they’re hiring!

Hidden unhelpful reviews on cpanratings.org

I noticed that on the module review pages linked from search.cpan.org and metacpan.org that 'unhelpful' reviews are inaccessible. The text is contained in a div as such:


< div data-dist="module_name" id="show_unhelpful">

3 hidden unhelpful reviews

< /div>

Does anyone know if that link is expected to expand and show the unhelpful review text? I'm always interested in opinions of others, whether they be good, bad, or ugly.

Ward Cunningham on Perl: fast to develop, fast to run, insightful

From an Interview With Ward Cunningham in Dr Dobb's Journal published May 15, 2012:

Look @this_job twitter feed

I claimed a while ago that I maintained a list of pdx and telecommute jobs of potential interest to folks I know who are looking for new gigs. Well, I suck at maintaining that list. I'm going to try to make it easier to maintain by re-inventing the page as a twitter feed. The idea is that it is easier to post a couple tweets each day than to edit an html document. If it is sufficiently easier, then I might actually do it regularly.

If you use twitter, follow @this_job. If you use rss, subscribe to https://twitter.com/statuses/user_timeline/this_job.rss. If you prefer email updates, well I'm sure there is some service out there which will turn twitter streams or rss feeds into email. Actually, I think twitter started doing that themselves.

We'll see if this experiment works any better.

Things To Bring To YAPC

Many of you are packing right now, or will be packing shortly to come to YAPC::NA 2012. Here’s a list of things that you might want to bring with you to YAPC:

Announce: WWW::Scraper::Wikipedia::ISO3166

Hi Folks

After an email discussion with Kim Ryan, author of Locale::SubCountry, and a recent exchange on this very blog, about removing Locale::Country::SubCountry from CPAN, I've released WWW::Scraper::Wikipedia::ISO3166 V 1.01.

It's main purpose is to ship a SQLite database of countries and subcountries, and an interface to that db.

The db can be used directly, or exported as CSV or HTML.

Pre-exported files are shipped in the distro as data/*.csv and data/*.html.

The HTML looks like this.

The Wikipedia files I downloaded are also shipped in the distro under data/*.html, to encourage you to access them locally if playing with the code, rather than hitting Wikipedia itself repeatedly.

If you think this makes the distro too big (4Mb) let me know. I can easily drop the those files.

Using the Record Separator

I use Perl for years, but there are some details that I still am unable to use correctly in Perl. I think they should be my fault. And probably, if I rtfm I would get an answer. Nevertheless, and although this is not perlmonks, I'll post my problem anyway.

I use local $/ = "\n\n" as record separator to read a file. The code that processes that file, uses a module, that decides to open a config file, and that expects that the record separator is a single new line. That library fails.

My main doubt is if all modules shout set the record separator explicitly, as we never know if someone changed it, or if there is any way I can change my own copy of it without messing with other modules.

Be Your Own Big Brother

Many modern browsers (including recent versions of Firefox and Opera) support the W3C's geolocation API. This is a standardised mechanism for Javascript to ask your browser where it geographically is in the world. Typically the browser will then pop up a message asking you if you wish to reveal this information, giving you the opportunity to opt out.

But how does your browser know where it is? The method that Firefox and Opera both seem to use is this:

  1. They sniff data on your Wifi to figure out the local hotspots;
  2. They submit the details of these hotspots to a web service run by Google;
  3. Google tells them where you are.

How is Google able to figure out where you are based on local wifi hotspots? The answer is their Street View cars. At the same time that they drive around photographing streets for Street View, they also take a survey of wifi hot spots.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.