Wheres the best place to put common methods


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Thanks  for your replies lads. I think initially I might put Misc stuff into a 'Common' CS file and maybe look at it again down the road.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I'm using the suggested SF architecture of having a Base assembly were I put this kind of stuff. Likely if I had a single assembly project, I'd put this kind of common code in its own folder, with its own namespace. I definitely tend toward using the base assembly approach though, as it makes it easier to share with other projects/solutions.
Les Pinter
Les Pinter
StrataFrame Team Member (73 reputation)StrataFrame Team Member (73 reputation)StrataFrame Team Member (73 reputation)StrataFrame Team Member (73 reputation)StrataFrame Team Member (73 reputation)StrataFrame Team Member (73 reputation)StrataFrame Team Member (73 reputation)StrataFrame Team Member (73 reputation)StrataFrame Team Member (73 reputation)
Group: Forum Members
Posts: 43, Visits: 213
Hi Gerard,

   I'd say that if the methods are all going to be used in a single project, a .cs file in the project would be adequate. That's especially true if you're continually adding more code to the class. I'd only create a separate project and dll if i just wanted to include the dll in all of my projects without the source code.

Les

Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I am uisng c# as main language

I am starting to build up a lot of common methods that will be used across Buisness Objects. e.g. Validating Lookups, Picking out descriptions etc. that will typically need to go out to Database Tables (rather than access internal Buisness Objects)

I have to decide where to put this code....do I just put then all into a common .CS file, Do I create a .DLL separate project... wondering what is the best pracrise here.

Tia.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search