I have a data warehouse containing typical star schemas, and a whole bunch of code which does stuff like this (obviously a lot bigger, but this is illustrative):
SELECT cdim.x
,SUM(fact.y) AS y
,dim.z
FROM fact
INNER JOIN conformed_dim AS cdim
ON cdim.cdim_dim_id = fact.cdim_dim_id
INNER JOIN nonconformed_dim AS dim
ON d...
I am working a project where I need to generate a series of classes to represent/access data in the database. Third party projects such as hibernate or subsonic are not an option. I am new in this subject domain, so I am looking for information on the topic. The project is in .net and I am using MyGeneration. I am primarily looking for i...
Do code generation tools do more than create CRUD?
e.g.
Say I have a User's table, a code generation tool would then create:
The class
the CRUD:
Update/Insert/GetByID/GetAll/Delete
Stored procedures for #2
What other things can/do they generally create?
...
I have a set of XSDs from which I generate data access classes, stored procedures and more.
What I don't have is a way to generate database table from these - is there a tool that will generate the DDL statements for me?
This is not the same as Create DB table from dataset table, as I do not have dataset tables, but XSDs.
...
Do you use code-generation tools (aside from those used to generate proxies and from designers built-in to visual studio)?
What part(s) of your application do you generate?
Do you typically roll your own generator? If so, what type of generator do you write (asp templates, coddom etc.). If not, what 3rd party tools do you use?
I am ...
Summary for the impatient: I'm searching for good references on generating code for common language constructs but not parsing.
I am interested in programming languages and try to read the literature as much as possible. But most of them covers the topic in a functional and theoretical perspective that, I find them hard to understand le...
I'm an expert C# 3 / .NET 3.5 programmer looking to start doing some runtime codegen using System.Reflection.Emit.DynamicMethod. I'd love to move up to the next level by becoming intimately familiar with IL.
Any pointers (pun intended)?
...
We use the DesignSurface and all that good IDesignerHost goodness in our own designer. The designed forms are then persisted in our own bespoke format and all that works great. WE also want to export the forms to a text-based format (which we've done as it isn't that difficult).
However, we also want to import that text back into a docu...
I have the dragon book and Modern Compiler Implementation in ML. I'm looking for other good resources on code generation in a compiler. Can you recommend any?
...
When creating a new file with vim, I would like to automatically add some skeleton code.
For example, when creating a new xml file, I would like to add the first line:
<?xml version="1.0"?>
Or when creating an html file, I would like to add:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/...
Is there any way that I can change how a Literal of a code snippet renders when it is used in the code that the snippet generates?
Specifically I'd like to know if I can have a literal called say, $PropertyName$ and then get the snippet engine to render "_$PropertyName$ where the first character is made lowercase.
I can't afford R#. P...
I'm doing some PHP work recently, and in all the code I've seen, people tend to use few methods. (They also tend to use few variables, but that's another issue.) I was wondering why this is, and I found this note "A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. ...
Hi,
What code generation tools are built-in to vs.net 2008 or are officially available via Microsoft?
I know of:
Entity Framework
sqlmetal
What else is there?
Ideally i'm looking for something that will generate from an existing database schema.
...
In Visual Studio if I define a class to implement an interface e.g.
class MyObject : ISerializable {}
I am able to right click on ISerializable, select "Implement Interface" from the context menu and see the appropriate methods appear in my class definition.
class MyObject : ISerializable {
#region ISerializable Members
publi...
I am using MyGeneration 1.3.0.3 with the Xsd3b plugin. I am trying to generate some CSLA 3.5 C# classes from an Xsd3b XML file that I extracted from my SQL Server database. The template language exposes a number of fileds for each column, including a DbTargetType and a LanguageType. My problem is that the DbTargetType and LanguageType ...
I am performing a lot of JavaScript work in the browser and would like to have some of that backend functionality in the front-end. Specifically, it would be nice to have the functions get(), save(), all() and count() available to the client. Additionally, it would be great to have the field list of the model already available in the gen...
I use MyGeneration along with nHibernate to create the basic POCO objects and XML mapping files. I have heard some people say they think code generators are not a good idea. What is the current best thinking? Is it just that code generation is bad when it generates thousands of lines of not understandable code?
...
Is it possible with Axis2 and Eclipse to generate a Web Service client and have it use java types that you already have in packages instead of creating it's own types. Reason being of course if I have type A already created and it creates it's own Type A I can't just assign variable of type A to variable of type B.
The wsdl is being ge...
I'm working on a project which makes substantial use of code generation. Some of the files it generates contain >0.25 million lines of code. VS (2K5) doesn't cope too badly, but R# (4.01) throws an out of memory exception every two minutes or so.
Splitting them out into partial classes/separate files isn't an option in the immediate ter...
I managed to create a class using CodeDom and add a single method to that class. Now, is there a way to, having constructed the CodeCompileUnit instance, compile the code and invoke the generated method? The method invocation has to be done in the same context as the code generation.
...