Codesmith Templates Xaml
Fixed a bug where the execute template dialog would allow a user to generate a template that was unable to compile. Fixed a bug where the Template Editor would not receive focus when switching between documents. Fixed a bug where a Generator Project File could be saved with the incorrect file extension if the file name contained a period. CodeSmith Generator is a software development tool to help you get your job done faster. Technically speaking it is a template driven source code generator that automates the creation of common application source code for any language (C#, Java, VB, PHP, ASP.NET, SQL, etc.).
Cosmin Oprea (aka somalezu) 15-Sep-06 2:5315-Sep-06 2:53Hello there,I am wondering. Did you know you can use the ASP.Net parser in your custom, desktop application? Hosting the asp.Net engine in your application is done in 10 lines of code, and then you have 100% CodeSmith compatibility - because I think this is the way Eric Smith 'implemented' his parser as well.I've done this very simple test a few months ago - feel free to contact me at my gmail account (cosmin dot oprea) if you still want to make some Open Source CodeSmith-like generator.Somalezu. Hi Styx,You don't need to change the default behavior of LoadProperties-it's lazy loaded by design. WSRG,Thanks for the input. You certainly contacted me at the right time!
I was actually looking for a way to generate an entire DB schema with TaHoGen, but I couldn't figure out a way to do it just yet. Now, since there's no Open-Source equivalent for CodeSmith's SchemaExplorer, how did you manage to reverse-engineer the DB? Did you write a schema exploration tool yourself?
If it's stable enough for a 1.0 release, I'd certainly consider it to be included as part of the TaHoGen distribution.Oh, and about that @Assembly Src=' attribute. From what I remember about that section of code, I wrote that in one section because the @Assembly directive has two situations in which it is used:1. @Assembly Src=' - This is to compile a source file into an assembly before including it into the references2. @Assembly Name=' - This references an existing assembly and includes it as part of the compilation process.I'll have to take a look at those two instances again and see what's going on.I definitely appreciate the feedback, WSRG!
Codesmith Templates Xaml Download
In your own experience with TaHoGen, have you run into any problems? (I swore I must have tested that thing to death, but user feedback is the ultimate litmus test, heh). Yes, I've been using my schema code for about 2 years now. It works against Microsoft SQL Server, but since I made the architecture 'pluggable' I can write more providers as needed. I started a MySQL provider a while back but the core code was kinda hosed at that time.I really like TaHoGen. NVelocity got me a long way, and i have some cool templates using it, but writing the templates in a native language is better. And theoretically, we can add Python.net or Perl.net in the future.But, I never could get around that assembly loading problem.
I dont know how to explain it better than I did above. I tried several times with/without the hack i made and it only works with the hack.The Assembly token code should load the named assembly into the referenced assemblies collection if there is no src attribute. IMHOKeep in touch. The schema is included in the source which is located on my websiteIn a nutshell, I have the following classes in the DBInspector.DataModel assembly:TableFieldStoredProcedureParam (stored procedure parameter)(a view in SQL server is the same as a table)The Providers (MssqlProvider) will populate these objects based on the database schema. It is this set of objects that I dub my 'schema' and use throughout the templates.Because I have the base class 'BaseProvider' and the structure is all there, I can create a MySQL provider etc at ease. Outside of the provider assembly, none of DBInspector deals with database code, its all done through the DataModel.Regards,Mark.
That won't work either. I tried using IJW in managed C with the boost spirit libraries, and believe me, it was a nightmare. The best compromise was to build it into an ActiveX (aka COM) dll and use Tlbimp.exe to make it useable in.NET. The only way to go pure C# is to either use regex (which is possible, but its harder to debug.and. effectively cripples many features that TaHoGen has over CodeSmith, such as multiple templates in one assembly), or write your own recursive descent ASP.NET parser in C#. Either way, it's not pretty. So far, I don't see any compelling need to make the entire project in C# (including the parser).
It's much easier to just use the existing parser rather than rewrite another one from scratch.However, if you're willing to write one on your own, I certainly won't stop you.-Philip Laureano.