Re: Introducing vibe.d! SOAP .. REST?

2012-05-03 Thread Kagamin

On Thursday, 3 May 2012 at 09:22:23 UTC, bls wrote:

Should be POST GET PUT DELETE


I'm afraid, some proxies may cut unusual http verbs. SVN relies 
on them and if a proxy is not nice, it gets broken.


Re: Introducing vibe.d! SOAP .. REST?

2012-05-03 Thread Chris NS
I've been playing around with vibe in my free time the last few 
days, and here are the beginnings of a stab at REST:

https://github.com/csauls/zeal.d/blob/master/source/zeal/http/router.d

Admittedly it rips off the Rails way of recognizing and pathing 
the REST actions, but I admit a small bias as someone who uses 
Rails often.  That said, I've been trying to dream up a "more 
D-like" way to do it.


Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Steven Schveighoffer
On Thu, 03 May 2012 08:43:43 -0400, Jakob Ovrum   
wrote:



On Thursday, 3 May 2012 at 12:33:33 UTC, Ary Manzana wrote:

On 5/3/12 6:41 PM, Jacob Carlborg wrote:

On 2012-05-03 10:09, Ary Manzana wrote:


I'm not sure. I'd like the symbols to be under the same tree.

With tabs you'd have to click twice to go from one place to another.



I didn't even know the symbols where there until a scrolled down.



The same happened to me.

What I meant with "under the same tree is"

+ std
  + algorithm
* map
* reduce
* ...


There would be a lot of wasted whitespace to the left, and overflow for  
long symbol names would become an even bigger issue.


I do understand the problem though, and I want to fix it. Some more  
opinions are much appreciated.


I suggest:

1. Only expand tree to the level of the current symbol selected.  So for  
instance, you click on std.datetime, you see all the top-level symbols of  
std.datetime *not* expanded.  If you click on std.datetime.Month, the  
Month enum expands in the tree.
2. When inside a module, only show the packages of that module as  
breadcrumbs, without indentation.  That saves you the white space.


BTW, I noticed two issues:

1. If a symbol name is too long, it is truncated with ..., but the  
expand/collapse arrow is also removed.
2. The index.html goes to links like std_base64.html, but the actual doc  
is at std.base64.html, so you get a 404.


Looks really nice!  I agree with Ary, we *really* really need cross  
references (generated by the compiler), and I'd add it would be nice to be  
able to show categories and category headers at the top of each module  
(i.e. here are all the structs in this file, here are all the classes).


-Steve


Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Jacob Carlborg

On 2012-05-03 14:43, Jakob Ovrum wrote:


There would be a lot of wasted whitespace to the left, and overflow for
long symbol names would become an even bigger issue.

I do understand the problem though, and I want to fix it. Some more
opinions are much appreciated.




The right side is pretty empty if you have a wide screen. Perhaps the 
symbols can be placed there.


--
/Jacob Carlborg


Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Jacob Carlborg



What I meant with "under the same tree is"

+ std
+ algorithm
* map
* reduce
* ...


Aha, I was thinking more like "below the tree" as it is now.

--
/Jacob Carlborg


Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Jakob Ovrum

On Thursday, 3 May 2012 at 12:33:33 UTC, Ary Manzana wrote:

On 5/3/12 6:41 PM, Jacob Carlborg wrote:

On 2012-05-03 10:09, Ary Manzana wrote:


I'm not sure. I'd like the symbols to be under the same tree.

With tabs you'd have to click twice to go from one place to 
another.




I didn't even know the symbols where there until a scrolled 
down.




The same happened to me.

What I meant with "under the same tree is"

+ std
  + algorithm
* map
* reduce
* ...


There would be a lot of wasted whitespace to the left, and 
overflow for long symbol names would become an even bigger issue.


I do understand the problem though, and I want to fix it. Some 
more opinions are much appreciated.





Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Ary Manzana

On 5/3/12 6:41 PM, Jacob Carlborg wrote:

On 2012-05-03 10:09, Ary Manzana wrote:


I'm not sure. I'd like the symbols to be under the same tree.

With tabs you'd have to click twice to go from one place to another.



I didn't even know the symbols where there until a scrolled down.



The same happened to me.

What I meant with "under the same tree is"

+ std
  + algorithm
* map
* reduce
* ...


Re: Introducing vibe.d!

2012-05-03 Thread SomeDude

On Wednesday, 2 May 2012 at 22:18:12 UTC, bls wrote:

Am 01.05.2012 23:46, schrieb Sönke Ludwig:

I made a post with Steve Teale's MySQL driver as an example:
http://vibed.org/blog/posts/writing-native-db-drivers

There were some hidden gotchas, but I hope the current port 
doesn't

break anything from the original code.


Looks good. Unfortunately I spend some time with MongoDB and I 
have to say : Amazing db. I thought key/value databases are 
just toys. At least regarding MongoDB is was completely wrong.


It does have its scaling problems, though. As soon as RAM is 
full, performance drops drastically, as it's essentially a disk 
backed in memory database.


Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Jacob Carlborg

On 2012-05-03 10:09, Ary Manzana wrote:


I'm not sure. I'd like the symbols to be under the same tree.

With tabs you'd have to click twice to go from one place to another.



I didn't even know the symbols where there until a scrolled down.

--
/Jacob Carlborg


Re: Introducing vibe.d! SOAP .. REST?

2012-05-03 Thread bls

Am 03.05.2012 11:22, schrieb bls:

Should be POST GET PUT DELETE

I would be fantastic if vibe.d can implement a REST SERVER following
this guideline :


A very interesting read regarding implementing a rest server (PHP)

http://www.gen-x-design.com/archives/create-a-rest-api-with-php/

Bjoern


Re: Introducing vibe.d! SOAP .. REST?

2012-05-03 Thread bls

Am 30.04.2012 08:38, schrieb Sönke Ludwig:

If you mean automatic generation of a REST interface for an existing D
interface, then it's definitely planned. I can imagine a sloppy version
where the HTTP method is always POST or can be POST/GET as desired by
the client. But I would also like to have a more expressive version,
where the HTTP method is inferred from the D method somehow and maybe it
would also be possible to specify a sub path for each method.

Sönke


Yes, this is what I am asking for. I think POST/GET is not enough.

Should be POST GET PUT DELETE

I would be fantastic if vibe.d can implement a REST SERVER following 
this guideline :


The JsonRestStore follows
RFC 2616 (http://www.ietf.org/rfc/rfc2616.txt) whenever possible to 
define to interaction with server. JsonRestStore uses an HTTP GET 
request to retrieve data, a PUT request to change items, a DELETE 
request to delete items, and a POST request to create new items. It is 
recommended that the server follow a URL structure for resources:


/{Table}/{id}

This URL will be used to retrieve items by identity and make 
modifications (PUT and DELETE). It is also recommended that a /{Table}/ 
URL is used to represent the collection of items for the store. When a 
query is performed, any query string is appended to the target URL to 
retrieve the results of the query. The JsonRestStore expects the results 
to be returned in an array (not in an object with an items property like 
some stores). The store will also POST to that URL to create new items.


When creating new items, the JsonRestStore will POST to the target URL 
for the store. If your server wants to assign the URL/location for the 
newly created item, it can do so by including a Location header in the 
response:


Location: http://mysite.com/Table/newid

The server can also assign or change properties of the object (such an 
id or default values) in the response to a POST (or any other request), 
by simply returning the updated JSON representation of the item in the 
body of the response.


Note that in PHP, sometimes setting the Location will erroneously 
trigger a 302 status code which will cause JsonRestStore to fail. Per 
RFC 2616, the correct response to a POST that creates a new resource is 
to return a 201 status code with the Location header. In PHP, you must 
set the status code as well as the Location header if you want to avoid 
a 302 response.


Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread James Miller

On Thursday, 3 May 2012 at 06:09:31 UTC, Jakob Ovrum wrote:

On Thursday, 3 May 2012 at 05:14:43 UTC, James Miller wrote:

On Wednesday, 2 May 2012 at 18:26:11 UTC, Jakob Ovrum wrote:
This project is finally published and documented, so here's 
an announcement.


  https://github.com/JakobOvrum/bootDoc

bootDoc is a configurable DDoc theme, with advanced 
JavaScript features like a package tree and module tree, as 
well as fully qualified symbol anchors. The style itself and 
some of the components come from Twitter's Bootstrap 
framework.


I would make a minor change that lets you see the function 
tree near the top. On my laptop screen (about a standard size) 
I have to scroll down about an entire screen to see it. How 
this is implemented is up to you, but being able to collapse 
to module view might be enough.


--
James Miller


Packages in the module view are collapsable, just click on them.

Having the module list in its entirety collapsable might be an 
idea, but unless your project has a ton of top-level packages 
and modules, it won't help much with your specific problem (the 
situation would be almost the same).


I am considering putting the module tree and symbol tree in 
tabs instead of below each other.


Ahh, I missed that, sorry. Nevermind me, carry on, you're awesome.

--
James Miller


Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Rory McGuire
Would be great if you could make it an accordion with a live search at the
top.


On Thu, May 3, 2012 at 10:09 AM, Ary Manzana  wrote:

> On 5/3/12 2:10 PM, Jacob Carlborg wrote:
>
>> On 2012-05-03 08:09, Jakob Ovrum wrote:
>>
>>  I am considering putting the module tree and symbol tree in tabs instead
>>> of below each other.
>>>
>>
>> I think that would be a good idea.
>>
>
> I'm not sure. I'd like the symbols to be under the same tree.
>
> With tabs you'd have to click twice to go from one place to another.
>
>


Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Ary Manzana

On 5/3/12 2:10 PM, Jacob Carlborg wrote:

On 2012-05-03 08:09, Jakob Ovrum wrote:


I am considering putting the module tree and symbol tree in tabs instead
of below each other.


I think that would be a good idea.


I'm not sure. I'd like the symbols to be under the same tree.

With tabs you'd have to click twice to go from one place to another.



Re: Introducing vibe.d!

2012-05-03 Thread Sönke Ludwig

Am 03.05.2012 00:18, schrieb bls:

Am 01.05.2012 23:46, schrieb Sönke Ludwig:

I made a post with Steve Teale's MySQL driver as an example:
http://vibed.org/blog/posts/writing-native-db-drivers

There were some hidden gotchas, but I hope the current port doesn't
break anything from the original code.


Looks good. Unfortunately I spend some time with MongoDB and I have to
say : Amazing db. I thought key/value databases are just toys. At least
regarding MongoDB is was completely wrong.



;)



I have a problem with diet templates.
In order to use dojo dijit I need :




Is this doable in diet templates ?




This line seems to work for me:
#appLayout.mainlayout(data-dojo-props="region: 'center', tabPosition: 
'bottom'", data-dojo-type="dijit.layout.TabContainer")


gives me this HTML:
data-dojo-type="dijit.layout.TabContainer">




Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Jacob Carlborg

On 2012-05-03 08:53, Ary Manzana wrote:


Oh, I just said that because I have a pull request waiting for that
feature to be incorporated in DMD... but I don't think it'll happen...


I really hope we get this functionality.

--
/Jacob Carlborg


Re: bootDoc - advanced DDoc framework using Twitter's Bootstrap

2012-05-03 Thread Jacob Carlborg

On 2012-05-03 08:09, Jakob Ovrum wrote:


I am considering putting the module tree and symbol tree in tabs instead
of below each other.


I think that would be a good idea.

--
/Jacob Carlborg