|
I have a project that contains around 6 libraries at the moment and a business objects library and a data layer library.
My question is one of
Which is considered the better way to go forward
1. Common Business object library?
2. the relevant business objects in the library? i.e. in a client library have the client and client history business objects
Thanks
Simon
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
My opinion is that it's better to have a common objects library. Maintenance becomes easier, and it's much easier to toss objects back and forth when every library has the same classes to work with.
You'll thank yourself for sharing a common library because it's almost like your own Base Class Library.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Thanks Richard,
that is the approach I have at the moment but wasn't sure it was the best approach hence I asked for opinions.
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
There are pros and cons to both these approaches.
Having a common library helps you with maintenance and sharing during development.
Individual libraries will help you if your app supports various editions, you need to ship only those libraries that are required for the edition to work.
|
|
|
|
|
That is the approach I have, but had one of the "is there a better approach" moments
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Hi All,
I have an entity framework call where it is going in to infinite loop. Can anybody please help me in resolving it and making this call to execute only one.
The persist method is being called here for many times so at last it is throwing exception
Following is the code
using (TransactionScope transactionScope = new TransactionScope(TransactionScopeOption.Required,
new TransactionOptions() { IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted }))
{
controllerContext.PersistEvents.Clear();
Persist(businessObject, context, controllerContext);
transactionScope.Complete();
}
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
I don't see where this has anything to do with EF, other than what I presume is an ObjectContext. What does the Persist method do? Does it call here recursively?
No comment
|
|
|
|
|
By any chance, is the Persist method the same one that contains this code or is it higher up the stack trace and results in this routine being called?
|
|
|
|
|
Hey,
in my excel plugin , i have dynamically generated the OLEOBJECTS Textbox ..
when i click on them to write something . THEY opens up the
Private Sub cmdActionTxt0_Change()
End Sub
VBA editor
i do not want it to be opened and simply want to write over them.
How is that possible
|
|
|
|
|
Hi every
I have two questions
First whats the meaning of "reference" in .net ?
public partial class MyForm : Form
{
...
...
public MyForm getForm()
{
return this;
}
}
and second
When this method is called, a reference, this , is returned to the calling method. could you explain it for me?
thanks
|
|
|
|
|
Neither question has anything specifically to with .NET, they are more to do with the language structure. See here[^] for the definition of reference types; there is also a simpler description in Charles Petzold's excellent .NET Book Zero[^]. The this name is merely an alias for the current object.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
A reference could be though of as a pointer to a memory location.
this is a reference to the object itself.
|
|
|
|
|
Hello,
I am writing an application that perform image acquisition frome a camera.
The image aqcuisition is done by a DLL Supplied by the camera manufactorer.
Basicaly im initializing the DLL and then i start capture,in my application i defened a function that is called by the DLL every captured frame,this "OnFrameCapturedHandler" function gets the frame as the parameter.
Then i perform some calculation on the frame and i display it on the GUI.
But the problem is that the grabbing is faster then my calculation so what happens is that a new frame comes in while the previous is still processed.So what i need is some way to block or to make "OnFrameCapturedHandler" not to do anything while previos frame is Processed.
I tried to put boolean at the begining of "OnFrameCapturedHandler" and set it to false while still processing and at the end set it to true.
And before entering the "OnFrameCapturedHandler" check it.but it freezes my app.
???
Thnaks.
|
|
|
|
|
Sounds like you are doing the processing on the primary (UI) thread. Move the calculation into a background thread, and Invoke the resulting image back to the UI thread.
|
|
|
|
|
Hey,
Sorry i posted the question in a wrong place im writing the app using MFC.
But still the calulation is done on other thread not the UI(main).
I think its done on the same as the DLL that perform the grabbing
|
|
|
|
|
Just because something is in a DLL doesn't mean it's necessarily in a different thread. Unless you specifically spin off a thread - or know that the DLL does this, then the chances are that it's done on the UI thread. The simple fact here is that the UI freezing is an indication that it's being locked by the processing.
|
|
|
|
|
Excellent point Pete... exported functions are usually on the same exact thread as the calling thread. Unless you intentionally thread that off (task it to another thread).
|
|
|
|
|
As Pete has already pointed out, your processing code is being run on the UI thread that "holds up" the application from refreshing the UI. You should move your processing code to a new thread and send the result back to the main thread when it's done. You may also want to consider processing each frame in a new thread and displaying the results in a new window.
|
|
|
|
|
Hi,
I often bring my program in development from home to office.
Each time I have to adjust the directories in the property page of the program.
Is it possible to know in wich file are stored these properties?
Perhaps an application can permit to move code from home to office?
Thanks,
Claude
|
|
|
|
|
If you are using C#, the. csproj file keeps the location of the code files. The .sln file holds references to the actual project files.
|
|
|
|
|
If you copy the full source code via a USB, you should really not need to adjust the directories.
Just keep the same folder structure on both machines.
|
|
|
|
|
Not exactly sure what properties he's referring to... but you're right... if you copy the whole thing, it should work.
|
|
|
|
|
You can move your project in any location you like, just copy the project folder and paste it anywhere on anew computer. this will seems to work. Maybe you are experiencing error on referenced components/assembly make sure if you use an assembly from your development pc, make really sure that it does exist on a new computer.
|
|
|
|
|
I have a problem with configuration files (Windows Forms application).
I'm developing an application, that is supposed to be using plug-ins. Plug-ins are enclosed into a dll, that is put into 'plugins' subdirectory in the application root. Each plug-in can have it's own setting, so to make it comfortable to use I want to have configuration of each plug-in in separate config file (for example when plugin1.dll needs some settings it is stored in the plugin1.dll.config).
I wanted to access configuration through the config section (I don't like the "settings" section and it doesn't work for some of my scenarios).
I have now class Plugins.Plugin1.Settings that derives from ConfigurationSection and a section in the app.config that points to this type. I point this type with fully qualified name (I mean with assembly name: 'Plugins.Plugin1.Settings, Plugins.Plugin1').
Everything seems fine. I copy Plugins.Plugin1.dll and Plugins.Plugin1.dll.config to 'plugins' directory and run the application. When I try to access settings I get exception saying, that there was an error creating configuration section module, because assembly Plugins.Plugin1 or one of it's dependencies could not be loaded.
Stupid thing about this (for me) is that the code, where exception is thrown from inside the Plugins.Plugin1 code.
I suppose the problem is that Plugins.Plugin1.dll isn't located inside 'bin', but inside subdirectory, but I can't throw it to bin, cause it isn't part of the main code, it's just an extension. How can I load data from this configuration file? Searched the web all day and didn't find anything usable... maybe I was asking Google the wrong questions
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|