Return-Path: Delivered-To: apmail-wicket-dev-archive@www.apache.org Received: (qmail 13189 invoked from network); 2 Oct 2009 22:54:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Oct 2009 22:54:05 -0000 Received: (qmail 85758 invoked by uid 500); 2 Oct 2009 22:54:05 -0000 Delivered-To: apmail-wicket-dev-archive@wicket.apache.org Received: (qmail 85675 invoked by uid 500); 2 Oct 2009 22:54:05 -0000 Mailing-List: contact dev-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@wicket.apache.org Delivered-To: mailing list dev@wicket.apache.org Received: (qmail 85664 invoked by uid 99); 2 Oct 2009 22:54:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 22:54:05 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of igor.vaynberg@gmail.com designates 209.85.211.189 as permitted sender) Received: from [209.85.211.189] (HELO mail-yw0-f189.google.com) (209.85.211.189) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2009 22:53:55 +0000 Received: by ywh27 with SMTP id 27so1302004ywh.2 for ; Fri, 02 Oct 2009 15:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=gTbtbZEo2H8qvwmSRU8PqojkjfgNqJIab2GT/01Ggx8=; b=k4B3Ke0Emc3YX2Hq4ea98DFCa/MMjvOqeknQSQmokP6ubcvTUEGOABcr7++j5dxxrU S2X1CUD79R4XfPM0xfMbNUGtbJCfyOr7EnOrYY11BynhRJiMGmbxcYNnXlNAwsO7bLOV eBQFnhcGblyMaxv3cSvqEkV+tnCGg0TwDsT1s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=clmlHwkv0KAi6FzHAhoOzVleou8jGp9uZjM0gweqkKwApbXMks9wn4jigoxA49qCIs PaS1Xd/VDxau7K2LHFdxLNaFnnyLS7X5FpsuvLhUxOeb+YO2xGdswkOthcTJOIASrNEq 0D0qQl09d4Bn5WMe+Ffjq3R5J0X006AIP6Ox0= MIME-Version: 1.0 Received: by 10.101.86.7 with SMTP id o7mr3590685anl.39.1254523641895; Fri, 02 Oct 2009 15:47:21 -0700 (PDT) From: Igor Vaynberg Date: Fri, 2 Oct 2009 15:47:01 -0700 Message-ID: <23eb48360910021547w3f87540fje6fcb4f6d40549@mail.gmail.com> Subject: [wicket 1.5] url handling refactor preview To: dev@wicket.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org as ive mentioned before, the focus of 1.5 will be the overhaul of how we handle the urls and process requests. this part of wicket has grown organically and has turned into a bunch of overcomplicated spaghetti code. matej and i (mostly matej) have been working on an clean room implementation that we think will be simpler, cleaner, and allow users to mangle their urls as much as they want. the preview is available here: https://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/wicket-ng with a tiny test webapp here https://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental/wicket-ng-webapp this is just a small prototype to allow us to feel out the api before we begin the nightmarish task of merging this back into wicket proper. the main package of interest is org.apache.wicket.request which contains the two key players: RequestMapper and RequestHandler. these two entities work together to resolve and process urls, facilitated by the new and much simplified yet functional org.apache.wicket.requset.cycle.RequestCycle. the RequestHandler is analogous to IRequestTarget - its job is to generate a response to user's request. the RequestMapper is what maps urls to requesthandlers and back. this is the backbone of url handling. the interface is quiet simple, yet allows total flexibility. the mappers can be composed and chained, producing any kind of url scheme desirable. as well as allowing users to build the url hierarchy in any way they want rather then just working with absolute mounts like in 1.4. for example, the ever desirable // url encoding scheme is now easily achievable by creating a mapper to take care of the /locale/ portion and chaining all other mappers behind that. and for the other ever desirable usecase of mounting things like so: /${user}/profile/${section}/detail there is now the org.apache.wicket.request.mapper.MountedMapper further, because mappers are chainable one can foresee a mapper who doesnt manipulate the url, but instead enforces a security constraint on a subset of url space. of interest are also: org/apache/wicket/request/url-format.txt and org/apache/wicket/page/page-management.txt feedback is welcome. above all we would like to hear all your weird and interesting url mapping scheme ideas so we can proof the api against them. -igor