code-generation

Code / template generator for Java

For C#, I have often used CodeSmith and lately the T4 generator which is part of Visual Studio. I'm looking for something similar for Java, in particular an Eclipse add-in since I do all my Java development using the Eclipse IDE. ...

Is there a way in .Net to programatically generate a DTD from an existing XML file?

I've been looking around the System.Xml namespace, but don't see anything that would support this. Does anyone know if it's built into .Net, or would I have to obtain a third party library to do it? NOTE: I wish it were as simple as generating an xsd, but that won't do for my specific situation. ...

Indenting for code-generation

Often, programmers write code that generates other code. (The technical term is metaprogramming, but it is more common than merely cross-compilers; think about every PHP web-page that generates HTML or every XSLT file.) One area I find challenging is coming up with techniques to ensure that both the hand-written source file, and the co...

For those of you using SubSonic, what kind of performance are you seeing in large applications?

I've used SubSonic in a few POC projects, but nothing large. It's so easy to use, and it's possible to abstract away the fact that it uses the active record pattern (can move it toward a more domain driven approach). Has anyone on here used SubSonic on larger applications, and what kind of performance did you witness? Was your experienc...

How do I determine if a column is in the primary key of its table? (SQL Server)

I am currently using... select Table_Name, Column_name, data_type, is_Nullable from information_Schema.Columns ...to determine information about columns in a given database for the purposes of generating a DataAccess Layer. From where can I retrieve information about if these columns are participants in the primary key of their table...

Graphically laying out wx app

Being really new to wx, I'm wondering if there is an IDE (especially for Linux) which would help me lay out a frame or dialog or whatever just to help me see what I'm doing. That means also creating the code for those changes. I remember way back when using resource compilers for OS/2 and Windows that produced binaries that would then ...

How to check for the presence of an OrderBy in a ObjectQuery<T> expression tree

I'm using t4 for generating repositories for LINQ to Entities entities. The repository contains (amongst other things) a List method suitable for paging. The documentation for Supported and Unsupported Methods does not mention it, but you can't "call" Skip on a unordered IQueryable. It will raise the following exception: System.Not...

Is there an application to generate Winform Code?

I need a simple app to edit database tables. Are there any code generators that will generate winforms in c#? I have CodeSmith, are there any templates around that would help in doing this? ...

What is scaffolding? Is it a term for a particular platform?

Scaffolding, what is it? Is it a Rails-only thing? ...

Web Design Tool for Web Developer

I would like to see if there is such a tool that allows reusable web template with components like menu and form easily applied. Basically I want to mock a very simple interface using html, to see if the navigation is working, then generate a pure XHTML/CSS for me to use on my web projects. For your information, I use Ruby on Rails. H...

MyProject.MyClass - vb.NET custom controls

In a Visual Basic project, I created a homemade TabControl in order to fix a visual bug. The control works properly, however whenever I modify the form using my tab, Visual Studio adds MyProject in front of the control in its declaration: Me.tabMenu = New MyProject.MyClass 'Gives a BC30002 compile error If I remove the MyProject., th...

Gentle introduction to JIT and dynamic compilation / code generation.

The deceptively simple foundation of dynamic code generation within a C/C++ framework has already been covered in another question. Are there any gentle introductions into topic with code examples? My eyes are starting to bleed staring at highly intricate open source JIT compilers when my needs are much more modest. Are there good te...

Is there a perfect code generation tool to generate MVC Storefront?

Does anybody know a good code generation tool (other than Subsonic because it doesn't support IQueryable in current version) to generate repository and other projects in a way Rob Conery worked in MVC Storefront? ...

Is it possible to modify a method body at run-time in .NET?

I know that it is possible (in theory) to create a new type at run-time, but is it possible to modify a method body of an existing type at run-time? My plan (if I can get this to work) is to tag up methods with a custom attribute, and then at run-time search for methods with the attribute, and insert some of my own code into the method b...

Visual Studio Macro - Code Gen Language

I am writing a macro for Visual studio that will generate some code. I would like for the macro to generate for both C# and VB, is there a way to determine what language is being used in the active (current) document? ...

Language Wizards considered harmful?

Wizards can kick-start features. They can also obfuscate your code, and are anti-YAGNI. On balance, do you think Wizards are more useful or more harmful? ...

Code generators or ORMs?

What do you suggest for Data Access layer? Using ORMs like Entity Framework and Hibernate OR Code Generators like Subsonic, .netTiers, T4, etc.? ...

Generate classes from XSD

You are doing contract first development of web services in a SOA world. After editing an XSD file, what is the best way to automatically (re)generate .net classes from the XSD files? ...

How can I see the machine code generated by v8?

Does anybody know how I can see the actual machine code that v8 generates from Javascript? I've gotten as far as Script::Compile() in src/api.cc but I can't figure out where to go from there. ...

Free NHibernate helper tools?

Are there any free tools to help simplify working with an NHibernate project in .NET 3.5? Primarily, I'm looking for some kind of code and config file generator to automate some of the more tedious parts of working with NHibernate. ...