[Haskell-cafe] Web development work

Jeremy Shaw jeremy at n-heptane.com
Sat Sep 18 17:47:59 EDT 2010


A RESTful API with JSON results sounds perfect. I will be surprised if  
the API useful for 3rd party sites happens to map on to the URL  
structure used by the main site. But if that works, all the better :)

Of course, if your site which is creating the JSON is written in  
Haskell, and my site which is using it is written in Haskell, then it  
would be nice if I could somehow benefit from the haskell type checker  
telling me that you have changed your JSON a bit.

In some small experimental RESTful-ish sites a I have made I tend to  
make the return values of the API be an algrebraic data type that all  
the API functions return. Then I have functions like SiteRetVal ->  
JSON, SiteRetVal -> XML, etc, which makes it easy to convert the  
output to whatever format the client wants. With a system like that,  
it is possible to have the SiteRetVal be in it's own hackage library.  
Your site and my site would both depend on that package. Then when you  
change the API return values, I get a new version of that library to  
type-check against... Not sure how valuable/feasible it is in practice  
though. I have only developed a prototype far enough to determine that  
it *can* be done. Whether it *should* be done remains to be seen.

Also, there maybe be some issues with using the accept header. In  
theory, you may someday provide XML (in addition to JSON). But I think  
that some browsers list xml has a higher preference than html. So then  
normal browser users will start getting xml instead of html?

Anyway, the basic idea of a simple RESTful API with JSON is exactly  
what I was hoping for. The rest is implementation details, which I  
don't care much about as long as it works. I definitely do not want to  
turn this into a design by committee project.

Also, once the site is 'done', it would be nice to hirer a graphic  
designer to give it a nice, clean, professional look.

- jeremy


On Sep 18, 2010, at 12:28 PM, Michael Snoyman wrote:

> Cool, an API sounds great. I favor a RESTful API, so most likely it
> would simply be JSON served via the same URL as the main page; jus set
> the Accept header appropriately. Does that sound good enough?
>
> Michael
>
> On Fri, Sep 17, 2010 at 5:21 PM, Jeremy Shaw <jeremy at n-heptane.com>  
> wrote:
>> I have been meaning to add a jobs section to the happstack.com  
>> website.
>>
>> It would be nice if haskellers.com had an API so I could syndicate  
>> just the
>> happstack related jobs/contractors/etc on happstack.com.
>>
>> That would help bring more exposure to haskellers.com, and would be
>> beneficial for visitors to happstack.com who do not know about
>> haskellers.com and are concerned that it would be hard to find  
>> developers.
>> Obviously, I can just provide a link -- but an API would be nice.
>>
>> - jeremy
>>
>>
>> On Sep 16, 2010, at 7:35 AM, Michael Snoyman wrote:
>>
>>> On Thu, Sep 16, 2010 at 10:26 AM, Andrew Coppin
>>> <andrewcoppin at btinternet.com> wrote:
>>>>
>>>>  On 16/09/2010 08:52 AM, Michael Snoyman wrote:
>>>>>
>>>>> future it would be beneficial to the community to have this
>>>>> information centralized on a website. I think it would be useful  
>>>>> to
>>>>> have some basic skills and experience information, including  
>>>>> system
>>>>> administration abilities.
>>>>
>>>> [..]
>>>>
>>>> (And yes, given the frequency with which this gets asked, we should
>>>> probably
>>>> write this info down somewhere!)
>>>>
>>>
>>> OK, I'll bite on this one. I just registered the domain name
>>> haskellers.com (I was surprised it was available). So let me ask the
>>> community what information they would want out there. Here's the  
>>> ideas
>>> I had:
>>>
>>> * Users can create their own profiles. Profiles have the following
>>> information:
>>>   * Basic name, contact, website, photo, etc.
>>>   * Brief bio
>>>   * Skills. We'll probably have a list of skills to choose from.
>>>   * Notable projects worked on, with strong focus on Hackage  
>>> packages.
>>> * Some kind of "web of trust" feature, where users can confirm that
>>> someone else's profile is accurate. Open to suggestions on this.
>>> * A public message board for posting job information. I think this
>>> would not require login to post, but we would have spam protection
>>> (recaptcha).
>>>
>>> And then of course the basic what is Haskell, links to haskell.org,
>>> etc. I'll probably be able to get started on this early next week.
>>>
>>> Michael
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>>



More information about the Haskell-Cafe mailing list