|
It basically comes down to a decision tree when trying to choose between these 2 technologies.
a. If you own both ends of the application (client, server) and it's in a intranet-type environment...
Use Remoting.
b. If you need to interoperate with other technologies, now or in the future...
Use web services. There is a .NET-Java bridge for .NET Remoting, but I'd stay clear of it.
c. If you are designing a services-based architecture that you want to maintain over the next couple of years...
Use web services. It will put you closer to Indigo/Longhorn when pigs fly it is released.
Remember that you could have a SOAP-based web-service that uses email as the binding-type. So, the definition of webservices is a little grey to say the least.
.NET remoting can also work over HTTP and be hosted in IIS.
Also, the WS-x specs are still filtering into the dev. community, so double check your requirements against the specs to make sure you're not going to have to roll-your-own security, etc... if you do choose webservices.
Cheers,
Simon
sig :: "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG blog:: brokenkeyboards
|
|
|
|
|
This document details when to use remoting and when not. Of course, it also needs to be reviewed on a application-by-application basis:
http://www.ingorammer.com/RemotingFAQ/RemotingUseCases.html
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
A casual discussion in regards to the distinction betweeen DataSet and Recordset?
More specifically...
1. DataRelation and Navigation capability
2. Disconnected Vs Connected
Anyone wants to elaborate/add on this? I just want to see if I'm missing something in my understanding of the technologies.
|
|
|
|
|
I have a file open dialog that I use to pick files from two different directories. I am trying to remember the directory so that the user doesn't have to switch directories often.
This code below only remembers the last directory open. The initial directory function doesn't seem to work. I have tried RestoreDirectory function as both true and false. It also doesn't seem to work.
Any ideas as to what I am doing wrong?
The code snippet
<br />
Stream myStream;<br />
string pickedFile = "";<br />
<br />
openFileDialog.Title = "Locate Tranlator Directory";<br />
openFileDialog.Filter = "Fanuc Translators (*.exe)|*.exe|All files (*.*)|*.*" ;<br />
if(!Directory.Exists(transDir))<br />
{<br />
transDir = "";<br />
}<br />
openFileDialog.FilterIndex = 1 ;<br />
openFileDialog.RestoreDirectory = false ;<br />
openFileDialog.InitialDirectory = transDir;<br />
<br />
if(openFileDialog.ShowDialog() == DialogResult.OK)<br />
{<br />
if((myStream = openFileDialog.OpenFile())!= null)<br />
{<br />
pickedFile = openFileDialog.FileName.ToString();<br />
transDir = Path.GetDirectoryName(pickedFile);<br />
}<br />
}<br />
/code> <br />
<br />
<small>Jeff Patterson<br />
Programmers speak in Code.<br />
<a href="http://www.anti-dmca.org">http:
</small>
|
|
|
|
|
Does anyone know if this is available in C#. I know you can download the exe and call it from C# but this won't give you any "progress" info on how far a long you are on the encoding process ..
Anyone ? Is there a .NET lib for this yet ?
|
|
|
|
|
I have Class A with Properties Foo and Bar and
Class B which has an indexer to an Array of Class A objects.
I have a button for each element in B's array of A's.
I want to refer to these A objects through the Tag property of each button:
<br />
private B b = new B(2);<br />
<br />
button1.Tag = b[0];<br />
button2.Tag = b[1];<br />
I think my problem lies in the fact that many times the elements in the array will be null, which leaves the tags as null. I would like the tag, however, to refer to the space in the array in the Class B object, so I can do something like :
<br />
(A)button1.Tag = new A(FOO, BAR);<br />
thereby creating a new Class A object within b's array. Along with this I would like to be able to set the properties like:
<br />
((A)button2.Tag).Foo = NEWFOO;<br />
I come from C++ so I always think in pointers. Do I need pointers to do this, or just a different approach?
Tym!
|
|
|
|
|
1) When my app is running a large process it freezes up the app so that you can't move it or minimize it, etc. until the process is done. How do you avoid this. I tried threads and that didn't seem to do it, is there a function to the give control back to the app like repaint or something
2) I have a paragraph of text that I need to escape chr(10) and chr(13) characters from. How would you do this using the string.replace function?
Thanks in advance, sorry for the lame questions, still learning.
-Brent
|
|
|
|
|
Greets,
It is annoying when your UI isn't repainting when performing lengthy operations. However, Application.DoEvents() may do the trick for sending the appropriate messages required to repaint.
In C#, "\r\n" is the same as the chr(10) and chr(13) pair. That is what they are if you need to find them. "\r" is chr(10) (carriage return) and "\n" is newline. In the old days, a person that didn't send a newline really made things difficult to read.
BTW, the .NET library has a platform specific way of using a carriage return / newline pair, that's using the System.Environment.Newline property.
Regards,
Joe
|
|
|
|
|
bscott3125 wrote:
1) When my app is running a large process it freezes up the app so that you can't move it or minimize it, etc. until the process is done. How do you avoid this. I tried threads and that didn't seem to do it, is there a function to the give control back to the app like repaint or something
Your program is currently single threaded. When you are preforming lenghty operations your application will not perform UI operations. To prevent this, you can run lengthy operations on a separate thread.
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
Jared is proberly right about your app being single threaded. If you are absolutely shure you have tried multiple threading and the problem is still there, you encountered another problem.
In this case it's very likely your 'large process' is eating up all the system cpu resource. This does cause other applications to hang too and you will probably only have acces to the windows task manager. At least untill you process has finished.
To avoid this kind of problem, you will probably have to lower the process priority of your 'large process' its threat. I don't exactly know how to do this in C#.NET.
I hope this helps you a little further, but be shure to check first whether or not your app is really multi threathed.
|
|
|
|
|
Hello,
1. when adding an ActiveX on a .NET WinForm one or more dlls will be created and added to project. can somebody please explain what are these dlls and what do they do?
2. If there is some version of an ActiveX on a system and my app uses another version (newer or older) of the same ActiveX, what happens if I install and register my version on that system for my app?
will some sort of conflict occur??
thank you
|
|
|
|
|
Hi,
From what I have seen, the DLLs created are the generated interop assemblies used to access the COM object your project uuses. It looks like .NET adds a (arguably) nice wrapper object over COM in order to marshall the calls between the managed code and the component in use.
Not all questions answered, sorry.
Regards,
Joe
|
|
|
|
|
1) These are called interop assemblies. Interop assemblies are the bridge between the .NET world and the unmanaged world. As you can figure out, interop assemblies forward back and forth COM method calls.
Dropping an ActiveX control onto a form is like using the aximp.exe tool from the command line. It imports the type library and then creates one or more dll files, usually 2 with ActiveX components (and only one for a simple "non-visual" COM component).
2) Since the interop assemblies only forward method calls, including the component creation steps, versioning is not worse nor better. The component is eventually instantiated based on its clsid, that's why your .NET code will always try to create that component, not a more recent one.
RSS feed
|
|
|
|
|
Regards,
How can I set an icon for my UserControl dll so that when adding it into the toolbox it represents its custom icon instead of that default icon?
Appreciates,
- nSun
- -- --- ----- --- -- -
"Art happens when you least expect it"
|
|
|
|
|
Add the following attribute above the your class declaration:
[ToolboxBitmap(typeof(YourNamespace.YourClassName), "YourImage.bmp")]
-Nick Parker
DeveloperNotes.com
|
|
|
|
|
Thank you Nick it works but:
Colors are damaged and ugly in the it's icon while in toolbox, can you tell me the correct format/color number that the bitmap should use?
|
|
|
|
|
Two things, make sure the bitmap or icon is 16x16 and the color green is used as the transparency color (i.e. RGB(0,255,0)). HTH
-Nick Parker
DeveloperNotes.com
|
|
|
|
|
How can I Modify registry keys with C#?
|
|
|
|
|
Look at the Microsoft.Win32.Registry and Microsoft.Win32.RegistryKey classes.
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
<br />
operator float() { return m_fNum; }<br />
I am working on a port from C++ to C# of an AI method. But I found this method and don't know how to port this one to C#. Anyone does?
Greetings....
|
|
|
|
|
Hi Willem,
It looks like an overloaded cast operator. You'd probably want to consider using a 'Single' data type first of all in C#, but when it comes to the code using "(float)MyClass" on your particular class, you'd probably want to replace that with a method call or property that returns the single-point floating result.
Regards,
Joe
|
|
|
|
|
MultiThread wrote:
but when it comes to the code using "(float)MyClass" on your particular class, you'd probably want to replace that with a method call or property that returns the single-point floating result.
Why wouldn't he just keep it as an overloaded cast operator?
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
Hi David,
He probably could, but that would be due to my ignorance. I did some research and found that the cast operator in C# can't be overloaded, but that C# did allow the use of "explicit" and "implicit" as keywords to allow for that sort of behavior.
Regards,
Joe
|
|
|
|
|
I found the solution
<br />
public static explicit operator float(Fuzzy f1)<br />
{<br />
return f1.fuzzNum;<br />
}<br />
You can then do this:
<br />
float x;<br />
Fuzzy y = new Fuzzy(56.34);<br />
<br />
x = (float)y;
Greetings....
|
|
|
|
|
Cool...glad we could help. Although, you may want to use operator overloading sparingly. Only use it when it makes sense to have an object cast to another object...etc.
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|