Jezz Santos - 314 - Feb 18, 2014

Just posted a video of some ServiceStack developer tooling we are considering making into an open source project that helps create ServiceStack REST services. http://www.youtube.com/watch?v=ejTyvKba_vo

Looking for people’s feedback on whether this kind of thing has any value to the community.

Ryan Britton:

great stuff Jezz - thank you for sharing.

I’d be interested to take a look under the hood, should you decide to release the source, and fork the code with my own contributions. The tooling can only benefit from community scrutiny and contribution…

I especially liked the idea of dragging the projects onto the NuPattern nodes to “link them up” - much better than trying to preempt project locations within the solution tree and generate artifacts in the correct folders statically…  

Rudy Scott:

This looks really handy for getting started.

Wayne Brantley:

+Rudy Scott not only for ‘getting started’, but anytime you need to add a new resource,etc.

John Watson:

Hi Jezz, the YT video is marked as ‘private’ and can’t be watched.

Jezz Santos:

Oh boy!, sorry my mistake, should be public now

Wayne Brantley:

First of all I would like to say that this looks absolutely fantastic.  I think this is a terrific tool and that +Demis Bellot should call you right away and get this as part of SS.  I think the HARDEST part of servicestack is ‘getting it all wired up and going’.  Many people struggle with that.  You have automated all of that and helped people implement best practices.  While watching I made some notes, thoughts, questions and I wanted to share them with you.

What if I wanted to add AccessRestrictions Attributes?
What if I wanted to add certain roles for authorization?
What if I wanted to add the Swagger attrigutes?
On your generated service classes, seems like you can shared method that takes a lambda, call it with the actual code in the service and elimiate the try/catch and all associated code…
Also seems like the organziation of source files in things like validators could be better.  If you have 10 services, you will have a mess in there with 40+ files.
Wonder about a /Services/User/{Validators, Workflow} type of structure

Unit Tests - these unit tests appear to be testing your services - but what it is testing is completely code generated, meaning it is correct.
I think these generated unit tests are good for testing that your solution builder is working correctly, but serve little purpose in the final tests?
I mean I cannot modify the service class can I, as it is generated code and just users the manager to call my real code anyway?

What if I dont want to use MOQ?  I like SubstituteFor.

Jezz Santos:

Thanks Wayne, everything you are asking about is absolutely modifiable or can be added easily. You are right about the unit tests from a purest perspective, but we haven’t got to the point yet where we can absolutely undeniably say that the generated code and our solution is right yet. Part of the reason we wanted to get feedback here, was to see if there was an appetite from the community to share what has been learned in the form of a toolkit (rather than sharing contextual-free code samples) :slight_smile:

We use several code-gen patterns, and I tried to illustrate many to you in the video. All generated code is extensible through the use of either partial classes, partial methods or double derived, or some combination thereof where we think you may want to modify or enhance the generated code. Its simply a case of using the right pattern for accommodating what generated code you think people will want to extend using hand crafted code files.

There is nothing set in stone here, and there are few constraints to begin with out of the gate - its just a demo at this point.

Wayne Brantley:

Well, again - it looks really great.

Rudy Scott:

+Wayne Brantley yep yep – good stuff!

Jezz Santos:

See this post https://plus.google.com/112627746644624669199/posts/gc1f3PsWbeH

Wayne Brantley:

Great news, I think this could be great.