.netTiers + Codesmith VS Entity Framework .Net C#
Asked Answered
A

1

6

I have question about pros and cons what should I mention when I compare netTiers (with codesmith) and Entity Framework

This question was asked many times around netTiers (with codesmith) and all topics that I have found are very old, older then time when Entity Framework got so popular probably.

I am actually very comfortable with Entity framework (not proficient, but I like it and I use it a lot) and am not very close to netTiers (with codesmith), that's why I want to know what to decide when I see netTiers in complex project. One option is to stay and handle all problems face to face that I assume that it takes enormous amount of time. Another - to use already managed and pre-designed fancy utilities from Microsoft (that's how beautiful entity framework seems to appear to me, after I spent few days with netTiers).

Apul answered 6/2, 2019 at 13:45 Comment(3)
Use EF - you already gave many reasons not to use NettiersKeavy
I need pros and cons to analyze, if it worth to implement, because implementation of different technology in old project causes also lot's of work.Apul
You got an “up” because new generation needs knows netTiers!!Citify
I
7

Comfort level is a big one, if you are the primary developer, and you like Entity Framework then that is a very big reason to stick with it. However, in your case, it sounds like you are coming in to a new environment that is using netTiers, you prefer EF, and you want an excuse to switch to your favorite framework.

I have used both frameworks, and I started using both of them about the same time. In my opinion they both have areas they shine in.

EF is better for small projects, it is primarily used for a code first approach and shines in allowing the application to upgrade the database as new versions of the app are rolled out. However, it also promotes poor sql query generation using linq-to-sql and consequently tends to have a lower overall data throughput then netTiers. If the developer has little direct database experience, or has no direct management access to the database, then EF will likely be a more attractive option for them as it will allow them to take back a little control.

netTiers shines in reducing code writing and maintenance. Unlike EF it only supports a database first approach. netTiers auto generates the entire DAL for you, and keeps it updated at the click of a generation button. It works better for larger projects, particularly web projects where you have full control over the hosted database and can easily push upgrades to it. netTiers Achilles heel is the CodeSmith config used to generate the DAL. This config probably needs to be kept in source control, because if it is ever lost and was highly customized, then it can be very difficult to re-create that so your DAL is generated the same way the next time you push the button (this can be an issue during developer turnover). netTiers also allows you to see all the DAL code, and debug as needed, whereas EF is just a dll you are stuck with.

Historically, netTiers was developed before EF really became a viable framework. It was developed to solve an issue that really had not yet been addressed. Since that time EF has really grown up and in many areas has surpassed netTiers, which has caused netTiers popularity to plummet. EF is far more configurable and flexible than netTiers. However, EF has never been able to touch netTiers in the area of code generation, and takes a lot more work to ensure it stays on par with netTiers in data throughput.

I have seen apps where developers have manually modified DAL code, which breaks the power of netTiers to reduce coding time by auto generating the DAL. As long as you are not stuck in that situation and you already have a solid netTiers setup, then trying to rip it out and convert over to EF would probably be a waste of effort.

Inapprehensible answered 6/2, 2019 at 16:6 Comment(4)
Thank you for your answer. It was really informative.Apul
I'm still using netTiers and have been able to create TList and List object with it and use the handy linq occassionally. I've used EF in a MVC project, and I used database first model, it was much more finicky. Anytime I modified a stored procedure or adding a field to a table, it would not override the previous version in the EF objects and a new field for example would not appear so I always had to create another SP so the DB first would pick it up and be usable in the code. My only concern with netTiers last commit was 2015.Eudo
Good to know about those challenges in EF. The latest commit to nettiers was actually middle of last year. So May 2020.Inapprehensible
I agree with you! I love netTiers! But…, unfortunately the framework is based in free open source code that a company wants to gets all. Definitely, neyTlers is a framework that offers to you a big support to data layers…, base inclusive on Microsoft’s libraries. netTiers is a framework for every developer.Citify

© 2022 - 2024 — McMap. All rights reserved.