CodeSmith Community
Your Code. Your Way. Faster!

NetTiers, a blackbox? bad idea? cannot give full business functionality? code generation is bad as opposed to hand-coding everything?

Latest post 05-17-2007 9:57 PM by JRich. 3 replies.
  • 04-03-2007 3:50 AM

    • chauey
    • Not Ranked
    • Joined on 11-07-2003
    • Posts 5
    • Points 145

    NetTiers, a blackbox? bad idea? cannot give full business functionality? code generation is bad as opposed to hand-coding everything?

    One of my clients is refusing to pay for code that I've delivered and they had already approved and stated this NetTiers: 

    "The use of net tiers created a black box of functionality that contributed to the learning curve of the system. A black box for the business and data layers is not necessarily a bad thing if designed to give you the expected output based on your input. However, the net tiers layer is automatically generated based on data model. This therefore cannot give you full business functionality. Additionally, any change to the database means that the net tiers layer has to be fully regenerated"

    "NetTiers have been used heavily for creating entities which is very cumbersome to maintain. Code regeneration is needed for any database changes and the build project is not provided with the rest of the code."

    "using NetTiers was a bad idea since the database structure was not so complicated and the resulting mass of code it generated needlessly added another layer of abstraction." (about 35 tables, excluding the Membership Provider tables)

    Anyone care to comment? Know anyone who would care to comment?

    • Post Points: 95
  • 04-03-2007 10:55 AM In reply to

    Re: NetTiers, a blackbox? bad idea? cannot give full business functionality? code generation is bad as opposed to hand-coding everything?

    "The use of net tiers created a black box of functionality that contributed to the learning curve of the system. A black box for the business and data layers is not necessarily a bad thing if designed to give you the expected output based on your input. However, the net tiers layer is automatically generated based on data model. This therefore cannot give you full business functionality. Additionally, any change to the database means that the net tiers layer has to be fully regenerated"

    There is no black box about .netTiers.  They are open source in a familiar ASP.net syntax templates written in c#, the same language as the code's output.  A black box would be a closed source initiative without any ability to change the source output. 

    As for the ability to regenerate, CodeSmith comes with a command line utility which makes extremely simple to automate the regeneration process.  With CodeSmith 4.0, you can regenerate with a simple CodeSMith project from windows explorer, the command line, from within Visual Studio, CodeSmithStudio, or even a build task. 

    It's likely your client is either just making up excuses or does not have the know how to work with an enterprise level application.

    "NetTiers have been used heavily for creating entities which is very cumbersome to maintain. Code regeneration is needed for any database changes and the build project is not provided with the rest of the code."

    You get a class for every entity to customize to your needs.  Really?  Is it that difficult to understand?

    With each generation, netTiers writes out the property set or CodeSmith Project depending on the CodeSmith version being used in the /References directory in the output.  If using a CodeSmith Project, it's as simple as right clicking the file and say Generate Outputs. 

    "using NetTiers was a bad idea since the database structure was not so complicated and the resulting mass of code it generated needlessly added another layer of abstraction." (about 35 tables, excluding the Membership Provider tables)

    I can't stress this enough, .netTiers is *not* for everyone.  Yes, it generates abstractions, but all enterprise level frameworks do.  With flexibility breeds complexity, if you want your architecture to be flexible enough to adapt, then you have to cover up the complexity with some abstractions.  This is commonplace in most frameworks.  Take a look at the indirection used in Castle, or some of the Microsoft Patterns and Practices solutions, like the Web Client Software Factory.
    They are both excellent .Net based solutions, but both of them have more abstraction than .netTiers.


    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 5
  • 04-04-2007 3:26 PM In reply to

    • jcteague
    • Top 10 Contributor
    • Joined on 03-10-2005
    • Austin, Tx
    • Posts 442
    • Points 10,925

    Re: NetTiers, a blackbox? bad idea? cannot give full business functionality? code generation is bad as opposed to hand-coding everything?

    1.  As Robert already stated, there is no black box.  All source code is provided.  Code generation is not absolutely necessary to maintain the system, althought it is definetly much easier to.  Unless you only gave them the dlls generated they it is definitely not a black box implementation.

    2.  Robert already mentioned it, but it bears repeating.  Abstraction (generally) leads to easier understanding (creating a vocabulary to describe the domain), and maintainablity (changes to system occur in api rather than UI.  If you call GetXXX in 5 aspx pages, changing GetXXX once is much easier).

     

    HTH,

    Thanks, John Teague ------------------------------ Member of the .NetTiers team http://www.nettiers.com ------------------------------

    • Post Points: 5
  • 05-17-2007 9:57 PM In reply to

    • JRich
    • Top 150 Contributor
    • Joined on 04-24-2007
    • Posts 30
    • Points 785

    Re: NetTiers, a blackbox? bad idea? cannot give full business functionality? code generation is bad as opposed to hand-coding everything?

    This is an interesting question. Consider the following line of reasoning.

    1. Every application has to implement a data layer of some sort. Doing this by hand, from scratch, is at best a tedious, repetive process, An ADO.NET dll sufficient to access the data store is cobbled together over many days or weeks. Its functionality is typically limited to the bare minimum required to support the application.

    2. Once this custom, one time design is completed, is it likely to be superior to what Net Tiers can provide in 30 minutes? If so, more power to you. But for most of us, the Net Tiers solution is a superior design. And its implementation takes minutes, not weeks.

    3. As far as schema changes to the database. This will have an impact on any data layer implementation. Is it better to bring the programmer back in to spends many hours, if not days extending his original design? With Net Tiers the data layer changes are ready in minutes.

    4. As for Net Tiers being a "black box",  if I could write by hand all of the code created by Net Tiers, would the customer say it was a black box? No, he would say I was a genious.

    The bottom line is, when I leave, I must have provided the code to generate data layer functionality. What difference does it make if that code was hand generated by me over weeks, or generated by CodeSmith in minutes. The customer has the source code, all of it.

    After having used codesmith on my first project for a customer, I can't imagine why any customer would want me to write my own data layer!

    • Post Points: 5
Page 1 of 1 (4 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems