Is Codesmith a viable ORM tool (or should I stick with a true ORM)

I am buying an ORM tool. I'm tormented by buying either CodeSmith (which is currently available at a substantial discount) compared to the ORM tool.

LINQ to SQL is disconnected from my list; SubSonic 2.x is off the list (I don’t want to invest in a dead end, knowing that SubSonic 3.0 is suitable. NHibernate seems to be superfluous, like LLBLGEN. I only briefly evaluated EF, but I do not quickly get a warm and fuzzy feeling from it.

Am I going crazy thinking CodeSmith is a rational alternative to ready-made ORM? Will CodeSmith pay for itself in other ways?

Please note that I am in no way affiliated with any sellers, and this is not a cheap shot SO question just for the sake of creating product noise! I am looking for honest tips and opinions about CodeSmith as an ORM tool (with its templates provided or available to the community).

+4
source share
8 answers

In fact, hibernation is a good ORM tool. But he stops!

The capabilities of smith code can be more than just relational mapping staff! I use a code blacksmith to create some forms of user interface, business layers (templates), data access layers, templates, etc. But to work with a code blacksmith, you may need good experience in developing a system or using their templates, which I do not like to use, but I like as an example.

The code smith approach has one particular drawback; you must first design your system based on the database implementation. Currently, in the field of object analysis, people are achieving success in the implementation of business logic and entities immediately before the implementation of the database - they forget about it.

The decision is difficult; I constantly read important names such as Scott W. Ambler, Kent beck, Robert C. Martin and people from the Pragmatic Programmers series who recommend the ORM Tool to speed up development. They said that the developers of the ORM Tool are concerned about all the problems with the database (integration, connection, specification of the database provider, etc.). Therefore, when we have to create data access layers, we must consider all these aspects.

I believe that these ORM tools come with overloaded ones. I do not yet know how these tools will work in low-budget projects (I mean not good hosting servers or any shared resources). I saw how inexperienced developers did not take this into account when trying to preach the gospel to their favorite tools. But in Java projects, hibernate is already a widespread and well-known tool. I have no doubt that large projects were implemented using this technology, but I saw that Java application developers can teach us (.net developers) how to create great solutions. (Sorry, we have to admit.)

The only thing I would recommend is to consider your context. Are you making a new system? Do you need a job in a template? Have you ever tried to consider such a code generator and ORM tools?

I prefer the code smith, because I immediately generate whole solutions, and not just the level of data access. Code generation is very important, and it is equally important that Microsoft imitate the code smith approach in visual studio.net 2008, etc.

Good luck.

+8
source

Code Smith is not an ORM, it is just an IDE code generator.

You can generate DALs using smith code based on your database, but this can lead to the defeat of (one of) the goals of using ORM, which is basically that it generates DALs dynamically, so you don't have to write code.

If you are really trying to compare the two, then perhaps you can get some benefit using the code smith, because you will have absolute control over the code that is generated, but I'm not sure if the benefit eliminates the disadvantage of what could spend months to write smith code templates to create DALs based on your database.

And then you need to think about what happens when you make changes to your database, you will most likely have to run a code blacksmith and build it every time you do it. A good ORM will allow you to configure database changes in the schema, and then it will generate dynamically, so you don’t have to worry (how much) about making changes to the database.

+5
source

NHibernate is the way to go. This is an ORM enterprise. And with FluentNHibernate’s automatic convention-based configuration, the configuration is ridiculously simple if you stick to a single convention (you get to specify conventions or by default).

With NHibernate, your domain objects are pure C # objects. There are no weird base classes. There are no codegenesis files that need to be updated every time you decide to make changes.

+5
source

I use netTiers daily and love it. The documentation sucks for him, but for me it was such a time saver in the office. Many people are confronted with the amount of code that it produces, but from what I saw, the code that it creates is much faster than manual code. It also generates all the sprocs that you will need for your CRUD base material. The access methods that it creates are also quite amazing, thanks to using all of your unique keys, foreign keys, and primary keys.

+3
source

I think using Codesmith is viable. But you should look into the framework that uses it. Net Tiers is an application infrastructure that can be based on knocking out a good DAL.

+2
source

Why would something like LLblgen be redundant? We use it at work, and after some steep learning curve it is very nice :). You should at least give it a try.

I’m not sure if this is related to the amit codes, but this is a code generator, you can roll your own ORM, but since there are already good ones there, I don’t think it is worth the time and effort if you do not want this for training purposes.

0
source

Go with netTiers and .netMVP. NetTiers is a very good DAL, and .netMVP is the framework I just released to support user interface level abstraction. :)

http://community.codesmithtools.com/CodeSmith/m/templates/42499.aspx

0
source

I used LLblgen a few years ago. I hope that what I saw was corrected. We looked at the built-in SQL code that was created and seen to select one row of data with the primary key passed to:

SELECT DISTINCT * FROM TABLE WHERE primark_key_id = @primarykey. 

Really, DISTINCT? I always asked to do prokers instead, but what the project manager knocked down. I'm not sure what time was saved by writing inefficient code.

-2
source

All Articles