Spontaneous Publicity
blogs are the new phone book

Codesmith 4.0 Feedback and Feature Requests

June 5, 2007 07:10 by Luke
Codesmith is a product that I have considered purchasing multiple times in the past. It seems to be the code generations suite that has the best community built around it and I think that is a very import aspect of any software I purchase. Every time I download the trial of Codesmith, my trial expires before I find a compelling reason to purchase the product. Well, the other day I received a free licence for Codesmith 4.0 professional so I decided to use it on a project I am working on. After spending a couple of days with the product there are many features which I feel are missing or need some improvement. Some of them seem so glaring that I plan on following up with support to make sure I understand the functionality and the documentation correctly. It is also possible that the scenarios that Codesmith is meant to target are just not what I am trying to use it for. It seems that Codesmith is very well suited for walking through database structures and generating stored procedures or some sort of custom data layer, but that is not really what I want to use it for.

Background

First I want to explain what I am attempting to use code generation for. Basically, I am generating an asp.net website based on configuration in a database. I already have a separate app that is used to input the configuration parameters and now I am trying to use Codesmith templates to generate the website. So here is the basic structure of my project: I have created a base class for all the templates which includes some properties and functionality that will be common to all the code templates in this project. I created this class in Visual Studio and so it is in a re-usable dll. I also have other classes in this assembly which are used to hold common configuration parameters and such. I plan on making three template files (.cst) for each aspx page I am generating. One for the code behind(.cs), one for the markup (.aspx), and one "master" template that will call the other two templates. In the end, I will be writing my own client which will use the Codesmith API to run the templates and generate the website.

Visual Studio Integration

With visual studio integration being a feature, I assumed that this would allow you to view, edit, and run your code templates inside of Visual Studio. I was expecting an experience where I can open Visual Studio, choose "New Codesmith Project" or "Add Codesmith template" to an existing project and then begin editing both the .cst file as well as the .cs code behind file. Well, the only visual studio template that is provided is a "Add Codesmith project" which simply adds a Codesmith project (.csp) to your project. This features helps you manage code generation as part of your build process. And when it comes to editing and running your code templates, they still open up in Codesmith Studio which is external to Visual Studio. This wouldn't be so bad except the development experience in Codesmith Studio is nowhere near as nice as Visual Studio. The intellisense only seems to work part of the time, the code formatting is not very configurable, and it just feels a lot more like editing in notepad than it does a development IDE. Reading through the feature request at the Codesmith forums lead me to believe that I am not alone in my frustrations with the Visual Studio integration. I have seen other products do a much better job of leveraging the fact that I am comfortable and much more productive in Visual Studio. Codesmith Studio should only be for developers who do not have Visual Studio.

Assembly References

As I mentioned earlier, I want to use a common assembly to hold some base and utility classes for my templates. There is one problem though, if you want to use any external assemblies, they must be in one of three places:
  • The GAC
  • The Visual Studio PublicAssemblies Folder
  • The Codesmith Addins folder
So this basically means that I have to finish developing my external assemblies BEFORE I begin developing my code templates or I can just copy my assembly manually over to one of the folders above every time I make a new build of it. Well, that may not be so bad except for the fact that the Codesmith Studio holds on to the assembly once you use it in a template so I can't replace it in the file system until I completely close Codesmith Studio. This is annoying to say the least. I do not know how the Codesmith engine works under the hood, but I assume it is doing some sort of build which results in a .Net assembly or something very similar. I think it would be ideal if you could just have a Codesmith visual studio project type which would result in an assembly which could be referenced in other visual studio projects. This would really open up tons of new scenarios for sharing templates across applications as well as with the community. Having the templates in a assembly package would also make using the Codesmith API much easier. Instead of having to point the CodeTemplateCompiler to a .cst file, I would like to be able pass it an instance of a CodeTemplate class which it can then operate on.

Code Behind

I realize intellisense is probably a very hard feature to implement but whenever I use a product has it implemented but it only works sometimes, this almost makes me wish it weren't there at all. If you can't count on a feature, then it is more of an annoyance than a help. The code behind model seems like it is something that was just tacked on to Codesmith and is not really supported all that well. For starters, I can't figure out how to add a .cs code behind file to the Codesmith Explorer window. If I right click, there is not "new C# file" option and if I try to rename another file to a .cs extension it complains that it is not a valid extension. The only way I have been able to add my own code behind files into the Codesmith explorer is to create a blank cs file and move it into the same folder as my template using windows explorer. Then it shows up in the Codesmith explorer. Maybe my experience as an Asp.Net developer pushes me towards the code behind model because it seems that Codesmith templates are more geared towards the inline classic asp type model of coding.

Conclusion

I hope all of this ranting makes you think I hate Codesmith. On the contrary, I think it is a pretty cool product that has a very wide variety of applications. I guess I am just spoiled by Visual Studio. I am a big believer that when you create tools for a development platform like .Net or Visual Studio, you should make things work just like they were always part of the platform. For example, if you are writing APIs, they should conform as closely as possible to the BCL standards as far as naming etc. Codesmith essentially introduces a new file type into my development arsenal: the .cst template file. Having to use these files outside of Visual studio when I am trying to integrate them with a project that is being developed inside of the Visual Studio IDE just feels wrong. I would love to hear from the Codesmith team as to what their plans are beyond version 4.0
Tags:
Categories:
Actions: E-mail | del.icio.us | Permalink | Comments (53) | Comment RSSRSS comment feed

Comments

June 5. 2007 09:31

Eric J. Smith


          Luke,

          Thank you for the feedback.  Here are some comments on your feedback.

          1. Visual Studio Integration, this is a really hard one because the VS editor doesn't support nested languages merged at run-time which is what we are doing since your template and target language could be any combination of languages.  We could bring the editor control we are using into VS, but it's no small undertaking.  In fact, it would be a massive effort and in the end the only difference would be that you could edit your templates in VS.  It's not exactly a big selling point for the huge investment we would have to make into this feature.  The other big problem with this one is that we'd have to maintain two IDE's since we don't want to require that you own VS to use CodeSmith.

          2. IntelliSense is definitely not an easy feature to implement.  We've tried to do a good job, but you are right in that there are too many scenerios that the feature fails.  We will be working to improve on these scenerios in the future.  The biggest thing to keep in mind here is that we are cheating to get IntelliSense by compiling the template and then using reflection.  So if your template doesn't compile or you've added new things to your codebehind file and haven't compiled those changes yet, you will run into issues.

          3. The assembly locking thing is also something that we are planning to address in the future.

          Thanks,
          Eric J. Smith
        

Eric J. Smith

June 5. 2007 09:37

Luke Foust


          Eric,

          Thank you for your reply. It shows what a stand up company you guys are that you respond to customers feedback in such a professional manner.

          Would it help with the Visual Studio Integration if you were to restrict the code to just one language? That is a limitation that we have with all other VS project types and is something that I would gladly live with if it meant better integration.
        

Luke Foust

June 14. 2007 11:36

Phil Bachmann


          Thanks for the insight into CodeSmith, Luke. I am developing a product in this area and it is encouraging to see that that you are frustrated by problems that I have already solved.

          To me these issues are very basic - the real challenge for code generation tools lies in adding value beyond the mere generation of code.

          If you are interested in conducting a serious review I will give you a free licence for my software.  It is due to reach beta at the end of June.

          Check out the developer notes on my website at www.sbutton.com, I'd appreciate your thoughts.
        

Phil Bachmann

July 29. 2010 11:51

ImHosted Review

Thank you for this post, It's fantastic to see another BlogEngine user. Most people these days tend to use other systems like Wordpress, but I think BlogEngine is the better system to use.

ImHosted Review

July 30. 2010 21:52

 computer game

Really good blog. Your links with this are good. We went through all this as well as I really thank you for the advice.

computer game

August 4. 2010 00:51

Free Apple iPad

No need to be gloomy guys, there's still a lot of positives to take.

Free Apple iPad

August 7. 2010 22:55

how to get a girlfriend

I found your blog Monday and started follow your posts religiously. I have not commented on any blog just yet but I was thinking I would love to. It's really exciting to actually contribute to a publication even if it's only a blog. I really don't know exactly what to say other than I really enjoyed reading through 2 of the posts. Nice articles indeed. I sure will keep visiting your blog weekly. I learned quite a bit from you. Thx!

how to get a girlfriend

August 15. 2010 14:41

Major Swentzel

You made some good points there. I did a search on the topic and found most people will agree with your blog.

Major Swentzel

August 16. 2010 05:02

china dropship

Easily, the post is really the sweetest on this worthwhile topic. I fit in with your conclusions and will eagerly look forward to your approaching updates. Saying thanks will not just be sufficient, for the exceptional clarity in your writing. I will immediately grab your rss feed to stay privy of any updates.

china dropship

August 16. 2010 22:30

usb data transfer cable

I’m very interested in your article.

usb data transfer cable

August 17. 2010 23:25

convert video to dvd

Fairly interesting post. Thanks for sharing this great product with us.

convert video to dvd

August 17. 2010 23:27

convert video to dvd

Fairly interesting.Thanks for sharing this great product with us.

convert video to dvd

August 18. 2010 05:19

porter cable battery

You should wite a blog post about a recommendation of websites like Codesmith 4.0 Feedback and Feature Requests. I came across your site two days ago when I was googling, however I am not really into the blog thing. I don't think it's because I do not enjoy blogs, but more than likely due to the fact that I'm a little ignorant to them.  But blogengine is cool.

porter cable battery

August 19. 2010 22:29

Broyhill Furniture

Cheers for this blog post,  it was great to read.

Broyhill Furniture

August 20. 2010 00:51

iphone-accessories

It's crazy this gets written about so little, I'm sure the demand is there.

iphone-accessories

August 20. 2010 00:52

iphone accessories

No need to be gloomy guys, there's still a lot of positives to take.

iphone accessories

August 20. 2010 00:52

garden bridge

Ha, actions speak louder than words.

garden bridge

August 20. 2010 22:16

replica gucci sneakers

<b><a href="http://www.cheapshoes4days.com">Nike Air Max</a></b> was first released by Nike in 1987.
Ever since it <b><a href="http://www.cheapshoes4days.com">Replica Gucci Sneakers</a></b> was first released in the market, the company has been regularly releasing updated models of it with varying <b><a href="http://www.cheapshoes4days.com">Discount Louis Vuitton Clothing</a></b> colors , materials and designs.
his Nike sneaker model  utilizes a great <b><a href="http://www.cheapshoes4days.com">Urban Ed Hardy Clothing</a></b> deal of air cushioning right on its heel part that is seen apparent at the sides of the middle sole <b><a href="www.edhardyhive.com/.../...7_p1.html">Nike Air Max 24-7</a></b> in majority of its releases.

replica gucci sneakers

August 21. 2010 15:20

Weight Loss for Idiots Reviews

I think you may be right in what you have said in this post. Whoever there will be many people will disagree with you.

Weight Loss for Idiots Reviews

August 23. 2010 07:40

jordan shoes

Cosplay costumes   http://www.rolesmagic.com  
Nike shoes      http://www.withinstyles.com
Christmas tree   http://www.decorsell.com
http://www.comfortips.com    mbt shoes
http://www.ugg-boots-4s.com      ugg boots

jordan shoes

August 23. 2010 09:16

Christian Louboutin handbags

Gucci handbags              http://www.bagagains.com
Ed hardy                   http://www.road-designs.com  
ugg boots uk                http://www.ugg-boots-nk.com
ugg outlet                  http://www.ugg-boots-ou.com
Christian Louboutin handbags   http://www.luxuport.com/

Christian Louboutin handbags

August 25. 2010 03:58

NFL Football Jerseys

If I speak in the Cheap Authentic NFL Jerseys tongues of men and of angels, but have not love, I am only a resounding gong or a clanging cymbal. If I have the gift of prophecy and can fathom all mysteries and all Official NFL Jerseys knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. If I give all I possess to the poor and surrender my USA Jerseys Shop body to the flames,but have not love, I gain nothing.Love is patient, NFL Jerseys love is kind. It does not envy, it does not boast, it is not proud. It is not rude, it is not self-seeking, it is not easily angered, it NHL Jerseys keeps no record of wrongs. Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always MLB Jerseys hopes, always perseveres.Love never NHL Hockey Jerseys fails. But where there are prophecies, they will cease; where there are tongues, they will be stilled; where there is knowledge, it will pass away. For we know in part and we prophesy in MLB Baseball Jerseys part, but when perfection comes, the imperfect disappea. When I was a child, I talked like a child, I thought like a child, I reasoned like a child. When I became NBA Basketball Jerseys man, I put childish ways behind me. Now we see but a poor reflection as in a mirror; then we shall see face to face. Now I know in part; then I shall know fully, even as I am fully known.And now these three remain: faith, hope and NFL Football Jerseys love. But the greatest of these is love. http://www.jersey-usa.com/sitemap.html LIJ

NFL Football Jerseys

August 27. 2010 12:26

botkier satchel

Wow! I have to say, your blog has to be one of the best written blogs that I have read in a long time.What I wouldn't give to be able to create posts that are as interesting| as yours. I guess I'll have to keep reading your articles and hope that some day I can write on a topic with as much knowledge as you have! Bravo!!

botkier satchel

August 27. 2010 23:22

Kori Busico

do you have an rss feed? I want to add it to my reader but I can't find it...

Kori Busico

August 29. 2010 00:38

seduction affiliates

hey, with so many comments you should add an affiliate program to your blog and make some money...

seduction affiliates

August 29. 2010 20:58

new driver sign

Congratulations for posting such a useful blog. Your blog isn't only informative but also extremely artistic too. There usually are extremely couple of individuals who can write not so easy articles that creatively. Keep up the good writing !!

new driver sign

August 30. 2010 13:00

Jannie Susa

Great website, keeping me from working

Jannie Susa

August 30. 2010 18:42

bail baltimore

Thanks for sharing this very good write-up. Very interesting ideas! (as always, btw)

bail baltimore

August 30. 2010 20:55

Treasa Kasky

are you using a custom template?

Treasa Kasky

August 30. 2010 21:44

joke

nice blog! keep the good work!

joke

August 30. 2010 21:50

Jamel Ealy

HO YA this subject this subject this subjectI have been browsingonline just above 3 hours today, in spite of that I by no means found any attractive piece similar to yours about this subject It really is pretty worth enough for me. In my view, if all website owners and bloggers made high-quality content as you did, the internet is going to be a lot more practical than ever before.

Jamel Ealy

August 30. 2010 23:17

dating tips

great blog! I too have one ob dating and seduction tips for guys...

dating tips

August 31. 2010 00:06

payroll company

Great write-up, I am a big believer in commenting on blogs and forums to inform the blog writers know that they’ve added some thing worthwhile to the world wide web!

payroll company

August 31. 2010 17:43

dating blog

good work! keep posting more. I have a dating blog too but it's not so popular like yours..

dating blog

August 31. 2010 20:30

garmin refurbished

I am really not too familiar with this subject but I do like to visit blogs for layout ideas and interesting topics. You actually expanded upon a subject that I usually don't care much about and made it very interesting. This is a memorable blog that I will take note of. I already bookmarked it for future reference. Have a great day

garmin refurbished

September 1. 2010 01:18

typing tutor online

I enjoyed reading your post! Learn to type faster with typing tutor online.

typing tutor online

September 1. 2010 03:04

Petunia Picklebottom

Many thanks for sharing this excellent piece. Very interesting ideas! (as always, btw)

Petunia Picklebottom

September 1. 2010 20:42

typing tutor online

Nice job! Looking for a typing tutor online? Check out my website.

typing tutor online

September 2. 2010 04:00

ETF newsletters

it will be great if you post more...

ETF newsletters

September 2. 2010 16:50

Jason Shakin

great blog! keep up the great work!

Jason Shakin

September 2. 2010 21:49

cheap nfl jerseys

there usually are extremely couple of individuals who can write not so easy articles that creatively.

cheap nfl jerseys

September 3. 2010 02:13

ETF newsletter

any plan to update this blog?

ETF newsletter

September 3. 2010 10:24

gift ideas

try to change your template, there are some great ones...

gift ideas

September 3. 2010 21:32

mixed wrestling

OMG! I have to say, your blog has to be one of the most well written blogs that I have viewed in a long time.What I wouldn't give to be able to create posts that are as mind grabing| as yours. I guess I'll have to keep reading yours and pray that some day I can write on a subject with as much knowledge as you have! Bravo!!

mixed wrestling

September 4. 2010 05:35

krankenversicherung zusatzversicherung

It becomes obvious that there is far more to know about it as I expected. I like to stress that you  made some good points in your post.

krankenversicherung zusatzversicherung

September 4. 2010 16:49

seduction

how old is this post?

seduction

September 5. 2010 07:42

Melatonin

It's the little things that matter, that's what I believe.

Melatonin

September 6. 2010 03:06

ETF

just bookmarked your blog...

ETF

September 6. 2010 23:03

saint helena california restaurants

We are currently being held prisoner by the Itallian mafia -xmas, christmas, santa- and being beaten to post spam comments on comment boxes! If you will not approve this they will torture me. -jingle bells, christmas music- They are coming back soon. -one horse open sleigh, christmas gifts, christmas music- Please call someone! -xmas jokes, christmas morning, christmas carol- Smile but seriously, just trying to make a buck and help others in the process. Help me help you and your audience by taking a gander at a great way to get paid for taking online surveys and make a few bucks for this upcoming Christmas season. Hope this one was at least a bit entertaining. Original credit to a much more original marketer than myself.<a href="3f722yp4-dqi3z4bp6szw-bv9r.hop.clickbank.net/ target="_top">It really helped me out!</a>

saint helena california restaurants

September 7. 2010 02:47

electronic cigarette

I don't completely agree, but the principle is right, and you're heart is in the right place.

electronic cigarette

September 7. 2010 04:25

Carpet Cleaning Philadelphia

Im grateful for the blog post.Really looking forward to read more. Will read on...

Carpet Cleaning Philadelphia

September 7. 2010 23:43

Hermes Birkin

Money can`t buy Happiness?Whoever said that doesn`t know where to buy.
No matter it is the classic Birkin bag, or the Kelly and Lindy bag,
http://www.buyhermesbirkin.com/

Hermes Birkin

September 9. 2010 09:43

Walter

sagabindara salutes you all out there

Walter

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading