Using Namespaces with strataframe BOs?


Author
Message
Jason Seidell
Jason Seidell
StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)
Group: Forum Members
Posts: 59, Visits: 180
We use namespaces/libraries for all our BO's, however we just create a seperate library project for each set of BOs and then just set the namespace through the Project properties which will apply to all the BOs in that project.  Then your BO's are just a reference away from being ready for any other project you have.

Jason Seidell

Programmer/Analyst

Infinedi

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I use namespaces to organize my BOs and it works great. Just edit the BO .vb and .designer files with your namespace once and your good to go.
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
No problem at all...I apprecate your contributions out here on the forum and you are right on the money for the rest of the designer file.  But this is something that we specifically took into account.
Guillermo Vilas
Guillermo Vilas
StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 2.3K
Thanks Trent,

I´ve always been told not to stick on assumptions (I hope this is correct in English). And I did by assuming the BO mapper will overwrite the entire designer file. Though I´ll test it too. BigGrin

------------------------------------------------------------------------
I would like to change the world, but they don´t give me the source code.
MS Windows 7 Ultimate 64-Bit
Intel(R) Core(TM)2 Quad CPU Q9300 2.50 GHz
6.00 GB of RAM, NVIDIA GeForce 9800 GT

MacBook Pro i5 OSX Lion
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Actually the Namespace will be left alone once it has been added or changed within the *.vb and *.designer.vb file.  Based on this post I went and re-verified this since I was confused as to what you were posting.

If you open up a BO and add a namespace to both the .vb and the partial class (.designer.vb), the namespaces will stick, even after a partial class rebuild.  I have tested this and I know that we have a lot of developers that have this as a requirement within their shops and use this logic on extremely large environments, so I am very confident that this works.

CustomersBO.vb

CustomersBO.Designer.vb

If this is how the BOs are structured, then you go in and rebuild the partials, the namespace will be left intact.

Guillermo Vilas
Guillermo Vilas
StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)
Group: StrataFrame Users
Posts: 112, Visits: 2.3K
Hello Jiri

I think this won´t be possible since the BO mapper overwrites the class designer (Designer.vb or Designer.cs) file every time you rebuild the mapped classes. The best way I can work around is doing one of these:



1) Setup the Root Namespace at Project property level for the entire BO dll

2) Creating a stand alone BO dll for each Business Logic: eg. YourCompany.YourProduct.BO.Sales.dll, YourCompany,YourProduct.BO.Inventory etc...

3) Wait until you are sure you wont need to map the classes anymore (at least for production release) and apply your namespace manually.



Hope this help and I´m pretty sure the experts will add comments too. Smile

------------------------------------------------------------------------
I would like to change the world, but they don´t give me the source code.
MS Windows 7 Ultimate 64-Bit
Intel(R) Core(TM)2 Quad CPU Q9300 2.50 GHz
6.00 GB of RAM, NVIDIA GeForce 9800 GT

MacBook Pro i5 OSX Lion
Jiri Brazda
Jiri Brazda
StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)
Group: StrataFrame Users
Posts: 78, Visits: 356
Hi

I need to organize my BOs in several namespaces. However it seems that it is not possible with Strataframe. When I manually update *.vb and *.Designer.vb files it works but when I rebuild classes with Business Object Mapper, the *.Designer.vb file lost the information about namespace...

I understand that Designer files are generated automatically but I didn't find any other method how to use namespaces.

Is there any correct way how to do it?

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