Haskell.org GSOC: Ticket Queryhttp://ghc.haskell.org/trac/summer-of-code/query?status=!closed&owner=mightybyte&order=id
Haskell.org Google Summer of Codeen-USHaskell.org GSOC/images/summerlambda.pnghttp://ghc.haskell.org/trac/summer-of-code/query?status=!closed&owner=mightybyte&order=id
Trac 1.0.7http://ghc.haskell.org/trac/summer-of-code/ticket/1621
http://ghc.haskell.org/trac/summer-of-code/ticket/1621#1621: Snap: Implement type-safe URL support for the Snap Web FrameworkThu, 29 Mar 2012 14:01:06 GMTozataman<p>
Snap aims to be a fast, resiable, easy to use, high quality and high level web development framework for Haskell. More information on Snap can be found at <a class="ext-link" href="http://www.snapframework.com/"><span class="icon">​</span>http://www.snapframework.com/</a>.
</p>
<p>
Type safe URLs encode all accessible paths of a web application via an algebraic datatype defined specifically for the web application at hand. All urls within the application, then, are generated from this datatype, which ensures statically that no dead links are present anywhere in the application.
</p>
<p>
Furthermore, when the user-visible URLs need to change for various (possibly cosmetic) reasons, the change can be implemented centrally and propagated to all the places of use within the application.
</p>
<p>
The web-routes package on Hackage seems to provide a framework-agnostic way to handle type-safe URLs. However, it might be worthwhile to discuss if this is the right choice for Snap.
</p>
<p>
The scope of this project would include the following:
</p>
<ul><li>Evaluation of web-routes and development of an idiomatic solution for underlying type-safe URL support for snap, both at "snap-core" and "snap" package levels. The API design should specifically consider how all the pieces will come together given the highly flexible snaplet infrastructure that Snap provides to achieve modularity in web applications.
</li></ul><ul><li>Development of Haskell combinators/helpers, so that URLs for various pages can be generated programmatically anywhere in the application.
</li></ul><ul><li>Integration with Heist template system so that URLs for various pages, including all necessary parameters, can easily be generated in templates anywhere in the application.
</li></ul><ul><li>Development of test cases to be added to the appropriate snap test-suites.
</li></ul><ul><li>Implementation of the type-safe URL system for the Snap website, as an initial use case study and verification of the design.
</li></ul><ul><li>The project may involve Template Haskell to remove obvious boilerplate.
</li></ul><h2 id="InterestedMentors">Interested Mentors</h2>
<p>
Doug Beardsley
</p>
<p>
Greg Collins
</p>
<p>
Ozgun Ataman
</p>
Resultshttp://ghc.haskell.org/trac/summer-of-code/ticket/1621#changelog