.netTiers
Help Wanted! If you are using .netTiers and find it as invaluable as we do, please consider giving back to the .netTiers team by helping with our effort to fully document .netTiers. To help, simply create an account and you will then be able to edit this wiki.
I started netTiers about a month ago with a view to saving myself sometime during freelance work. Whilst netTiers is an invaluble tool I found some difficulties in getting started with it. My struggle came mainly from a lack of documentation and not know the best way to go about attacking the problem with netTiers. I decided that Id create a crib sheet for all those "newbies" like myself who are struggling to get their project off the ground. This page will cover the basic things you MUST do in order to make netTiers work best for you with a few hints and tips taht Ive found through trial and error. So here we go....

STEP 1: Database - PK/FK

Now although this is mentioned in the other documentation on this site this really REALLY is the key. You firstly MUST properly design the database ina normalised fashion - there no "quick wins" here put the time in, define your Primary and Foreign Keys.

The more information you put in the database the more netTiers has to work with which in turn means the less work you need to do!

Also try to avoid any Object Oriented words as Column names bad choices are

Entity, Object, Key (Also hazardous if you put the word Key on the end of a column), Property

STEP 2: Indexes

OK so I didnt actually "gleen" this from the documentation but through trial and error and I dont think it actually specifically says this anywhere.

IF YOU WANT METHOD LIKE .GetBYXXXXX where XXXX is a column name within your DB you need to put an index on that column. ALSO if youre generating the Web Admin section you need to spread the combo-primary key across both the foreign key tables AND an Id column set to identity otherwise the admin ascx controls wont get a GetById select method which horribly breaks the entire admin back end. So to save yourself a lot of head scratching a re-gen-ing the database layout your m2m relationships as so...

Pseudo code Table 1: Id : Primary Key, Identity SPecification (1,1)

Table 2: Id : Primary Key, Identity SPecification (1,1)

Table 3 (m2m between Table 1 & Table 2) Id : Composite Key, Identity SPecification (1,1) Table1Id: Composite Key, FK Table2Id: Composite Key FK

STEP 3: Syntax

Use PascalCasing starting everything with a Capital Letters including (but not limited to) Database Name, COlumn Names, Table Names, Indexs and stick to it!

STEP 4: Service Model or Domain Model

To get the most out with the leas amount of trouble Id suggest the following default value when generating.

Component Model: Service Layer (true)

STEP 5: Rollout

Try to get 4h database as "finsihed" as humanly possible - Ive not *quite* managed to figure out exactly which files get re-written and which do not however changing column names post geenration seems to cause a lot of problems at which point point it to a clean new directory and re-gen from "nothing" then copy any files back from the old version to the new one. This can be a bit painful and I need to look into a more sensible less "sledge hammer to crack a nut" solution but its the best Ive managed so far and works well.

CONCLUSION

The more changes tot he database you make after generation the more time your going to spend faffing around trying to work out why things dont work as they did before. Try not to build the DB "as you go along" and have a good database with PKs, FKs and Indexs BEFORE you start.

I'll be adding to this from time to time as I find out more but I hope this has helped!









STEP 5: Rollout Procedure?











ScrewTurn Wiki version 2.0.31.