www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Modern COM Programming in D

reply Lionello Lunesu <lio lunesu.remove.com> writes:
Little over a year ago I held a tech talk at Microsoft about how I used 
D to write readable COM code. A while back I thought I'd try to get 
permission to share these slides, and what'dya know:

http://lunesu.com/index.php?/archives/126-Modern-COM-Programming-in-D.html

Direct link to the slides: 
http://lunesu.com/uploads/ModernCOMProgramminginD.pptx

Let me know what you guys think!

Lionello.
Jan 24 2012
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 1/24/2012 9:07 AM, Lionello Lunesu wrote:
 Little over a year ago I held a tech talk at Microsoft about how I used D to
 write readable COM code. A while back I thought I'd try to get permission to
 share these slides, and what'dya know:

 http://lunesu.com/index.php?/archives/126-Modern-COM-Programming-in-D.html

 Direct link to the slides:
http://lunesu.com/uploads/ModernCOMProgramminginD.pptx

 Let me know what you guys think!

 Lionello.

I'd like to link to this. But first, please turn the slides into a single .pdf file! Or html. Something browser friendly.
Jan 24 2012
next sibling parent reply Lionello Lunesu <lio lunesu.remove.com> writes:
On 25-1-2012 2:26, Walter Bright wrote:
 On 1/24/2012 9:07 AM, Lionello Lunesu wrote:
 Little over a year ago I held a tech talk at Microsoft about how I
 used D to
 write readable COM code. A while back I thought I'd try to get
 permission to
 share these slides, and what'dya know:

 http://lunesu.com/index.php?/archives/126-Modern-COM-Programming-in-D.html


 Direct link to the slides:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pptx

 Let me know what you guys think!

 Lionello.

I'd like to link to this. But first, please turn the slides into a single .pdf file! Or html. Something browser friendly.

Done: http://lunesu.com/uploads/ModernCOMProgramminginD.pdf
Jan 24 2012
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 1/24/2012 5:07 PM, Lionello Lunesu wrote:
 Done:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pdf

Added to interface.html
Jan 24 2012
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 1/24/12 9:10 PM, Walter Bright wrote:
 On 1/24/2012 5:07 PM, Lionello Lunesu wrote:
 Done:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pdf

Added to interface.html

http://www.reddit.com/r/programming/comments/ow7qc/modern_com_programming_in_d/ Andrei
Jan 25 2012
prev sibling next sibling parent Lionello Lunesu <lio lunesu.remove.com> writes:
On 25-1-2012 14:56, kdmult wrote:
 On Wednesday, 25 January 2012 at 01:08:04 UTC, Lionello Lunesu wrote:
 Done:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pdf

Could you correct the URL of your files on the last page?
 My files
 http://dpxml-lio/d/


Yeah, that's not meant to work. Releasing the source code it a entirely different process that I don't think is worth it. I'll remove the link from the slide. Lionello.
Jan 25 2012
prev sibling next sibling parent Lionello Lunesu <lio lunesu.remove.com> writes:
On 25-1-2012 14:56, kdmult wrote:
 On Wednesday, 25 January 2012 at 01:08:04 UTC, Lionello Lunesu wrote:
 Done:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pdf

Could you correct the URL of your files on the last page?
 My files
 http://dpxml-lio/d/


Yeah, that's not meant to work. Releasing the source code it a entirely different process that I don't think is worth it. I'll remove the link from the slide. Lionello.
Jan 25 2012
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2012-04-12 17:59, Jay Norwood wrote:
 On Tuesday, 3 April 2012 at 14:10:32 UTC, Jesse Phillips wrote:
 Most of his code isn't available as it was kind of under
 Microsoft. However I revived Juno for D2 awhile ago (still need
 to play with it myself). Juno provides some nice tools and API.

 https://github.com/JesseKPhillips/Juno-Windows-Class-Library

 http://dsource.org/projects/juno

There was a discussion about D support for xpcom at this thread a few years back, where the conclusion seems to have been that xpcom usage was abi compatible. Have you tested communicating with xpcom objects using the juno library? http://forum.dlang.org/thread/fqkfsu$25g5$1 digitalmars.com#post-fqph1i:241kk3:241:40digitalmars.com

DWT uses XPCOM to integrate Firefox if I recall correctly. -- /Jacob Carlborg
Apr 12 2012
prev sibling next sibling parent "kdmult" <kdmult ya.ru> writes:
On Wednesday, 25 January 2012 at 01:08:04 UTC, Lionello Lunesu 
wrote:
 Done:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pdf

Could you correct the URL of your files on the last page?
 My files
 http://dpxml-lio/d/

Jan 24 2012
prev sibling next sibling parent "Sam Hu" <samhudotsamhu gmail.com> writes:
On Wednesday, 25 January 2012 at 06:56:40 UTC, kdmult wrote:
 On Wednesday, 25 January 2012 at 01:08:04 UTC, Lionello Lunesu 
 wrote:
 Done:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pdf

Could you correct the URL of your files on the last page?
 My files
 http://dpxml-lio/d/


Sorry the link http://dpxml-lio/d is unreachable from my side (maybe someone blocked it :P).Could you please provide an alternative place for download? Appreciated. Regards, Sam
Apr 03 2012
prev sibling next sibling parent "Jesse Phillips" <jessekphillips+D gmail.com> writes:
On Tuesday, 3 April 2012 at 07:49:28 UTC, Sam Hu wrote:

 Sorry the link http://dpxml-lio/d is unreachable from my side
 (maybe someone blocked it :P).Could you please provide an
 alternative place for download?

 Appreciated.

 Regards,
 Sam

Most of his code isn't available as it was kind of under Microsoft. However I revived Juno for D2 awhile ago (still need to play with it myself). Juno provides some nice tools and API. https://github.com/JesseKPhillips/Juno-Windows-Class-Library http://dsource.org/projects/juno
Apr 03 2012
prev sibling next sibling parent "Sam Hu" <samhudotsamhu gmail.com> writes:
On Tuesday, 3 April 2012 at 14:10:32 UTC, Jesse Phillips wrote:
 On Tuesday, 3 April 2012 at 07:49:28 UTC, Sam Hu wrote:

 Sorry the link http://dpxml-lio/d is unreachable from my side
 (maybe someone blocked it :P).Could you please provide an
 alternative place for download?

 Appreciated.

 Regards,
 Sam

Most of his code isn't available as it was kind of under Microsoft. However I revived Juno for D2 awhile ago (still need to play with it myself). Juno provides some nice tools and API. https://github.com/JesseKPhillips/Juno-Windows-Class-Library http://dsource.org/projects/juno

Thanks for the reply.Yes,Juno is great,I use it since D1. Regards, Sam
Apr 08 2012
prev sibling parent "Jay Norwood" <jayn prismnet.com> writes:
On Tuesday, 3 April 2012 at 14:10:32 UTC, Jesse Phillips wrote:
 Most of his code isn't available as it was kind of under
 Microsoft. However I revived Juno for D2 awhile ago (still need
 to play with it myself). Juno provides some nice tools and API.

 https://github.com/JesseKPhillips/Juno-Windows-Class-Library

 http://dsource.org/projects/juno

There was a discussion about D support for xpcom at this thread a few years back, where the conclusion seems to have been that xpcom usage was abi compatible. Have you tested communicating with xpcom objects using the juno library? http://forum.dlang.org/thread/fqkfsu$25g5$1 digitalmars.com#post-fqph1i:241kk3:241:40digitalmars.com
Apr 12 2012
prev sibling next sibling parent reply bls <bizprac orange.fr> writes:
On 01/24/2012 09:07 AM, Lionello Lunesu wrote:
 Little over a year ago I held a tech talk at Microsoft about how I used
 D to write readable COM code. A while back I thought I'd try to get
 permission to share these slides, and what'dya know:

 http://lunesu.com/index.php?/archives/126-Modern-COM-Programming-in-D.html

 Direct link to the slides:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pptx

 Let me know what you guys think!

 Lionello.

Congratulations Lionello, This is not just a useful snippet. You have been able to explain all the D2 goodies in a reasonable context. This code should have a home and live at "Fine_Art_Of_D2_Programming.com" Very well done! Thank You, Bjoern
Jan 25 2012
parent Lionello Lunesu <lio lunesu.remove.com> writes:
On 26-1-2012 0:58, bls wrote:
 On 01/24/2012 09:07 AM, Lionello Lunesu wrote:
 Little over a year ago I held a tech talk at Microsoft about how I used
 D to write readable COM code. A while back I thought I'd try to get
 permission to share these slides, and what'dya know:

 http://lunesu.com/index.php?/archives/126-Modern-COM-Programming-in-D.html


 Direct link to the slides:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pptx

 Let me know what you guys think!

 Lionello.

Congratulations Lionello, This is not just a useful snippet. You have been able to explain all the D2 goodies in a reasonable context. This code should have a home and live at "Fine_Art_Of_D2_Programming.com" Very well done! Thank You, Bjoern

Thanks Bjoern! :)
Jan 25 2012
prev sibling next sibling parent reply "Jesse Phillips" <jessekphillips+D gmail.com> writes:
On Tuesday, 24 January 2012 at 17:08:01 UTC, Lionello Lunesu 
wrote:
 Little over a year ago I held a tech talk at Microsoft about 
 how I used D to write readable COM code. A while back I thought 
 I'd try to get permission to share these slides, and what'dya 
 know:

 http://lunesu.com/index.php?/archives/126-Modern-COM-Programming-in-D.html

 Direct link to the slides: 
 http://lunesu.com/uploads/ModernCOMProgramminginD.pptx

 Let me know what you guys think!

 Lionello.

I have some questions related to this. One, do you know about Juno? http://www.dsource.org/projects/juno New Source location: https://github.com/he-the-great/Juno-Windows-Class-Library Two, how does your work compare? Are these improvements that could go into Juno? Three, you may be interested to know about tlbimpd: http://www.dsource.org/projects/juno/wiki/TypeLibraryImporter I revived the project for D2, but Richard Webb has actually done the work to make it usable. Wondering if effort on this could be consolidated and as brought up in the reddit comments maybe work could go towards WinRT support? Great presentation material though. Thank you for having done so.
Jan 25 2012
parent Lionello Lunesu <lio lunesu.remove.com> writes:
On 26-1-2012 4:50, Jesse Phillips wrote:
 On Tuesday, 24 January 2012 at 17:08:01 UTC, Lionello Lunesu wrote:
 Little over a year ago I held a tech talk at Microsoft about how I
 used D to write readable COM code. A while back I thought I'd try to
 get permission to share these slides, and what'dya know:

 http://lunesu.com/index.php?/archives/126-Modern-COM-Programming-in-D.html


 Direct link to the slides:
 http://lunesu.com/uploads/ModernCOMProgramminginD.pptx

 Let me know what you guys think!

 Lionello.

I have some questions related to this. One, do you know about Juno? http://www.dsource.org/projects/juno New Source location: https://github.com/he-the-great/Juno-Windows-Class-Library

Hadn't heard of it, no. Checking it now.
 Two, how does your work compare? Are these improvements that could go
 into Juno?

My code is a template that generates wrappers for COM interfaces. Sure, that template can be part of any related library, but the prerequisites probably make it too niche to be universally useful. For one, it needs a D-style interface definition for the COM interfaces.
 Three, you may be interested to know about tlbimpd:
 http://www.dsource.org/projects/juno/wiki/TypeLibraryImporter

 I revived the project for D2, but Richard Webb has actually done the
 work to make it usable. Wondering if effort on this could be
 consolidated and as brought up in the reddit comments maybe work could
 go towards WinRT support?

Hmm, this would work beautifully! tlbimpd could be extended to generate the same kind of wrappers for each COM object/interface. About WinRT... That's actually how my code started out. There are still some WinR Treferences in the slides that I should have removed. Anyway, now that WinRT is 'out in the open' that's no longer an issue. So, yes, the same trick works for all of WinRT.
 Great presentation material though. Thank you for having done so.

Thanks! L.
Jan 25 2012
prev sibling next sibling parent "Jesse Phillips" <jessekphillips+D gmail.com> writes:
On Thursday, 26 January 2012 at 03:50:38 UTC, Lionello Lunesu 
wrote:

 Hmm, this would work beautifully! tlbimpd could be extended to 
 generate the same kind of wrappers for each COM 
 object/interface.

 About WinRT... That's actually how my code started out. There 
 are still some WinR Treferences in the slides that I should 
 have removed. Anyway, now that WinRT is 'out in the open' 
 that's no longer an issue. So, yes, the same trick works for 
 all of WinRT.

Looked more in depth at your code I see that you demonstrated the "D IDL" which I think is what tlbimpd is doing, still need to piece all these components together myself. Looking at the Wikipage on WinRT, it seems that tlb is being "dropped" and replaced with a meta data format similar to .Net's. This would definitely be a nice area to have expanded. There is also a comparison you do and I'm curious how you see this one working. VARIANT -> std.variant. In Juno the Variant struct is defined and it seems their are functions which take that type. Isn't the struct definition still going to be required for interoperability. It could be made transparent to the user though.
Jan 25 2012
prev sibling parent reply Sean Kelly <sean invisibleduck.org> writes:
Very nice!  One tiny thing I noticed so far--the last 2 comments on page 8 a=
re backwards.=20

Sent from my iPhone

On Jan 24, 2012, at 9:07 AM, Lionello Lunesu <lio lunesu.remove.com> wrote:

 Little over a year ago I held a tech talk at Microsoft about how I used D t=

o share these slides, and what'dya know:
=20
 http://lunesu.com/index.php?/archives/126-Modern-COM-Programming-in-D.html=

=20
 Direct link to the slides: http://lunesu.com/uploads/ModernCOMProgrammingi=

=20
 Let me know what you guys think!
=20
 Lionello.

Jan 26 2012
parent Lionello Lunesu <lio lunesu.remove.com> writes:
On 26-1-2012 22:30, Sean Kelly wrote:
 Very nice!  One tiny thing I noticed so far--the last 2 comments on page 8 are
backwards.

Yeah, saw that as well. Good catch! :)
Jan 26 2012