This project has moved. For the latest updates, please go here.

VB.Net Output

Developer
Sep 21, 2013 at 5:54 PM
Back in October/November 2010 I started to look at the conversion from C# to VB.Net and had some discussions with tiago.
See:
https://cslagenfork.codeplex.com/discussions/234428
https://cslagenfork.codeplex.com/discussions/229822

Unfortunately due to family commitments and illnesses within the family I was unable to to really get started.

If you look back to the discussions in Oct/Nov 2010 you will see that the decision was made to start from scratch with the latest templates rather than try and update the original VB .Net templates as too much had changed.
I was also thought to be a good idea to only translate the output and to leave the codesmith code in C#.
I still think that is the best way to go as it will be easier going forward to identify further changes to the codesmith code.
Also as neither I nor tiago had a full version of codesmith (tiago said he used notepad++ for editing), to enable easier editing the codesmith templates where renamed to *.asp so that they could be edited in VS which would think they were asp code and give some highlighting.

There is still a lot of hand coding to do to get CSLAGEnFork to output for VB.Net but I do think it is a very good idea.
I am wiling to help and again have more time to devote to the task.
If there were 2 or 3 people willing to help then we could share out the codesmith code and get started.
My preference would still be to leave the codesmith code as C# and convert the output code to VB.Net to make further updating easier.

We will need help from tiago to identify the code with CSLAGenFork that outputs C# code rather than the C# code being output from the templates.
e.g. tiago told me there is CslaTemplateHelperAdded.cs and so there would need to be VBCslaTemplateHelperAdded.cs that outputted the VB.Net equivalent.
I would think there are other routines that would need VB equivalents and tiago would be the best person to identify them.
Sep 22, 2013 at 7:31 AM
Glad you are back Blarm.

I have some experience on modding templates, and i am willing to help out however i can. I d rather you and tiago lead the effort, cause you seem to know what you are doing :)
Sep 23, 2013 at 1:02 PM
Hi Guys,

I have done a bunch of work converting the templates to VB including fixing the code in CslaTemplateHelperVB.cs. These templates were against Tiago's build from March 2012, so I'm not sure how much he changed in the March 2013 release, but I think they are a good starting point. I've used them successfully to bring my app up to CSLA 4.x from 3.8. The only stuff I didn't really touch were the CSLA40DAL templates, as my needs revolved around using regular ADO.NET code. If you want me to email you what I have, just let me know. I spent a fair amount of time working on these, so if I can help you avoid reinventing the wheel I will.
Coordinator
Sep 23, 2013 at 9:49 PM
Edited Sep 23, 2013 at 9:50 PM
Hi guys,

I'm happy to see things happening. It seems you don't need my colaboration. That is quite convenient as I'm back in Angola and have been working like crazy. As far as I can see, Mike Tavares used the same approached proposed by Bill Larman - write the templates for VB using C#, since all the logic in the templates is already in C#

So with a little help from Pandelaras, I think you will see the task through.

I think you will need developer access in order to make your life (and mine) easier.

Best wishes for your work.
Tiago Freitas Leal
Coordinator
Sep 23, 2013 at 9:56 PM
Concerning developer access, please decide how you want to organize yourselves. All 3 have public contacts on Codeplex, so I suggest you start by using a Codeplex contact to share email details. Then Mike Tavares can send you the results he got so far. Don't forget his efforts were made 1 year ago and a lot has changed. So I guess his templates may crash "a bit". My bad as I make a lot of changes :)

Please use the forum to coordinate so I can follow the progress.

Happy templating!

Tiago
Developer
Sep 24, 2013 at 4:00 PM
Mike, did you us the approach of keeping the codesmith code in C# and changing the output to be VB.Net.
If so what was the CSLAGenFork changeset that you started from.
I would be good to get that changeset and compare it with the latest CSLAGenFork to see how much has been changed by Tiago.
I will send you and pandalares my email. Can you send us your code to have a look at.

I will not be available much until next week as my wife is moving house over the weekend.
I will be following her in about 3 weeks, so in the meantime will have some evenings to do some coding without being nagged to get off of the computer.

Bill
Sep 24, 2013 at 7:03 PM
I did use the method of using C# code to output the VB.NET templates. I just sent you the templates with the helper file to your email address.
The CSLAGenFork changeset that I used was 13169 from back in April 2012. Just let me know if you have any questions and I will do my best to help.

Mike
Developer
Sep 24, 2013 at 9:01 PM
Mike, I did not get the email.

Maybe I misspelled my email address in the message I sent.
I will send another message.
Developer
Sep 25, 2013 at 9:47 AM
Tiago,

This maybe a silly question, but I just want to make sure I understand the templates correctly:
Are the CSLA40 and CSLA40DAL templates separate or is one of them the latest version and the code output depends on the flags chosen in Project Properties->Generation->Target->Data Access Layer:(Use DTO (instead of Data Reader, Generate DAL Interface, Generate DAL).

That is: Do we need to create CSLA40 VB templates and when finished then create CSLA40DAL VB templates.
Coordinator
Sep 26, 2013 at 6:51 AM
Blarm wrote:
Are the CSLA40 and CSLA40DAL templates separate or is one of them the latest version and the code output depends on the flags chosen in Project Properties->Generation->Target->Data Access Layer:(Use DTO (instead of Data Reader, Generate DAL Interface, Generate DAL).

That is: Do we need to create CSLA40 VB templates and when finished then create CSLA40DAL VB templates.
The CSLA40 and CSLA40DAL are used according to the chosen project ouput you select on the UI. This means some templates are exactly the same.
Coordinator
Mar 27, 2014 at 9:55 PM
The VB templates for generation of non DAL projects were published today.
Thanks to Michael Tavares, Bill Larman and Pandelis Boyiazis.