
Pakyow 0.8: New Router, Updated View Syntax, and Smarter View Transformation - craigkerstiens
http://pakyow.com/blog/2014/03/04/zero_eight
======
VeejayRampay
I've seen somewhere on the site that Pakyow is "up to 40 some percent faster
than Sinatra". What makes Pakyow faster than Sinatra under the hood?

~~~
bryanp
I can't speak too intelligently about how Sinatra is architected, but here's a
bit about how Pakyow handles routing.

A route is just a regex and set of functions (blocks, procs, whatever). When a
request comes in, the following things happen:

1\. An AppContext instance is created that contains the request's state 2\.
Route is matched (narrowed by method then match on path) 3\. Each function is
evaluated within the context

Hooks, etc aren't special things and are just functions at a particular
location in the set. This set is built at startup, so there's no object
creation to fulfill a request (except the Request/Response/AppContext
objects). The routing bits of pakyow (pakyow-core) are very close to the Rack
metal.

Aside from routing, nearly everything in Pakyow is middleware. This makes it
easy to completely remove (not just disable) components like static file
handling, logging, etc.

Hope that helps!

------
donnieclapp
The philosophy underpinning this framework seems sort of amazing to me. I'm
trying to figure out why it seems to be so under-the-radar.

~~~
bryanp
Why thank you kind sir! Myself (primary dev) and the few people I know who use
it agree :)

We've been intentionally quiet, to be honest. Lots of things to get straight
since the initial release, much of which was done in 0.8. We're at a more
stable point now and I hope to see some momentum build soon. Of course, any
ideas you have would be welcome.

